Re: localhost or LAN addresses in /etc/hosts



Chris G wrote:

The whole point is to make things easy to configure, my router
certainly *doesn't* know the names/addresses of machines on my LAN and
I don't really see how it could.

The usual way is by the machine asking for DHCP to send its name, and
the router sends back an IP - and updates its local DNS. This is not
implemented in every router, but it's _really_ common.

Of course dnsmasq does use the
upstream DNS for addresses it doesn't know but the upstream DNS is
currently my ISP's DNS. The router has both DHCP and DNS turned off
(you can't switch only one off).

There wouldn't be much point, since the router's DNS is mainly there to
map the addresses assigned by DHCP.

No, I have static addresses assigned so it's correct. Apart from
anything else how, otherwise, would one access things such as
printers (my 192.168.1.44 hp7310 for example), they have to be
fixed addresses.

No they don't, they just have to not change as long as they're on the
network.

?? So what's the difference? :-) ...

Logically, none. But you can get this effect with the DHCP on any router
I've used.

and, if they did change when,
for example, a printer was turned off and then on again (as it might
when using DHCP) how would the rest of the system know the printer's
IP address?

That's the point - it can't change, but that doesn't mean you need to go
to this trouble with static addresses. Use the DHCP on your router,
tell it to always assign 192.168.1.44 to the MAC address of your hp7310
printer, and then even if you disconnect and reconnect, your printer
will always have the same address - and it _should_ be in your router's
DNS, too.

I'm sure I've read somewhere (can't find it now) that dnsmasq
specifically works for 'simple' names for machines on a LAN with
private addresses.

Yes, but the "simple" name is _always_ automatically suffixed with the
search domains.

127.x.x.x is only the right address for "isbd" when the question is
asked from "isbd".

Any other client doing a lookup should be taking the name "isbd" and
appending its "search domain" and finding the address that way. If,
from your example the search domain is "isbd.net" then dnsmasq should
be
returning the correct values for "chris" and "home".

That spoils the easy configuration though, I need to go round to every
machine and tell it what its "search domain" is.

You don't _have_ easy configuration as long as you're doing it manually.
"Use the Force" - let the router do the work.
--
derek


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



Relevant Pages

  • Re: Testing environment question
    ... For your domain members to function properly they must use the local DNS server. ... Turn off the DHCP function on the router. ... You can set up DHCP on the DC or you can just configure the machines manually to use the router for default gateway but use the DC for DNS. ...
    (microsoft.public.windows.server.general)
  • Re: Networking problems (again) tough one
    ... The problem *only* occurs on my Linux machines. ... DNS numbers, ... all systems start working again whether setup manually or with DHCP. ... If theu are shoing good, and yet things dont work, you may have a misconfigured router. ...
    (comp.os.linux.setup)
  • Re: DNS Problem??
    ... In the DHCP field at the router, ... > DNS but it adds the 'public' side DNS automatically. ... Do you have another SERVER class machine with the clients? ...
    (microsoft.public.windows.server.dns)
  • Re: NoMachines client access to Gnome on F7 (Alex) (Tim) (Alex)
    ... so the Fedora machines seem to be forwarding their names to the router ... whether or not it can function as a DNS. ...
    (Fedora)
  • Re: [Info-vax] my vax goes to internet
    ... I tried to use fixed address, that was how my local machines were ... I did not succeed in making the router route fixed address. ... Very few uses DHCP with their VMS systems. ...
    (comp.os.vms)