From 3fa1092930c3dcb1c3ddfe6c1061e30477f9b45d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 9 Apr 2021 19:59:33 +0200 Subject: op-mode: bgp: support VRF related "show bgp vrf" commands cpo@PE1:~$ show bgp vrf all Instance default: No BGP prefixes displayed, 0 exist Instance red: BGP table version is 1, local router ID is 10.2.1.1, vrf id 11 Default local pref 100, local AS 100 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 *> 10.2.1.0/24 0.0.0.0 0 32768 ? Displayed 1 routes and 1 total paths Instance blue: BGP table version is 1, local router ID is 10.1.1.1, vrf id 10 Default local pref 100, local AS 100 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 *> 10.1.1.0/24 0.0.0.0 0 32768 ? Displayed 1 routes and 1 total paths --- .../include/bgp/show-bgp-common.xml.i | 244 +++++++++++++++++++++ op-mode-definitions/show-bgp.xml.in | 242 +------------------- op-mode-definitions/show-ip-bgp.xml.in | 9 +- 3 files changed, 262 insertions(+), 233 deletions(-) create mode 100644 op-mode-definitions/include/bgp/show-bgp-common.xml.i (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/include/bgp/show-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-bgp-common.xml.i new file mode 100644 index 000000000..5751dccd3 --- /dev/null +++ b/op-mode-definitions/include/bgp/show-bgp-common.xml.i @@ -0,0 +1,244 @@ + +#include + + + Network in the BGP routing table to display + + <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> + + + + #include + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + IPv4 Address Family + + + #include + #include + + + + + Network in the BGP routing table to display + + <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> + + + + #include + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + IPv6 Address Family + + + #include + #include + + + + + Layer 2 Virtual Private Network + + + + + Network in the BGP routing table to display + + <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Ethernet Virtual Private Network + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + Display information about all EVPN NLRIs + + + + + Display BGP Overlay Information for prefixes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display BGP tags for prefixes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Ethernet Segment + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + + + Ethernet Segment per EVI + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + #include + + + + + Show import route target + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed BGP neighbor information + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes advertised to a BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes learned from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show detailed BGP neighbor information + + ASN:NN IPADDRESS:NN + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display BGP Overlay Information for prefixes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display BGP tags for prefixes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + EVPN route information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + Specify Route type + + + + + EAD (Type-1) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + MAC-IP (Type-2) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Multicast (Type-3) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Ethernet Segment (Type-4) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Prefix (Type-5) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + EAD (Type-1) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Ethernet Segment (Type-4) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + MAC-IP (Type-2) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Multicast (Type-3) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Prefix (Type-5) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + #include + + + #include + + + VXLAN network identifier (VNI) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + diff --git a/op-mode-definitions/show-bgp.xml.in b/op-mode-definitions/show-bgp.xml.in index 62abbe938..36e7062df 100644 --- a/op-mode-definitions/show-bgp.xml.in +++ b/op-mode-definitions/show-bgp.xml.in @@ -8,248 +8,26 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - #include - + #include + - Network in the BGP routing table to display - - <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> - + Show BGP VRF information - - #include - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - + + - IPv4 Address Family - - - #include - #include - - - - - Network in the BGP routing table to display + Show BGP VRF related information - <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> + vrf name + all - - #include - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - IPv6 Address Family - - #include - #include + #include - - - - Layer 2 Virtual Private Network - - - - - Network in the BGP routing table to display - - <x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x> - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Ethernet Virtual Private Network - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - - Display information about all EVPN NLRIs - - - - - Display BGP Overlay Information for prefixes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display BGP tags for prefixes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Ethernet Segment - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - - - - Ethernet Segment per EVI - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - #include - - - - - Show import route target - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show detailed BGP neighbor information - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes advertised to a BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes learned from BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show detailed BGP neighbor information - - ASN:NN IPADDRESS:NN - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display BGP Overlay Information for prefixes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display BGP tags for prefixes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - EVPN route information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - - Specify Route type - - - - - EAD (Type-1) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - MAC-IP (Type-2) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Multicast (Type-3) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Ethernet Segment (Type-4) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Prefix (Type-5) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - EAD (Type-1) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Ethernet Segment (Type-4) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - MAC-IP (Type-2) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Multicast (Type-3) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Prefix (Type-5) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - #include - - - #include - - - VXLAN network identifier (VNI) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - + diff --git a/op-mode-definitions/show-ip-bgp.xml.in b/op-mode-definitions/show-ip-bgp.xml.in index 4097bcf2d..ecef320bf 100644 --- a/op-mode-definitions/show-ip-bgp.xml.in +++ b/op-mode-definitions/show-ip-bgp.xml.in @@ -11,14 +11,21 @@ vtysh -c "show ip bgp" #include + + + Show BGP VRF information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + - Show bgp routing protocol for given VRF + Show BGP VRF related information vrf name all + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ #include -- cgit v1.2.3