CFR: FIB handling improvements

Alan Somers asomers at freebsd.org
Wed Aug 21 18:13:56 UTC 2013


On Wed, Aug 21, 2013 at 11:48 AM, Sam Fourman Jr. <sfourman at gmail.com>wrote:

>
> * Use of dhclient with non-zero FIBs.  With this patch, it is possible
>
>> to use DHCP on a specific interface with a non-zero FIB and have it
>> work correctly with this rc.conf snippet:
>>
>> ifconfig_em1="SYNCDHCP"
>> dhclient_fib_em1=1
>>
>
> This patch is needed, I have a situation where we have
> 2 internet providers, one is a static ip set in rc.conf, the other
> provider forces
> the use of DHCP, but trying to use the "DHCP" connection only for a
> "Backup"
> caused the problem of the primary gateway being overwritten on fib0 (the
> static)
> I tried to solve it by the following in /etc/rc.local:
>
> /usr/sbin/setfib 1 /sbin/dhclient re2
> setfib 0 route delete default
> setfib 1 route delete default
> setfib 1 route add default 99.55.240.1
> setfib 0 route add default 75.133.75.193
>
> this sorta works, but in practice after several hours (not sure why)
> all of the traffic on the machine tries to use the gateway of FIB1.
> this problem ONLY shows up when the use of DHCP is in the mix.
>
>
> So my question is twofold, is my situation what this patch is supposed to
> fix?
> or did I simply find a bug in the interface code? that will sort of eludes
> to
>
> Thank you for your work
> --
>
> Sam Fourman Jr.
>

Yes, this patch will probably fix your problem.  We regularly configure
machines with static on igb0, dynamic on igb1, and separate gateways for
each.


More information about the freebsd-net mailing list