You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement BGP configuration for VLAN interfaces with FHRP support (#1810)
Add comprehensive BGP neighbor configuration for VLAN-based Layer 3 switching
scenarios with proper handling of untagged VLAN members and First Hop
Redundancy Protocol (FHRP) virtual IP addresses.
Changes:
1. Exclude untagged VLAN members from physical interface BGP configuration
- Add _is_untagged_vlan_member() helper function to detect VLAN membership
- Physical interfaces that are untagged VLAN members excluded from BGP_NEIGHBOR
- Physical interfaces that are untagged VLAN members excluded from BGP_NEIGHBOR_AF
- BGP peering happens over VLAN interface (SVI) instead of physical interface
2. Add BGP configuration for VLAN interfaces using peer IP addresses
- VLAN interfaces with untagged members get BGP_NEIGHBOR entries
- Use peer IP addresses from connected interfaces as neighbor identifiers
- Support FHRP virtual IP addresses (VRRP/HSRP/GLBP) via existing detection logic
- Fallback to direct IP addresses if no FHRP VIP configured
- Reuse get_connected_interface_ipv4_address() for consistent FHRP detection
- Support both IPv4 and IPv6 address families
- Create appropriate BGP_NEIGHBOR_AF entries (ipv4_unicast/ipv6_unicast)
3. Add VIP address caching and management
- Load VIP addresses at sync start to avoid repeated queries
- Cache management functions for performance optimization
The combination of these changes ensures BGP neighbors are correctly
configured for VLAN-based Layer 3 switching scenarios where:
- Physical interfaces are Layer 2 VLAN members (untagged)
- IP addressing and routing happens on VLAN interfaces (SVIs)
- Redundant gateway configurations use FHRP protocols
This implementation is critical for high-availability network deployments
using VLAN interfaces with FHRP redundancy.
Signed-off-by: Christian Berendt <[email protected]>
0 commit comments