Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BGP BFD session things #17410

Merged

Conversation

ton31337
Copy link
Member

Closes #17396
Closes #17408

Use a separate `member` in this case.

Signed-off-by: Donatas Abraitis <[email protected]>
Having something like:

```
 neighbor 192.168.1.222 ebgp-multihop 32
 neighbor 192.168.1.222 update-source 192.168.1.5
 neighbor 192.168.1.222 bfd
```

Won't work and the result is (empty):

```
$ show bfd peers
BFD Peers:
```

bgp_stop() is called in BGP FSM multiple times (even at startup) that
causes intermediate session interruption when update-source/ebgp-multihop
is triggered.

With this fix, the ordering does not matter and the BFD session's parameters
are updated correctly.

Signed-off-by: Donatas Abraitis <[email protected]>
@frrbot frrbot bot added bgp tests Topotests, make check, etc labels Nov 11, 2024
@ton31337 ton31337 requested a review from rzalamena November 11, 2024 15:09
@tufeigunchu
Copy link

I tested the change but I couldn't get BFD session either when restarting frr, is it ready?

@ton31337
Copy link
Member Author

I tested the change but I couldn't get BFD session either when restarting frr

Can you show show bfd peers, and show bgp neighbor?

Also, show the full config + logs. Because for me (and a topotest added confirms) it works.

@tufeigunchu
Copy link

Your topotest uses ip address in update-source, does it mean that using interface name is not supported?
I test with interface name and it failed.

If BFD is down, we should try to detect the source automatically from the given
interface.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337
Copy link
Member Author

@tufeigunchu could you retry with the latest changes (force pushed 1 commit)?

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777 riw777 merged commit fe56a65 into FRRouting:master Nov 12, 2024
11 checks passed
@ton31337 ton31337 deleted the fix/bgpd_ebgp_multihop_set_unset branch November 12, 2024 18:12
@triple-it
Copy link

Hi,
So I ran into this bug.

And I probably do not have the optimal configuration for this session-finding.

bgp
neighbor 10.64.2.2 description tun2
neighbor 10.64.2.2 bfd
neighbor 10.64.2.2 bfd profile BFDBGP
neighbor 10.64.2.2 bfd check-control-plane-failure
neighbor 10.64.2.2 update-source 10.64.2.1

bfd
peer 10.64.4.2 local-address 10.64.4.1
transmit-interval 200
receive-interval 200
echo-mode
echo transmit-interval 200
echo receive-interval 200
exit

I'm not configuring the dummy2 and vti2 (routed ipsec) configuration explicitly in the frr.conf but they are currently outside.
Dummy2 under control of netplan
vti2 under control of the ipsec software.

The BGP session does not go down when BFD goes down.

2024-12-17 11:47:23.781 [DEBG] bfdd: [SEY1D-NT8EQ] state-change: [mhop:no peer:10.64.2.2 local:10.64.2.1 vrf:default] up -> down reason:control-expired                                                                                                                                             
2024-12-17 11:47:23.781 [DEBG] bgpd: [Q4BCV-6FHZ5] zclient_bfd_session_update: 10.64.2.1/32 -> 10.64.2.2/32 (interface vti2) VRF default(0) (CPI bit no): Down                                                                                                                                      
2024-12-17 11:47:23.781 [DEBG] bgpd: [QFMSE-NPSNN] zclient_bfd_session_update:   sessions updated: 0                                              
2024-12-17 11:47:25.486 [DEBG] bfdd: [J1C6V-VMRW5] state-change: [mhop:no peer:10.64.2.2 local:10.64.2.1 vrf:default] down -> up                  
2024-12-17 11:47:25.486 [DEBG] bgpd: [Q4BCV-6FHZ5] zclient_bfd_session_update: 10.64.2.1/32 -> 10.64.2.2/32 (interface vti2) VRF default(0) (CPI bit no): Up                                                                                                                                        
2024-12-17 11:47:25.486 [DEBG] bgpd: [QFMSE-NPSNN] zclient_bfd_session_update:   sessions updated: 0                                              
2024-12-17 11:47:26.926 [DEBG] bfdd: [SEY1D-NT8EQ] state-change: [mhop:no peer:10.64.2.2 local:10.64.2.1 vrf:default] up -> down reason:control-expired                                                                                                                                             
2024-12-17 11:47:26.927 [DEBG] bgpd: [Q4BCV-6FHZ5] zclient_bfd_session_update: 10.64.2.1/32 -> 10.64.2.2/32 (interface vti2) VRF default(0) (CPI bit no): Down                                                                                                                                      
2024-12-17 11:47:26.927 [DEBG] bgpd: [QFMSE-NPSNN] zclient_bfd_session_update:   sessions updated: 0    

What would be the best configuration to make this session matching happening now?

Should I change to interface configuration on the BFD ? Interface under update-source BGP?
Is interface configuration (of dummy2 or vti2) required in frr.conf?

If someone could give some pointers to get this session matching happening now, please let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp master size/L tests Topotests, make check, etc
Projects
None yet
4 participants