localhost or LAN addresses in /etc/hosts

Bart Silverstrim bsilver at chrononomicon.com
Tue Dec 16 13:50:54 UTC 2008


NoOp wrote:

> For others that advocate DHCP on a small local network:
> 
> The advantages of static IP's in a small local network are even more
> evident when you use VPN's, VNC, or a central printer - particularly if
> you use IPP to connect to the printer.

I don't suppose the network-manager bugs have been fixed yet, have they? 
On my machine after upgrading to 8.10 I could no longer use a static IP!

THAT is a PITA!

> BTW: the printer doesn't just come up and provide a 'printer name' on
> the network, it's not possible. I'm sure that someone will come along
> and show me wrong and how to do it with DHCP & that's quite OK, but
> using static IP's on a small local lan shouldn't require dnsmasq or any
> other special requirements other than defining the host names in /etc/hosts.

I don't know if it's that simple (well, yes, you can do it with a /hosts 
file not arguing that) but in today's networking a lot of printers do 
advertise themselves so they're discoverable. I just opened "networks" 
on this Ubuntu machine and there are four networked laser printers 
showing, and Macs with Rendezvous love discovering printers for breakfast.

I really think it won't be much longer before Rendezvous and 
autodiscovery (same service, isn't it?) and IPv6 will make networking 
three times more magical for users and four times more frustrating to 
troubleshoot.

>  Another case in point: I VPN into a remote network that has maybe 5 or
> 6 machines on site. If the machines are DHCP I need to find a way to
> find out what their current IP's are so that I can connect to them for
> updates etc. In nearly all cases this is simply impossible with a
> standard VNC or VPN link; unless I've taken the trouble to define their
> MAC addresses in the remote router to assign those machines the same IP
> address each time. In that case I need to rely on a dns discover utility
> that may or may not be working on the remote end.

Or open the management page to your DHCP server and it'll tell you 
what's connected :-)

>   So why even bother? Just reserve a block of IP's on the router to be
> static, reserve a block to be DHCP, and leave it at that. 

That's how mine was set up...well, until Network Manager crapped the 
bed. Lost my webcams, lost my network, miffed more than a little I am, 
just not *quite* enough to revert to 8.04.

Almost though.

>You have your
> machines/printers/etc on static, friends visit & connect and get a DHCP
> address and can access the necessary services (including your printer if
> you give them the IP address) and off you go. Basically Karl was/is
> correct for the most part on this one. Oh *please* Karl don't blog about
> your network settings on the list just because I commented that you are
> *basically* right on this...

I think he was right and wrong at the time in what he said can and can't 
be done with it, but I don't feel like digging through archives at the 
moment just to prove a point. I'm not in the mood to drop trou just to 
prove my geekness.




More information about the ubuntu-users mailing list