Date: Tue, 14 Dec 2004 12:54:21 -0500 From: Chuck Swiger <cswiger@mac.com> To: infofarmer@mail.ru Cc: questions@freebsd.org Subject: Re: ppp(8) and dhclient(8) Message-ID: <41BF28CD.2030703@mac.com> In-Reply-To: <41BF22B8.9010802@mail.ru> References: <41BF22B8.9010802@mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew P. wrote: > I have a FreeBSD-4.10 host in my network. It's interface is > DHCP-configured with a local ip-address, a dns server and a default > route. The network is not connected to Internet, so the dns server > resolves only local names and the default router only routes local > packets. The host sometimes connects to internet via PPPoE. It receives > new dns server and default route via IPCP. > > The problem is that the new pair of dns/route seems to conflict with the > old one. > > DNS. I put enable dns and resolv writable in ppp.conf, ppp updates > resolv.conf, but dhclient rewrites it in some seconds, leaving only > local dns server in it. You want to change the make_resolv_conf() function in /sbin/dhclient-script. > ROUTER. Default route is configured at startup by dhclient. "add default > HISADDR" in ppp.conf will result in error and will not change the route. > So we can type "add! default HISADDR" or delete the route first with > "delete default". But when ppp disconnects there's no more default route > and local packets do not get routed. You should describe your local network topology using a static route rather than a default route, so that you can add and delete a default route via ppp without breaking anything. Add something like this to /etc/rc.conf: static_routes="local" route_local="-net 192.168.2.0/24 192.168.1.1" ...assuming your local network has both a 192.168.1.x and a 192.168.2.y subnets, and 192.168.1.1 is a gateway which can get to both networks. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41BF28CD.2030703>