From c14098b7b1517d77bf53318cc7964295d54db119 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 10 Mar 2021 20:33:36 +0100 Subject: bgp: evpn: T1513: add support for per VNI route-distinguished and route-target set protocols bgp 65010 address-family l2vpn-evpn vni 100 route-target both 516:10516 set protocols bgp 65010 address-family l2vpn-evpn vni 100 rd 192.168.0.1:514 Todo: add verify() step to check if at least one evpn enabled BGP neighbor exits, else FRR will error out with: This command is only supported under EVPN VRF --- .../include/bgp-afi-l2vpn-common.xml.i | 13 +++++ .../include/bgp-route-target.xml.i | 45 ++++++++++++++++++ interface-definitions/protocols-bgp.xml.in | 55 ---------------------- 3 files changed, 58 insertions(+), 55 deletions(-) create mode 100644 interface-definitions/include/bgp-route-target.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/include/bgp-afi-l2vpn-common.xml.i b/interface-definitions/include/bgp-afi-l2vpn-common.xml.i index 11b1cf6bf..2bbf57532 100644 --- a/interface-definitions/include/bgp-afi-l2vpn-common.xml.i +++ b/interface-definitions/include/bgp-afi-l2vpn-common.xml.i @@ -11,4 +11,17 @@ + + + Route Distinguisher + + txt + Route Distinguisher, (x.x.x.x:yyy|xxxx:yyyy) + + + ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ + + + +#include diff --git a/interface-definitions/include/bgp-route-target.xml.i b/interface-definitions/include/bgp-route-target.xml.i new file mode 100644 index 000000000..c3df56a74 --- /dev/null +++ b/interface-definitions/include/bgp-route-target.xml.i @@ -0,0 +1,45 @@ + + + + Route Target + + + + + Route Target both import and export + + txt + Route target (x.x.x.x:yyy|xxxx:yyyy) + + + ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ + + + + + + Route Target export + + txt + Route target (x.x.x.x:yyy|xxxx:yyyy) + + + ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ + + + + + + Route Target import + + txt + Route target (x.x.x.x:yyy|xxxx:yyyy) + + + ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ + + + + + + diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in index 96a0b1315..afcd8f727 100644 --- a/interface-definitions/protocols-bgp.xml.in +++ b/interface-definitions/protocols-bgp.xml.in @@ -276,61 +276,6 @@ - - - Route Distinguisher - - txt - Route Distinguisher, asn:xxx - - - ^[0-9]{1,10}:[0-9]{1,5}$ - - - - - - Route Target - - - - - Route Target both import and export - - txt - Route target (x.x.x.x:yyy|xxxx:yyyy) - - - ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ - - - - - - Route Target export - - txt - Route target (x.x.x.x:yyy|xxxx:yyyy) - - - ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ - - - - - - Route Target import - - txt - Route target (x.x.x.x:yyy|xxxx:yyyy) - - - ^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$ - - - - - VXLAN Network Identifier -- cgit v1.2.3