Someone at work has a new laptop and wanted to be able to connect it to the network via Wifi. To make life with the laptop easier it would be preferable to set it up to automatically get it's IP address so that it can connect both here and at starbucks without having to edit network settings.
However, at work we all have static IP addresses, we don't use DHCP because of the opinion that it makes it harder to trace who is looking at pr0n when they should be working.
I proposed putting a dhcp server on my Ubuntu box and having a play.
Looking through the /etc/dhcp3/dhcpd.conf file, it turns out that you can hard code particular MAC addresses to specific IP addresses, essentially assigning static IP addresses to specific network cards at the server end. This is as secure as it gets, you can trace who is looking at pr0n down to the network card in their PC.
I set it up as follows:
- Installed dhcpd package
- Edited /etc/dhcp3/dhcpd.conf
-
Added:
option domain-name "domainname.com"; # local domain option domain-name-servers 192.168.0.3, 192.168.0.181; # local name servers
-
Added:
This was the trickiest bit to get right. It has to have a subnet definition and normally these can be empty but the 'routers' line can be used to specify the gateway.
* Added: <verbatim> subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.12; # pcw: gateway } -
Add MAC details for each host pc:
host pcw { hardware ethernet 12:34:56:78:12:34; fixed-address 192.168.0.132; } -
Reboot dhcp server:
sudo /etc/init.d/dhcp3-server restart
Conclusion: DHCP is cool, it will not necessarily cost you tracability (at least on linux: dunno about windows, there might be a dancing paper clip that will tell you) and all the pc's on the network get configured automatically.


I modified the dhcp server to provide a number of ip addresses from a pool betwen 192.168.0.221 and 192.168.0.230. I added the following to /etc/dhcp3/dhcpd.conf:
subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.221 192.168.0.230; option domain-name "itl.co.uk"; option routers 192.168.0.12; }By default the dhcp address allocations are written to /var/log/messages. To get them into their own log file I put the following in /etc/syslog.conf:
and did
The mysterious 'local7' comes from the following line in dhcpd.conf:
There is probably a very good reason that this is 'local7' and not 'dhcpd'.
Peter.