Cisco - BGP
Alasta 10 Octobre 2015 cisco cisco ccnp route cli
Description : Nous allons parler de BGP sur Cisco ainsi que de son implémentation.
Introduction :
BGP (Border Gateway Protocol), différents cas d’utilisation :
- Le client annonce ses réseaux publiques au(x) ISPs
- L’ISP annonce à son client une route par défaut, tous les réseaux d’Internet ou une partie
- Echange de routes entre deux AS
Quatre type d’utilisations :
- Single homed
- 1 ISP
- 1 connection à l’ISP
- Dual-homed
- 1 ISP
- 2 connctions à l’ISP
- Multi-homed
- plusieurs ISPs
- 1 connection par ISP
- Dual-multi-homed
- plusieurs ISPs
- 2 connections par ISP
Informations/Fiche sur BGP :
- Protocol standard
- C’est un EGP
- Protocol Distance Vector (Path cector)
- Administrative Distance : 20 pour eBGP et 200 pour iBGP
- Métrique riche
- Lettre qui identifie BGP dans la table de routage : B
- AS : de 1 à 65535
EGP :
iBGP : relation BGP entre 2 routeurs de la même AS.
eBGP : relation BGP entre 2 routeurs d’AS différentes.
Path Vector :
Mécanisme de prévention de boucle
- BGP ignore les annonces contenant son AS dans l’AS PATH
- en iBGP, il y a un split-horizon ibgp
exemple pour l’AS PATH :
La relation de voisinage :
Comme nous l’avons vu plus haut, il y a 2 types de relations BGP :
- eBGP
- iBGP
Pour différencier une relation eBGP/iBGP dans la configuration il faut regarder l’AS du routeur (router bgp XXX) et le comparé au remote-as des neighbor.
Lorsque les 2 sont identiques c’est qu’il y a une relation iBGP dans le cas contraire c’est eBGP.
Configuration :
eBGP
Configuration R1
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp 1000
R1(config-router)#neighbor 10.1.2.2 remote-as 2000
Configuration R22
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router bgp 2000
R2(config-router)#neighbor 10.1.2.1 remote-as 1000
Vérification
- Début des échanges
R1#sh ip bgp summ
BGP router identifier 11.1.1.1, local AS number 1000
BGP table version is 100, main routing table version 100
7 network entries using 819 bytes of memory
7 path entries using 364 bytes of memory
7/5 BGP path/bestpath attribute entries using 868 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2075 total bytes of memory
BGP activity 17/7 prefixes, 53/46 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.2.2 4 2000 121 157 0 0 0 00:00:01 Active
R1#
=> State/PfxRcd : Active
- Relation de voisinage montée
R1#sh ip bgp summ
BGP router identifier 11.1.1.1, local AS number 1000
BGP table version is 112, main routing table version 112
7 network entries using 819 bytes of memory
7 path entries using 364 bytes of memory
7/5 BGP path/bestpath attribute entries using 868 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2075 total bytes of memory
BGP activity 17/7 prefixes, 59/52 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.2.2 4 2000 137 177 0 0 0 00:00:03 0
Relation de voisinage montée mais l’apprentissage des routes n’est pas fait.
=> State/PfxRcd : 0
- Apprentissage des routes fait :
R1#sh ip bgp summ
BGP router identifier 11.1.1.1, local AS number 1000
BGP table version is 115, main routing table version 115
10 network entries using 1170 bytes of memory
10 path entries using 520 bytes of memory
7/6 BGP path/bestpath attribute entries using 868 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2582 total bytes of memory
BGP activity 17/7 prefixes, 62/52 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.2.2 4 2000 144 186 115 0 0 00:03:06 3
=> State/PfxRcd : 3
Autre
Par défaut, BGP considère que son voisin eBGP est directement connecté (connection avec IP d’interconnexion).
Si ce n’est pas le cas il faut déclaré le neighbor en ebgp-multihop (cas de relation via la loopback).
router bgp 1000
neighbor 10.1.2.2 remote-as 2000
neighbor 10.1.2.2 ebgp-multihop
iBGP
Configration R1
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp 1000
R1(config-router)#neighbor 11.3.3.3 remote-as 1000
R1(config-router)#neighbor 11.3.3.3 update-source Loopback0
Il faut faire le pendant dans la configuration du voisin iBGP.
La commande neighbor A.B.C.D update-source Loopback0, permet de monter le voisinage BGP via la loopback0, l’avantage c’est que dans un réseau maillé si le lien directe tombe, on peut toujours passé par un autre chemin via le routage.
Vérification
R1#sh ip bgp summ
BGP router identifier 11.1.1.1, local AS number 1000
BGP table version is 12, main routing table version 12
11 network entries using 1287 bytes of memory
11 path entries using 572 bytes of memory
8/7 BGP path/bestpath attribute entries using 992 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2875 total bytes of memory
BGP activity 11/0 prefixes, 11/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.2.2 4 2000 17 20 12 0 0 00:11:23 3
11.3.3.3 4 1000 16 21 12 0 0 00:11:47 1
Les échanges BGP :
- Port TCP 179
- BGP version 4
- Hello, par défaut tous les 60 secondes
- Holdtime, par défaut tous les 180 secondes
- configurable avec un min à 0 sec et un max à 65535
router bgp 1000
timers bgp <hello> <holdtime>
- BGP identifier
- router-ID : qui est égal à l’adresse IP la plus grande des interfaces de loopback, s’il n’y a pas de loopback, c’est la plus grande IP des interfaces UP (au moment ou l’on passe la commande router BGP XX).
Etat de la relation de voisinage :
- Idle : je ne sais pas joindre mon voisin
- Active : je connais un chemin pour joindre mon voisin
- Connect : la session TCP est établie (3-way handshake)
- OpenSent : j’ai envoiyé un message OPEN (version BGP, mon AS, mon Holdtime, mon router-ID) et j’attends la réponse
- OpenConfirm : j’ai reçu un message OPEN, je commence à scanner ma table pour décider des annonces à envoyer à mon voisin
- Established : le scan est terminé, je commence à envoyer mes annonces au voisin
Injection de routes dans la table BGP locale :
2 méthodes :
Injection de route
router bgp 1000
network 172.16.21.0 [mask 255.255.255.0]
Identifié par un i dans le champs “origin-code” de la table BGP (visible à côté du PATH dans le show ip bgp).
Redistribution de route
router bgp 1000
redistribute <IGP>
redistribute static
redistribute connected
Identifié par un ? dans le champs “origin-code” de la table BGP.
Spécificité de la commande network
- Dans un IGP (OSPF/EIGRP/RIP)
- Indique les interfaces sur lequel activer l’IGP.
- Dans l’EGP (BGP)
- Indique le réseau à annoncer.
- Sans masque
- BGP annonce le chemin vers le réseau majeur
- en mode auto-summary : si un sous-réseau du réseau majeur est présent dans la table de routage.
- en mode no auto-summary : si le réseau majeur est présent dans la table de routage (mode par défaut).
- BGP annonce le chemin vers le réseau majeur
- Avec masque (exact match)
- BGP annonce le chemin vers le réseau spécifique
- si ce réseau est présent dans la table de routage avec exactement le même masque.
## La métrique
C'est une métrique riche, mais seulement 3 attributs sont obligatoires sur chaque annonce :
- as-path
- liste des AS à traverser pour joindre le réseau.
- attribut vide tant que l'annonce n'est pas sortie de l'AS.
- permet d'éviter les boucles.
- next-hop
- prochain saut
- orign-code
- i : réseau injecté via la commande *network*
- e : non utilisé
- ? : réseau injecté par la commande *redistribute*
*Note :* une fois affectée, l'origin-code ne changera plus.
### Modification de la métrique
- Si l'annonce est envoyée à un voisin eBGP
- as-path : rajout de l'AS local au début de la liste
- next-hop : @IP source de la relation de voisinage
- origin-code : pas de modification
- Si l'annonce est envoyée à un voisin iBGP
- Aucune modification des attributs
- sauf si la route avait été injectée localement
- next-hop : @IP de la source de la relation de voisinage
### Quelles routes sont annoncées
- Toutes les routes ne sont pas annoncées aux voisins.
- Seule la **meilleur** route de chaque destination est annoncée :
- identifiée par **best**
- code : >
- Pas de partage de charge possible
### Critères de sélection de la 'best'
1. next-hop : doit être accessible
2. weight : le plus grand
3. local preference : la plus grande
4. injectée localement
5. as-path : le plus petit
6. origin-code : préférence du i au ?
7. MED : la plus petite
8. eBGP préféré à iBGP
9. iBGP : voisin IGP le plus proche
10. eBGP : chemin le plus ancien
11. router-ID : le plus petit
### La fréquence des annonces
- Les annonces sont regroupées et envoyées en batch :
- iBGP : toutes les 5 secondes
- eBGP : toutes les 30 secondes
Configuration :
router bgp 1000
neighbor A.B.C.D advertisement-interval 10
router bgp 1000
bgp scan-time 5
router bgp 2000
neighbor <IP_du_voisin> weight <Valeur>
route-map W1
set weight 100
route-map W2
set weight 200
router bgp 2000
neighbor <IP_du_voisin_1> route-map W1
neighbor <IP_du_voisin_2> route-map W2
router bgp 2000
neighbor <IP_du_voisin> remote-as 1000
bgp default local-preference 200
route-map LC200
set local-preference 200
router bgp 2000
neighbor <IP_du_voisin> remote-as 1000
neighbor <IP_du_voisin> route-map LC200 in
access-list 1 permit 9.9.9.9
route-map LC200-9.9.9.9 permit 10
match ip address 1
set local-preference 200
route-map LC200-9.9.9.9 permit 20
router bgp 1000
neighbor <IP_du_voisin> remote-as 2000
neighbor <IP_du_voisin> route-map LC200-9.9.9.9 in
route-map ASPP
set as-path prepend 4000 4000 4000
router bgp 4000
neighbor <IP_R1> remote-as 1000
neighbor <IP_R1> route-map ASPP out
neighbor <IP_R3> remote-as 3000
route-map ASPP
set as-path prepend last-as 3
router bgp 1000
neighbor <IP_voisin_a_plomber> remote-as 2000
neighbor <IP_voisin_a_plomber> route-map ASPP in
! Sur R4-1
route-map M41
set metric 41
router bgp 1000
neighbor <IP_R3> remote-as 3000
neighbor <IP_R3> route-map M41 out
! Sur R4-3
route-map M43
set metric 43
router bgp 1000
neighbor <IP_R3> remote-as 3000
neighbor <IP_R3> route-map M43 out
! ou en global pour toutes les annonces :
router bgp 1000
default-metric 41
router bgp 1000
neighbor <IP_du_voisin> remote-as 2000
neighbor <IP_du_voisin> soft-reconfiguration inbound
! sur R1-1
ip access-list standard net01
permit 10.0.0.0 0.0.0.255
permit 10.0.1.0 0.0.0.255
ou
permit 10.0.0.0 0.0.1.255
route-map med-r1-1
match ip address net01
set metric 50
route-map med-r1-1 permit 20
set metric 200
router bgp 1000
neighbor 2.1.2.1 remote-as 2000
neighbor 2.1.2.1 route-map med-r1-1 out
! sur R1-2
ip access-list standard net23
permit 10.0.2.0 0.0.0.255
permit 10.0.3.0 0.0.0.255
ou
permit 10.0.2.0 0.0.1.255
route-map med-r1-2
match ip address net23
set metric 50
route-map med-r1-2 permit 20
set metric 200
router bgp 1000
neighbor 2.2.2.2 remote-as 2000
neighbor 2.2.2.2 route-map med-r1-2 out
AS Path | Regex | Nb Match |
---|---|---|
65001 3331 **22**33 11333 | 22 | 1 |
65001 **33**31 **2233** 11**33**3 | 22|33 | 4 |
6**5**00**1 3331 2233 11333** | [1235] | 15 |
6500**1 3331 2233 11333** | [1-4] | 14 |
6500**1 3**331 **223**3 **113**33 | [1-3].3 | 3 |
**65**001 3331 2233 11333 | ^65 | 1 |
65001 3331 2233 11333 | ^33 | 0 |
65001 3331 2233 113**33** | 33$ | 1 |
65001 3331 2233 11333 | _33_ | 0 |
65001 3331 2233 11333 | _33 | 1 |
65001 **333**1 22**33** 11**333** | 3+ | 3 |
. | tout caractères |
* | 0 ou plusieurs fois |
+ | 1 ou plusieurs fois |
? | 0 ou 1 fois |
^ | début de chaîne |
$ | fin de chaîne |
_ | tout délimiteur (virgule, espace, tabulation, début, fin) |
\ | protection du caractère suivant |
[ ] | 1 des caractères |
| | fonction OU |
( ) | un groupe |
{3} | quantifié 3 fois |
{1,3} | quantifié de 1 à 3 fois |
_100_ | Prefix qui traverse l'AS 100 |
^100$ | Prefix généré par l'AS 100 et qui est directement connectée à mon AS |
^100_ | Prefix annoncé par mon voisin AS 100 |
_100$ | Prefix qui a été généré par l'AS 100 |
^[0-9]+$ | Tout prefix ne contenant qu'un AS |
^$ | Prefix généré par mon AS |
.\* | Tout prfix |
^([0-9]+)(_\1)\*$ | Tout prefix répété X ou X X ou X X X ... |
Router#show ip bgp regex ^([0-9]+)(_\1)*$| b Net
BGP table version is 87, local router ID is 172.217.43.6
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
*> 1.1.1.1/32 172.22.83.1 0 4321 4321 4321 ?
router bgp 1000
! Annonces l'aggrégat de route si un des réseaux est présent dans la table de routage
aggregate-address 10.0.0.0 255.0.0.0 summary-only
! La différence avec la précédente commande c'est qu'il annonce l'aggrégation et les réseaux.
aggregate-address 10.0.0.0 255.0.0.0
router bgp <AS>
! si l'AS du voisin est égale à l'AS locale c'est une relation iBGP dans le cas contraire c'est de l'eBGP
neighbor <IP_du_voisin> remote-as <AS_du_voisin>
! utiliser une interface particulère pour monter la relation (par défaut c'est l'ip de l'interface du voisin).
neighbor <IP_du_voisin> update-source <Interface local>
! dans le cas ou l'IP du routeur n'est pas sur l'interface directement connecté au voisin
neighbor <IP_du_voisin> ebgp-multihop
! injection de routes dans la table BGP
network <sous-réseau> [mask <masque_de_sous-réseau>]
! redistribution de routes dans la table BGP
redistribute <Type_de_routes> [metric <metric> route-map <Nom_route-map>]
!!Optionnelle
! Modification des timers
timers bgp <hello> <holdtime>
! Modification de la fréquence des annonces
neighbor <IP_du_voisin> advertisement-interval <Interval_en_secondes>
! Modification de l'interval de scan de la table BGP pour l'insertion dans la table de routage
bgp scan-time <Interval_en_secondes>
! Autoriser/forcer le set du next-hop dans les annonces iBGP avec un voisin iBGP.
neighbor <IP_du_voisin_iBGP> next-hop-self
! Modification du weight
neighbor <IP_du_voisin> weight <Valeur>
! ou via route-map
neighbor <IP_du_voisin> route-map W1
! Modification de la local preference (global à toutes les reception d'annonces eBGP)
bgp default local-preference 200
! ou via route-map
neighbor <IP_du_voisin> route-map LC200 in
! Modification de l'AS-Path via route map
! route-map ASPP
! set as-path prepend <AS_local> <AS_local> ...
neighbor <IP_du_voisin> route-map ASPP out
! Modification de la MED via route-map
! route-map M60
! set metric 60
neighbor <IP_du_voisin> route-map M60 out
! ou en global
default-metric 60
! Modification de traffic avec l'AS-PATH
! ip as-path access-list 1 permit _2000$
! route-map ASFilter
! match as-path 1
neighbor <IP_du_voisin> route-map ASFilter in
! Filtrage des annonces :
! selon l'AS
! ip as-path access-list 1 permit \REGEX\
! ip as-path access-list 1 deny ...
! Filtrage des annonces reçues du voisin
neighbor <IP_du_voisin> filter-list 1 in
! Filtrage des annonces envoyées au voisin
neighbor <IP_du_voisin> filter-list 1 out
! selon des réseaux
! ip prefix-list \NAME\ permit ...
! ip prefix-list _NAME_ deny ...
! Filtre les annonces reçues du voisin
neighbor <IP_du_voisin> prefix-list _NAME_ in
! Filtre les annonces envoyées au voisin
neighbor <IP_du_voisin> prefix-list _NAME_ out
! selon divers paramètres
! route-map DIVERS permit 10
! match ip-adress ...
! route-map DIVERS deny 20
! match ip address prefix-list ...
! route-map DIVERS permit 30
! match as-path ...
! Filtre les annonces reçues du voisin
neighbor <IP_du_voisin> route-map DIVERS in
! Filtre les annonces envoyées au voisin
neighbor <IP_du_voisin> route-map DIVERS out
! Aggrégation de routes
aggregate-address 10.0.0.0 255.0.0.0 summary-only
! Ajout de la soft-configuration
neighbor <IP_du_voisin> soft-reconfiguration inbound
R1#sh ip bgp
BGP table version is 16, local router ID is 11.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
*> 1.1.1.0/24 0.0.0.0 0 32768 i
*> 4.4.4.4/32 10.1.2.2 0 0 2000 i
*>i5.5.5.5/32 11.3.3.3 0 100 0 i
*> 9.9.9.9/32 10.1.2.2 0 2000 ?
*> 10.0.0.0 0.0.0.0 32768 i
s> 10.1.2.0/24 0.0.0.0 0 32768 ?
s> 10.1.3.0/24 0.0.0.0 0 32768 ?
s> 10.3.4.0/24 10.1.3.3 1 32768 ?
*> 11.1.1.1/32 0.0.0.0 0 32768 ?
*> 11.3.3.3/32 10.1.3.3 1 32768 ?
*> 11.4.4.4/32 10.1.3.3 2 32768 ?
*> 25.2.5.0/24 10.1.2.2 0 2000 ?
R1#sh ip bgp summary
BGP router identifier 11.1.1.1, local AS number 1000
BGP table version is 16, main routing table version 16
12 network entries using 1404 bytes of memory
12 path entries using 624 bytes of memory
9/8 BGP path/bestpath attribute entries using 1116 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3168 total bytes of memory
BGP activity 12/0 prefixes, 12/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.2.2 4 2000 67 77 16 0 0 01:01:05 3
11.3.3.3 4 1000 65 72 16 0 0 01:01:07 1
R1#sh ip bgp neighbors [IP-voisin]
BGP neighbor is 10.1.2.2, remote AS 2000, external link
BGP version 4, remote router ID 11.2.2.2
BGP state = Established, up for 01:03:00
Last read 00:00:00, last write 00:00:00, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 13 2
Keepalives: 65 65
Route Refresh: 0 1
Total: 79 69
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 16, neighbor version 16/0
Output queue size : 0
Index 2, Offset 0, Mask 0x4
2 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 6 3 (Consumes 156 bytes)
Prefixes Total: 15 3
Implicit Withdraw: 6 0
Explicit Withdraw: 3 0
Used as bestpath: n/a 3
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Bestpath from this peer: 6 n/a
Suppressed due to dampening: 6 n/a
Total: 12 0
Number of NLRIs in the update sent: max 3, min 1
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 10.1.2.1, Local port: 36269
Foreign host: 10.1.2.2, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3A5538):
Timer Starts Wakeups Next
Retrans 71 0 0x0
TimeWait 0 0 0x0
AckHold 67 40 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3709893137 snduna: 3709895103 sndnxt: 3709895103 sndwnd: 15985
irs: 3126996070 rcvnxt: 3126997477 rcvwnd: 14978 delrcvwnd: 1406
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: active open, nagle
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 114 (out of order: 0), with data: 68, total data bytes: 1406
Sent: 112 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 70, total data bytes: 1965
BGP neighbor is 11.3.3.3, remote AS 1000, internal link
BGP version 4, remote router ID 11.3.3.3
BGP state = Established, up for 01:03:13
Last read 00:00:13, last write 00:00:13, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 8 1
Keepalives: 65 65
Route Refresh: 0 0
Total: 74 67
Default minimum time between advertisement runs is 0 seconds
For address family: IPv4 Unicast
BGP table version 16, neighbor version 16/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 8 1 (Consumes 52 bytes)
Prefixes Total: 11 1
Implicit Withdraw: 0 0
Explicit Withdraw: 3 0
Used as bestpath: n/a 1
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Bestpath from this peer: 1 n/a
Suppressed due to dampening: 3 n/a
Total: 4 0
Number of NLRIs in the update sent: max 3, min 1
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255
Local host: 11.1.1.1, Local port: 179
Foreign host: 11.3.3.3, Foreign port: 56609
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3A7194):
Timer Starts Wakeups Next
Retrans 69 0 0x0
TimeWait 0 0 0x0
AckHold 67 63 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 1233415379 snduna: 1233417119 sndnxt: 1233417119 sndwnd: 16270
irs: 136954806 rcvnxt: 136956143 rcvwnd: 16137 delrcvwnd: 247
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
IP Precedence value : 6
Datagrams (max data segment is 536 bytes):
Rcvd: 81 (out of order: 0), with data: 67, total data bytes: 1336
Sent: 136 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 70, total data bytes: 1739
R1#sh ip bgp neighbors 11.3.3.3 advertised-routes
BGP table version is 16, local router ID is 11.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
*> 1.1.1.0/24 0.0.0.0 0 32768 i
*> 4.4.4.4/32 10.1.2.2 0 0 2000 i
*> 9.9.9.9/32 10.1.2.2 0 2000 ?
*> 10.0.0.0 0.0.0.0 32768 i
*> 11.1.1.1/32 0.0.0.0 0 32768 ?
*> 11.3.3.3/32 10.1.3.3 1 32768 ?
*> 11.4.4.4/32 10.1.3.3 2 32768 ?
*> 25.2.5.0/24 10.1.2.2 0 2000 ?
Total number of prefixes 8
R1#sh ip bgp neighbors 11.3.3.3 route
BGP table version is 16, local router ID is 11.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
*>i5.5.5.5/32 11.3.3.3 0 100 0 i
Total number of prefixes 1
R1#sh ip bgp neighbors 11.3.3.3 received-routes
BGP table version is 16, local router ID is 11.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
*>i5.5.5.5/32 11.3.3.3 0 100 0 i
Total number of prefixes 1
R2#sh ip bgp rib-failure
Network Next Hop RIB-failure RIB-NH Matches
25.2.5.0/24 25.2.5.5 Higher admin distance n/a
R1#sh ip bgp update-group
BGP version 4 update-group 1, internal, Address Family: IPv4 Unicast
BGP Update version : 16/0, messages 0
Update messages formatted 8, replicated 0
Number of NLRIs in the update sent: max 3, min 1
Minimum time between advertisement runs is 0 seconds
Has 1 member (* indicates the members currently being sent updates):
11.3.3.3
BGP version 4 update-group 2, external, Address Family: IPv4 Unicast
BGP Update version : 16/0, messages 0
Update messages formatted 13, replicated 0
Number of NLRIs in the update sent: max 3, min 1
Minimum time between advertisement runs is 30 seconds
Has 1 member (* indicates the members currently being sent updates):
10.1.2.2
R2#sh ip bgp 5.5.5.5/32
BGP routing table entry for 5.5.5.5/32, version 40
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1 2
1000
9.9.9.4 from 9.9.9.4 (11.4.4.4)
Origin IGP, localpref 100, valid, external
1000
10.1.2.1 from 10.1.2.1 (11.1.1.1)
Origin IGP, localpref 100, valid, external, best
R2#sh ip bgp 5.5.5.5/32 bestpath
BGP routing table entry for 5.5.5.5/32, version 40
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1 2
1000
10.1.2.1 from 10.1.2.1 (11.1.1.1)
Origin IGP, localpref 100, valid, external, best
! Suppression des routes du voisin, AS ou autre et ré-initialisation de la relaton de voisinage
clear ip bgp < IP_voisin | numéro_AS | * | external >
! On redemande au voisin la table BGP sans reset de la relation de voisinage
! 2 comportements :
! - si soft-reconfiguration de positionné, on recharge la table qui vient de la mémoire
! - sinon redemande au voisin
clear ip bgp <IP_voisin> soft in
! renvoi le annonces BGP (pas vu en lab)
clear ip bgp <IP_voisin> soft out