This command provides a summary of the bgp neighbors peered with the DUT. Returns a dictionary that maps the BGP address for each neighbor to another dictionary listing information on that neighbor device.
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
bgp_info = duthost.get_bgp_neighbors()
This command takes no arguments
This command returns a dictionary mapping the neigbor's BGP address to another dictionary describing the neighbor device. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
{bgp-ip}
- dictionary with information on the neihboring device matching the provided BGP ipremote AS
- ASN defined for the peer grouplocal AS
- Local ASN for neighbordescription
- The name of the BGP neighboradmin
- Admin status for interface used to communicate with neighboraccepted prefixes
- Number of accepted prefixes for that BGP neigbhorconnections established
- number of connections established by BGP neighborconnections dropped
- number of connections dropped by neighborpeer group
- Name of peer groupstate
- Current state of BGP neighborremote routerid
- remote router id on neighbormrai
- Minimum Route Advertisement Intervalip_version
- version of IP used for communication with neighbormessage statistics
- Dictionary describing statistics on communication with neighborCapability
rcvd
- Capability messages receivedsent
- Capability messages sent
Notifications
rcvd
- Notification messages receivedsent
- Notification messages sent
Route Refresh
rcvd
- Route Refresh messages receivedsent
- Route Refresh messages sent
Updates
rcvd
- Update messages receivedsent
- Update messages sent
Keepalives
rcvd
- Keepalive messages receivedsent
- Keepalive messages sent
Opens
rcvd
- Open messages receivedsent
- Open messages sent
Total
rcvd
- total messages receivedsent
- total messages sent