[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to link name to IP address in DHCP request



On Mon, Jan 21, 2008 at 01:09:08PM +1100, hce wrote:
> Hi,
> 
> I have several computers which all use DHCP (udhcpc) to get IP
> addresses. They have simple web server on it so I can connect it to
> use a brower such as http://192.168.0.6. The problem is I don't know
> the IP address it is assigned to. How can I send DHCP request to link
> computer's name to assigned IP address, so I can use http://Debian1 to
> connect it?

First, read some basics. 
 http://people.debian.org/~osamu/pub/getwiki/html/ch06.en.html

Assuming you are behind consumer router by looking at your DHCP address
example, ...

Why not give your web server with fixed IP.  Most router use limitted
range of IP for DHCP (e.g. 0-127).  Just avoid them. For example set
your server with 192.168.0.200.  Your gateway router still function
since it is in the same subnet but will not collide.

For name to IP, you can either set up local DNS or set up your lmhosts
file (I think for windows) or /etc/hosts file for Linux.

The Lmhosts file is located in the %SystemRoot%\System32\Drivers\Etc
folder on a Windows computer. The file is named LMHOSTS.SAM, and must be
renamed to LMHOSTS before it can be used. 

This is easy way, you may be able to use avahi etc but I never done it.

Osamu


Reply to: