[Techtalk] DHCP question maybe dns

Magni Onsoien magnio+lc-techtalk at pvv.ntnu.no
Fri Apr 12 09:15:35 EST 2002


Hamster:

> There are a couple of steps.
> 1. Find the MAC address of the win95 pc. To do this, at a command prompt run winipcfg. click on "more info" and the field called adaptor address is the one youre looking for. write that number down.

Or, when you know the IP address, check the dhcpd logfile which should
reside in /var/log/daemon.log or /var/log/dhcpd.log or something like
that (grep for dhcpd in /var/log/*). There you will find the IP-address
as the dhcp-server assigns it to the client, together with it's
MAC-address.

(Also use this log for debugging if the static assignment of address
doesn't work as desired.)

> One last thing is to make sure the fixed-address is not part of the pool of addresses that dhcp hands out. My range looks like the line below, and you can see doesnt inlcude the .100 address.
> 
>  range 192.168.100.101 192.168.100.200;

I don't think it would be a problem to assign one of these dynamic
addresses as static address. The dhcp-server always checks if the
address is in use or reserved, and if it is, it won't be used.
Another thing is that it will probably be more tidy to have one address
space for static IPs and one for dynamic, then you can always see pretty
fast what kind of client that has a particular address.

If you have a big enough pool of addresses to assign via dhcp, you can
increase the lease time. Then an address will be reserved to one
MAC-address as long as there are free addresses left. A client can (and
usually do, by default) ask for the last address it had, and if this is
free, it will have it again, even if the lease time has expired. If
max-lease-time is higher than default-lease-time, the client can also
ask for (and get) a longer lease time than the default. In my dorm at
Uni there were ~250 addresses for 200 rooms, the default lease time was
30 days, and the dhcp server logged address assignsments for more than
that, so if you turned off your computer for 29 days, you always got the
same IP-address (unless someone had gone bananas and cycled through all
the addresses with one computer), and usually also if you turned it on
after longer time, since there were enough addresses.


Magni :)
-- 
sash is very good for you.



More information about the Techtalk mailing list