NSX Advanced Load Balancer 使用 Quagga 对虚拟服务进行基于 BGP 的缩放。因此,只有在登录到服务引擎的 Quagga 实例时,才能调试或检查 BGP 配置或 BGP 对等体状态。
有关更多信息,请参见如何使用 VMware NSX Advanced Load Balancer CLI 访问和使用 Quagga Shell。
为了使调试变得更容易,您可以从 NSX Advanced Load Balancer 控制器 Shell 中查看这些命令。
使用控制器查看 BGP/BFD 配置
使用您的凭据登录到控制器 Shell,并查看所需的 BGP/BFD 命令,如下所述:
通告的路由
对等状态
对等体信息
运行配置
BFD 会话状态
通告的路由
命令 |
适用的筛选器 |
---|---|
|
|
[admin:1234-ctrl]: > show serviceengine 10.79.168.63 bgp advertised_routes +----------------------+---------------------------------------------------------------------+ | Field | Value | +----------------------+---------------------------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | advertised_routes[1] | | | ipv4_routes | show ip bgp | | | BGP table version is 0, local router ID is 2.146.114.58 | | | Status code | | | s: s suppressed, d damped, h history, * valid, > best, = multipath, | | | | | | i internal, r RIB-failure, S Stale, R Removed | | | Origin codes: i - IGP, e - EGP, | | | ? - incomplete | | | | | | Network Next Hop Metric LocPrf Weight Pat | | | h | | | *> 1.1.1.1/32 0.0.0.0 0 32768 i | | | *> 2.2.2.2/32 | | | 0.0.0.0 0 32768 i | | | | | | Total number of prefixes 2 | | | 10-7 | | | 9-168-63# | | | | | ipv6_routes | show ipv6 bgp | | | No BGP network exists | | | 10-79-168-63# | | | | +----------------------+---------------------------------------------------------------------+ +----------------------+------------------------------+ | Field | Value | +----------------------+------------------------------+ | vrf | seagent-default | | namespace | none | | advertised_routes[1] | | | ipv4_routes | show ip bgp | | | No BGP process is configured | | | 10-79-168-63# | | | | | ipv6_routes | show ipv6 bgp | | | No BGP process is configured | | | 10-79-168-63# | | | | +----------------------+------------------------------+
这是通用的通告路由。要查看特定 VRF 的通告路由,请使用 vrf_ref
筛选器,如下所示:
admin:1234-ctrl]: > show serviceengine 10.79.168.63 bgp advertised_routes filter vrf_ref global +----------------------+-------------------------------------------------------+ | Field | Value | +----------------------+-------------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | advertised_routes[1] | | | peer_ip | 100.64.50.21 | | ipv4_routes | show ip bgp neighbors 100.64.50.21 advertised-routes | | | BGP table version is 0, lo | | | cal router ID is 2.146.114.58 | | | Status codes: s suppressed, d damped, h history, * | | | valid, > best, = multipath, | | | i internal, r RIB-failure, S Stale, R | | | Removed | | | Origin codes: i - IGP, e - EGP, ? - incomplete | | | | | | Network Nex | | | t Hop Metric LocPrf Weight Path | | | *> 1.1.1.1/32 100.64.50.14 | | | 0 100 32768 i | | | | | | Total number of prefixes 1 | | | 10-79-168-63# | | | | | ipv6_routes | show bgp neighbors 100.64.50.21 advertised-routes | | | % No such neighbor or address | | | family | | | 10-79-168-63# | | | | | advertised_routes[2] | | | peer_ip | 100.64.50.3 | | ipv4_routes | show ip bgp neighbors 100.64.50.3 advertised-routes | | | 10-79-168-63# | | | | | ipv6_routes | show bgp neighbors 100.64.50.3 advertised-routes | | | % No such neighbor or address | | | family | | | 10-79-168-63# | | | | +----------------------+-------------------------------------------------------+
向对等体通告的路由是使用 vrf_ref
显示的。
可以使用 show serviceengine <se_name> bgp advertised_routes filter vrf_ref <vrf_name> peer_ipv4 <peer_IP>
通过对等体筛选器查看为特定对等体通告的路由。
对等状态
命令 |
适用的筛选器 |
---|---|
|
|
bgp peer status
标记检查通告是否成功:
[admin:abc-ctrl]: > show serviceengine 10.79.168.63 bgp peer_status +-------------+----------------------------------------------------------------------------------+ | Field | Value | +-------------+----------------------------------------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | ipv4_status | show ip bgp summary | | | BGP router identifier 2.146.114.58, local AS number 65000 | | | R | | | IB entries 3, using 336 bytes of memory | | | Peers 2, using 9136 bytes of memory | | | | | | Nei | | | ghbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxR | | | cd | | | 100.64.50.3 4 65000 0 0 0 0 0 never Active | | | | | | 100.64.50.21 4 65000 281 283 0 0 0 04:38:38 0 | | | | | | | | | Total number of neighbors 2 | | | 10-79-168-63# | | | | | ipv6_status | show bgp summary | | | No IPv6 neighbor is configured | | | 10-79-168-63# | | | | +-------------+----------------------------------------------------------------------------------+ +-------------+----------------------+ | Field | Value | +-------------+----------------------+ | vrf | seagent-default | | namespace | none | | ipv4_status | show ip bgp summary | | | 10-79-168-63# | | | | | ipv6_status | show bgp summary | | | 10-79-168-63# | | | | +-------------+----------------------+
可以使用 show serviceengine <Service Engine name>- bgp peer_state
查看服务引擎上的 BGP 对等体的当前状态。这会显示在服务引擎中配置的所有 VRF 的对等体状态。
show serviceengine 10.79.168.63- bgp peer_state +----------------+------------------------------------+ | Field | Value | +----------------+------------------------------------+ | vrf_name | global | | peers_state[1] | | | peer_ip | 100.64.188.27 | | state | BGP_PEER_ESTABLISHED | | upOrDownTime | 4d21h59m | | peers_state[2] | | | peer_ip | 100.64.106.55 | | state | BGP_PEER_NOT_APPLICABLE_TO_THIS_SE | | upOrDownTime | | | peers_state[3] | | | peer_ip | 100.64.19.12 | | state | BGP_PEER_IDLE | | upOrDownTime | | | peers_state[4] | | | peer_ip | 100.64.19.11 | | state | BGP_PEER_NOT_ESTABLISHED | | upOrDownTime | 00:13:22 | +----------------+------------------------------------+
可以使用 show serviceengine <Service Engine name>- bgp peer_state filter vrf_ref global
按 VRF 进行筛选。
可以使用 show serviceengine <Service Engine name> bgp peer_state
查看以下信息:
BGP 对等体 IP
状态
启动或关闭时间
BGP 对等体可能具有以下状态之一:
状态 |
描述 |
---|---|
|
|
|
BGP 会话为 |
|
BGP 会话为 如果 |
|
从对等体学习的前缀超出最大限制。检查 VRF 的配置。 |
|
在 SE 上,对于 VRF,没有为任何接口配置对等体的可访问性网络。 |
该功能提供在 SE 上缓存的对等体状态。要更新间隔,请使用 serviceenginegroup->bgp_state_update_interval
。
对等信息
命令 |
适用的筛选器 |
---|---|
|
|
bgp peer_info
标记查看 BGP 对等体信息:
[admin:1234-ctrl]: > show serviceengine 10.79.168.63 bgp peer_info +-----------+-----------------------------------------------------------------------------+ | Field | Value | +-----------+-----------------------------------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | peer_info | show ip bgp neighbors | | | BGP neighbor is 100.64.50.3, remote AS 65000, local AS 65 | | | 000, internal link | | | BGP version 4, remote router ID 0.0.0.0 | | | BGP state = Activ | | | | | | Last read 05:01:23, hold time is 180, keepalive interval is 60 seconds | | | Mes | | | sage statistics: | | | Inq depth is 0 | | | Outq depth is 0 | | | | | | Sent Rcvd | | | Opens: 0 0 | | | Notifications: | | | 0 0 | | | Updates: 0 0 | | | Keepalives: | | | 0 0 | | | Route Refresh: 0 0 | | | Capability: | | | 0 0 | | | Total: 0 0 | | | Minimum time b | | | etween advertisement runs is 5 seconds | | | | | | For address family: IPv4 Unicast | | | Comm | | | unity attribute sent to this neighbor(both) | | | Inbound path policy configured | | | O | | | utbound path policy configured | | | Route map for incoming advertisements is PEER_R | | | M_IN_100.64.50.3 | | | Route map for outgoing advertisements is *PEER_RM_OUT_100.64. | | | 50.3 | | | 0 accepted prefixes | | | | | | Connections established 0; dropped 0 | | | Last reset | | | never | | | Next connect timer due in 4 seconds | | | Read thread: off Write thread: off | | | | | | B | | | GP neighbor is 100.64.50.21, remote AS 65000, local AS 65000, internal link | | | BG | | | P version 4, remote router ID 2.226.39.17 | | | BGP state = Established, up for 04:5 | | | 2:38 | | | Last read 00:00:37, hold time is 180, keepalive interval is 60 seconds | | | | | | Neighbor capabilities: | | | 4 Byte AS: advertised and received | | | Route refresh: | | | advertised and received(old & new) | | | Address family IPv4 Unicast: advertised | | | and received | | | Graceful Restart Capabilty: advertised and received | | | Remot | | | e Restart timer is 120 seconds | | | Address families by peer: | | | none | | | Gr | | | aceful restart informations: | | | End-of-RIB send: IPv4 Unicast | | | End-of-RIB re | | | ceived: IPv4 Unicast | | | Message statistics: | | | Inq depth is 0 | | | Outq depth is | | | 0 | | | Sent Rcvd | | | Opens: 1 | | | 1 | | | Notifications: 0 0 | | | Updates: 2 | | | 1 | | | Keepalives: 294 293 | | | Route Refresh: 0 | | | 0 | | | Capability: 0 0 | | | Total: 297 | | | 295 | | | Minimum time between advertisement runs is 5 seconds | | | | | | For address f | | | amily: IPv4 Unicast | | | Community attribute sent to this neighbor(both) | | | Inbound | | | path policy configured | | | Outbound path policy configured | | | Route map for incomin | | | g advertisements is PEER_RM_IN_100.64.50.21 | | | Route map for outgoing advertiseme | | | nts is *PEER_RM_OUT_100.64.50.21 | | | 0 accepted prefixes | | | | | | Connections establishe | | | d 1; dropped 0 | | | Last reset never | | | Local host: 100.64.50.14, Local port: 45618 | | | Fo | | | reign host: 100.64.50.21, Foreign port: 179 | | | Nexthop: 100.64.50.14 | | | Nexthop global | | | : fe80::250:56ff:fe91:feb0 | | | Nexthop local: :: | | | BGP connection: non shared network | | | | | | Read thread: on Write thread: off | | | | | | 10-79-168-63# | | | | +-----------+-----------------------------------------------------------------------------+ +-----------+------------------------+ | Field | Value | +-----------+------------------------+ | vrf | seagent-default | | namespace | none | | peer_info | show ip bgp neighbors | | | 10-79-168-63# | | | | +-----------+------------------------+
查看运行配置
命令 |
适用的筛选器 |
---|---|
|
|
show serviceengine bgp running_config
命令:
[admin:1234-ctrl]: > show serviceengine 10.79.168.63 bgp peer_info +-----------+-----------------------------------------------------------------------------+ | Field | Value | +-----------+-----------------------------------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | peer_info | show ip bgp neighbors | | | BGP neighbor is 100.64.50.3, remote AS 65000, local AS 65 | | | 000, internal link | | | BGP version 4, remote router ID 0.0.0.0 | | | BGP state = Activ | | | | | | Last read 05:01:23, hold time is 180, keepalive interval is 60 seconds | | | Mes | | | sage statistics: | | | Inq depth is 0 | | | Outq depth is 0 | | | | | | Sent Rcvd | | | Opens: 0 0 | | | Notifications: | | | 0 0 | | | Updates: 0 0 | | | Keepalives: | | | 0 0 | | | Route Refresh: 0 0 | | | Capability: | | | 0 0 | | | Total: 0 0 | | | Minimum time b | | | etween advertisement runs is 5 seconds | | | | | | For address family: IPv4 Unicast | | | Comm | | | unity attribute sent to this neighbor(both) | | | Inbound path policy configured | | | O | | | utbound path policy configured | | | Route map for incoming advertisements is PEER_R | | | M_IN_100.64.50.3 | | | Route map for outgoing advertisements is *PEER_RM_OUT_100.64. | | | 50.3 | | | 0 accepted prefixes | | | | | | Connections established 0; dropped 0 | | | Last reset | | | never | | | Next connect timer due in 4 seconds | | | Read thread: off Write thread: off | | | | | | B | | | GP neighbor is 100.64.50.21, remote AS 65000, local AS 65000, internal link | | | BG | | | P version 4, remote router ID 2.226.39.17 | | | BGP state = Established, up for 04:5 | | | 2:38 | | | Last read 00:00:37, hold time is 180, keepalive interval is 60 seconds | | | | | | Neighbor capabilities: | | | 4 Byte AS: advertised and received | | | Route refresh: | | | advertised and received(old & new) | | | Address family IPv4 Unicast: advertised | | | and received | | | Graceful Restart Capabilty: advertised and received | | | Remot | | | e Restart timer is 120 seconds | | | Address families by peer: | | | none | | | Gr | | | aceful restart informations: | | | End-of-RIB send: IPv4 Unicast | | | End-of-RIB re | | | ceived: IPv4 Unicast | | | Message statistics: | | | Inq depth is 0 | | | Outq depth is | | | 0 | | | Sent Rcvd | | | Opens: 1 | | | 1 | | | Notifications: 0 0 | | | Updates: 2 | | | 1 | | | Keepalives: 294 293 | | | Route Refresh: 0 | | | 0 | | | Capability: 0 0 | | | Total: 297 | | | 295 | | | Minimum time between advertisement runs is 5 seconds | | | | | | For address f | | | amily: IPv4 Unicast | | | Community attribute sent to this neighbor(both) | | | Inbound | | | path policy configured | | | Outbound path policy configured | | | Route map for incomin | | | g advertisements is PEER_RM_IN_100.64.50.21 | | | Route map for outgoing advertiseme | | | nts is *PEER_RM_OUT_100.64.50.21 | | | 0 accepted prefixes | | | | | | Connections establishe | | | d 1; dropped 0 | | | Last reset never | | | Local host: 100.64.50.14, Local port: 45618 | | | Fo | | | reign host: 100.64.50.21, Foreign port: 179 | | | Nexthop: 100.64.50.14 | | | Nexthop global | | | : fe80::250:56ff:fe91:feb0 | | | Nexthop local: :: | | | BGP connection: non shared network | | | | | | Read thread: on Write thread: off | | | | | | 10-79-168-63# | | | | +-----------+-----------------------------------------------------------------------------+ +-----------+------------------------+ | Field | Value | +-----------+------------------------+ | vrf | seagent-default | | namespace | none | | peer_info | show ip bgp neighbors | | | 10-79-168-63# | | | | +-----------+------------------------+
您可以查看所有 VRF 的当前 BGP 配置。
BFD 会话状态
通过使用 BFD,链路两端的网络对等体可以快速检测链路故障并进行恢复。
命令 |
适用的筛选器 |
---|---|
|
|
show serviceengine <Service Engine IP address> bfd session_status
命令检查 BFD 数据包和 BGP 会话详细信息。
以下是 21.1.2 之前的 NSX Advanced Load Balancer 版本上的 BFD 会话状态输出。
show serviceengine 10.79.168.63 bfd session_status +-----------+-----------------------------------+ | Field | Value | +-----------+-----------------------------------+ | vrf | global | | namespace | avi_ns1 | | status | There are 2 sessions: | | | Session 2 | | | id=2 | | | local=100.64.50.14 (active) | | | remote=100 | | | .64.50.21 | | | LocalState=Down*No Diagnostic* | | | RemoteState=Down*No Diagnostic* | | | L | | | ocalId=1968595698 | | | RemoteId=0 | | | Time=Down(05:300:11.166) | | | CurrentTxInterval=1 | | | ,000,000 us | | | CurrentRxTimeout=0 us | | | LocalDetectMulti=3 | | | LocalDesiredMinTx=1,0 | | | 00,000 us | | | LocalRequiredMinRx=1,000,000 us | | | RemoteDetectMulti=0 | | | RemoteDesire | | | dMinTx=0 us | | | RemoteRequiredMinRx=1 us | | | | | | Session 1 | | | id=1 | | | local=100.64.50.14 (a | | | ctive) | | | remote=100.64.50.3 | | | LocalState=Down*No Diagnostic* | | | RemoteState=Down* | | | No Diagnostic* | | | LocalId=817711591 | | | RemoteId=0 | | | Time=Down(05:300:19.723) | | | Cu | | | rrentTxInterval=1,000,000 us | | | CurrentRxTimeout=0 us | | | LocalDetectMulti=3 | | | Loca | | | lDesiredMinTx=1,000,000 us | | | LocalRequiredMinRx=1,000,000 us | | | RemoteDetectMulti | | | =0 | | | RemoteDesiredMinTx=0 us | | | RemoteRequiredMinRx=1 us | | | | +-----------+-----------------------------------+ +-----------+-----------------------+ | Field | Value | +-----------+-----------------------+ | vrf | seagent-default | | namespace | none | | status | There are 0 sessions: | | | | +-----------+-----------------------+
BGP 多跳的 BFD 支持
在 NSX Advanced Load Balancer 21.1.2 版中,BFD 功能支持 BGP 多跳实施。以下是 NSX Advanced Load Balancer 21.1.2 版上的 BFD 会话状态输出。
show serviceengine 10.102.64.10 bfd session_status filter vrf_ref global +-----------+------------------------------------------------+ | Field | Value | +-----------+------------------------------------------------+ | vrf | global | | namespace | avi_ns1 | | status | show bfd peers | | | BFD Peers: | | | peer 100.64.188.60 | | | ID: 4 | | | Remote ID: 0 | | | Status: down | | | Do | | | wntime: 21 hour(s), 26 minute(s), 49 second(s) | | | Diagnostics: ok | | | Remote diagnostic | | | s: ok | | | Local timers: | | | Receive interval: 1000ms | | | Transmission interval: 300ms (confi | | | gured 1000ms) | | | Echo transmission interval: disabled | | | Remote timers: | | | Receive interv | | | al: 0ms | | | Transmission interval: 0ms | | | Echo transmission interval: 0ms | | | | | | 10-102-64-10 | | | # | | | | +-----------+------------------------------------------------+
peer_ipv4/ peer_ipv6
筛选器必须始终与vrf_ref
筛选器一起使用。peer_ipv4
和peer_ipv6
筛选器不能一起使用。在提供无效的
vrf_ref
时,它默认为管理 VRF;在提供无效的对等体筛选器时,将返回空输出。不支持
show serviceengine <Service Engine name> bfd session_status
命令的status_level
筛选器。