diff options
13 files changed, 261 insertions, 121 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 673539c1a..74874ee43 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -75,6 +75,8 @@ address-family ipv4 unicast {% elif af == 'ipv6_unicast' %} address-family ipv6 unicast +{% elif af == 'l2vpn_evpn' %} + address-family l2vpn evpn {% endif %} {% if config.address_family[af].allowas_in is defined and config.address_family[af].allowas_in is not none %} neighbor {{ neighbor }} allowas-in {{ config.address_family[af].allowas_in.number if config.address_family[af].allowas_in.number is defined }} @@ -163,6 +165,8 @@ router bgp {{ asn }} address-family ipv4 unicast {% elif af == 'ipv6_unicast' %} address-family ipv6 unicast +{% elif af == 'l2vpn_evpn' %} + address-family l2vpn evpn {% endif %} {% if address_family[af].aggregate_address is defined and address_family[af].aggregate_address is not none %} {% for ip in address_family[af].aggregate_address %} @@ -191,6 +195,19 @@ router bgp {{ asn }} {% endfor %} {% endif %} +{% if address_family[af].advertise_all_vni is defined %} + advertise-all-vni +{% endif %} +{% if address_family[af].advertise_default_gw is defined %} + advertise-default-gw +{% endif %} +{% if address_family[af].advertise_svi_ip is defined %} + advertise-svi-ip +{% endif %} +{% if address_family[af].vni is defined and address_family[af].vni is not none %} + vni {{ address_family[af].vni }} + exit-vni +{% endif %} exit-address-family {% endfor %} {% endif %} diff --git a/interface-definitions/include/bgp-afi-allowas-in.xml.i b/interface-definitions/include/bgp-afi-allowas-in.xml.i new file mode 100644 index 000000000..77de04ed7 --- /dev/null +++ b/interface-definitions/include/bgp-afi-allowas-in.xml.i @@ -0,0 +1,21 @@ +<!-- included start from bgp-afi-allowas-in.xml.i --> +<node name="allowas-in"> + <properties> + <help>Accept route that contains the local-as in the as-path</help> + </properties> + <children> + <leafNode name="number"> + <properties> + <help>Number of occurrences of AS number</help> + <valueHelp> + <format>u32:1-10</format> + <description>Number of times AS is allowed in path</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-10"/> + </constraint> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-attribute-unchanged.xml.i b/interface-definitions/include/bgp-afi-attribute-unchanged.xml.i new file mode 100644 index 000000000..fef53dd9d --- /dev/null +++ b/interface-definitions/include/bgp-afi-attribute-unchanged.xml.i @@ -0,0 +1,27 @@ +<!-- included start from bgp-afi-attribute-unchanged.xml.i --> +<node name="attribute-unchanged"> + <properties> + <help>BGP attributes are sent unchanged</help> + </properties> + <children> + <leafNode name="as-path"> + <properties> + <help>Send AS path unchanged</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="med"> + <properties> + <help>Send multi-exit discriminator unchanged</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="next-hop"> + <properties> + <help>Send nexthop unchanged</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-common.xml.i b/interface-definitions/include/bgp-afi-common.xml.i index ea4eea591..8c483f131 100644 --- a/interface-definitions/include/bgp-afi-common.xml.i +++ b/interface-definitions/include/bgp-afi-common.xml.i @@ -1,54 +1,12 @@ <!-- included start from bgp-afi-common.xml.i --> -<node name="allowas-in"> - <properties> - <help>Accept route that contains the local-as in the as-path</help> - </properties> - <children> - <leafNode name="number"> - <properties> - <help>Number of occurrences of AS number</help> - <valueHelp> - <format>u32:1-10</format> - <description>Number of times AS is allowed in path</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-10"/> - </constraint> - </properties> - </leafNode> - </children> -</node> +#include <include/bgp-afi-allowas-in.xml.i> <leafNode name="as-override"> <properties> <help>AS for routes sent to this peer to be the local AS</help> <valueless/> </properties> </leafNode> -<node name="attribute-unchanged"> - <properties> - <help>BGP attributes are sent unchanged</help> - </properties> - <children> - <leafNode name="as-path"> - <properties> - <help>Send AS path unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="med"> - <properties> - <help>Send multi-exit discriminator unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="next-hop"> - <properties> - <help>Send nexthop unchanged</help> - <valueless/> - </properties> - </leafNode> - </children> -</node> +#include <include/bgp-afi-attribute-unchanged.xml.i> <node name="disable-send-community"> <properties> <help>Disable sending community attributes to this peer</help> @@ -73,14 +31,7 @@ <help>Originate default route to this peer</help> </properties> <children> - <leafNode name="route-map"> - <properties> - <help>route-map to specify criteria of the default route</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> + #include <include/bgp-route-map.xml.i> </children> </node> <node name="distribute-list"> @@ -155,73 +106,17 @@ </constraint> </properties> </leafNode> -<node name="nexthop-self"> - <properties> - <help>Disable the next hop calculation for this peer</help> - </properties> - <children> - <leafNode name="force"> - <properties> - <help>Set the next hop to self for reflected routes</help> - <valueless/> - </properties> - </leafNode> - </children> -</node> +#include <include/bgp-afi-nexthop-self.xml.i> <leafNode name="remove-private-as"> <properties> <help>Remove private AS numbers from AS path in outbound route updates</help> <valueless/> </properties> </leafNode> -<node name="route-map"> - <properties> - <help>Route-map to filter route updates to/from this peer</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Route-map to filter outgoing route updates</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Route-map to filter incoming route updates</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> -</node> -<leafNode name="route-reflector-client"> - <properties> - <help>Peer is a route reflector client</help> - <valueless/> - </properties> -</leafNode> -<leafNode name="route-server-client"> - <properties> - <help>Peer is a route server client</help> - <valueless/> - </properties> -</leafNode> -<node name="soft-reconfiguration"> - <properties> - <help>Soft reconfiguration for peer</help> - </properties> - <children> - <leafNode name="inbound"> - <properties> - <help>Enable inbound soft reconfiguration</help> - <valueless/> - </properties> - </leafNode> - </children> -</node> +#include <include/bgp-afi-route-map.xml.i> +#include <include/bgp-afi-route-reflector-client.xml.i> +#include <include/bgp-afi-route-server-client.xml.i> +#include <include/bgp-afi-soft-reconfiguration.xml.i> <leafNode name="unsuppress-map"> <properties> <help>Route-map to selectively unsuppress suppressed routes</help> diff --git a/interface-definitions/include/bgp-afi-nexthop-self.xml.i b/interface-definitions/include/bgp-afi-nexthop-self.xml.i new file mode 100644 index 000000000..0bcc4e937 --- /dev/null +++ b/interface-definitions/include/bgp-afi-nexthop-self.xml.i @@ -0,0 +1,15 @@ +<!-- included start from bgp-afi-nexthop-self.xml.i --> +<node name="nexthop-self"> + <properties> + <help>Disable the next hop calculation for this peer</help> + </properties> + <children> + <leafNode name="force"> + <properties> + <help>Set the next hop to self for reflected routes</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i b/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i index afd56eff3..e85bf7d11 100644 --- a/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i +++ b/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i @@ -8,12 +8,5 @@ </valueHelp> </properties> </leafNode> -<leafNode name="route-map"> - <properties> - <help>Route map to filter redistributed routes</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> -</leafNode> +#include <include/bgp-route-map.xml.i> <!-- included end --> diff --git a/interface-definitions/include/bgp-afi-route-map.xml.i b/interface-definitions/include/bgp-afi-route-map.xml.i new file mode 100644 index 000000000..5549f56ca --- /dev/null +++ b/interface-definitions/include/bgp-afi-route-map.xml.i @@ -0,0 +1,25 @@ +<!-- included start from bgp-afi-route-map.xml.i --> +<node name="route-map"> + <properties> + <help>Route-map to filter route updates to/from this peer</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>Route-map to filter outgoing route updates</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>Route-map to filter incoming route updates</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-route-reflector-client.xml.i b/interface-definitions/include/bgp-afi-route-reflector-client.xml.i new file mode 100644 index 000000000..f6a9caa61 --- /dev/null +++ b/interface-definitions/include/bgp-afi-route-reflector-client.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-afi-route-reflector-client.xml.i --> +<leafNode name="route-reflector-client"> + <properties> + <help>Peer is a route reflector client</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-route-server-client.xml.i b/interface-definitions/include/bgp-afi-route-server-client.xml.i new file mode 100644 index 000000000..60de553fe --- /dev/null +++ b/interface-definitions/include/bgp-afi-route-server-client.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-afi-route-server-client.xml.i --> +<leafNode name="route-server-client"> + <properties> + <help>Peer is a route server client</help> + <valueless/> + </properties> +</leafNode> +<!-- included end -->
\ No newline at end of file diff --git a/interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i b/interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i new file mode 100644 index 000000000..7af11f8f4 --- /dev/null +++ b/interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i @@ -0,0 +1,15 @@ +<!-- included start from bgp-afi-soft-reconfiguration.xml.i --> +<node name="soft-reconfiguration"> + <properties> + <help>Soft reconfiguration for peer</help> + </properties> + <children> + <leafNode name="inbound"> + <properties> + <help>Enable inbound soft reconfiguration</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i b/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i new file mode 100644 index 000000000..df346afc1 --- /dev/null +++ b/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i @@ -0,0 +1,16 @@ +<!-- included start from bgp-neighbor-afi-l2vpn-evpn.xml.i --> +<node name="l2vpn-evpn"> + <properties> + <help>L2VPN EVPN BGP settings</help> + </properties> + <children> + #include <include/bgp-afi-allowas-in.xml.i> + #include <include/bgp-afi-attribute-unchanged.xml.i> + #include <include/bgp-afi-nexthop-self.xml.i> + #include <include/bgp-afi-route-map.xml.i> + #include <include/bgp-afi-route-reflector-client.xml.i> + #include <include/bgp-afi-route-server-client.xml.i> + #include <include/bgp-afi-soft-reconfiguration.xml.i> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in index e5122fe8d..3b7910766 100644 --- a/interface-definitions/protocols-bgp.xml.in +++ b/interface-definitions/protocols-bgp.xml.in @@ -217,6 +217,43 @@ </node> </children> </node> + <node name="l2vpn-evpn"> + <properties> + <help>L2VPN EVPN BGP settings</help> + </properties> + <children> + <leafNode name="advertise-all-vni"> + <properties> + <help>Advertise All local VNIs</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="advertise-default-gw"> + <properties> + <help>Advertise All default g/w mac-ip routes in EVPN</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="advertise-svi-ip"> + <properties> + <help>Advertise svi mac-ip routes in EVPN</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="vni"> + <properties> + <help>VXLAN Network Identifier</help> + <valueHelp> + <format>u32:1-16777215</format> + <description>VNI number</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-16777215"/> + </constraint> + </properties> + </leafNode> + </children> + </node> </children> </node> <node name="maximum-paths"> @@ -318,6 +355,7 @@ <children> #include <include/bgp-neighbor-afi-ipv4-unicast.xml.i> #include <include/bgp-neighbor-afi-ipv6-unicast.xml.i> + #include <include/bgp-neighbor-afi-l2vpn-evpn.xml.i> </children> </node> <leafNode name="advertisement-interval"> @@ -771,6 +809,7 @@ <children> #include <include/bgp-neighbor-afi-ipv4-unicast.xml.i> #include <include/bgp-neighbor-afi-ipv6-unicast.xml.i> + #include <include/bgp-neighbor-afi-l2vpn-evpn.xml.i> </children> </node> #include <include/bgp-bfd.xml.i> diff --git a/op-mode-definitions/show-ip-bgp.xml.in b/op-mode-definitions/show-ip-bgp.xml.in index 6d7fe58a0..311f9e6ae 100644 --- a/op-mode-definitions/show-ip-bgp.xml.in +++ b/op-mode-definitions/show-ip-bgp.xml.in @@ -204,6 +204,67 @@ </tagNode> </children> </node> + <node name="l2vpn"> + <properties> + <help>Layer 2 Virtual Private Network</help> + </properties> + <children> + <node name="evpn"> + <properties> + <help>Ethernet Virtual Private Network</help> + </properties> + <children> + <node name="all"> + <properties> + <help>Display information about all EVPN NLRIs</help> + </properties> + <children> + <leafNode name="overlay"> + <properties> + <help>Display BGP Overlay Information for prefixes</help> + </properties> + <command>vtysh -c "show ip bgp l2vpn evpn all overlay"</command> + </leafNode> + <leafNode name="tags"> + <properties> + <help>Display BGP tags for prefixes</help> + </properties> + <command>vtysh -c "show ip bgp l2vpn evpn all tags"</command> + </leafNode> + </children> + </node> + <tagNode name="neighbors"> + <properties> + <help>Show detailed BGP IPv4 unicast neighbor information</help> + <completionHelp> + <script>vtysh -c "show ip bgp summary" | awk '{print $1}' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"</script> + </completionHelp> + </properties> + <children> + <leafNode name="advertised-routes"> + <properties> + <help>Show routes advertised to a BGP neighbor</help> + </properties> + <command>vtysh -c "show ip bgp l2vpn evpn neighbor $7 advertised-routes"</command> + </leafNode> + <leafNode name="routes"> + <properties> + <help>Show routes learned from BGP neighbor</help> + </properties> + <command>vtysh -c "show ip bgp l2vpn evpn neighbor $7 routes"</command> + </leafNode> + </children> + </tagNode> + <leafNode name="update-groups"> + <properties> + <help>Detailed info about dynamic update groups</help> + </properties> + <command>vtysh -c "show ip bgp l2vpn evpn update-groups"</command> + </leafNode> + </children> + </node> + </children> + </node> <node name="large-community"> <properties> <help>Show BGP routes matching the specified large-communities</help> |