Re: localhost or LAN addresses in /etc/hosts



Chris G wrote:
On Mon, Dec 15, 2008 at 09:54:13AM -0400, Derek Broughton wrote:
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.

So the *router* decides what the machine's name is?

The DNS server ties a name to an IP. On simple router multifunction
devices, if the DHCP and DNS server are tied together, they can be the
one to determine the name giving to the IP address.

You can have a device call itself whatever it wants...as far as the
network is concerned, other devices will consult the DNS server to find
the name, just like you can call yourself Huggybears but Uncle Sam calls
you by whatever you have on your birth certificate.

Okay, silly example, but you get the gist of it.

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.

I really don't understand this. I have two printers on my network,
one is an HP7310 which has its own network interface the other is a
laser printer which is accessed via an Axis print server. So, if the
router is providing DHCP and DNS services how does it get to know
about the printers? Presumably when I turn the Axis print server on
it gets an IP address from the router but how does the router know
that it's a printer and/or give it a useful name that I will know
about and be able to use?

If I'm reading what you're being explained in the thread correctly...

If you have devices looking for your printer *by name*, then it doesn't
matter what their name is if assigned reliably via DHCP and updated in
DNS. You can name it Print-1 and no matter what the IP, if the DNS is
updated correctly each time the printer gets the IP from the DHCP server
you have the ability to find it by asking the network for Print-1.

I personally don't do this. I have network printers on a static IP and
set them up on the my systems with a static IP, so I don't need to worry
about DNS records or DHCP working properly for devices I don't move around.

My printers are set to an IP block that isn't handed out by the DHCP
server...I set aside a small number of IP's for printers that are
excluded from DHCP and then keep them as you sound like you did, static
on the printing device.

The only things on my network DHCP'd are computers.

If we're talking home routers, those SOHO devices from
Staples/newegg/whatever, chances are the @#$% things will die in less
than a year or two anyway so the less I rely on them for configuring my
network the less hassle I have replacing it.

How is setting up MAC addresses to match devices in the router any
easier than editing /etc/hosts? That's where I really don't follow
what you're advising. As it is all I do is:-

Because you'd have to edit /etc/hosts on multiple machines if you have
multiple machines to administer, or if you have a mixed environment in
your home. It's a lot easier to not worry about editing files every time
you have a visitor or new computer and centralize management when you
can, but you have to balance it for your environment and preferences. I
also balance this out with the experiences where if this isn't a
thousand-dollar Cisco device we're talking about then I've had them
periodically fail on me for giggles.

I got to the point where I bought a separate switch and WAP because the
combo devices failed on me often enough to @#$!@ #!@#$#$%%%

-Bart

-Bart

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



Relevant Pages

  • Re: network has gone down again, and I cannot figure out why
    ... search dns: dns.asm.bellsouth.net ... try against the secondary DNS server address. ... up DHCP on this end and now I can email. ... DHCP just configures your side of the network with the data that the ...
    (Fedora)
  • Re: [SLE] IP addressing
    ... >shared across the network regardless of what type of realm is being used ... >do that by configuring your dhcp deamon to reserve particular IP ... >1- do not run DNS or dhcp on your novell (ofcourse you will have to run ...
    (SuSE)
  • Re: VPN connects but cannot browse network
    ... Resolution has to be done by allowing your clients to get the proper DNS ... WINS specs via the DHCP. ... added within RRAS when RRAS is being used as your VPN "engine". ... My clients can sucessfully connect but they cannot access my network. ...
    (microsoft.public.win2000.networking)
  • Re: DNS, DHCP and classes
    ... I can't help with the DNS and DHCP changes, but I do want to clarify what you're doing so that someone else may be able to help on where your problem may lie. ... DHCP is set up to recognise all three networks and ignore requests from the 10/24 network. ... All bits set on a host address is a broadcast address for that network. ...
    (uk.comp.os.linux)
  • Re: Missing printers in Forward lookup Zones
    ... Then printers, which cannot Authenticate with AD, will not be able to update ... This is where DHCP comes in, the DHCP server will do the ... Authentication and DNS Registrations for the printers. ...
    (microsoft.public.windows.server.dns)