BGP/BFD Visibility
Overview
Avi Vantage uses Quagga for BGP based scaling of virtual services. Therefore, debugging or to checking the BGP configuration or the status of BGP peer was possible only by logging into the Quagga instance of the Service Engine.
For more information, refer to the How to Access and Use the Quagga Shell article.
To make debugging easier, starting from Avi Vantage release 20.1.1, the capability to view these commands from the Avi Controller shell is possible.
Viewing BGP/BFD Configuration via the Controller
Log in to the Controller shell with your credentials and view the required BGP/BFD commands as discussed below:
Advertised Routes
Command | Filters Applicable |
---|---|
/serviceengine/<se_uuid>/bgp/advertised_routes | vrf_ref peer_ip |
To view the BGP routes advertised to configured peers, use the command bgp advertised_routes
as shown below:
[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# |
| | |
+----------------------+------------------------------+
This is the generic advertised routes. To view the advertised routes for a specific VRF, use the vrf_ref
filter as shown below:
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# |
| | |
+----------------------+-------------------------------------------------------+
Peer-wise advertised routes are displayed on using vrf_ref
.
Note: Use the peer filter to view the advertised routes for a specific peer using show serviceengine <se_name> bgp advertised_routes filter vrf_ref <vrf_name> peer_ipv4 <peer_IP>
Peer Status
Command | Filters Applicable |
---|---|
/serviceengine/<se_uuid>/bgp/peers_status | vrf_ref |
When advertising BGP routes to the peers, to check if the advertising is successful use the bgp peer status
flag as shown below:
[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# |
| | |
+-------------+----------------------+
Starting with Avi Vantage 21.1.3, the current state of the BGP peers on a ServiceEngine can be viewed using show serviceengine <Service Engine name>- bgp peer_state
. This shows the peer status of all the VRF configured in the Service Engine.
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 |
+----------------+------------------------------------+
Use show serviceengine <Service Engine name>- bgp peer_state filter vrf_ref global
to filter by VRF.
The following information can be viewed using show serviceengine <Service Engine name> bgp peer_state
:
- BGP Peer IP
- The State
- Up or Down Time
The State of the BGP Peer can be one one of the following:
State | Description |
---|---|
BGP_PEER_IDLE |
|
BGP_PEER_ESTABLISHED | |
BGP_PEER_NOT_ESTABLISHED | BGP session is down. If the upOrDownTime is set to Never, BGP Session has been down since the configuration of the peer. |
BGP_PEER_PREFIX_EXCEEDED | Prefixes learnt from the peer exceeded the maximum limit. Check the VRF's configuration. |
BBGP_PEER_NOT_APPLICABLE_TO_THIS_SE | On the SE, for the VRF, no interface is configured with the peer's reachability network |
Note: This feature provides peer states cached on SE. To update the interval, use serviceenginegroup->bgp_state_update_interval
.
Peer Information
Command | Filters Applicable |
---|---|
/serviceengine/<se_uuid>/bgp/peers | vrf_ref peer_ipv4 peer_ipv6 |
To view the BGP peer information use the bgp peer_info
flag as shown below:
[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# |
| | |
+-----------+------------------------+
View the Running Configuration
Command | Filters Applicable |
---|---|
/serviceengine/<se_uuid>/bgp/running_config | vrf_ref |
Use the command *show serviceengine bgp running_config
as shown below:
[admin:1234-ctrl]: > show serviceengine 10.79.168.63 bgp running_config
+----------------+---------------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------------+
| vrf | global |
| namespace | avi_ns1 |
| running_config | show running-config |
| | |
| | Current configuration: |
| | ! |
| | password ****** |
| | log file /var/lib |
| | /avi/log/bgp/avi_ns1_bgpd.log |
| | ! |
| | router bgp 65000 |
| | bgp router-id 2.146.114.58 |
| | no |
| | bgp default ipv4-unicast |
| | network 1.1.1.1/32 |
| | network 2.2.2.2/32 |
| | neighbor 100. |
| | 64.50.3 remote-as 65000 |
| | neighbor 100.64.50.3 advertisement-interval 5 |
| | neighbor |
| | 100.64.50.3 timers connect 10 |
| | neighbor 100.64.50.3 activate |
| | neighbor 100.64.5 |
| | 0.3 route-map PEER_RM_IN_100.64.50.3 in |
| | neighbor 100.64.50.3 route-map PEER_RM_ |
| | OUT_100.64.50.3 out |
| | neighbor 100.64.50.21 remote-as 65000 |
| | neighbor 100.64.50.2 |
| | 1 advertisement-interval 5 |
| | neighbor 100.64.50.21 timers connect 10 |
| | neighbor 10 |
| | 0.64.50.21 activate |
| | neighbor 100.64.50.21 route-map PEER_RM_IN_100.64.50.21 in |
| | |
| | neighbor 100.64.50.21 route-map PEER_RM_OUT_100.64.50.21 out |
| | ! |
| | access-list 1 pe |
| | rmit 1.1.1.1 |
| | access-list 2 permit 2.2.2.2 |
| | ! |
| | ip prefix-list def-route seq 5 permi |
| | t 0.0.0.0/0 |
| | ip prefix-list ip_v4-list seq 5 permit 2.2.2.2/32 |
| | ip prefix-list ip_ |
| | v4-list seq 10 permit 1.1.1.1/32 |
| | ip prefix-list snat_vip_v4-list seq 1 permit 2. |
| | 2.2.2/32 |
| | ip prefix-list snat_vip_v4-list seq 2 permit 1.1.1.1/32 |
| | ! |
| | route-map bgp |
| | _properties_ebgp_rmap permit 65400 |
| | match ip address prefix-list snat_vip_v4-lis |
| | t |
| | call bgp_community_rmap |
| | ! |
| | route-map bgp_properties_ebgp_rmap permit 65401 |
| | ca |
| | ll bgp_community_rmap |
| | ! |
| | route-map bgp_properties_ibgp_rmap permit 65400 |
| | match i |
| | p address prefix-list snat_vip_v4-list |
| | call bgp_community_rmap |
| | ! |
| | route-map bgp_ |
| | properties_ibgp_rmap permit 65401 |
| | call bgp_community_rmap |
| | ! |
| | route-map bgp_commu |
| | nity_rmap permit 65401 |
| | ! |
| | route-map PEER_RM_OUT_100.64.50.3 permit 10 |
| | match ip a |
| | ddress 2 |
| | call bgp_properties_ibgp_rmap |
| | ! |
| | route-map PEER_RM_OUT_100.64.50.21 per |
| | mit 10 |
| | match ip address 1 |
| | call bgp_properties_ibgp_rmap |
| | ! |
| | line vty |
| | ! |
| | end |
| | 10-79 |
| | -168-63# |
| | |
+----------------+---------------------------------------------------------------+
+----------------+-------------------------+
| Field | Value |
+----------------+-------------------------+
| vrf | seagent-default |
| namespace | none |
| running_config | show running-config |
| | |
| | Current configuration: |
| | ! |
| | password ****** |
| | log file /var/lib |
| | /avi/log/bgp/0_bgpd.log |
| | ! |
| | line vty |
| | ! |
| | end |
| | 10-79-168-63# |
| | |
+----------------+-------------------------+
You can view the current BGP configuration for all VRFs.
BFD Session Status
BFD enables networking peers on each end of a link to quickly detect and recover from a link failure.
Command | Filters Applicable |
---|---|
/serviceengine/<se_uuid>/bfd/session_status | vrf_ref |
Use the show serviceengine <Service Engine IP address> bfd session_status
command to check the details of the BFD packets and the BGP session.
The below is the output for the BFD session status on the Avi Vantage release prior to 21.1.2.
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: |
| | |
+-----------+-----------------------+
BFD Support for BGP Multi-hop
Starting with Avi Vantage release 21.1.2, BFD feature supports BGP multi-hop implementation. The below is the output for the BFD session status on the Avi Vantage release 21.1.2.
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 |
| | # |
| | |
+-----------+------------------------------------------------+
Notes:
-
The
peer_ipv4
/peer_ipv6
filters should always be used with thevrf_ref
filter. -
The filters
peer_ipv4
andpeer_ipv6
can not be used together. - When an invalid
vrf_ref
is provided, it defaults to the management vrf and when an invalid peer filter is provided, an empty output is returned. - Starting with Avi Vantage release 21.1.2, the status_level filter for the
show serviceengine <Service Engine name> bfd session_status
command is not supported.