Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2019 22:54:45 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Eugene Grosbein <eugen@grosbein.net>
Cc:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Thomas Mueller <mueller6722@twc.com>, freebsd-net@freebsd.org
Subject:   Re: Can Ethernet and wi-fi be used concurrently?
Message-ID:  <201906250554.x5P5sjWh047947@gndrsh.dnsmgr.net>
In-Reply-To: <0e8ebf6b-56fd-d6ea-906b-5af1c8fa54ab@grosbein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 25.06.2019 3:16, Rodney W. Grimes wrote:
> 
> >> from Nick Wolff:
> >>
> >>> Yes this is no issue just need to make sure you don't have an default route
> >>> on your Ethernet interface(May need to set a static) and that the hotspot
> >>> network and intranet network doesn't overlap.
> >>
> >> To use the ethernet, I believe I need
> >>
> >> route add default 192.168.0.1
> >>
> >> if I don't use dhclient.
> >>
> >> How do I avoid this, and then how would I add route for the hotspot network?
> > 
> > One of the night mares of trying to get 2 interfaces that
> > either one is using DHCP to play nice togeather is
> > a royal PITA as we have no way to ignore a default route
> > from a DHCP server. 
> > 
> > Our (the freebsd) dhclient is lacking in this area, this problem has
> > been solved in several other implementations.
> 
> In fact, we have the they to ignore a default route from a DHCP server.
> Our DHCP client does NOT install any routes by itself. It merely passes routing info
> to shell script /sbin/dhclient-script that contains many distinct shell functions
> and allows user to override any function such as one rewriting /etc/resolv.conf
> or another adding routes including default one.
> 
> One may create /etc/dhclient-enter-hooks script overriding some of noted functions.
> For example, to prevent DHCP client from touching /etc/resolv.conf
> in case you run your own DNS recursor at localhost:
> 
> add_new_resolv_conf() {
>   return 0
> }
> 
> Same way one may override following function that is called with "new_routers"
> variable to NOT change default route or change it conditionally etc.
> 
> This feature is documented within dhclient-script(8) manual page liked with dhclient(8).
> I use this in production without any problem.

Thank you Eugene, this is very informative, I'll have to take
a closer look at this as a solution, but I did not find it when
I was reading the man pages and such.  What I see in other implementations
is the ability to supersede or ignore the default route directly
by configuration entires in /etc/dhclient.conf.

Again, thank you,
-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906250554.x5P5sjWh047947>