mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 13:21:22 +00:00
![]() This commit => provides "all" option, to display the table entries for all(or specific) AFI/SAFIs. => Also introduced "show_flags" to avoid passing multiple arguments(use_json, wide, all) to functions 1. show <ip> bgp <ipv4/ipv6> <all> <wide|json> 2. show <ip> bgp <ipv4/ipv6> <all> summary <json> 3. show <ip> bgp <ipv4/ipv6> <all> cidr-only <wide|json> 4. show <ip> bgp <ipv4/ipv6> <all> community <wide|json> 5. show <ip> bgp <ipv4/ipv6> <all> dampening <dampened-paths|flap-statistics|parameters> <wide|json> 6. show <ip> bgp <ipv4/ipv6> <all> neighbors A.B.C.D advertised-routes|filtered-routes|received-routes <wide|json> show bgp all summary == show ip bgp all summary => output is same => display entries for all AFIs and for each SAFI. show bgp ipv4 all summary == show ip bgp ipv4 all summary => output is same => display entries for each SAFI in AFI_IP show bgp ipv6 all summary == show ip bgp ipv6 all summart => output is same => display entries for each SAFI in AFI_IP6 similarly for all other commands. sample output 1. show <ip> bgp <ipv4/ipv6> <all> <wide|json> router# show ip bgp all wide For address family: IPv4 Unicast BGP table version is 6, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.1/32 0.0.0.0 0 32768 ? *>i2.2.2.2/32 192.168.56.152 0 100 0 ? * i10.0.2.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? * i192.168.56.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? *>i192.168.123.245/32 192.168.56.152 0 100 0 ? *>i192.168.223.245/32 192.168.56.152 0 100 0 ? Displayed 6 routes and 8 total paths For address family: IPv6 Unicast BGP table version is 3, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 32768 ? *>i2001:db8::2/128 fe80::a00:27ff:fefc:2aa 0 100 0 ? *> 2001:db8:85a3::8a2e:370:7334/128 :: 0 32768 ? Displayed 3 routes and 3 total paths router# router# show ip bgp ipv4 all wide For address family: IPv4 Unicast BGP table version is 6, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.1/32 0.0.0.0 0 32768 ? *>i2.2.2.2/32 192.168.56.152 0 100 0 ? * i10.0.2.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? * i192.168.56.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? *>i192.168.123.245/32 192.168.56.152 0 100 0 ? *>i192.168.223.245/32 192.168.56.152 0 100 0 ? Displayed 6 routes and 8 total paths router# router# router# show ip bgp ipv6 all wide For address family: IPv6 Unicast BGP table version is 3, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 32768 ? *>i2001:db8::2/128 fe80::a00:27ff:fefc:2aa 0 100 0 ? *> 2001:db8:85a3::8a2e:370:7334/128 :: 0 32768 ? Displayed 3 routes and 3 total paths router# router# show bgp all wide For address family: IPv4 Unicast BGP table version is 6, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.1/32 0.0.0.0 0 32768 ? *>i2.2.2.2/32 192.168.56.152 0 100 0 ? * i10.0.2.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? * i192.168.56.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? *>i192.168.123.245/32 192.168.56.152 0 100 0 ? *>i192.168.223.245/32 192.168.56.152 0 100 0 ? Displayed 6 routes and 8 total paths For address family: IPv6 Unicast BGP table version is 3, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 32768 ? *>i2001:db8::2/128 fe80::a00:27ff:fefc:2aa 0 100 0 ? *> 2001:db8:85a3::8a2e:370:7334/128 :: 0 32768 ? Displayed 3 routes and 3 total paths router# router# router# show bgp ipv4 all wide For address family: IPv4 Unicast BGP table version is 6, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.1/32 0.0.0.0 0 32768 ? *>i2.2.2.2/32 192.168.56.152 0 100 0 ? * i10.0.2.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? * i192.168.56.0/24 192.168.56.152 0 100 0 ? *> 0.0.0.0 0 32768 ? *>i192.168.123.245/32 192.168.56.152 0 100 0 ? *>i192.168.223.245/32 192.168.56.152 0 100 0 ? Displayed 6 routes and 8 total paths router# router# show bgp ipv6 all wide For address family: IPv6 Unicast BGP table version is 3, local router ID is 1.1.1.1, vrf id 0 Default local pref 100, local AS 1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 32768 ? *>i2001:db8::2/128 fe80::a00:27ff:fefc:2aa 0 100 0 ? *> 2001:db8:85a3::8a2e:370:7334/128 :: 0 32768 ? Displayed 3 routes and 3 total paths router# Router1# show bgp all dampening parameters For address family: IPv4 Unicast Half-life time: 15 min Reuse penalty: 750 Suppress penalty: 2000 Max suppress time: 60 min Max suppress penalty: 12000 For address family: IPv4 Multicast Half-life time: 20 min Reuse penalty: 1000 Suppress penalty: 10000 Max suppress time: 40 min Max suppress penalty: 4000 For address family: IPv4 VPN dampening not enabled for IPv4 VPN For address family: IPv4 Encap dampening not enabled for IPv4 Encap For address family: IPv4 Labeled Unicast dampening not enabled for IPv4 Labeled Unicast For address family: IPv4 Flowspec dampening not enabled for IPv4 Flowspec For address family: IPv6 Unicast dampening not enabled for IPv6 Unicast For address family: IPv6 Multicast Half-life time: 10 min Reuse penalty: 1500 Suppress penalty: 15000 Max suppress time: 20 min Max suppress penalty: 6000 For address family: IPv6 VPN dampening not enabled for IPv6 VPN For address family: IPv6 Encap dampening not enabled for IPv6 Encap For address family: IPv6 Labeled Unicast dampening not enabled for IPv6 Labeled Unicast For address family: IPv6 Flowspec dampening not enabled for IPv6 Flowspec For address family: L2VPN EVPN dampening not enabled for L2VPN EVPN router# bgpd: all option with json-c apis used Replaced vty_out with json-c wrapper functions for all option support to show <ip> bgp commands Sample output: Router2# show bgp all json { "ipv4Unicast":{ "vrfId": 0, "vrfName": "default", "tableVersion": 8, "routerId": "128.16.16.1", "defaultLocPrf": 100, "localAS": 2, "routes": { "128.16.16.0/24": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"128.16.16.0", "prefixLen":24, "network":"128.16.16.0\/24", "metric":0, "weight":32768, "peerId":"(unspec)", "path":"", "origin":"IGP", "nexthops":[ { "ip":"0.0.0.0", "hostname":"router", "afi":"ipv4", "used":true } ] } ],"130.130.0.0/16": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"130.130.0.0", "prefixLen":16, "network":"130.130.0.0\/16", "metric":0, "weight":32768, "peerId":"(unspec)", "path":"", "origin":"IGP", "nexthops":[ { "ip":"0.0.0.0", "hostname":"router", "afi":"ipv4", "used":true } ] } ],"192.168.50.0/24": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"192.168.50.0", "prefixLen":24, "network":"192.168.50.0\/24", "metric":0, "weight":0, "peerId":"10.10.20.3", "path":"3", "origin":"IGP", "nexthops":[ { "ip":"10.10.20.3", "hostname":"router", "afi":"ipv4", "used":true } ] } ],"200.200.200.0/24": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"200.200.200.0", "prefixLen":24, "network":"200.200.200.0\/24", "metric":0, "weight":0, "peerId":"10.10.10.1", "path":"1", "origin":"IGP", "nexthops":[ { "ip":"10.10.10.1", "hostname":"router", "afi":"ipv4", "used":true } ] } ] } } , "ipv4Multicast":{ "vrfId": 0, "vrfName": "default", "tableVersion": 0, "routerId": "128.16.16.1", "defaultLocPrf": 100, "localAS": 2, "routes": { } } , "ipv4Flowspec":{ "vrfId": 0, "vrfName": "default", "tableVersion": 0, "routerId": "128.16.16.1", "defaultLocPrf": 100, "localAS": 2, "routes": { } } , "ipv6Unicast":{ "vrfId": 0, "vrfName": "default", "tableVersion": 11, "routerId": "128.16.16.1", "defaultLocPrf": 100, "localAS": 2, "routes": { "2001:db8::2/128": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"2001:db8::2", "prefixLen":128, "network":"2001:db8::2\/128", "metric":0, "weight":32768, "peerId":"(unspec)", "path":"", "origin":"incomplete", "nexthops":[ { "ip":"::", "hostname":"router", "afi":"ipv6", "scope":"global", "used":true } ] } ],"2001:db8::3/128": [ { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"2001:db8::3", "prefixLen":128, "network":"2001:db8::3\/128", "metric":0, "weight":0, "peerId":"10.10.20.3", "path":"3", "origin":"incomplete", "nexthops":[ { "ip":"2001:db8:0:20::3", "hostname":"router", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::a00:27ff:fe76:6738", "hostname":"router", "afi":"ipv6", "scope":"link-local", "used":true } ] } ],"2001:db8:0:20::/64": [ { "valid":true, "pathFrom":"external", "prefix":"2001:db8:0:20::", "prefixLen":64, "network":"2001:db8:0:20::\/64", "metric":0, "weight":0, "peerId":"10.10.20.3", "path":"3", "origin":"incomplete", "nexthops":[ { "ip":"2001:db8:0:20::3", "hostname":"router", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::a00:27ff:fe76:6738", "hostname":"router", "afi":"ipv6", "scope":"link-local", "used":true } ] }, { "valid":true, "bestpath":true, "pathFrom":"external", "prefix":"2001:db8:0:20::", "prefixLen":64, "network":"2001:db8:0:20::\/64", "metric":0, "weight":32768, "peerId":"(unspec)", "path":"", "origin":"incomplete", "nexthops":[ { "ip":"::", "hostname":"router", "afi":"ipv6", "scope":"global", "used":true } ] } ] } } , "ipv6Multicast":{ "vrfId": 0, "vrfName": "default", "tableVersion": 0, "routerId": "128.16.16.1", "defaultLocPrf": 100, "localAS": 2, "routes": { } } } Router2# Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com> |
||
---|---|---|
.. | ||
rfapi | ||
rfp-example | ||
.gitignore | ||
bgp_addpath_types.h | ||
bgp_addpath.c | ||
bgp_addpath.h | ||
bgp_advertise.c | ||
bgp_advertise.h | ||
bgp_aspath.c | ||
bgp_aspath.h | ||
bgp_attr_evpn.c | ||
bgp_attr_evpn.h | ||
bgp_attr.c | ||
bgp_attr.h | ||
bgp_bfd.c | ||
bgp_bfd.h | ||
bgp_bmp.c | ||
bgp_bmp.h | ||
bgp_btoa.c | ||
bgp_clist.c | ||
bgp_clist.h | ||
bgp_community.c | ||
bgp_community.h | ||
bgp_damp.c | ||
bgp_damp.h | ||
bgp_debug.c | ||
bgp_debug.h | ||
bgp_dump.c | ||
bgp_dump.h | ||
bgp_ecommunity.c | ||
bgp_ecommunity.h | ||
bgp_encap_tlv.c | ||
bgp_encap_tlv.h | ||
bgp_encap_types.h | ||
bgp_errors.c | ||
bgp_errors.h | ||
bgp_evpn_mh.c | ||
bgp_evpn_mh.h | ||
bgp_evpn_private.h | ||
bgp_evpn_vty.c | ||
bgp_evpn_vty.h | ||
bgp_evpn.c | ||
bgp_evpn.h | ||
bgp_filter.c | ||
bgp_filter.h | ||
bgp_flowspec_private.h | ||
bgp_flowspec_util.c | ||
bgp_flowspec_util.h | ||
bgp_flowspec_vty.c | ||
bgp_flowspec.c | ||
bgp_flowspec.h | ||
bgp_fsm.c | ||
bgp_fsm.h | ||
bgp_io.c | ||
bgp_io.h | ||
bgp_keepalives.c | ||
bgp_keepalives.h | ||
bgp_label.c | ||
bgp_label.h | ||
bgp_labelpool.c | ||
bgp_labelpool.h | ||
bgp_lcommunity.c | ||
bgp_lcommunity.h | ||
bgp_mac.c | ||
bgp_mac.h | ||
bgp_main.c | ||
bgp_memory.c | ||
bgp_memory.h | ||
bgp_mpath.c | ||
bgp_mpath.h | ||
bgp_mplsvpn.c | ||
bgp_mplsvpn.h | ||
bgp_network.c | ||
bgp_network.h | ||
bgp_nexthop.c | ||
bgp_nexthop.h | ||
bgp_nht.c | ||
bgp_nht.h | ||
bgp_open.c | ||
bgp_open.h | ||
bgp_packet.c | ||
bgp_packet.h | ||
bgp_pbr.c | ||
bgp_pbr.h | ||
bgp_rd.c | ||
bgp_rd.h | ||
bgp_regex.c | ||
bgp_regex.h | ||
bgp_route.c | ||
bgp_route.h | ||
bgp_routemap.c | ||
bgp_rpki.c | ||
bgp_snmp.c | ||
bgp_table.c | ||
bgp_table.h | ||
bgp_updgrp_adv.c | ||
bgp_updgrp_packet.c | ||
bgp_updgrp.c | ||
bgp_updgrp.h | ||
bgp_vnc_types.h | ||
bgp_vpn.c | ||
bgp_vpn.h | ||
bgp_vty.c | ||
bgp_vty.h | ||
bgp_zebra.c | ||
bgp_zebra.h | ||
bgpd.c | ||
bgpd.conf.sample | ||
bgpd.conf.sample2 | ||
bgpd.conf.vnc.sample | ||
bgpd.h | ||
IMPLEMENTATION.txt | ||
Makefile | ||
subdir.am | ||
valgrind.supp |