opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
832 stars 620 forks source link

enable staticd (frr) by default #3128

Closed ip6li closed 1 year ago

ip6li commented 2 years ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Issue 5778 does not match to my problem.

Used OPNsense version: OPNsense 22.7.4-amd64, FreeBSD 13.1-RELEASE-p2, OpenSSL 1.1.1q 5 Jul 2022 (updated Sep., 18th 2022)

Is your feature request related to a problem? Please describe.

Problem is to create a set up which support ip based load balancing for some poor behaved hardware. Example: Vodafone offers a product named CableMax1000 with an Arris cable modem which neither supports LACP, nor 2,5G interfaces. Routing protocols like IS-IS, OSPF or BGP4 are also not supported. This cable product allows line speeds which exceeds capabilities of a GBit ethernet slightly.

A clear and concise description of what the problem is including your motivation for the request,

Linux supports an easy was do set up such a behaviour:

ip route replace default nexthop via 192.168.3.1 dev enp1s0 weight 1 nexthop via 192.168.3.1 dev enp2s0 weight 1

Such a configuration works with Linux and Arris cable modem. My idea is to set up a similar behaviour with staticd from OPNsense frr package.

Describe the solution you like

frr offers a mighty routing solution even for static routes by staticd which is included in OPNsense package frr7. It seems to do that job using following config

OPNsense.localdomain# show running-config 
Building configuration...

Current configuration:
!
frr version 7.5.1
frr defaults datacenter
hostname OPNsense.localdomain
log syslog notifications
!
ip route 0.0.0.0/0 192.168.3.1 igb1 onlink
ip route 0.0.0.0/0 192.168.3.1 igb0 onlink
!
line vty
!
end
OPNsense.localdomain# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

S>* 0.0.0.0/0 [1/0] via 192.168.3.1, igb0 onlink, weight 1, 00:02:08
  *                 via 192.168.3.1, igb1 onlink, weight 1, 00:02:08
C * 192.168.3.0/24 [0/1] is directly connected, igb1, 00:10:42
C>* 192.168.3.0/24 [0/1] is directly connected, igb0, 00:10:42
C>* 192.168.254.0/24 [0/1] is directly connected, em0_vlan4090, 00:10:42

Describe alternatives you considered

For now I found no alternative, because AFAIK FreeBSD does not offer a similar solution like Linux. LAGG with round robin works for IPv4, only. It does not work for dual stack IPv4/IPv6, in this case LAGG/rr does not work for IPv6 connections.

Additional context

OPNsense-bot commented 1 year ago

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

fmeppo commented 5 months ago

Neat - I think PR #3880 might help with this! I'd be happy to work on this, as I need similar functionality for a weird setup with overlay networks.