可以使用 CLI 从 Tier-0 服务路由器中验证是否建立了到邻居的 BGP 连接。

前提条件

确认配置了 BGP。请参见使用管理器模式在 Tier-0 逻辑路由器上配置 BGP

过程

  1. 登录到 NSX Manager CLI。
  2. NSX Edge 上,运行 get logical-routers 命令以查找 Tier-0 服务路由器的 VRF 编号。
    nsx-edge-1> get logical-routers
    Logical Router
    UUID        : 736a80e3-23f6-5a2d-81d6-bbefb2786666
    vrf         : 0
    type        : TUNNEL
    
    Logical Router
    UUID        : 421a2d0d-f423-46f1-93a1-2f9e366176c8
    vrf : 5
    type        : SERVICE_ROUTER_TIER0
    
    Logical Router
    UUID        : f3ce9d7d-7123-47d6-aba6-45cf1388ca7b
    vrf         : 6
    type        : DISTRIBUTED_ROUTER
    
    Logical Router
    UUID        : c8e64eff-02b2-4462-94ff-89f3788f1a61
    vrf         : 7
    type        : SERVICE_ROUTER_TIER1
    
    Logical Router
    UUID        : fb6c3f1f-599f-4421-af8a-99692dff3dd4
    vrf         : 8
    type        : DISTRIBUTED_ROUTER
    
    
  3. 运行 vrf <number> 命令以进入 Tier-0 服务路由器上下文。
    nsx-edge-1> vrf 5
    nsx-edge1(tier0_sr)> 
    
  4. 验证 BGP 状态是否为 Established, up
    get bgp neighbor
    BGP neighbor: 192.168.100.254   Remote AS: 64511
    BGP state: Established, up
    Hold Time: 180s   Keepalive Interval: 60s
    Capabilities:
             Route Refresh: advertised and received
             Address Family: IPv4 Unicast:advertised and received
             Graceful Restart: none
             Restart Remaining Time: 0
    Messages: 28 received, 31 sent
    Minimum time between advertisements: 30s (default)
    For Address Family IPv4 Unicast:advertised and received
             Route Refresh: 0 received, 0 sent
             Prefixes: 2 received, 2 sent, 2 advertised
    1 Connections established, 2 dropped
    Local host: 192.168.100.3, Local port: 179
    Remote host: 192.168.100.254, Remote port: 33044
    

后续步骤

从外部路由器中检查 BGP 连接。请参见验证 Tier-0 路由器上的南北向连接和路由重新分发