Skip to content

[BGP] The 'set src' command is sometimes set with no loopback ip address #21931

@dgsudharsan

Description

@dgsudharsan

This issue is seen starting 202411.

bgpcfgd has logic to apply set src command when receiving loopback interface

2025 Feb 24 19:54:55.980637 MSN-2700 INFO bgp#bgpcfgd: The 'set src' configuration with Loopback0 ip 'FC00:1::32' has been scheduled to be added
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1017|FC00::29/126', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel105|FC00::9/126', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1017', 'SET', (('vrf', ''),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1011|10.0.0.12/31', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1023|10.0.0.28/31', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1014|10.0.0.16/31', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel108', 'SET', (('vrf', ''),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 INFO bgp#bgpcfgd: The 'set src' configuration with Loopback0 ip '10.1.0.32' has been scheduled to be added
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1014', 'SET', (('vrf', ''),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('PortChannel1023|FC00::39/126', 'SET', (('state', 'ok'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('Loopback0', 'SET', (('NULL', 'NULL'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|FC00:1::32/128', 'SET', (('NULL', 'NULL'),))'
2025 Feb 24 19:54:55.980637 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('Loopback0|10.1.0.32/32', 'SET', (('NULL', 'NULL'),))'
2025 Feb 24 19:54:55.996435 MSN-2700 DEBUG bgp#bgpcfgd: Received message : '('fc00::42', 'SET', (('asn', '64001'), ('holdtime', '10'), ('keepalive', '3'), ('local_addr', 'fc00::41'), ('name', 'ARISTA01T0'), ('nhopself', '0'), ('rrclient', '0')))'

We find it rarely that this logic doesn't result in set src being set with loopback ip address

route-map RM_SET_SRC6 permit 10
exit
!
route-map RM_SET_SRC permit 10
exit

During this time, there is no indication of any error from zebra

2025 Feb 24 19:54:48.685582 MSN-2700 NOTICE bgp#zebra[34]: [V98V0-MTWPF] client 52 says hello and bids fair to announce only bgp routes vrf=0
2025 Feb 24 19:54:59.978720 MSN-2700 ERR bgp#zebra[34]: [HSYZM-HV7HF] Extended Error: Carrier for nexthop device is down
2025 Feb 24 19:54:59.978720 MSN-2700 ERR bgp#zebra[34]: [WVJCK-PPMGD][EC 4043309093] netlink-dp (NS 0) error: Network is down, type=RTM_NEWNEXTHOP(104), seq=34, pid=3716991302
2025 Feb 24 19:54:59.978720 MSN-2700 ERR bgp#zebra[34]: [X5XE1-RS0SW][EC 4043309074] Failed to install Nexthop (18[if 4 vrfid 0]) into the kernel
2025 Feb 24 19:55:00.080107 MSN-2700 ERR bgp#zebra[34]: [HSYZM-HV7HF] Extended Error: Carrier for nexthop device is down
2025 Feb 24 19:55:00.080182 MSN-2700 ERR bgp#zebra[34]: [WVJCK-PPMGD][EC 4043309093] netlink-dp (NS 0) error: Network is down, type=RTM_NEWNEXTHOP(104), seq=45, pid=3716991302

Checking on swss rec. the intf_table for loopback is only set later in time than bgpcfg processing

2025-02-24.19:55:06.815196|INTF_TABLE:Loopback0|SET|NULL:NULL|mac_addr:00:00:00:00:00:00
2025-02-24.19:55:06.815219|INTF_TABLE:Loopback0:10.1.0.32/32|SET|scope:global|family:IPv4
2025-02-24.19:55:06.815511|INTF_TABLE:Loopback0:FC00:1::32/128|SET|scope:global|family:IPv6

Hence it is not clear if this is an FRR issue or bgpcfgd issue. Currently there are no logs or records for the commit command in bgpcfgd. I recommend adding one which can be helpful in debug

Tech support logs

frr.running_config

Metadata

Metadata

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions