diff options
author | Ameya Dharkar <adharkar@vmware.com> | 2021-05-21 11:04:00 +0200 |
---|---|---|
committer | Ameya Dharkar <adharkar@vmware.com> | 2021-06-08 02:58:22 +0200 |
commit | d0a4ee6010a6ba66aee396c2fe56e4ec6b45a553 (patch) | |
tree | a86d8c69dd92b8040a57ed286eca7f7b19b0cace /yang | |
parent | bgpd: Data structure for gateway IP overlay Index (diff) | |
download | frr-d0a4ee6010a6ba66aee396c2fe56e4ec6b45a553.tar.xz frr-d0a4ee6010a6ba66aee396c2fe56e4ec6b45a553.zip |
bgpd: Add "set evpn gateway-ip" clause for route-map
- Add following set clause for route-maps
"set evpn gateway-ip <ipv4|ipv6 >A.B.C.D|X:X::X:X"
- When this route-map is applied as outboubd policy in BGP, it will set the
gateway-ip in BGP attribute For EVPN type-5 routes.
Example configuration:
route-map RMAP-EVPN_GWIP permit 5
set evpn gateway-ip ipv4 50.0.2.12
set evpn gateway-ip ipv6 50:0:2::12
router bgp 101
bgp router-id 10.100.0.1
neighbor 10.0.1.2 remote-as 102
!
address-family l2vpn evpn
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 route-map RMAP-EVPN_GWIP out
advertise-all-vni
exit-address-family
Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
Diffstat (limited to 'yang')
-rw-r--r-- | yang/frr-bgp-route-map.yang | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index ca60c8f7b..1c990b5ed 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -300,6 +300,18 @@ module frr-bgp-route-map { "Set BGP large community list (for deletion)"; } + identity set-evpn-gateway-ip-ipv4 { + base frr-route-map:rmap-set-type; + description + "Set EVPN gateway IP overlay index IPv4"; + } + + identity set-evpn-gateway-ip-ipv6 { + base frr-route-map:rmap-set-type; + description + "Set EVPN gateway IP overlay index IPv6"; + } + grouping extcommunity-non-transitive-types { leaf two-octet-as-specific { type boolean; @@ -816,5 +828,25 @@ module frr-bgp-route-map { type bgp-filter:bgp-list-name; } } + case evpn-gateway-ip-ipv4 { + when + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, + 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')"; + description + "Set EVPN gateway IP overlay index IPv4"; + leaf evpn-gateway-ip-ipv4 { + type inet:ipv4-address; + } + } + case evpn-gateway-ip-ipv6 { + when + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, + 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')"; + description + "Set EVPN gateway IP overlay index IPv6"; + leaf evpn-gateway-ip-ipv6 { + type inet:ipv6-address; + } + } } } |