Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2024 00:18:06 -0700
From:      list_freebsd@bluerosetech.com
To:        Anton Yudin <contact@antonyudin.com>, freebsd-net@freebsd.org
Subject:   Re: How to ignore a default route for one of the dhclient-ed interface?
Message-ID:  <8bd004ff-f4a1-8cf4-dc90-a95328ff5ec9@bluerosetech.com>
In-Reply-To: <CAAokbZ0t%2BYdU1bjfd%2ByhnTjUw82puWBJHs3rBxwS-%2BkTkERz%2Bg@mail.gmail.com>
References:  <CAAokbZ0t%2BYdU1bjfd%2ByhnTjUw82puWBJHs3rBxwS-%2BkTkERz%2Bg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2024-04-07 20:16, Anton Yudin wrote:
>    I'm running a FreeBSD 14 with two interfaces that use DHCP.
>    I would like to make one of the interfaces to never set the default 
> route.
>    Right now the first interface to be fully up sets the default route.
> 
>    I tried to set the following in /etc/dhclient.conf
> ---------------8<------------------------
>    interface "wan1" {
>        ignore routers;
>    }
> ---------------8<------------------------
>    but the default route still gets set.
[...]
> Is there a better way of doing this?

What happens if you explicitly set the request statement for each of the 
interfaces, including routers in only the one you want as your gateway?

"By default, the DHCPv4 client requests the subnet-mask, 
broadcast-address, time-offset, routers, domain-name, 
domain-name-servers and host-name options" --dhclient.conf(5)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8bd004ff-f4a1-8cf4-dc90-a95328ff5ec9>