> 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 rgri...@freebsd.org _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"