From 8a03992f47e54d1c3bf3e04f6eadddbdb487dbb2 Mon Sep 17 00:00:00 2001 From: Petr Hruby Date: Mon, 30 Sep 2019 08:53:25 +0200 Subject: [PATCH] ios get_bgp_neighbors vrf and safi aware (#768) * get_bgp_neighbors vrf support * afi string contains afi modifier * mocked data, minor changes * afi string with afi modifier * supported afis * mocked data * comments * typo * show arp vrf ios test * black reformated --- napalm/ios/ios.py | 71 ++- .../normal/expected_result.json | 41 ++ ...show_arp_vrf_TEST___exclude_Incomplete.txt | 9 + .../mcast_ipv6/expected_result.json | 59 ++ .../mcast_ipv6/show_bgp_all_summary.txt | 44 ++ .../show_bgp_ipv4_mdt_all_neighbors.txt | 1 + .../show_bgp_ipv4_multicast_neighbors.txt | 368 +++++++++++ .../show_bgp_ipv4_unicast_neighbors.txt | 369 +++++++++++ .../show_bgp_ipv6_multicast_neighbors.txt | 1 + .../show_bgp_ipv6_unicast_neighbors.txt | 369 +++++++++++ .../show_bgp_vpnv4_unicast_all_neighbors.txt | 1 + .../show_bgp_vpnv6_unicast_all_neighbors.txt | 1 + .../normal/expected_result.json | 24 +- .../show_bgp_ipv4_mdt_all_neighbors.txt | 1 + .../show_bgp_ipv4_multicast_neighbors.txt | 1 + .../show_bgp_ipv6_multicast_neighbors.txt | 1 + .../show_bgp_vpnv4_unicast_all_neighbors.txt | 1 + .../show_bgp_vpnv6_unicast_all_neighbors.txt | 1 + .../vrfs_mdt/expected_result.json | 86 +++ .../vrfs_mdt/show_bgp_all_summary.txt | 40 ++ .../show_bgp_ipv4_mdt_all_neighbors.txt | 330 ++++++++++ .../show_bgp_ipv4_multicast_neighbors.txt | 1 + .../show_bgp_ipv4_unicast_neighbors.txt | 1 + .../show_bgp_ipv6_multicast_neighbors.txt | 1 + .../show_bgp_ipv6_unicast_neighbors.txt | 1 + .../show_bgp_vpnv4_unicast_all_neighbors.txt | 598 ++++++++++++++++++ .../show_bgp_vpnv6_unicast_all_neighbors.txt | 0 27 files changed, 2392 insertions(+), 29 deletions(-) create mode 100644 test/ios/mocked_data/test_get_arp_table_with_vrf/normal/expected_result.json create mode 100644 test/ios/mocked_data/test_get_arp_table_with_vrf/normal/show_arp_vrf_TEST___exclude_Incomplete.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/expected_result.json create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_all_summary.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_mdt_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_unicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_unicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv4_unicast_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv6_unicast_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_mdt_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv4_unicast_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv6_unicast_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/expected_result.json create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_all_summary.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_mdt_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_unicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_multicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_unicast_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv4_unicast_all_neighbors.txt create mode 100644 test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv6_unicast_all_neighbors.txt diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py index 86f58e3eb..744d4ef32 100644 --- a/napalm/ios/ios.py +++ b/napalm/ios/ios.py @@ -1465,13 +1465,21 @@ def build_prefix_limit(af_table, limit, prefix_percent, prefix_timeout): def get_bgp_neighbors(self): """BGP neighbor information. - Currently no VRF support. Supports both IPv4 and IPv6. + Supports both IPv4 and IPv6. vrf aware """ - supported_afi = ["ipv4", "ipv6"] + supported_afi = [ + "ipv4 unicast", + "ipv4 multicast", + "ipv6 unicast", + "ipv6 multicast", + "vpnv4 unicast", + "vpnv6 unicast", + "ipv4 mdt", + ] bgp_neighbor_data = dict() - bgp_neighbor_data["global"] = {} - + # vrfs where bgp is configured + bgp_config_vrfs = [] # get summary output from device cmd_bgp_all_sum = "show bgp all summary" summary_output = self._send_command(cmd_bgp_all_sum).strip() @@ -1482,17 +1490,29 @@ def get_bgp_neighbors(self): # get neighbor output from device neighbor_output = "" for afi in supported_afi: - cmd_bgp_neighbor = "show bgp %s unicast neighbors" % afi - neighbor_output += self._send_command(cmd_bgp_neighbor).strip() - # trailing newline required for parsing - neighbor_output += "\n" + if afi in [ + "ipv4 unicast", + "ipv4 multicast", + "ipv6 unicast", + "ipv6 multicast", + ]: + cmd_bgp_neighbor = "show bgp %s neighbors" % afi + neighbor_output += self._send_command(cmd_bgp_neighbor).strip() + # trailing newline required for parsing + neighbor_output += "\n" + elif afi in ["vpnv4 unicast", "vpnv6 unicast", "ipv4 mdt"]: + cmd_bgp_neighbor = "show bgp %s all neighbors" % afi + neighbor_output += self._send_command(cmd_bgp_neighbor).strip() + # trailing newline required for parsing + neighbor_output += "\n" # Regular expressions used for parsing BGP summary parse_summary = { "patterns": [ # For address family: IPv4 Unicast + # variable afi contains both afi and safi, i.e 'IPv4 Unicast' { - "regexp": re.compile(r"^For address family: (?P\S+) "), + "regexp": re.compile(r"^For address family: (?P[\S ]+)$"), "record": False, }, # Capture router_id and local_as values, e.g.: @@ -1584,6 +1604,7 @@ def get_bgp_neighbors(self): { "regexp": re.compile( r"^BGP neighbor is (?P({})|({}))," + r"(\s+vrf (?P\S+),)?" r"\s+remote AS (?P{}).*".format( IPV4_ADDR_REGEX, IPV6_ADDR_REGEX, ASN_REGEX ) @@ -1612,7 +1633,7 @@ def get_bgp_neighbors(self): # Capture AFI and SAFI names, e.g.: # For address family: IPv4 Unicast { - "regexp": re.compile(r"^\s+For address family: (?P\S+) "), + "regexp": re.compile(r"^\s+For address family: (?P[\S ]+)$"), "record": False, }, # Capture current sent and accepted prefixes, e.g.: @@ -1678,6 +1699,13 @@ def get_bgp_neighbors(self): # a match was found, so update the temp entry with the match's groupdict neighbor_data_entry.update(match.groupdict()) if item["record"]: + # update list of vrfs where bgp is configured + if not neighbor_data_entry["vrf"]: + vrf_to_add = "global" + else: + vrf_to_add = neighbor_data_entry["vrf"] + if vrf_to_add not in bgp_config_vrfs: + bgp_config_vrfs.append(vrf_to_add) # Record indicates the last piece of data has been obtained; move # on to next entry neighbor_data.append(copy.deepcopy(neighbor_data_entry)) @@ -1700,9 +1728,12 @@ def get_bgp_neighbors(self): # check the router_id looks like an ipv4 address router_id = napalm.base.helpers.ip(router_id, version=4) + # create dict keys for vrfs where bgp is configured + for vrf in bgp_config_vrfs: + bgp_neighbor_data[vrf] = {} + bgp_neighbor_data[vrf]["router_id"] = router_id + bgp_neighbor_data[vrf]["peers"] = {} # add parsed data to output dict - bgp_neighbor_data["global"]["router_id"] = router_id - bgp_neighbor_data["global"]["peers"] = {} for entry in summary_data: remote_addr = napalm.base.helpers.ip(entry["remote_addr"]) afi = entry["afi"].lower() @@ -1777,8 +1808,14 @@ def get_bgp_neighbors(self): # check the remote router_id looks like an ipv4 address remote_id = napalm.base.helpers.ip(neighbor_entry["remote_id"], version=4) - if remote_addr not in bgp_neighbor_data["global"]["peers"]: - bgp_neighbor_data["global"]["peers"][remote_addr] = { + # get vrf name, if None use 'global' + if neighbor_entry["vrf"]: + vrf = neighbor_entry["vrf"] + else: + vrf = "global" + + if remote_addr not in bgp_neighbor_data[vrf]["peers"]: + bgp_neighbor_data[vrf]["peers"][remote_addr] = { "local_as": napalm.base.helpers.as_number(entry["local_as"]), "remote_as": napalm.base.helpers.as_number(entry["remote_as"]), "remote_id": remote_id, @@ -1796,7 +1833,7 @@ def get_bgp_neighbors(self): } else: # found previous data for matching remote_addr, but for different afi - existing = bgp_neighbor_data["global"]["peers"][remote_addr] + existing = bgp_neighbor_data[vrf]["peers"][remote_addr] assert afi not in existing["address_family"] # compare with existing values and croak if they don't match assert existing["local_as"] == napalm.base.helpers.as_number( @@ -2175,9 +2212,9 @@ def get_arp_table(self, vrf=""): ] """ if vrf: - command = 'show arp vrf {} | exclude Incomplete'.format(vrf) + command = "show arp vrf {} | exclude Incomplete".format(vrf) else: - command = 'show arp | exclude Incomplete' + command = "show arp | exclude Incomplete" arp_table = [] diff --git a/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/expected_result.json b/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/expected_result.json new file mode 100644 index 000000000..7d7f096ee --- /dev/null +++ b/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/expected_result.json @@ -0,0 +1,41 @@ +[{ + "interface": "Vlan20", + "ip": "172.29.50.1", + "mac": "84:B8:02:76:AC:0E", + "age": 8.0 +}, { + "interface": "Vlan20", + "ip": "172.29.50.2", + "mac": "00:19:07:25:34:4A", + "age": 221.0 +}, { + "interface": "Vlan20", + "ip": "172.29.50.3", + "mac": "00:24:F7:DD:77:41", + "age": 0.0 +}, { + "interface": "Vlan20", + "ip": "172.29.50.10", + "mac": "68:05:CA:12:71:C2", + "age": 37.0 +}, { + "interface": "Vlan41", + "ip": "172.29.52.33", + "mac": "84:B8:02:76:AC:0E", + "age": 61.0 +}, { + "interface": "Vlan41", + "ip": "172.29.52.34", + "mac": "00:24:F7:DD:77:43", + "age": 0.0 +}, { + "interface": "Vlan41", + "ip": "172.29.52.40", + "mac": "A0:99:9B:1C:DF:A7", + "age": 3.0 +}, { + "interface": "Vlan41", + "ip": "192.168.81.34", + "mac": "00:24:F7:DD:77:43", + "age": 0.0 +}] diff --git a/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/show_arp_vrf_TEST___exclude_Incomplete.txt b/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/show_arp_vrf_TEST___exclude_Incomplete.txt new file mode 100644 index 000000000..c0979f408 --- /dev/null +++ b/test/ios/mocked_data/test_get_arp_table_with_vrf/normal/show_arp_vrf_TEST___exclude_Incomplete.txt @@ -0,0 +1,9 @@ +Protocol Address Age (min) Hardware Addr Type Interface +Internet 172.29.50.1 8 84b8.0276.ac0e ARPA Vlan20 +Internet 172.29.50.2 221 0019.0725.344a ARPA Vlan20 +Internet 172.29.50.3 - 0024.f7dd.7741 ARPA Vlan20 +Internet 172.29.50.10 37 6805.ca12.71c2 ARPA Vlan20 +Internet 172.29.52.33 61 84b8.0276.ac0e ARPA Vlan41 +Internet 172.29.52.34 - 0024.f7dd.7743 ARPA Vlan41 +Internet 172.29.52.40 3 a099.9b1c.dfa7 ARPA Vlan41 +Internet 192.168.81.34 - 0024.f7dd.7743 ARPA Vlan41 diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/expected_result.json b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/expected_result.json new file mode 100644 index 000000000..227c8e3c4 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/expected_result.json @@ -0,0 +1,59 @@ +{ + "global": { + "router_id": "192.168.0.2", + "peers": { + "192.168.0.1": { + "local_as": 1, + "remote_as": 1, + "remote_id": "192.168.0.1", + "is_up": true, + "is_enabled": true, + "description": "iBGP peer nx-osv-1", + "uptime": 2202, + "address_family": { + "ipv4 unicast": { + "received_prefixes": 2, + "accepted_prefixes": 2, + "sent_prefixes": 1 + }, + "ipv6 unicast": { + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 + }, + "ipv4 multicast": { + "received_prefixes": 1, + "accepted_prefixes": 1, + "sent_prefixes": 0 + } + } + }, + "192.168.0.3": { + "local_as": 1, + "remote_as": 1, + "remote_id": "192.168.0.3", + "is_up": true, + "is_enabled": true, + "description": "iBGP peer csr1000v-1", + "uptime": 494, + "address_family": { + "ipv4 unicast": { + "received_prefixes": 1, + "accepted_prefixes": 1, + "sent_prefixes": 1 + }, + "ipv6 unicast": { + "received_prefixes": 2, + "accepted_prefixes": 2, + "sent_prefixes": 0 + }, + "ipv4 multicast": { + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 + } + } + } + } + } +} \ No newline at end of file diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_all_summary.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_all_summary.txt new file mode 100644 index 000000000..d630efc38 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_all_summary.txt @@ -0,0 +1,44 @@ +For address family: IPv4 Unicast +BGP router identifier 192.168.0.2, local AS number 1 +BGP table version is 25, main routing table version 25 +4 network entries using 576 bytes of memory +4 path entries using 320 bytes of memory +3/3 BGP path/bestpath attribute entries using 456 bytes of memory +0 BGP route-map cache entries using 0 bytes of memory +0 BGP filter-list cache entries using 0 bytes of memory +BGP using 1352 total bytes of memory +BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs + +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd +192.168.0.1 4 1 46 46 25 0 0 00:36:42 2 +192.168.0.3 4 1 18 16 25 0 0 00:08:14 1 + +For address family: IPv6 Unicast +BGP router identifier 192.168.0.2, local AS number 1 +BGP table version is 1, main routing table version 1 +2 network entries using 336 bytes of memory +2 path entries using 208 bytes of memory +1/0 BGP path/bestpath attribute entries using 152 bytes of memory +0 BGP route-map cache entries using 0 bytes of memory +0 BGP filter-list cache entries using 0 bytes of memory +BGP using 696 total bytes of memory +BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs + +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd +192.168.0.1 4 1 46 46 1 0 0 00:36:42 0 +192.168.0.3 4 1 18 16 1 0 0 00:08:14 2 + +For address family: IPv4 Multicast +BGP router identifier 192.168.0.2, local AS number 1 +BGP table version is 1, main routing table version 1 +1 network entries using 144 bytes of memory +1 path entries using 76 bytes of memory +1/0 BGP path/bestpath attribute entries using 152 bytes of memory +0 BGP route-map cache entries using 0 bytes of memory +0 BGP filter-list cache entries using 0 bytes of memory +BGP using 372 total bytes of memory +BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs + +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd +192.168.0.1 4 1 46 46 1 0 0 00:36:42 1 +192.168.0.3 4 1 18 16 1 0 0 00:08:14 0 diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_mdt_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_mdt_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_mdt_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_multicast_neighbors.txt new file mode 100644 index 000000000..a808e2ed2 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_multicast_neighbors.txt @@ -0,0 +1,368 @@ +BGP neighbor is 192.168.0.1, remote AS 1, internal link + Description: iBGP peer nx-osv-1 + BGP version 4, remote router ID 192.168.0.1 + BGP state = Established, up for 00:37:53 + Last read 00:00:13, last write 00:00:21, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Graceful Restart Capability: received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 Unicast (was not preserved, IPv6 Unicast (was not preserved, IPv4 Multicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 3 5 + Keepalives: 43 41 + Route Refresh: 0 0 + Total: 47 47 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.1 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 2 (Consumes 160 bytes) + Prefixes Total: 4 2 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv6 Unicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 1 (Consumes 76 bytes) + Prefixes Total: 0 1 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.1 + Connections established 3; dropped 2 + Last reset 00:38:07, due to BGP Notification received of session 1, Other Configuration Change + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.1, Foreign port: 20123 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A37A1D): +Timer Starts Wakeups Next +Retrans 44 0 0x0 +TimeWait 0 0 0x0 +AckHold 44 39 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 3960699162 snduna: 3960700161 sndnxt: 3960700161 +irs: 2397721058 rcvnxt: 2397722122 + +sndwnd: 16616 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15871 scale: 0 delrcvwnd: 513 + +SRTT: 997 ms, RTTO: 1021 ms, RTV: 24 ms, KRTT: 0 ms +minRTT: 8 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 2277902 ms, Sent idletime: 17361 ms, Receive idletime: 17562 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 536 bytes): +Rcvd: 88 (out of order: 0), with data: 44, total data bytes: 1063 +Sent: 88 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 46, total data bytes: 998 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF52064 FREE + +BGP neighbor is 192.168.0.3, remote AS 1, internal link + Description: iBGP peer csr1000v-1 + BGP version 4, remote router ID 192.168.0.3 + BGP state = Established, up for 00:09:30 + Last read 00:00:03, last write 00:00:39, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Enhanced Refresh Capability: advertised and received + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 2 7 + Keepalives: 12 12 + Route Refresh: 0 0 + Total: 17 20 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.3 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 1 (Consumes 80 bytes) + Prefixes Total: 4 1 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 1 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: 00:09:31 + Last Sent Refresh End-of-rib: 00:09:31 + Refresh-Out took 0 seconds + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 1 0 + Refresh End-of-RIB 1 0 + + For address family: IPv6 Unicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 2 (Consumes 208 bytes) + Prefixes Total: 0 4 + Implicit Withdraw: 0 2 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.3 + Connections established 5; dropped 4 + Last reset 00:09:32, due to Peer closed the session of session 1 + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.3, Foreign port: 49379 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A381AB): +Timer Starts Wakeups Next +Retrans 15 0 0x0 +TimeWait 0 0 0x0 +AckHold 17 13 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 1841341979 snduna: 1841342406 sndnxt: 1841342406 +irs: 272578933 rcvnxt: 272579612 + +sndwnd: 15958 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15706 scale: 0 delrcvwnd: 678 + +SRTT: 865 ms, RTTO: 1866 ms, RTV: 1001 ms, KRTT: 0 ms +minRTT: 10 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 571302 ms, Sent idletime: 4781 ms, Receive idletime: 4983 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 1460 bytes): +Rcvd: 33 (out of order: 0), with data: 19, total data bytes: 678 +Sent: 32 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 15, total data bytes: 426 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF51F84 FREE diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_unicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_unicast_neighbors.txt new file mode 100644 index 000000000..83564c3c0 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_unicast_neighbors.txt @@ -0,0 +1,369 @@ +BGP neighbor is 192.168.0.1, remote AS 1, internal link + Description: iBGP peer nx-osv-1 + BGP version 4, remote router ID 192.168.0.1 + BGP state = Established, up for 00:40:00 + Last read 00:00:24, last write 00:00:36, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Graceful Restart Capability: received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 Unicast (was not preserved, IPv6 Unicast (was not preserved, IPv4 Multicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 3 5 + Keepalives: 45 43 + Route Refresh: 0 0 + Total: 49 49 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.1 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 2 (Consumes 160 bytes) + Prefixes Total: 4 2 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv6 Unicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 1 (Consumes 76 bytes) + Prefixes Total: 0 1 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.1 + Connections established 3; dropped 2 + Last reset 00:40:12, due to BGP Notification received of session 1, Other Configuration Change + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.1, Foreign port: 20123 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A562A0): +Timer Starts Wakeups Next +Retrans 46 0 0x0 +TimeWait 0 0 0x0 +AckHold 46 40 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 3960699162 snduna: 3960700199 sndnxt: 3960700199 +irs: 2397721058 rcvnxt: 2397722160 + +sndwnd: 16616 scale: 0 maxrcvwnd: 16384 +rcvwnd: 16384 scale: 0 delrcvwnd: 0 + +SRTT: 998 ms, RTTO: 1016 ms, RTV: 18 ms, KRTT: 0 ms +minRTT: 8 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 2402498 ms, Sent idletime: 26184 ms, Receive idletime: 26186 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 536 bytes): +Rcvd: 92 (out of order: 0), with data: 46, total data bytes: 1101 +Sent: 92 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 48, total data bytes: 1036 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF52064 FREE + +BGP neighbor is 192.168.0.3, remote AS 1, internal link + Description: iBGP peer csr1000v-1 + BGP version 4, remote router ID 192.168.0.3 + BGP state = Established, up for 00:11:34 + Last read 00:00:17, last write 00:00:08, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Enhanced Refresh Capability: advertised and received + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 2 7 + Keepalives: 15 14 + Route Refresh: 0 0 + Total: 20 22 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.3 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 1 (Consumes 80 bytes) + Prefixes Total: 4 1 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 1 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: 00:11:34 + Last Sent Refresh End-of-rib: 00:11:34 + Refresh-Out took 0 seconds + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 1 0 + Refresh End-of-RIB 1 0 + + For address family: IPv6 Unicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 2 (Consumes 208 bytes) + Prefixes Total: 0 4 + Implicit Withdraw: 0 2 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.3 + Connections established 5; dropped 4 + Last reset 00:11:35, due to Peer closed the session of session 1 + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.3, Foreign port: 49379 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A56727): +Timer Starts Wakeups Next +Retrans 18 0 0x0 +TimeWait 0 0 0x0 +AckHold 19 15 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 1841341979 snduna: 1841342463 sndnxt: 1841342463 +irs: 272578933 rcvnxt: 272579650 + +sndwnd: 15901 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15668 scale: 0 delrcvwnd: 716 + +SRTT: 909 ms, RTTO: 1600 ms, RTV: 691 ms, KRTT: 0 ms +minRTT: 10 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 695582 ms, Sent idletime: 9144 ms, Receive idletime: 8944 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 1460 bytes): +Rcvd: 38 (out of order: 0), with data: 21, total data bytes: 716 +Sent: 37 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 18, total data bytes: 483 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF51F84 FREE + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_multicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_multicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_unicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_unicast_neighbors.txt new file mode 100644 index 000000000..accb96411 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv6_unicast_neighbors.txt @@ -0,0 +1,369 @@ +BGP neighbor is 192.168.0.1, remote AS 1, internal link + Description: iBGP peer nx-osv-1 + BGP version 4, remote router ID 192.168.0.1 + BGP state = Established, up for 00:41:47 + Last read 00:00:15, last write 00:00:34, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Graceful Restart Capability: received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 Unicast (was not preserved, IPv6 Unicast (was not preserved, IPv4 Multicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 3 5 + Keepalives: 47 45 + Route Refresh: 0 0 + Total: 51 51 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.1 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 2 (Consumes 160 bytes) + Prefixes Total: 4 2 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv6 Unicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.1 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 1 (Consumes 76 bytes) + Prefixes Total: 0 1 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.1 + Connections established 3; dropped 2 + Last reset 00:41:58, due to BGP Notification received of session 1, Other Configuration Change + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.1, Foreign port: 20123 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A701C5): +Timer Starts Wakeups Next +Retrans 48 0 0x0 +TimeWait 0 0 0x0 +AckHold 48 42 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 3960699162 snduna: 3960700237 sndnxt: 3960700237 +irs: 2397721058 rcvnxt: 2397722198 + +sndwnd: 16616 scale: 0 maxrcvwnd: 16384 +rcvwnd: 16346 scale: 0 delrcvwnd: 38 + +SRTT: 998 ms, RTTO: 1012 ms, RTV: 14 ms, KRTT: 0 ms +minRTT: 8 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 2508775 ms, Sent idletime: 16666 ms, Receive idletime: 16867 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 536 bytes): +Rcvd: 96 (out of order: 0), with data: 48, total data bytes: 1139 +Sent: 96 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 50, total data bytes: 1074 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF52064 FREE + +BGP neighbor is 192.168.0.3, remote AS 1, internal link + Description: iBGP peer csr1000v-1 + BGP version 4, remote router ID 192.168.0.3 + BGP state = Established, up for 00:13:20 + Last read 00:00:21, last write 00:01:00, hold time is 180, keepalive interval is 60 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Address family IPv6 Unicast: advertised and received + Address family IPv4 Multicast: advertised and received + Enhanced Refresh Capability: advertised and received + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 2 7 + Keepalives: 16 16 + Route Refresh: 0 0 + Total: 21 24 + Do log neighbor state changes (via global configuration) + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 Unicast + Session: 192.168.0.3 + BGP table version 25, neighbor version 25/0 + Output queue size : 0 + Index 4, Advertise bit 0 + 4 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 1 1 (Consumes 80 bytes) + Prefixes Total: 4 1 + Implicit Withdraw: 3 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 1 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 7 n/a + Bestpath from iBGP peer: 3 n/a + Total: 10 0 + Number of NLRIs in the update sent: max 1, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: 00:13:20 + Last Sent Refresh End-of-rib: 00:13:20 + Refresh-Out took 0 seconds + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 1 0 + Refresh End-of-RIB 1 0 + + For address family: IPv6 Unicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 1, Advertise bit 0 + 1 update-group member + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 2 (Consumes 208 bytes) + Prefixes Total: 0 4 + Implicit Withdraw: 0 2 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: IPv4 Multicast + Session: 192.168.0.3 + BGP table version 1, neighbor version 1/0 + Output queue size : 0 + Index 2, Advertise bit 0 + 2 update-group member + Uses NEXT_HOP attribute for MBGP NLRIs + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 0 0 + Prefixes Total: 0 0 + Implicit Withdraw: 0 0 + Explicit Withdraw: 0 0 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Total: 0 0 + Number of NLRIs in the update sent: max 0, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 192.168.0.3 + Connections established 5; dropped 4 + Last reset 00:13:21, due to Peer closed the session of session 1 + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is disabled + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 192.168.0.2, Local port: 179 +Foreign host: 192.168.0.3, Foreign port: 49379 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x59A702CF): +Timer Starts Wakeups Next +Retrans 19 0 0x0 +TimeWait 0 0 0x0 +AckHold 21 17 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 1841341979 snduna: 1841342482 sndnxt: 1841342482 +irs: 272578933 rcvnxt: 272579688 + +sndwnd: 15882 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15630 scale: 0 delrcvwnd: 754 + +SRTT: 921 ms, RTTO: 1531 ms, RTV: 610 ms, KRTT: 0 ms +minRTT: 10 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: 800963 ms, Sent idletime: 21826 ms, Receive idletime: 22028 ms +Status Flags: passive open, gen tcbs +Option Flags: nagle, path mtu capable +IP Precedence value : 6 + +Datagrams (max data segment is 1460 bytes): +Rcvd: 41 (out of order: 0), with data: 23, total data bytes: 754 +Sent: 40 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 19, total data bytes: 502 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x0FF51F84 FREE + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv4_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv4_unicast_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv4_unicast_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv6_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv6_unicast_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_vpnv6_unicast_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/expected_result.json b/test/ios/mocked_data/test_get_bgp_neighbors/normal/expected_result.json index 66a0e6055..284c615e4 100644 --- a/test/ios/mocked_data/test_get_bgp_neighbors/normal/expected_result.json +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/expected_result.json @@ -11,12 +11,12 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": 637213, "accepted_prefixes": 3142, "received_prefixes": 3142 }, - "ipv6": { + "ipv6 unicast": { "sent_prefixes": 36714, "accepted_prefixes": 148, "received_prefixes": 148 @@ -32,12 +32,12 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": 966, "accepted_prefixes": 1, "received_prefixes": 1 }, - "ipv6": { + "ipv6 unicast": { "sent_prefixes": 105, "accepted_prefixes": 2, "received_prefixes": 2 @@ -53,7 +53,7 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": 709, "accepted_prefixes": 0, "received_prefixes": 0 @@ -69,7 +69,7 @@ "local_as": 65000, "is_up": false, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": -1, "accepted_prefixes": -1, "received_prefixes": -1 @@ -85,7 +85,7 @@ "local_as": 65000, "is_up": false, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": -1, "accepted_prefixes": -1, "received_prefixes": -1 @@ -101,7 +101,7 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv4": { + "ipv4 unicast": { "sent_prefixes": 213, "accepted_prefixes": 629700, "received_prefixes": 629700 @@ -117,7 +117,7 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv6": { + "ipv6 unicast": { "sent_prefixes": 35, "accepted_prefixes": 0, "received_prefixes": 0 @@ -133,7 +133,7 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv6": { + "ipv6 unicast": { "sent_prefixes": 36, "accepted_prefixes": 1, "received_prefixes": 1 @@ -149,7 +149,7 @@ "local_as": 65000, "is_up": false, "address_family": { - "ipv6": { + "ipv6 unicast": { "sent_prefixes": -1, "accepted_prefixes": -1, "received_prefixes": -1 @@ -165,7 +165,7 @@ "local_as": 65000, "is_up": true, "address_family": { - "ipv6": { + "ipv6 unicast": { "sent_prefixes": 29, "accepted_prefixes": 36387, "received_prefixes": 36387 diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_mdt_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_mdt_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_mdt_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_multicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_multicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_multicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_multicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv4_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv4_unicast_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv4_unicast_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv6_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv6_unicast_all_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/normal/show_bgp_vpnv6_unicast_all_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/expected_result.json b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/expected_result.json new file mode 100644 index 000000000..e774b89d7 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/expected_result.json @@ -0,0 +1,86 @@ +{ + "TEST": { + "router_id": "10.23.4.9", + "peers": { + "10.124.238.162": { + "local_as": 65904, + "remote_as": 65221, + "remote_id": "10.23.17.238", + "is_up": true, + "is_enabled": true, + "description": "eBGP to ro03", + "uptime": 6652800, + "address_family": { + "vpnv4 unicast": { + "received_prefixes": 5, + "accepted_prefixes": 5, + "sent_prefixes": 9 + } + } + }, + "10.124.238.174": { + "local_as": 65904, + "remote_as": 65221, + "remote_id": "10.23.17.239", + "is_up": true, + "is_enabled": true, + "description": "eBGP to ro04", + "uptime": 6652800, + "address_family": { + "vpnv4 unicast": { + "received_prefixes": 5, + "accepted_prefixes": 5, + "sent_prefixes": 9 + } + } + } + } + }, + "global": { + "router_id": "10.23.4.9", + "peers": { + "10.23.4.1": { + "local_as": 65904, + "remote_as": 65904, + "remote_id": "10.23.4.1", + "is_up": true, + "is_enabled": true, + "description": "iBGP_RouteReflectorClient", + "uptime": 33955200, + "address_family": { + "ipv4 mdt": { + "received_prefixes": 2, + "accepted_prefixes": 2, + "sent_prefixes": 44 + }, + "vpnv4 unicast": { + "received_prefixes": 28, + "accepted_prefixes": 28, + "sent_prefixes": 11825 + } + } + }, + "10.23.4.2": { + "local_as": 65904, + "remote_as": 65904, + "remote_id": "10.23.4.2", + "is_up": true, + "is_enabled": true, + "description": "iBGP_RouteReflectorClient", + "uptime": 33955200, + "address_family": { + "ipv4 mdt": { + "received_prefixes": 2, + "accepted_prefixes": 2, + "sent_prefixes": 44 + }, + "vpnv4 unicast": { + "received_prefixes": 28, + "accepted_prefixes": 28, + "sent_prefixes": 11825 + } + } + } + } + } +} \ No newline at end of file diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_all_summary.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_all_summary.txt new file mode 100644 index 000000000..8821e2a66 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_all_summary.txt @@ -0,0 +1,40 @@ +For address family: IPv4 MDT +BGP router identifier 10.23.4.9, local AS number 65904 +BGP table version is 1196, main routing table version 1196 +44 network entries using 11264 bytes of memory +158 path entries using 20224 bytes of memory +38/34 BGP path/bestpath attribute entries using 9424 bytes of memory +120 BGP rrinfo entries using 4800 bytes of memory +107 BGP AS-PATH entries using 6560 bytes of memory +24 BGP community entries using 576 bytes of memory +352 BGP extended community entries using 57618 bytes of memory +0 BGP route-map cache entries using 0 bytes of memory +0 BGP filter-list cache entries using 0 bytes of memory +BGP using 110466 total bytes of memory +BGP activity 7518411/7495529 prefixes, 42295720/42241362 paths, scan interval 10 secs + +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd +10.23.4.1 4 65904 16623253 21263669 1196 0 0 1y4w 2 +10.23.4.2 4 65904 16622654 21254551 1196 0 0 1y4w 2 + +For address family: VPNv4 Unicast +BGP router identifier 10.23.4.9, local AS number 65904 +BGP table version is 128859195, main routing table version 128859195 +22838 network entries using 5846528 bytes of memory +54200 path entries using 6504000 bytes of memory +2858/1411 BGP path/bestpath attribute entries using 754512 bytes of memory +120 BGP rrinfo entries using 4800 bytes of memory +107 BGP AS-PATH entries using 6560 bytes of memory +24 BGP community entries using 576 bytes of memory +352 BGP extended community entries using 57618 bytes of memory +0 BGP route-map cache entries using 0 bytes of memory +0 BGP filter-list cache entries using 0 bytes of memory +BGP using 13174594 total bytes of memory +9784 received paths for inbound soft reconfiguration +BGP activity 7518411/7495529 prefixes, 42295720/42241362 paths, scan interval 10 secs + +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd +10.124.238.162 4 65221 3258980 3260629 128859195 0 0 11w0d 5 +10.124.238.174 4 65221 3258986 3260630 128859195 0 0 11w0d 5 +10.23.4.1 4 65904 16623876 21264368 128859991 0 0 1y4w 28 +10.23.4.2 4 65904 16623277 21255250 128859991 0 0 1y4w 28 diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_mdt_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_mdt_all_neighbors.txt new file mode 100644 index 000000000..6f6221c83 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_mdt_all_neighbors.txt @@ -0,0 +1,330 @@ +BGP neighbor is 10.23.4.1, remote AS 65904, internal link + Description: iBGP_RouteReflectorClient + Inherits from template iBGP_RR for session parameters + BGP version 4, remote router ID 10.23.4.1 + BGP state = Established, up for 1y4w + Last read 00:00:01, last write 00:00:01, hold time is 9, keepalive interval is 2 seconds + Configured hold time is 9, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 MDT: advertised and received + Address family VPNv4 Unicast: advertised and received + Graceful Restart Capability: advertised and received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 MDT (was not preserved, VPNv4 Unicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: and received + Stateful switchover support enabled: NO for session 1 + Message statistics, state Established: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 6939143 1209 + Keepalives: 14325483 16622891 + Route Refresh: 0 14 + Total: 21264627 16624115 + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 MDT + Session: 10.23.4.1 + BGP table version 1196, neighbor version 1196/0 + Output queue size : 0 + Index 3, Advertise bit 1 + Route-Reflector Client + 3 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 44 2 (Consumes 256 bytes) + Prefixes Total: 11445 4 + Implicit Withdraw: 11330 2 + Explicit Withdraw: 71 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 2 n/a + Bestpath from iBGP peer: 2 n/a + Total: 4 0 + Number of NLRIs in the update sent: max 3, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: VPNv4 Unicast + Session: 10.23.4.1 + BGP table version 128860627, neighbor version 128860627/0 + Output queue size : 0 + Index 56241, Advertise bit 6 + Route-Reflector Client + 56241 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 11825 28 (Consumes 6360 bytes) + Prefixes Total: 21583708 4611 + Implicit Withdraw: 12372174 1910 + Explicit Withdraw: 9199088 2673 + Used as bestpath: n/a 51 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 1016 n/a + Suppressed due to dampening: 12347 n/a + Bestpath from iBGP peer: 487 n/a + AF Permit Check: 11240635 n/a + Invalid Path: 6 n/a + AF Update Check: 76213 n/a + Total: 11330704 0 + Number of NLRIs in the update sent: max 267, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 10.23.4.1 + Connections established 4; dropped 3 + Last reset 1y4w, due to RR client config change of session 1 + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 10.23.4.9, Local port: 11750 +Foreign host: 10.23.4.1, Foreign port: 179 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1F2A14): +Timer Starts Wakeups Next +Retrans 19674640 7 0x0 +TimeWait 0 0 0x0 +AckHold 16623191 14600544 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 6248363 6248362 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 185434464 snduna: 1581373830 sndnxt: 1581373830 +irs: 4023632593 rcvnxt: 44669840 + +sndwnd: 10245 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15263 scale: 0 delrcvwnd: 1121 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 546 ms, Receive idletime: 349 ms +Status Flags: active open, path mtu discovery +Option Flags: nagle, path mtu capable, md5 +IP Precedence value : 6 + +Datagrams (max data segment is 1560 bytes): +Rcvd: 34428410 (out of order: 0), with data: 16623221, total data bytes: 316004561 +Sent: 35107896 (retransmit: 7, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 20336707, total data bytes: 1395939403 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C08B5D270 FREE + +BGP neighbor is 10.23.4.2, remote AS 65904, internal link + Description: iBGP_RouteReflectorClient + Inherits from template iBGP_RR for session parameters + BGP version 4, remote router ID 10.23.4.2 + BGP state = Established, up for 1y4w + Last read 00:00:01, last write 00:00:00, hold time is 9, keepalive interval is 2 seconds + Configured hold time is 9, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 MDT: advertised and received + Address family VPNv4 Unicast: advertised and received + Graceful Restart Capability: advertised and received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 MDT (was not preserved, VPNv4 Unicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: and received + Stateful switchover support enabled: NO for session 1 + Message statistics, state Established: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 6930951 1868 + Keepalives: 14324537 16621645 + Route Refresh: 28 10 + Total: 21255517 16623524 + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 MDT + Session: 10.23.4.2 + BGP table version 1196, neighbor version 1196/0 + Output queue size : 0 + Index 3, Advertise bit 1 + Route-Reflector Client + 3 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 44 2 (Consumes 256 bytes) + Prefixes Total: 11445 2 + Implicit Withdraw: 11330 0 + Explicit Withdraw: 71 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 2 n/a + Bestpath from iBGP peer: 2 n/a + Total: 4 0 + Number of NLRIs in the update sent: max 3, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: VPNv4 Unicast + Session: 10.23.4.2 + BGP table version 128860627, neighbor version 128860627/0 + Output queue size : 0 + Index 56241, Advertise bit 6 + Route-Reflector Client + 56241 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 11825 28 (Consumes 6360 bytes) + Prefixes Total: 21583708 10099 + Implicit Withdraw: 12372174 7117 + Explicit Withdraw: 9199088 2954 + Used as bestpath: n/a 37 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 1016 n/a + Suppressed due to dampening: 12347 n/a + Bestpath from iBGP peer: 487 n/a + AF Permit Check: 11240635 n/a + Invalid Path: 6 n/a + AF Update Check: 76213 n/a + Total: 11330704 0 + Number of NLRIs in the update sent: max 267, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 10.23.4.2 + Connections established 1; dropped 0 + Last reset never + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 10.23.4.9, Local port: 25751 +Foreign host: 10.23.4.2, Foreign port: 179 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1F5C2B): +Timer Starts Wakeups Next +Retrans 19748470 3 0x0 +TimeWait 0 0 0x0 +AckHold 16622107 14536809 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 1 1 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 2431176863 snduna: 3825540778 sndnxt: 3825540778 +irs: 2039673132 rcvnxt: 2355806927 + +sndwnd: 15444 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15434 scale: 0 delrcvwnd: 950 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 258 ms, Receive idletime: 61 ms +Status Flags: active open +Option Flags: nagle, path mtu capable, md5 +IP Precedence value : 6 + +Datagrams (max data segment is 1536 bytes): +Rcvd: 34592673 (out of order: 0), with data: 16622195, total data bytes: 316133794 +Sent: 35114649 (retransmit: 3, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 20372301, total data bytes: 1394363914 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C068D76A8 FREE + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_multicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_multicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_unicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_unicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv4_unicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_multicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_multicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_multicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_unicast_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_unicast_neighbors.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_ipv6_unicast_neighbors.txt @@ -0,0 +1 @@ + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv4_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv4_unicast_all_neighbors.txt new file mode 100644 index 000000000..33251ba74 --- /dev/null +++ b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv4_unicast_all_neighbors.txt @@ -0,0 +1,598 @@ +BGP neighbor is 10.124.238.162, vrf TEST, remote AS 65221, external link + Description: eBGP to ro03 + Inherits from template TI-eBGP for session parameters + BGP version 4, remote router ID 10.23.17.238 + BGP state = Established, up for 11w0d + Last read 00:00:01, last write 00:00:00, hold time is 6, keepalive interval is 2 seconds + Configured hold time is 7, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Graceful Restart Capability: advertised + Enhanced Refresh Capability: advertised and received + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 2492 18 + Keepalives: 3258866 3259712 + Route Refresh: 0 0 + Total: 3261383 3259733 + Default minimum time between advertisement runs is 0 seconds + + For address family: VPNv4 Unicast + Translates address family IPv4 Unicast for VRF TEST + Session: 10.124.238.162 + BGP table version 128859991, neighbor version 128859991/0 + Output queue size : 0 + Index 59765, Advertise bit 0 + 59765 update-group member + Inherits from template TI-PRI1 + Inbound soft reconfiguration allowed + Community attribute sent to this neighbor + Inbound path policy configured + Outbound path policy configured + Outgoing update prefix filter list is PL_FROM_BGP + Route map for incoming advertisements is RM_LOCAL-PREF-1 + Route map for outgoing advertisements is RM_AS-PREPEND-1 + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 9 5 (Consumes 1440 bytes) + Prefixes Total: 15264 7 + Implicit Withdraw: 15238 0 + Explicit Withdraw: 4 2 + Used as bestpath: n/a 7 + Used as multipath: n/a 0 + Saved (soft-reconfig): n/a 5 (Consumes 600 bytes) + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + prefix-list 18821 0 + AS_PATH loop: n/a 26 + Bestpath from this peer: 32 n/a + Suppressed due to dampening: 16 n/a + Total: 18869 26 + Maximum prefixes allowed 2000 + Threshold for warning message 75% + Number of NLRIs in the update sent: max 12, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Minimum time between advertisement runs is 5 seconds + Refresh Epoch: 2 + Last Sent Refresh Start-of-rib: 4w1d + Last Sent Refresh End-of-rib: 4w1d + Refresh-Out took 0 seconds + Last Received Refresh Start-of-rib: 11w0d + Last Received Refresh End-of-rib: 11w0d + Refresh-In took 0 seconds + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 12 1 + Refresh End-of-RIB 12 1 + + Address tracking is enabled, the RIB does have a route to 10.124.238.162 + Connections established 1; dropped 0 + Last reset never + External BGP neighbor configured for connected checks (single-hop no-disable-connected-check) + Interface associated: TenGigabitEthernet1/1/0.3113 (peering address in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1 +Local host: 10.124.238.161, Local port: 179 +Foreign host: 10.124.238.162, Foreign port: 64354 +Connection tableid (VRF): 58 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1CEF4D): +Timer Starts Wakeups Next +Retrans 3261232 0 0x0 +TimeWait 0 0 0x0 +AckHold 3259744 2893319 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 0 0 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 2170764437 snduna: 2232911108 sndnxt: 2232911108 +irs: 1470694361 rcvnxt: 1532630471 + +sndwnd: 15795 scale: 0 maxrcvwnd: 16384 +rcvwnd: 14978 scale: 0 delrcvwnd: 1406 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 1095 ms, Receive idletime: 894 ms +Status Flags: passive open, gen tcbs +Option Flags: VRF id set, nagle, path mtu capable, md5, Retrans timeout +IP Precedence value : 6 + +Datagrams (max data segment is 1460 bytes): +Rcvd: 6206170 (out of order: 0), with data: 3259746, total data bytes: 61936128 +Sent: 6197020 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 3261356, total data bytes: 62146689 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C09CAA108 FREE + +BGP neighbor is 10.124.238.174, vrf TEST, remote AS 65221, external link + Description: eBGP to ro04 + Inherits from template TI-eBGP for session parameters + BGP version 4, remote router ID 10.23.17.239 + BGP state = Established, up for 11w0d + Last read 00:00:00, last write 00:00:01, hold time is 6, keepalive interval is 2 seconds + Configured hold time is 7, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is not multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 Unicast: advertised and received + Graceful Restart Capability: advertised + Enhanced Refresh Capability: advertised and received + Multisession Capability: + Stateful switchover support enabled: NO for session 1 + Message statistics: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 2496 29 + Keepalives: 3258881 3259725 + Route Refresh: 0 0 + Total: 3261402 3259757 + Default minimum time between advertisement runs is 0 seconds + + For address family: VPNv4 Unicast + Translates address family IPv4 Unicast for VRF TEST + Session: 10.124.238.174 + BGP table version 128859991, neighbor version 128859991/0 + Output queue size : 0 + Index 59766, Advertise bit 2 + 59766 update-group member + Inherits from template TI-PRI3 + Inbound soft reconfiguration allowed + Community attribute sent to this neighbor + Inbound path policy configured + Outbound path policy configured + Outgoing update prefix filter list is PL_FROM_BGP + Route map for incoming advertisements is RM_LOCAL-PREF-3 + Route map for outgoing advertisements is RM_AS-PREPEND-3 + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 9 5 (Consumes 1320 bytes) + Prefixes Total: 15268 7 + Implicit Withdraw: 15238 0 + Explicit Withdraw: 0 2 + Used as bestpath: n/a 0 + Used as multipath: n/a 0 + Saved (soft-reconfig): n/a 5 (Consumes 600 bytes) + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + prefix-list 18848 0 + AS_PATH loop: n/a 39 + Bestpath from this peer: 1 n/a + Suppressed due to dampening: 16 n/a + Total: 18865 39 + Maximum prefixes allowed 2000 + Threshold for warning message 75% + Number of NLRIs in the update sent: max 12, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Minimum time between advertisement runs is 5 seconds + Refresh Epoch: 2 + Last Sent Refresh Start-of-rib: 4w1d + Last Sent Refresh End-of-rib: 4w1d + Refresh-Out took 0 seconds + Last Received Refresh Start-of-rib: 11w0d + Last Received Refresh End-of-rib: 11w0d + Refresh-In took 0 seconds + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 12 1 + Refresh End-of-RIB 12 1 + + Address tracking is enabled, the RIB does have a route to 10.124.238.174 + Connections established 1; dropped 0 + Last reset never + External BGP neighbor configured for connected checks (single-hop no-disable-connected-check) + Interface associated: TenGigabitEthernet0/2/0.3116 (peering address in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1 +Local host: 10.124.238.173, Local port: 27846 +Foreign host: 10.124.238.174, Foreign port: 179 +Connection tableid (VRF): 58 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1D12FC): +Timer Starts Wakeups Next +Retrans 3261239 0 0x0 +TimeWait 0 0 0x0 +AckHold 3259753 2892586 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 6654736 6654735 0x106A1D13E0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 3420265207 snduna: 3482442005 sndnxt: 3482442005 +irs: 1708242578 rcvnxt: 1770179666 + +sndwnd: 15947 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15548 scale: 0 delrcvwnd: 836 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 614 ms, Receive idletime: 814 ms +Status Flags: active open +Option Flags: VRF id set, nagle, path mtu capable, md5 +IP Precedence value : 6 + +Datagrams (max data segment is 1460 bytes): +Rcvd: 6202523 (out of order: 0), with data: 3259756, total data bytes: 61937106 +Sent: 6196289 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 3261358, total data bytes: 62176816 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C09CA9F88 FREE + +BGP neighbor is 10.23.4.1, remote AS 65904, internal link + Description: iBGP_RouteReflectorClient + Inherits from template iBGP_RR for session parameters + BGP version 4, remote router ID 10.23.4.1 + BGP state = Established, up for 1y4w + Last read 00:00:01, last write 00:00:01, hold time is 9, keepalive interval is 2 seconds + Configured hold time is 9, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 MDT: advertised and received + Address family VPNv4 Unicast: advertised and received + Graceful Restart Capability: advertised and received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 MDT (was not preserved, VPNv4 Unicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: and received + Stateful switchover support enabled: NO for session 1 + Message statistics, state Established: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 6939143 1209 + Keepalives: 14325483 16622891 + Route Refresh: 0 14 + Total: 21264627 16624115 + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 MDT + Session: 10.23.4.1 + BGP table version 1196, neighbor version 1196/0 + Output queue size : 0 + Index 3, Advertise bit 1 + Route-Reflector Client + 3 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 44 2 (Consumes 256 bytes) + Prefixes Total: 11445 4 + Implicit Withdraw: 11330 2 + Explicit Withdraw: 71 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 2 n/a + Bestpath from iBGP peer: 2 n/a + Total: 4 0 + Number of NLRIs in the update sent: max 3, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: VPNv4 Unicast + Session: 10.23.4.1 + BGP table version 128860627, neighbor version 128860627/0 + Output queue size : 0 + Index 56241, Advertise bit 6 + Route-Reflector Client + 56241 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 11825 28 (Consumes 6360 bytes) + Prefixes Total: 21583708 4611 + Implicit Withdraw: 12372174 1910 + Explicit Withdraw: 9199088 2673 + Used as bestpath: n/a 51 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 1016 n/a + Suppressed due to dampening: 12347 n/a + Bestpath from iBGP peer: 487 n/a + AF Permit Check: 11240635 n/a + Invalid Path: 6 n/a + AF Update Check: 76213 n/a + Total: 11330704 0 + Number of NLRIs in the update sent: max 267, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 10.23.4.1 + Connections established 4; dropped 3 + Last reset 1y4w, due to RR client config change of session 1 + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 10.23.4.9, Local port: 11750 +Foreign host: 10.23.4.1, Foreign port: 179 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1F2A14): +Timer Starts Wakeups Next +Retrans 19674640 7 0x0 +TimeWait 0 0 0x0 +AckHold 16623191 14600544 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 6248363 6248362 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 185434464 snduna: 1581373830 sndnxt: 1581373830 +irs: 4023632593 rcvnxt: 44669840 + +sndwnd: 10245 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15263 scale: 0 delrcvwnd: 1121 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 546 ms, Receive idletime: 349 ms +Status Flags: active open, path mtu discovery +Option Flags: nagle, path mtu capable, md5 +IP Precedence value : 6 + +Datagrams (max data segment is 1560 bytes): +Rcvd: 34428410 (out of order: 0), with data: 16623221, total data bytes: 316004561 +Sent: 35107896 (retransmit: 7, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 20336707, total data bytes: 1395939403 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C08B5D270 FREE + +BGP neighbor is 10.23.4.2, remote AS 65904, internal link + Description: iBGP_RouteReflectorClient + Inherits from template iBGP_RR for session parameters + BGP version 4, remote router ID 10.23.4.2 + BGP state = Established, up for 1y4w + Last read 00:00:01, last write 00:00:00, hold time is 9, keepalive interval is 2 seconds + Configured hold time is 9, keepalive interval is 2 seconds + Minimum holdtime from neighbor is 0 seconds + Neighbor sessions: + 1 active, is multisession capable (disabled) + Neighbor capabilities: + Route refresh: advertised and received(new) + Four-octets ASN Capability: advertised and received + Address family IPv4 MDT: advertised and received + Address family VPNv4 Unicast: advertised and received + Graceful Restart Capability: advertised and received + Remote Restart timer is 120 seconds + Address families advertised by peer: + IPv4 MDT (was not preserved, VPNv4 Unicast (was not preserved + Enhanced Refresh Capability: advertised + Multisession Capability: and received + Stateful switchover support enabled: NO for session 1 + Message statistics, state Established: + InQ depth is 0 + OutQ depth is 0 + + Sent Rcvd + Opens: 1 1 + Notifications: 0 0 + Updates: 6930951 1868 + Keepalives: 14324537 16621645 + Route Refresh: 28 10 + Total: 21255517 16623524 + Default minimum time between advertisement runs is 0 seconds + + For address family: IPv4 MDT + Session: 10.23.4.2 + BGP table version 1196, neighbor version 1196/0 + Output queue size : 0 + Index 3, Advertise bit 1 + Route-Reflector Client + 3 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 44 2 (Consumes 256 bytes) + Prefixes Total: 11445 2 + Implicit Withdraw: 11330 0 + Explicit Withdraw: 71 0 + Used as bestpath: n/a 2 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 2 n/a + Bestpath from iBGP peer: 2 n/a + Total: 4 0 + Number of NLRIs in the update sent: max 3, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + For address family: VPNv4 Unicast + Session: 10.23.4.2 + BGP table version 128860627, neighbor version 128860627/0 + Output queue size : 0 + Index 56241, Advertise bit 6 + Route-Reflector Client + 56241 update-group member + Inherits from template iBGP_RR + Community attribute sent to this neighbor + Slow-peer detection is disabled + Slow-peer split-update-group dynamic is disabled + Sent Rcvd + Prefix activity: ---- ---- + Prefixes Current: 11825 28 (Consumes 6360 bytes) + Prefixes Total: 21583708 10099 + Implicit Withdraw: 12372174 7117 + Explicit Withdraw: 9199088 2954 + Used as bestpath: n/a 37 + Used as multipath: n/a 0 + + Outbound Inbound + Local Policy Denied Prefixes: -------- ------- + Bestpath from this peer: 1016 n/a + Suppressed due to dampening: 12347 n/a + Bestpath from iBGP peer: 487 n/a + AF Permit Check: 11240635 n/a + Invalid Path: 6 n/a + AF Update Check: 76213 n/a + Total: 11330704 0 + Number of NLRIs in the update sent: max 267, min 0 + Last detected as dynamic slow peer: never + Dynamic slow peer recovered: never + Refresh Epoch: 1 + Last Sent Refresh Start-of-rib: never + Last Sent Refresh End-of-rib: never + Last Received Refresh Start-of-rib: never + Last Received Refresh End-of-rib: never + Sent Rcvd + Refresh activity: ---- ---- + Refresh Start-of-RIB 0 0 + Refresh End-of-RIB 0 0 + + Address tracking is enabled, the RIB does have a route to 10.23.4.2 + Connections established 1; dropped 0 + Last reset never + Interface associated: (none) (peering address NOT in same link) + Transport(tcp) path-mtu-discovery is enabled + Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds + SSO is disabled +Connection state is ESTAB, I/O status: 1, unread input bytes: 0 +Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255 +Local host: 10.23.4.9, Local port: 25751 +Foreign host: 10.23.4.2, Foreign port: 179 +Connection tableid (VRF): 0 +Maximum output segment queue size: 50 + +Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) + +Event Timers (current time is 0x106A1F5C2B): +Timer Starts Wakeups Next +Retrans 19748470 3 0x0 +TimeWait 0 0 0x0 +AckHold 16622107 14536809 0x0 +SendWnd 0 0 0x0 +KeepAlive 0 0 0x0 +GiveUp 0 0 0x0 +PmtuAger 1 1 0x0 +DeadWait 0 0 0x0 +Linger 0 0 0x0 +ProcessQ 0 0 0x0 + +iss: 2431176863 snduna: 3825540778 sndnxt: 3825540778 +irs: 2039673132 rcvnxt: 2355806927 + +sndwnd: 15444 scale: 0 maxrcvwnd: 16384 +rcvwnd: 15434 scale: 0 delrcvwnd: 950 + +SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms +minRTT: 0 ms, maxRTT: 1000 ms, ACK hold: 200 ms +uptime: -1 ms, Sent idletime: 258 ms, Receive idletime: 61 ms +Status Flags: active open +Option Flags: nagle, path mtu capable, md5 +IP Precedence value : 6 + +Datagrams (max data segment is 1536 bytes): +Rcvd: 34592673 (out of order: 0), with data: 16622195, total data bytes: 316133794 +Sent: 35114649 (retransmit: 3, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 20372301, total data bytes: 1394363914 + + Packets received in fast path: 0, fast processed: 0, slow path: 0 + fast lock acquisition failures: 0, slow path: 0 +TCP Semaphore 0x7F2C068D76A8 FREE + diff --git a/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv6_unicast_all_neighbors.txt b/test/ios/mocked_data/test_get_bgp_neighbors/vrfs_mdt/show_bgp_vpnv6_unicast_all_neighbors.txt new file mode 100644 index 000000000..e69de29bb