From owner-freebsd-net@freebsd.org Tue Jun 25 05:54:53 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E90C415C1035 for ; Tue, 25 Jun 2019 05:54:52 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50EBC72113 for ; Tue, 25 Jun 2019 05:54:51 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x5P5skiV047948; Mon, 24 Jun 2019 22:54:46 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x5P5sjWh047947; Mon, 24 Jun 2019 22:54:45 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201906250554.x5P5sjWh047947@gndrsh.dnsmgr.net> Subject: Re: Can Ethernet and wi-fi be used concurrently? In-Reply-To: <0e8ebf6b-56fd-d6ea-906b-5af1c8fa54ab@grosbein.net> To: Eugene Grosbein Date: Mon, 24 Jun 2019 22:54:45 -0700 (PDT) CC: "Rodney W. Grimes" , Thomas Mueller , freebsd-net@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 50EBC72113 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.50 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; IP_SCORE(0.04)[ip: (0.14), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.05), country: US(-0.06)]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.20)[0.198,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.42)[0.418,0]; MX_GOOD(-0.01)[cached: gndrsh.dnsmgr.net]; NEURAL_SPAM_LONG(0.95)[0.953,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2019 05:54:53 -0000 > 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