Architecture :
Configuration :
R1
router bgp 1
no synchronization
bgp router - id 1.1 . 1.1
bgp log - neighbor - changes
neighbor 10.1 . 3.3 remote - as 3
no auto - summary
router bgp 1
no synchronization
bgp router - id 1.1 . 1.1
bgp log - neighbor - changes
neighbor 10.1 . 3.3 remote - as 3
no auto - summary
R2
router eigrp 12
redistribute connected
network 10.1 . 2.0 0.0 . 0.255
no auto - summary
eigrp router - id 2.2 . 2.2
R3
router bgp 3
no synchronization
bgp router - id 3.3 . 3.3
bgp log - neighbor - changes
neighbor 10.1 . 3.1 remote - as 1
neighbor 10.3 . 4.4 remote - as 4
no auto - summary
R4
router bgp 4
no synchronization
bgp router - id 4.4 . 4.4
bgp log - neighbor - changes
network 10.2 . 4.0 mask 255.255 . 255.0
neighbor 10.3 . 4.3 remote - as 3
no auto - summary
Pour R1, le réseau d’interconnexion entre R2 et R4 et joignable via EIGRP et BGP.
Il serait logique de passer par R2 car il est plus près.
Mais l’Administrative Distance de BGP (ici eBGP) est de 20 qui prend le main sur EIGRP qui est de 170 (car elle est redistibuée).
Table de routage R1
R1 #sh ip route
Codes : C - connected , S - static , R - RIP , M - mobile , B - BGP
D - EIGRP , EX - EIGRP external , O - OSPF , IA - OSPF inter area
N1 - OSPF NSSA external type 1 , N2 - OSPF NSSA external type 2
E1 - OSPF external type 1 , E2 - OSPF external type 2
i - IS - IS , su - IS - IS summary , L1 - IS - IS level - 1 , L2 - IS - IS level - 2
ia - IS - IS inter area , * - candidate default , U - per - user static route
o - ODR , P - periodic downloaded static route
Gateway of last resort is not set
10.0 . 0.0 / 24 is subnetted , 3 subnets
C 10.1 . 3.0 is directly connected , FastEthernet0 / 1
C 10.1 . 2.0 is directly connected , FastEthernet0 / 0
B 10.2 . 4.0 [ 20 / 0 ] via 10.1 . 3.3 , 00 : 04 : 26
On vérifie bien que R1 utilise BGP car son Administratice Distance et inférieure à EIGRP.
Il est possible de changer ce comportement juste pour le réseau choisi.
Configuration :
On va utiliser la fonction backdoor de BGP.
R1
router bgp 1
no synchronization
bgp router - id 1.1 . 1.1
bgp log - neighbor - changes
network 10.2 . 4.0 mask 255.255 . 255.0 backdoor
neighbor 10.1 . 3.3 remote - as 3
no auto - summary
Il faut en revanche le faire par réseau.
Vérification :
R1 #sh ip route
Codes : C - connected , S - static , R - RIP , M - mobile , B - BGP
D - EIGRP , EX - EIGRP external , O - OSPF , IA - OSPF inter area
N1 - OSPF NSSA external type 1 , N2 - OSPF NSSA external type 2
E1 - OSPF external type 1 , E2 - OSPF external type 2
i - IS - IS , su - IS - IS summary , L1 - IS - IS level - 1 , L2 - IS - IS level - 2
ia - IS - IS inter area , * - candidate default , U - per - user static route
o - ODR , P - periodic downloaded static route
Gateway of last resort is not set
10.0 . 0.0 / 24 is subnetted , 3 subnets
C 10.1 . 3.0 is directly connected , FastEthernet0 / 1
C 10.1 . 2.0 is directly connected , FastEthernet0 / 0
D EX 10.2 . 4.0 [ 170 / 284160 ] via 10.1 . 2.2 , 00 : 01 : 36 , FastEthernet0 / 0
R1 #sh ip bgp
BGP table version is 3 , local router ID is 1.1 . 1.1
Status codes: s suppressed , d damped , h history , * valid , > best , i - internal ,
r RIB - failure , S Stale
Origin codes: i - IGP , e - EGP , ? - incomplete
Network Next Hop Metric LocPrf Weight Path
r > 10.2 . 4.0 / 24 10.1 . 3.3 0 3 4 i
Test de perte EIGRP :
Nous allons couper l’interface f0/0 et vérifier que la route BGP prenne la main.
R1 #conf t
Enter configuration commands , one per line . End with CNTL / Z .
R1 ( config ) #int f0/0
R1 ( config - if ) #shutdown
R1 ( config - if ) #end
R1 #
* Mar 1 00 : 10 : 36.095 : % DUAL - 5 - NBRCHANGE : IP - EIGRP ( 0 ) 12 : Neighbor 10.1 . 2.2 ( FastEthernet0 / 0 ) is down: interface down
R1 #sh ip bgp
* Mar 1 00 : 10 : 37.563 : % SYS - 5 - CONFIG_I : Configured from console by console
* Mar 1 00 : 10 : 38.039 : % LINK - 5 - CHANGED : Interface FastEthernet0 / 0 , changed state to administratively down
R1 #sh ip bgp
* Mar 1 00 : 10 : 39.039 : % LINEPROTO - 5 - UPDOWN : Line protocol on Interface FastEthernet0 / 0 , changed state to down
R1 #sh ip route
Codes : C - connected , S - static , R - RIP , M - mobile , B - BGP
D - EIGRP , EX - EIGRP external , O - OSPF , IA - OSPF inter area
N1 - OSPF NSSA external type 1 , N2 - OSPF NSSA external type 2
E1 - OSPF external type 1 , E2 - OSPF external type 2
i - IS - IS , su - IS - IS summary , L1 - IS - IS level - 1 , L2 - IS - IS level - 2
ia - IS - IS inter area , * - candidate default , U - per - user static route
o - ODR , P - periodic downloaded static route
Gateway of last resort is not set
10.0 . 0.0 / 24 is subnetted , 2 subnets
C 10.1 . 3.0 is directly connected , FastEthernet0 / 1
B 10.2 . 4.0 [ 200 / 0 ] via 10.1 . 3.3 , 00 : 00 : 06