Sie sind auf Seite 1von 8

Policy Based Routing

R1
conf t
int fa0/0
ip address 192.168.10.1 255.255.255.0
no shut
R2
int s0/0
ip address 185.42.100.1 255.255.255.248
no shut
int fa0/0
ip address 192.168.10.2 255.255.255.0
no shut
int fa0/1
ip address 172.16.10.1 255.255.255.0
no shut
R3
int fa0/1
ip address 192.168.10.0
ISP1
int fa0/0
ip address 210.11.10.1 255.255.255.0
no shut
int s0/0
ip address 185.42.100.2 255.255.255.248
clock rate 128000
no shut
ISP2
int fa0/0
ip address 210.11.10.2 255.255.255.0
no shut
int s0/1
ip address 205.60.85.2 255.255.255.248
clock rate 128000
no shut
========
network 192.168.10.0/24 should
network 172.16.10.0/244 should
IF ISP links,fails,failover to
Normal Traffic should still be

pass ISP2
pass ISP2
the other ISP
present

Step1
Access List
R2
ip access-list standard net192
permit 192.168.10.0 0.0.0.255
exit
ip access-list standard net172
permit 17.16.10.0 0.0.0.255
exit
ip access-list extended net192to172
permit ip 192.168.10.0 0.0.0.255 172.16.10.0 0.0.0.255
exit

ip access-list extended net172to192


permit ip 172.16.10.0 0.0.0.255 192.168.10.0 0.0.0.255
exit
route-map f0/0Traffic permit 10
match ip address net172to192
set interface fa0/0
exit
route-map f0/0Traffic permit 20
match ip address net172
set interface s0/0
exit
route-map f0/1Traffic permit 10
match ip address net192to172
set int f0/1
route-map f0/1Traffic permit 20
match ip address net192
set int s0/1
exit
Step 3
conf policy
int fa0/0
ip policy route-map f0/0Traffic
exit
int fa0/1
ip policy route-map f0/1Traffic
exit
==========
Test
R1
ip route 0.0.0.0 0.0.0.0 fa0/0
R2
ip route 0.0.0.0 0.0.0.0 fa0/1
ip nat pool NAT1 185.42.100.1 185.42.100.1 netmask 255.255.255.248
access-list 55 permit any
ip nat inside source list 55 pool NAT1 overload
exit
int fa0/0
ip nat inside
exit
int fa0/1
ip nat inside
exit
int s0/0
ip nat outside
exit
int s0/1
ip nat outside
exit
ISP1
router eigrp 100
network 185.42.100.0 0.0.0.7

network 210.11.10.0 0.0.0.255


ISP2
router eigrp 100
network 205.60.85.0 0.0.0.7
network 210.11.10.0 0.0.0.255
===================================
BGP
R1
int Lo1
ip address
int Lo2
ip address
int Lo3
ip address
int Lo4
ip address
int Lo5
ip address
int Lo6
ip address
int lo0
ip address
int s0/1
ip address
no shut
R2
int s0/1
ip address
clock rate
no shut
int Lo1
ip address
int Lo2
ip address
int Lo3
ip address
int lo0
ip address

185.50.83.1 255.255.255.0
186.50.84.1 255.255.255.0
205.67.35.1 255.255.255.240
205.67.35.17 255.255.255.240
138.42.35.1 255.255.255.128
138.42.35.129 255.255.255.128
1.1.1.1 255.255.255.255
185.42.100.2 255.255.255.0

185.42.100.1 255.255.255.0
128000
135.68.100.1 255.255.255.0
106.43.32.1 255.255.224.0
106.43.64.1 255.255.224.0
2.2.2.2 255.255.255.255

=============
EBGP BASIC CONFIGURATION
(1) BP ASN per router only
to config
R1
basic bgp:
router bgp 100
neighbor <ip addyof target router> remote-as 200
or if using static routes:
R1
router bgp 100

neighbor 2.2.2.2 remote-as 200


neighbor 2.2.2.2 update-source loopback 0
neighbor 2.2.2.2 ebgp-multihop 2
exit
R2
router bgp 200
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 ebgp-multihop 2
exit
to advertise netwroks in bgp:
R1
router bgp 100
network 186.50.80.0 mask 255.255.248.0
ip route 186.50.80.0 255.255.248.0 null 0
**create an ip prefix-list
ip prefix-list mga28 permit 205.67.35.0/24 ge 28
**create route-map:
route-map pwede28 permit 10
match ip address prefix-list mga28
exit
**redistribute
router bgp 100
redistribute connected route-map pwede28
exit
======add R3 in the topology
R3
int Lo1
ip address
int Lo2
ip address
int Lo3
ip address
int Lo4
ip address
int s0/0
ip address
no shut
int Lo0
ip address

129.100.52.1 255.255.255.0
129.100.53.1 255.255.255.0
198.52.32.1 255.255.224.0
198.52.64.1 255.255.224.0
201.62.100.2 255.255.255.0
3.3.3.3 255.255.255.255

router bgp 300


neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source loopback 0
neighbor 2.2.2.2 ebgp-multihop 2

R2
int s0/0
ip address 201.62.100.1 255.255.255.0
clock rate 128000
no shut
router brgp 200
neighbor 3.3.3.3 remote-as 300
neighbor 3.3.3.3 update-source loopback 0
neighbor 3.3.3.3 ebgp-multihop 2
===============
IBGP
R4192.168.10.1
int Lo2
ip address 124.105.60.1 255.255.255.0
int s0/0
ip address 192.168.10.2 255.255.255.0
no shut
router brgp 300
neighbor 3.3.3.3 remote-as 300
neighbor 3.3.3.3 update-source loopback 0
R3
router bgp 300
neighbor 4.4.4.4 remote-as 300
neighbor 4.4.4.4 update-source loopback 0
neighbor 4.4.4.4 ebgp-multihop 2
router bgp 300
neighbor 4.4.4.4 remote-as 300
neighbor 4.4.4.4 next-hop-self
exit
ip nat pool NAT2 213.112.10.1 213.112.10.1 netmask 255.255.255.0
access-list 25 permit 192.168.10.0 0.0.0.255
ip nat inside source list 25 pool NAT2 overload
int s0/0
ip nat inside
exit
int s0/1
ip nat outside
exit
===========
R5
int s0/0
ip address 215.62.30.2 255.255.255.0
no shut
int s0/1
ip address 192.168.11.1 255.255.255.0
clock rate 12800
no shut
int Lo0

ip address 5.5.5.5 255.255.255.0


R6
int s0/1
ip address 192.168.11.2 255.255.255.0
no shut
int fa0/0
ip address 192.168.12.2 255.255.255.0
no shut
R4
int fa0/0
ip address 192.168.12.1 255.255.255.0
no shut
R1
int s0/1
ip address 215.62.30.1 255.255.255.0
clock rate 128000
no shut
R5
ip nat pool NAT3 213.12.10.1 213.12.10.1 netmask 255.255.255.0
access-list 10 permit 192.168.8.0 0.0.7.255
ip nat inside source list 10 pool swimmingpool overload
int s0/1
ip nat inside
exit
int s0/0
ip nat outside
exit
erase all static routes:
R1
ip route 2.2.2.2 255.255.255.255 Serial0/0
ip route 185.42.100.0 255.255.255.0 Serial0/1
R2
ip route 1.1.1.1 255.255.255.255 Serial0/0
ip route 3.3.3.3 255.255.255.255 Serial0/1
R3
ip route 2.2.2.2 255.255.255.255 Serial0/1
ip route 4.4.4.4 255.255.255.255 Serial0/0
R4
ip route 3.3.3.3 255.255.255.255 Serial0/0
ip route 12.10.0 255.255.255.254 null0
router bgp 300
netwrok 213.12.10.0 mask 255.255.255.254
exit
router bgp 300
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 ebgp-multihop 2
R5

ip route 213.12.10.0 255.255.255.254 null0


router bgp 300
network 213.12.10.0 mask 255.255.255.254
exit
neighbor 1.1.1.1 next-hop-self
R1
router bgp 100
neighbor 5.5.5.5 remote-as 300
neighbor 5.5.5.5 update-source loopback 0
neighbor 5.5.5.5 ebgp-multihop 2

=======EIGRP
advertise all connected networks
R5
router eigrp 300
network 215.62.30.2 255.255.255.0
network 192.168.11.1 255.255.255.0
network 5.5.5.5 255.255.255.0
R4
router eigrp 300
network 192.168.12.1 255.255.255.0
network 124.105.60.0 255.255.255.0
network 4.4.4.4 255.255.255.0
R6
router eigrp 300
network 192.168.11.2 255.255.255.0
network 192.168.12.2 255.255.255.0
R3
router eigrp 300
network 129.100.52.1 255.255.255.0
network 129.100.53.1 255.255.255.0
network 198.52.32.1 255.255.224.0
network 198.52.64.1 255.255.224.0
network 3.3.3.3 255.255.255.255
network 192.168.10.0 255.255.224.0
R2
router bgp 200
neighbor 3.3.3.3 default-originate
exit
R1
router bgp 100
neighbor 5.5.5.5 default-originate
exit
======
gawing neighbor
R4
router bgp 300
neighbor 5.5.5.5 remote-as 300

neighbor 5.5.5.5 update-source loopback 0


neighbor 5.5.5.5 next-hop-self
R5
router bgp 300
neighbor 4.4.4.4 remote-as 300
neighbor 4.4.4.4 update-source loopback 0
neighbor 4.4.4.4 next-hop-self
R5
router bgp 300
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 ebgp-multihop 2
R1
router bgp 100
neighbor 5.5.5.5 remote-as 300
neighbor 5.5.5.5 update-source loopback 0
* sh ip route eigrp
sh ip route static
sh ip bgp
sh bgp summary
sh bgp neighbor
========
Route reflectors
R4
conf t
router bgp 300
neighbor 5.5.5.5 route-reflector-client
exit

Das könnte Ihnen auch gefallen