【问题标题】:BGP Protocol configuration between two VPC两个 VPC 之间的 BGP 协议配置
【发布时间】:2022-08-04 00:33:00
【问题描述】:

我需要通过 SFP 光纤在两个网络之间配置交叉连接。 不幸的是,我是 BGP 配置的新手,需要确认我正在以正确的方式进行操作......

我有两个 VPC:

  • 专有网络 A: ASN 200 IP路由器:169.254.250.1 子网:10.0.0.1/34

  • 专有网络 B: ASN 100 IP路由器:169.254.250.2 4台服务器:169.254.131.1 / 169.254.131.2 / 169.254.131.3 / 169.254.131.4

VPC A 已完全配置,我购买了 Cisco 路由器 C1113-8PM 来配置我的 VPC B。我的目标是确保 VPC A 上的任何服务器都可以通过 BGP 访问我位于 VPC B 中的 4 台服务器。

我开始写入 VPC B 路由器的程序:

#Configure ASN VPC B on Router
enable
configure terminal
router bgp 100
bgp router-id 169.254.250.2
timers bgp 70 120
end

# Configure ASN VPC A and routes
configure terminal
neighbor 169.254.250.1 remote-as 200
address-family ipv4 unicast
neighbor 169.254.250.1 activate
end

够了吗?我需要将我的 VPC B 的每个 IP 地址设置到 BGP 表中吗?如何 ?

    标签: cisco-ios bgp


    【解决方案1】:

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

    网络图

    启用此对等互连需要两个重要命令:

    • 对等网关:vPC 对等网关功能允许 vPC 交换机充当发送到 vPC 对等路由器 MAC 地址的数据包的活动网关
    • 第 3 层对等路由器:发往对等方的数据包的 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
    !
    

    核实

    下面是 show bgp ipv4 单播邻居的输出。它验证:

    • BGP 邻居关系建立且稳定
    • 在外部邻居之间启用 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/docs/ip/ip-routing/217099-ebgp-peering-over-vpc-on-nexus.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-10
      • 2018-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-04
      相关资源
      最近更新 更多