From d0a4ee6010a6ba66aee396c2fe56e4ec6b45a553 Mon Sep 17 00:00:00 2001 From: Ameya Dharkar Date: Fri, 21 May 2021 02:04:00 -0700 Subject: bgpd: Add "set evpn gateway-ip" clause for route-map - Add following set clause for route-maps "set evpn gateway-ip 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 --- lib/routemap_cli.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/routemap_cli.c') diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index e11b9eea74..bf982cfa2b 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -1248,6 +1248,16 @@ void route_map_action_show(struct vty *vty, struct lyd_node *dnode, yang_dnode_get_string( dnode, "./rmap-set-action/frr-bgp-route-map:ipv4-nexthop")); + } else if (IS_SET_BGP_EVPN_GATEWAY_IP_IPV4(action)) { + vty_out(vty, " set evpn gateway-ip ipv4 %s\n", + yang_dnode_get_string( + dnode, + "./rmap-set-action/frr-bgp-route-map:evpn-gateway-ip-ipv4")); + } else if (IS_SET_BGP_EVPN_GATEWAY_IP_IPV6(action)) { + vty_out(vty, " set evpn gateway-ip ipv6 %s\n", + yang_dnode_get_string( + dnode, + "./rmap-set-action/frr-bgp-route-map:evpn-gateway-ip-ipv6")); } } -- cgit v1.2.3