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

Re: IP address depending on the MAC



On 06.10.2011 00:08, Liam O'Toole wrote:
On 2011-10-05, Raf Czlonka<rjc@linuxstuff.pl>  wrote:
On Wed, Oct 05, 2011 at 08:59:08PM BST, Ireneusz Szcześniak wrote:
The computers are in a university laboratory, where students often
unplug the lan cable.  Then they plug the cable again after some
time, and unplug again.

The problem with this plugging and unplugging is that when the
dhclient doesn't receive a lease in time, it randomly picks an
address and stays with it even then the cable is plugged later.
With this random address I can't connect to the computer remotely.
And so the idea of a static address came to my mind.  But now I
think I should look into the configuration of dhclient to resolve
the problem.

You can resolve this issue by setting up a long lease time and set up
static leases only - it's trivial.

Regards,
--
Raf

Yet another option is to configure clients to send their hostname in the
DHCP request. The hostnames will register with dnsmasq's DNS resolver,
so you can connect to the clients by hostname rather than IP address.
That is my preferred configuration.

Yes, but that doesn't resolve the problem with dhclient falling back to a random address when it doesn't receive a lease in time.

--
Ireneusz (Irek) Szczesniak
http://www.irkos.org


Reply to: