Restoring /etc/resolv.conf after a modem/router burp

Alex Beamish talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sun Jun 12 22:28:01 UTC 2005


On 6/12/05, interlug-list <interlug-vSRlqIl1h/9eoWH0uzbU5w at public.gmane.org> wrote:
> On Sun, 2005-06-12 at 17:46, Alex Beamish wrote:
> 
> > Every once in a while either the modem or the router (Netgear RP614)
> > goes burp and my /etc/resolv.conf gets overwritten with Sympatico's
> > two name servers.
> 
> Probably because dhcp is getting the name server and gateway information
> from Sympatico dhcpd when you reconnect after the hiccup.  If you
> disable dhcp, and preset the name servers then you'll be okay until the
> next time sympatico changes the name servers (or the next time the
> sympatico name servers go down).  That happens a lot, so you probably
> want to leave dhcp on.

Yes. If Sympatico wants to reset the name servers that I'm using, I
don't want to prevent that.

My setup is a bit more complicated still -- Sympatico is using DHCP to
assign me an address, and that's going to my router, and the router is
using DHCP to give all the household workstations addresses .. I'm
using 192.168.5.x so that it doesn't interfere with the 192.168.0.x
addresses at my employer.

> > When that happens, I have to go back into
> > /etc/resolv.conf and add in the definitions to get name service
> > working with my employer's LAN again.
> 
> Right.  The dhcp client doesn't know that you want to keep nameserver
> {atwork} when you pick up the dhcp stuff from sympatico.
> 
> > Now, OpenVPN comes up right away, so I could use just the IP
> > addresses, but name servers were invented for a reason -- so you
> > wouldn't have to remember if that server was 192.168.0.123 bu instead
> > was foo.bar.com.
> 
> #/etc/hosts
> # add the next line
> 192.168.0.123  foo.bar.co

I could do that, but there are a dozen hosts on that list and I'd
prefer if I could get the company name servers added back into
/etc/resolv.conf instead.

Thanks for your feedback, it's very helpful.

Alex
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list