[COLUG] Lan hostname to IP resolution

Rob Funk rfunk at funknet.net
Fri Feb 22 17:57:54 EST 2008


david riggs wrote:
>  I  have several Linux machines plugged in, or wirelessed into, my
> Verizon ADSL router.
...
> The ip address (192.168.1.X) varies from time to time as the links come
> up and down, so I cannot just put something like "192.168.1.68
> my-etch1" into /etc/hosts.

Take control of your LAN!  :-)

You could assign static IP addresses to each machine, and then either put 
those into /etc/hosts on each machine, or run a DNS server (dnsmasq is 
ideal for the purpose) on one of them and have the rest get DNS from 
there.
There's no need to have any machine ask the router for its IP address.


Or you could further insulate your LAN from Verizon.....

To do that, I'd get another router that has a better DHCP 
server.  "Better" meaning that it always assigns the same numbers to the 
same machines.  If you get a particularly good one, it'll have DNS built 
in and linked to DHCP, but even without that feature, if the DHCP server 
is more consistent then you can set up your own DNS server (or 
edit /etc/hosts).

BTW, I'm not talking about replacing the Verizon router, but putting your 
own router in between your machines and the Verizon router.  Be sure to 
set it to use a different network than 192.168.1.X; I like to pick two 
numbers between 0 and 254, and fill those in for X and Y to create a 
10.X.Y.Z network.

I personally recommend getting a router that can be flashed with firmware 
such as DD-WRT (www.dd-wrt.com); the easiest hardware to recommend is the 
Linksys WRT54GL (or some variant, see 
http://en.wikipedia.org/wiki/Wrt54g), though other routers will also 
work.  I'm pretty sure that the DD-WRT firmware will handle the DHCP and 
DNS the way you need.


-- 
==============================|   "A microscope locked in on one point
 Rob Funk <rfunk at funknet.net> |Never sees what kind of room that it's in"
 http://www.funknet.net/rfunk |    -- Chris Mars, "Stuck in Rewind"


More information about the colug432 mailing list