localhost or LAN addresses in /etc/hosts
Chris G
cl at isbd.net
Mon Dec 15 18:08:54 UTC 2008
On Mon, Dec 15, 2008 at 12:36:36PM -0500, Bart Silverstrim wrote:
> Chris G wrote:
> > On Mon, Dec 15, 2008 at 09:54:13AM -0400, Derek Broughton wrote:
> >> Chris G wrote:
> >>
> > 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.
>
Where/what do I tell that the printer is called Print-1, this is the
bit that's not clear to me. Are you saying that I should give it this
name in teh router configuration?
> 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.
>
Exactly! Much more sensible and easier IMHO, that's why I do it this
way too. :-)
> 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
Er, no, this is where we came in! I'm using dnsmasq on *one* machine
in the LAN and that means I only have to edit *one* /etc/hosts and
dnsmasq tells other machines on the network the contents of that one
/etc/hosts via DNS.
--
Chris Green
More information about the ubuntu-users
mailing list