Valeur par défaut de l’administrative distance BGP :
Protocol | Administrative distance |
Directly connected route | 0 |
Static route | 1 |
EIGRP summary route | 5 |
External BGP | 20 |
Internal EIGRP | 90 |
IGRP | 100 |
OSPF | 110 |
IS-IS | 115 |
RIP | 120 |
EGP | 140 |
ODR | 160 |
External EIGRP | 170 |
Internal BGP | 200 |
DHCP-learned | 254 |
Unknown | 255 |
R2#show ip route bgp B 1.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04 B 33.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04 B 3.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04 B 4.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04 B 11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04 B 44.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
Modification de la distance administrative d’un voisin
R2#conf t
R2(config)#router bgp 120
R2(config-router)#distance 150 10.1.23.3 0.0.0.0
Vérification
R2#show ip route bgp B 1.0.0.0/8 [200/0] via 10.1.12.1, 00:00:44 B 33.0.0.0/8 [150/0] via 10.1.23.3, 00:00:44 B 3.0.0.0/8 [150/0] via 10.1.23.3, 00:00:44 B 4.0.0.0/8 [150/0] via 10.1.23.3, 00:00:44 B 11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:44 B 44.0.0.0/8 [150/0] via 10.1.23.3, 00:00:44
Modification de la distance administrative d’un prefix
R2#conf t
R2(config)#access-list 33 permit 33.0.0.0
R2(config)#router bgp 120
R2(config-router)#no distance 150 10.1.23.3 0.0.0.0
R2(config-router)#distance 155 10.1.23.3 0.0.0.0 33
Vérification
R2#show ip route bgp B 1.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04 B 33.0.0.0/8 [155/0] via 10.1.23.3, 00:00:04 B 3.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04 B 4.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04 B 11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04 B 44.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
Modification de la distance administrative par défaut du routeur BGP
« distance bgp » permet de modifier les 3 valeurs de distance administrative par défaut :
- eBGP
- iBGP
- local routes
R2#conf t R2(config)#router bgp 120 R2(config-router)#no distance 155 10.1.23.3 0.0.0.0 33 R2(config-router)#distance bgp 60 90 20 <1-255> Distance for routes external to the AS <1-255> Distance for routes internal to the AS <1-255> Distance for local routes
R2#show ip route bgp B 1.0.0.0/8 [90/0] via 10.1.12.1, 00:00:07 B 33.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07 B 3.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07 B 4.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07 B 11.0.0.0/8 [90/0] via 10.1.12.1, 00:00:07 B 44.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07