Resolv.conf issues when switching from eth to ppp
I normally use DHCP on a LAN at work and home. Everything normally works fine when switching, except when I try to switch to a dial up acct via PPP.
Here's the main issue: after a fresh install and set as DHCP client, resolv.conf is filled with the domain, seach, and nameserver info provided by the DHCP server. If I issue an "ifdown eth0" (or ifconfig eth0 down"), resolv.conf is not wiped out, only the search part is gone. The domain and nameserver (3 or them) entries remain. When I connect w/ PPP, the ISP's nameserver entries are appended to the bottom of resolv.conf. Resolv.conf is only designed to handle 3 nameservers, so it never sees the two added by the dialup ISP, and simply times out on anything I hit by name. This is further complicated by the fact that I am behind a f/w with 1 to 1 NAT'ting... so my internal name server is on the 172.16.*.* network and unreachable when dialed up.
So... aside from changing the ifdown script to cat resolv.conf to /dev/null... anyone know how to have resolv.conf purged when shutting down eth0? It would be nice to have an ip release function in the TCP/IP protocol stack... or something more easily scripted. I'm looking for something I can do enterprise-wide w/o major changes...
Last edited by Supp0rtLinux; 12-28-2001 at 03:23 PM.
|