Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2013 12:13:54 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        "Sam Fourman Jr." <sfourman@gmail.com>
Cc:        freebsd-net@freebsd.org, Will Andrews <will@firepipe.net>, "Justin T. Gibbs" <gibbs@freebsd.org>, Alan Somers <asomers@freebsd.org>
Subject:   Re: CFR: FIB handling improvements
Message-ID:  <CAOtMX2jdhy8B48nXyZWs0GTFN2XhO65nUHUghV7%2BNry=Ckm04g@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
On Wed, Aug 21, 2013 at 11:48 AM, Sam Fourman Jr. <sfourman@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jdhy8B48nXyZWs0GTFN2XhO65nUHUghV7%2BNry=Ckm04g>