Re: Name resolution for local names using DHCP



Charles Russell wrote:
Robert Harris wrote:
Charles Russell wrote:

[snip]
I know I'm jumping in late, but static addresses are not a terribly good
idea - they don't scale in the sense that if you add another computer to
a network of n machines, then you have to change the /etc/hosts file of
all n existing machines.

1. Are you sure that your router can't to hostname to IP address
translations? It may just be that it has a wrong idea of your domain
names. If the host name of another computer is, say, machine, try to
resolve (e.g. with the command hosts):

machine.

(the following dot will stop your own computer appending its own idea of
the domain name)

Otherwise, look at the router's idea of the domain name and try to
resolve:

machine.domain.name.

(if the domain name is domain.name)

Of course that may not work either, but it will test whether your router
can resolve local hostnames.

2. Run avahi. Then each machine will advertise its own hostname and IP
address and you will be able to resolve say, machine, as machine.local

Robert

Thanks. I haven't time at the moment to experiment, but in the meanwhile
I have a question about the domain name. My network was originally set
up as a Windows XP network, with workgroup name "MSHOME", and later I
added a Linux box and a MacOSX box, both of which got handled
automatically by DHCP with no further router configuration. (Everything
works except for local name resolution, and even that works with samba
clients. MaxOSX and Linux behave identically.) As far as I know, I don't
have a named "domain", unless that is the same as the Windows network
workgroup.

With Linux, dhcpcd (I think) puts the line "search Belkin" into
resolv.conf. I have no idea what that is for.

That means that your Linux machine will search for machine.Belkin when
you ask it to search for machine (the resolv.conf man page tells a
fuller story). The name "Belkin" probably comes from your router; there
will be a file somewhere which on my (Debian) system is
/var/log/dhcp3/dhclient.eth0.leases which lists the parameters that your
router has sent.

Tell your router that your domain name is "local" (without the quotes)
and, after you have had a dhcp response from your router, make sure that
your /etc/resolv.conf contains the line: "search local".

Domain is nothing to so with workgroup name; it is generally like
"bellsouth.net" (if the fully qualified name of your computer is
"mycomputer.bellsouth.net).

Robert
.



Relevant Pages

  • Re: Static route not working for DNS
    ... > using domain name in IE doesn't resolve. ... I've now received a hosts file for this private network. ... >> access a website that is on a private network. ... >> static route in the main router pointing to another router with the ...
    (microsoft.public.backoffice.smallbiz)
  • Re: SuSE 8.0 and slow DNS resolution
    ... > play only when trying to resolve a partial adress? ... > Alos, it wouldn't affect the router, and hence not the value popping ... >> least one caching DNS to solve your current problem. ... This, AFAICT, is also the difference between Linux and Windows XP. ...
    (comp.os.linux.networking)
  • Solved: FC1 and Win XP using cross-over cable
    ... connexion trought USB network device I lost all conectivite, ... When I shared my USB connexion Win XP automatically gives 192.168.1.1 to ... default values so my router has that IP address as well. ... After that I was able to share and surf in the laptop, but Linux ...
    (Fedora)
  • cant connect to the network or even ping my gateway
    ... it asked me to fill in my network info.. ... windows machines). ... the light on my router lights up indicating a connection. ... it only shows my windows clients but NOT the linux machine. ...
    (comp.os.linux.networking)
  • cant connect to the network or even ping my gateway
    ... it asked me to fill in my network info.. ... windows machines). ... the light on my router lights up indicating a connection. ... it only shows my windows clients but NOT the linux machine. ...
    (comp.os.linux.setup)