Hi team,
i have as unexpected behaviour using export route-maps with bgp.
Export route-map does not working when i add a new bgp peer and using existing or new route-map as export filter. Same route-map works for other peers.
set protocols bgp peer-group xxx address-family ipv4-unicast maximum-prefix-out '100' set protocols bgp peer-group xxx address-family ipv4-unicast nexthop-self set protocols bgp peer-group xxx address-family ipv4-unicast remove-private-as set protocols bgp peer-group xxx address-family ipv4-unicast route-map export 'XXX-I-OUT4' set protocols bgp peer-group xxx address-family ipv4-unicast route-map import 'XXX-I-IN4' set protocols bgp peer-group xxx address-family ipv4-unicast soft-reconfiguration inbound set protocols bgp peer-group xxx description 'Peering: xxx v4' set protocols bgp peer-group xxx remote-as 'xxx' set protocols bgp neighbor xxx peer-group 'xxx' commit
After that, import route-map works as expected but export won't work:
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt xxx 4 xxx 831 29 0 0 0 00:06:43 2544 0
BGP neighbor is xxx, remote AS xxx, local AS xxx, external link Member of peer-group xxx for session parameters BGP version 4, remote router ID xxx, local router ID xxx BGP state = Established, up for 00:13:58 Last read 00:00:48, Last write 00:00:58 Hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: 4 Byte AS: advertised and received AddPath: IPv4 Unicast: RX advertised IPv4 Unicast Route refresh: advertised and received(old & new) Address Family IPv4 Unicast: advertised and received Hostname Capability: advertised (name: xxx,domain name: n/a) not received Graceful Restart Capability: advertised and received Remote Restart timer is 120 seconds Address families by peer: IPv4 Unicast(not preserved) Graceful restart information: End-of-RIB send: IPv4 Unicast End-of-RIB received: IPv4 Unicast Local GR Mode: Helper* Remote GR Mode: Restart R bit: False Timers: Configured Restart Time(sec): 120 Received Restart Time(sec): 120 IPv4 Unicast: F bit: False End-of-RIB sent: Yes End-of-RIB sent after update: Yes End-of-RIB received: Yes Timers: Configured Stale Path Time(sec): 360 Message statistics: Inq depth is 0 Outq depth is 0 Sent Rcvd Opens: 2 2 Notifications: 2 0 Updates: 2 808 Keepalives: 30 29 Route Refresh: 0 0 Capability: 0 0 Total: 36 839 Minimum time between advertisement runs is 0 seconds For address family: IPv4 Unicast xxx peer-group member Update group 9, subgroup 11 Packet Queue length 0 Inbound soft reconfiguration allowed Private AS numbers removed in updates to this neighbor NEXT_HOP is always this router Community attribute sent to this neighbor(all) Inbound path policy configured Outbound path policy configured Route map for incoming advertisements is *XXX-I-IN4 Route map for outgoing advertisements is *XXX-I-OUT4 2544 accepted prefixes Maximum allowed prefixes sent 0 Connections established 2; dropped 1 Last reset 00:14:00, User reset Local host: xxx, Local port: 55774 Foreign host: xxx, Foreign port: 179 Nexthop: xxx Nexthop global: xxx Nexthop local: xxx BGP connection: shared network BGP Connect Retry Timer in Seconds: 120 Estimated round trip time: 170 ms Read thread: on Write thread: on FD used: 38
Now, when i restart bgpd:
run restart frr bgpd WARNING: This is a potentially unsafe function! You may lose the connection to the router or active configuration after running this command. Use it at your own risk! Continue? [y/N]: y The route-map 'XXX-I-OUT4' does not exist.
Restart of bgpd resets all peers and the route-map is working as planned until i add another peer. Then i have to restart the bgpd again:
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt xxx 4 xxx 267 21 0 0 0 00:03:11 2544 3
Looks like export route-map is not probably during commit und requires a restart for working. I think the export route-map is not set correct and it runs into deny all.