Date created: Thursday, October 17, 2024 4:37:13 PM. Last modified: Tuesday, October 22, 2024 10:09:02 AM
BGP Commands
BGP Debug
Check which part of an RCF policy is permitting / denying a prefix:
show bgp debug policy redistribute ipv4 unicast vrf XXXX rcf STATIC_TO_BGP() 192.0.2.0/24
BGP Regex
On EOS, most BGP commands are under "show bgp ..." but the regex commands are hidden under "show ip bpg ..." and "show ipv6 bgp ...", but they are not consistent between address families!
# v4 AS-PATH
show ip bgp regex _23456_ vrf XYZ
show ip bgp as-path regex _23456_ vrf XYZ
# v6 AS-PATH
show ipv6 bgp regex _23456_ vrf XYZ
# v4 Standard Communities
show ip bgp community 1234:1234 vrf XYZ # Search for a complete community
show ip bgp community regex 1234:* vrf XYZ # Regex search
# v6 Standard Communities
show ipv6 bgp match community 1234:1234 vrf XYZ # Search for a complete community
# There is not regex search for v6!
# v4 Large Communities
show ip bgp large-community 1:1:1 vrf XYZ # Search for a complete community
# There is no regex for large communities
# v6 Large Communities
show ipv6 bgp large-community 1:1:1 vrf XYZ # Search for a complete community
# There is no regex for large communities
BGP Paths and Routes
It's not possible to see all routes learned via BGP e.g., "show ip route ..." only shows for a specific RIB.
This command counts all routes from all neighbours across all address-families:
show bgp summary | awk '{print $NF}' | tail -n +5 | tr "\n" "+" | sed 's/+$/\n/' | bc
There is no command to see the number of paths in BGP on EOS.
This command will show the total number of paths, but only for a single address family and only for a single VRF/table:
show bgp ipv4 unicast detail vrf XYZ | grep "Paths: " | awk '{print $2}' | tr "\n" "+" | sed 's/+$/\n/' | bc
Previous page: DSL Frequency Graph
Next page: Configuration Session