From f83a5125735bb2f63e4d98e1b264eb689a2ef00f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 1 Aug 2021 13:20:35 +0200 Subject: op-mode: bgp: T1513: backport "show bgp" commands from current branch --- op-mode-definitions/include/bgp/afi-common.xml.i | 55 +++++ .../include/bgp/afi-ipv4-ipv6-common.xml.i | 243 +++++++++++++++++++++ .../include/bgp/prefix-bestpath-multipath.xml.i | 20 ++ .../include/bgp/show-bgp-common.xml.i | 46 ++++ .../include/vtysh-generic-detail.xml.i | 8 + .../include/vtysh-generic-wide.xml.i | 8 + op-mode-definitions/show-bgp.xml.in | 91 ++++++++ 7 files changed, 471 insertions(+) create mode 100644 op-mode-definitions/include/bgp/afi-common.xml.i create mode 100644 op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i create mode 100644 op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i create mode 100644 op-mode-definitions/include/bgp/show-bgp-common.xml.i create mode 100644 op-mode-definitions/include/vtysh-generic-detail.xml.i create mode 100644 op-mode-definitions/include/vtysh-generic-wide.xml.i create mode 100644 op-mode-definitions/show-bgp.xml.in (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/include/bgp/afi-common.xml.i b/op-mode-definitions/include/bgp/afi-common.xml.i new file mode 100644 index 000000000..7fc59f3b0 --- /dev/null +++ b/op-mode-definitions/include/bgp/afi-common.xml.i @@ -0,0 +1,55 @@ + + + + Community number where AA and NN are (0-65535) + + AA:NN + + + + + + Exact match of the communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + List of large-community numbers + + AA:BB:CC + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RIB advertisement statistics + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Summary of BGP neighbor status + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show only sessions in Established state + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show only sessions not in Established state + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + +#include + diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i new file mode 100644 index 000000000..f1b699347 --- /dev/null +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i @@ -0,0 +1,243 @@ + + + + Display routes matching the community + + + + + Should accept local VPN route if exported and imported into different VRF (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Should accept VPN route with local nexthop (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Inform EBGP peers to blackhole traffic to prefix (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Exact match of the communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Graceful shutdown (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Staled Long-lived Graceful Restart VPN route (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not send outside local AS (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not advertise to any peer (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not export to next AS (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Removed because Long-lived Graceful Restart was not enabled for VPN route (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not export to any peer (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT translated VPNv4 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT translated VPNv6 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT VPNv4 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT VPNv6 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display routes matching the community-list + + 1-500 name + + + + + + Show BGP routes exactly matching specified community list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display detailed information about dampening + + + + + Display paths suppressed due to dampening + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display flap statistics of routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display detail of configured dampening parameters + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Display routes conforming to the filter-list + + + + + + + + Show BGP routes matching the specified large-communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Detailed information on TCP and BGP neighbor connections + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed BGP IPv4 unicast neighbor information + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes advertised to a BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show dampened routes received from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show flap statistics of the routes learned from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed prefix count information for BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show information received from BGP neighbor + + + + + Show prefixlist filter + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show received routes from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes learned from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Display routes conforming to the prefix-list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display routes matching the AS path regular expression + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the specified route map + + policy route-map + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i b/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i new file mode 100644 index 000000000..2d91a8253 --- /dev/null +++ b/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i @@ -0,0 +1,20 @@ + + + + Display only the bestpath + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display only multipaths + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display route and more specific routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + 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..785b85963 --- /dev/null +++ b/op-mode-definitions/include/bgp/show-bgp-common.xml.i @@ -0,0 +1,46 @@ + +#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 $@ + + + + 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 + + + diff --git a/op-mode-definitions/include/vtysh-generic-detail.xml.i b/op-mode-definitions/include/vtysh-generic-detail.xml.i new file mode 100644 index 000000000..d469f70c7 --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-detail.xml.i @@ -0,0 +1,8 @@ + + + + Detailed information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/vtysh-generic-wide.xml.i b/op-mode-definitions/include/vtysh-generic-wide.xml.i new file mode 100644 index 000000000..acc68b4c0 --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-wide.xml.i @@ -0,0 +1,8 @@ + + + + Increase table width for longer prefixes + + ${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 new file mode 100644 index 000000000..07369ddcb --- /dev/null +++ b/op-mode-definitions/show-bgp.xml.in @@ -0,0 +1,91 @@ + + + + + + + BGP information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display only routes with non-natural netmasks + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + #include + + + MAC address + + + + + MAC address database + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + martian next-hops + + + + + martian next-hop database + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Global BGP memory statistics + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP nexthop table + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + + + IPv4/IPv6 nexthop address + + <x.x.x.x> <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + + + BGP RIB advertisement statistics + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display number of prefixes for all afi/safi + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + + + -- cgit v1.2.3