Some problems with ECMP

Hi folks, I'm new in FreeBSD world and I need help.

I've a server at FreeBSD with two uplinks which connected to switching fabric. Communication between them is organizing by BGP. Server uses FRR. I want to use ECMP for load sharing between uplinks. All routes have the same metric. Currently routing table looks like:
Code:
show ip route

B>* 0.0.0.0/0 [20/0] via x.x.0.20, ix1_vlan1, weight 1, 01w0d13h
  *                                 via x.x.1.22, ix0_vlan1, weight 1, 01w0d13h
B>* 10.x.x.0/26 [20/0] via x.x.0.5, ix1_vlan10, weight 1, 01w0d13h
  *                       via x.x.1.5, ix0_vlan10, weight 1, 01w0d13h

Code:
netstat -r

default            x.x.0.20       UG1    ix1_vlan
default            x.x.1.22       UG1    ix0_vlan
10.x.x.0/26     x.x.1.5        UG1    ix0_vlan
10.x.x.0/26     x.x.0.5        UG1    ix1_vlan

When only one of uplinks is UP - everything is OK. But when two - I'd problems with random disconnects. In traffic dump we can see random RST packets because server are sent some packets through another link. Can you help me or tell me where I can read more about how ECMP works in FreeBSD?

I'm especially interested about:
- Which hash algorithms FreeBSD using is and how traffic will be processing?
- How I can check ECMP mode which will be using FreeBSD for sharing traffic (per-packets/per-flow)?


I'm using a 13.0-STABLE FreeBSD. Scheme at attachment.
 

Attachments

  • ECMP scheme.PNG
    ECMP scheme.PNG
    41.2 KB · Views: 166
VladiBG thank you so much for your attention to my question and for sharing interesting information. This answers at some of my questions. But I would still like to know where I could read more about how the ECMP protocol is implemented in FreeBSD? Which setting in the config file (zebra, frr or something else) is responsible for ECMP balancing mode, ie per-packet or per-flow? I don't use static routing. Maybe in my frr config something are missing/wrong?

frr version 7.5.1
frr defaults traditional
hostname xxxxx
log syslog notifications
!
router bgp xxxx
no bgp ebgp-requires-policy
bgp bestpath as-path multipath-relax
neighbor x.x.0.20 remote-as xxxx
neighbor x.x.0.20 bfd
neighbor x.x.1.22 remote-as xxxx
neighbor x.x.1.22 bfd
neighbor x.x.0.5 remote-as xxxx
neighbor x.x.0.5 bfd
neighbor x.x.1.5 remote-as xxxx
neighbor x.x.1.5 bfd
!
address-family ipv4 unicast
redistribute connected
neighbor x.x.0.20 next-hop-self
neighbor x.x.0.20 route-map s1_lan_out out
neighbor x.x.1.22 next-hop-self
neighbor x.x.1.22 route-map s2_lan_out out
neighbor x.x.0.5 next-hop-self
neighbor x.x.0.5 route-map s1_dmz_out out
neighbor x.x.1.5 next-hop-self
neighbor x.x.1.5 route-map s2_dmz_out out
exit-address-family
 
Back
Top