Introduction
Ce document décrit comment configurer et vérifier l'appairage eBGP (eBorder Gateway Protocol) entre la paire Nеxus vPC et un autre périphérique. La configuration sur le périphérique externe s'affiche sous la forme Cisco CLI NX-OS pour plus de clarté.
Conditions préalables
Exigences
Cisco vous recommande de prendre connaissance des rubriques suivantes :
Composants utilisés
Les informations contenues dans ce document sont basées sur les versions de matériel et de logiciel suivantes :
leaf1# |
C93108TC-FX |
NXOS 9.3(3) |
leaf2# |
C93108TC-FX |
NXOS 9.3(3) |
Périphérique externe |
N9K-C9396PX |
NXOS : version 9.2(3) |
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. Si votre réseau est en ligne, assurez-vous de bien comprendre l’incidence possible des commandes.
Informations générales
Les protocoles de routage (OSPF, ISIS, RIP, EIGRP, BGP) s'appairent entre une paire vPC et un périphérique externe. Cette fonctionnalité est prise en charge à l'adresse suivante : https://www.cisco.com/c/en/us/support/docs/ip/ip-routing/118997-technote-nexus-00.html. Cet article décrit des notes supplémentaires et des exemples de configuration pour eBGP en tant que protocole de routage.
Plusieurs problèmes se posent lors de la tentative d'activation de l'appairage de protocole de routage sur un vPC, qui n'existent pas lors de l'utilisation de
port-channel standard :
- Il n'est pas déterministe quel membre du port-channel le périphérique externe utilisera pour transférer le trafic pour chaque adresse MAC. Il est possible que le périphérique externe envoie des paquets BGP pour Leaf-1 sur la liaison vers Leaf-1. Lorsque Leaf-1 le reçoit, il le transfère au processeur et l'élimine (pas son adresse IP), de sorte que BGP (monodiffusion) ou un autre protocole (multidiffusion) est constamment instable. Aide la commande peer-gateway.
- Même avec la commande peer-gateway, la durée de vie sera réduite sur un tel paquet. La nouvelle commande dans NX-OS - layer3 peer-router désactive cela.
- iBGP entre les deux membres vPC est nécessaire pour obéir à la règle BGP pour iBGP entre tous les voisins. Nous exécutons vrf interne côté vPC, donc seuls ces deux membres doivent exécuter iBGP. Cette fonction est également nécessaire en cas de défaillance de la liaison vers le reste du réseau NX-OS (VXlan ou autre) et assure la redondance.
Configurer
Diagramme du réseau
Deux commandes importantes sont nécessaires pour activer cet appairage :
Configurations
Leaf 1:
! Form the vPC domain:
vpc domain 1
peer-switch
r
ole priority 10 peer-keepalive destination 192.0.2.2 source 192.0.2.1 peer-gateway layer3 peer-router ipv6 nd synchronize ip arp synchronize
!
!vPC peer-link interface members
interface Ethernet1/53 - 54
description vPC-Peerlink member
switchport
switchport mode trunk
channel-group 11 mode active
no shutdown
!
! vPC peer-link port-channel
interface port-channel11
description vPC-peerlink
switchport
switchport mode trunk
spanning-tree port type network
no shutdown
vpc peer-link
!
! vPC port-channel member to External Device
interface Ethernet1/52
description ExternalDevice Eth2/13
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
channel-group 12 mode active
no shutdown
!
! vPC port-channel to External Device
interface port-channel12
description vPC port-channel to External Device
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
vpc 12
!
! Layer 3 interface to the Eternal device:
interface Vlan205
no shutdown
vrf member Customer
! BFD for eBGP
bfd interval 500 min_rx 500 multiplier 3
! Disable bfd echo, as it is not supported over vPC
no bfd echo
no ip redirects
! We use/29 as we need 3 ip address, one per each member of the ! vPC domain and 3rd for the External Device
ip address 198.51.100.1/29 tag 800204
! Disable redirects - this is needed to enable BFD
no ipv6 redirects
!
router bgp 65535
router bgp 65535
router-id 203.0.113.1
log-neighbor-changes
address-family ipv4 unicast
Customer router-id 198.51.100.1 address-family ipv4 unicast neighbor 198.51.100.2 description Leaf-2 remote-as 65535 address-family ipv4 unicast soft-reconfiguration inbound always neighbor 198.51.100.3 description to External Device bfd remote-as 65000 update-source Vlan205 address-family ipv4 unicast soft-reconfiguration inbound always !
Leaf 2:
! Form the vPC domain:
vpc domain 1
peer-switch
role priority 10
peer-keepalive destination 192.0.2.1 source 192.0.2.2
peer-gateway
layer3 peer-router
ipv6 nd synchronize
ip arp synchronize
!
!vPC peer-link interface members
interface Ethernet1/53 - 54
description vPC-Peerlink member
switchport
switchport mode trunk
channel-group 11 mode active
no shutdown
!
! vPC peer-link port-channel
interface port-channel11
description vPC-peerlink
switchport
switchport mode trunk
spanning-tree port type network
no shutdown
vpc peer-link
!
! vPC port-channel member to External Device
interface Ethernet1/52
description ExternalDevice Eth2/13
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
channel-group 12 mode active
no shutdown
!
! vPC port-channel to External Device
interface port-channel12
description vPC port-channel to External Device
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
vpc 12
!
! Layer 3 interface to the Eternal device:
interface Vlan205
no shutdown
vrf member Customer
! BFD for eBGP
bfd interval 500 min_rx 500 multiplier 3
! Disable bfd echo, as it is not supported over vPC
no bfd echo
no ip redirects
! We use/29 as we need 3 ip address, one per each member of the ! vPC domain and 3rd for the External Device
ip address 198.51.100.2/29 tag 800204
! Disable redirects - this is needed to enable BFD
no ipv6 redirects
!
router bgp 65535
router bgp 65535
router-id 203.0.113.2
log-neighbor-changes
address-family ipv4 unicast
vrf Customer
router-id 198.51.100.2
address-family ipv4 unicast
neighbor 198.51.100.1
description Leaf-2
remote-as 65535
address-family ipv4 unicast
soft-reconfiguration inbound always
neighbor 198.51.100.3
description to External Device
bfd
remote-as 65000
update-source Vlan205
address-family ipv4 unicast
soft-reconfiguration inbound always
!
External Device (NX-OS style CLI):
interface Ethernet2/13 - 14
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
channel-group 12 mode active
no shutdown
!
interface port-channel12
switchport
switchport mode trunk
switchport trunk allowed vlan 203,205
mtu 9216
no shutdown
!
interface Vlan205
no shutdown
mtu 9216
! See notes in Leaf-1 and Leaf 2 for BFD
bfd interval 500 min_rx 500 multiplier 3
no bfd echo
no ip redirects
ip address 198.51.100.3/29
no ipv6 redirects
!
router bgp 65000
log-neighbor-changes
address-family ipv4 unicast
neighbor 198.51.100.1 remote-as 65535
description to Leaf-1
update-source Vlan205
bfd
neighbor 198.51.100.2 remote-as 65535
description to Leaf-2
update-source Vlan205
bfd
end
!
Vérifier
Voici le résultat de la commande show bgp ipv4 unicast neighbors. Il vérifie que :
- Le voisinage BGP est établi et stable
- BFD est activé entre les voisins externes
Leaf 1/2: show bgp ipv4 unicast neighbors vrf Customer BGP neighbor is 203.0.113.2, remote AS 65535, ibgp link, Peer index 4 BGP version 4, remote router ID 203.0.113.2 Neighbor previous state = OpenConfirm BGP state = Established, up for 6d22h Neighbor vrf: Customer Peer is directly attached, interface Vlan205 Last read 00:00:14, hold time = 180, keepalive interval is 60 seconds Last written 00:00:03, keepalive timer expiry due 00:00:56 Received 10012 messages, 0 notifications, 0 bytes in queue ... BGP neighbor is 203.0.113.2.3, remote AS 65000, ebgp link, Peer index 3 BGP version 4, remote router ID 203.0.113.2 Neighbor previous state = OpenConfirm BGP state = Established, up for 1d00h Neighbor vrf: Customer Using Vlan205 as update source for this peer Peer is directly attached, interface Vlan205 BFD live-detection is configured and enabled, state is Up Last read 00:00:22, hold time = 180, keepalive interval is 60 seconds Last written 00:00:56, keepalive timer expiry due 00:00:03 ! External Device: show bgp ipv4 unicast neighbors BGP neighbor is 203.0.113.1, remote AS 65535, ebgp link, Peer index 3 Inherits peer configuration from peer-template Cust_BGP_Peer BGP version 4, remote router ID 203.0.113.1 BGP state = Established, up for 1d00h Peer is directly attached, interface Vlan205 Enable logging neighbor events BFD live-detection is configured and enabled, state is Up Last read 0.660288, hold time = 180, keepalive interval is 60 seconds Last written 00:00:26, keepalive timer expiry due 00:00:33 Received 10122 messages, 1 notifications, 0 bytes in queue Sent 10086 messages, 1 notifications, 0(0) bytes in queue Connections established 14, dropped 13 Last reset by us 1d00h, due to bfd session down Last reset by peer 6d22h, due to other configuration change ....
Dépannage
Les commandes suivantes permettent de vérifier le fonctionnement :
show vpc show vpc consistency-parameters global show vpc consistency-parameters interface
show bgp ipv4 unicast neighbors show bgp ipv4 unicast summary