两个VPC之间的BGP协议配置

发布于 2025-01-19 17:15:58 字数 1575 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

留一抹残留的笑 2025-01-26 17:15:58

目标拓扑和配置应如下所述,如下所述

网络图

“网络图”

需要两个重要命令来启用此对面:

  • peer-gateway: VPC Peer-网关功能允许VPC开关充当vpc peer
  • layer3 peer-router的介绍到路由器MAC地址的数据包的活动网关:对ttl ttl的数据包没有更改,该数据包的数据包发给对等,外部设备也将VPC域从图层路由协议对等角度看作是单个物理实体。

配置

Leaf 1:
! Form the vPC domain:
vpc domain 1
  peer-switch
  role 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
!

验证

以下是显示BGP IPv4 Unicast邻居的输出。它验证了:

  • 建立BGP Neighborship,并且
  • 在外部邻居之间启用了稳定的BFD

故障排除

以下命令将有助于验证操作:

show vpc
show vpc consistency-parameters global
show vpc consistency-parameters interface <interface>
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast summary

参考。 https://www.cisco.com/c/en/us/support/support/ip/ip/ip/ip/ip/ip/ip/ip-routing/217099-ebgp-peering-over-over-vpc-vpc-on-nexus.html

Targeted topology and config should be as I described below

Network Diagram

Network Diagram

Two important commands are needed to enable this peering:

  • Peer-gateway : The vPC peer-gateway functionality allows a vPC switch to act as the active gateway for packets that are addressed to the router MAC address of the vPC peer
  • layer3 peer-router : no change for TTL of packets destined to the peer, external device sees the vPC domain as single physical entity from layer route protocol peering perspective as well.

Configurations

Leaf 1:
! Form the vPC domain:
vpc domain 1
  peer-switch
  role 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
!

Verify

Below is output of show bgp ipv4 unicast neighbors. It verifies that:

  • BGP neighborship is established and stable
  • BFD is enabled between external neighbors

Troubleshoot

Following commands will help verify operation:

show vpc
show vpc consistency-parameters global
show vpc consistency-parameters interface <interface>
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast summary

Ref. https://www.cisco.com/c/en/us/support/docs/ip/ip-routing/217099-ebgp-peering-over-vpc-on-nexus.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文