Re: Name resolution w/ multiple connections



On Tue, 27 Feb 2007 17:55:19 -0500
Anthony Yarusso <tonyyarusso@xxxxxxxxxxxxx> wrote:

So, what I need to know, is how to have both the modem and
wireless LAN connections up at the same time while maintaining
nameserver stuff through the dialup connection (except for things
defined in the hosts file as being local, like "duluth 192.168.1.5")

The DNS settings are being re-written by DHCP from the router. If you want
the nameservers to remain the same, you can override this with an "enter
hooks" file/script. The idea is to pre-empt the replacement of
the /etc/resolv.conf file by your router.

make a file, /etc/dhcp3/dhclient-enter-hooks containing the following:

#!/bin/bash

# Stop overwriting /etc/resolv.conf !

function make_resolv_conf {
echo “Doing nothing to resolv.conf”
}


Make the "script" executable

sudo chmod +x /etc/dhcp3/dhclient-enter-hooks

When you next bring up the wireless interface, your nameservers should
remain unchanged. just make sure you have the ones that you need
in /etc/resolv.conf . It's a funny solution ( a script that explicitly
does nothing), but it works

I use this here to define my own nameserver IPs and avoid having the ISPs
numbers and/or router IP constantly reappearing in /etc/resolv.conf Simply
making /etc/resolv.conf unwritable does not work, because dhcp actually
*replaces* the /etc/resolv.conf file and not just its contents.

Give it a try :-)

Peter

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: routing table problem after power failure (sarge)
    ... nameserver 194.159.73.135 ... ;; connection timed out; no servers could be reached ... tried to ping 127.0.0.1 router and lan, ...
    (Debian-User)
  • Re: Stange things in Wget, yum
    ... > Now at the moment I am at home, no access to my office router, but I ... be a name resolution issue though, so running your own nameserver (DNS ... this may have issues if your office LAN uses its own local DNS ... clobbered by the DHCP client. ...
    (Fedora)
  • Re: Stange things in Wget, yum
    ... > Risoluzione di download.fedora.redhat.com in corso... ... > This happens on my router ... > therefore I can't also run yum update ... be a name resolution issue though, so running your own nameserver (DNS ...
    (Fedora)
  • Re: cannot connect to the Internet on fc4 - confirm
    ... > nameserver 192.168.0.1 ... > Should the search be looking for the name of the router? ... > My subnet mask should be 255.255.255.248 on the WAN. ... I shouldn't have to specify the subnet, ...
    (Fedora)
  • Re: Wer ist Nameserver?
    ... worden ist) keine Informationen ueber den Nameserver. ... "Den Router hat uns der Schultraeger gegeben!" ...
    (de.comp.os.unix.networking.misc)