October 20, 2012

Suppose there are some dhcp configured servers and many clients, how can a client know which server provided the ip address?

Suppose there are some dhcp configured servers and many clients, how can a client know which server provided the ip address?

The address of the DHCP server is maintained in a file called dhclient.leases...

The address of the DHCP server is maintained in a file called dhclient.leases. on ubuntu, you will find this file in directory /var/lib/dhclient, but other distros may put it elsewhere (I believe debian puts it in dhclient3)
So the ip address is easy to find by looking into the file and searching for dhcp-server-identifier, or by entering the command:
grep dhcp-server-identifier /var/lib/dhcp/dhclient.leases

grep dhcp-server-identifier /var/lib/dhcp/dhclient.leases

Like  (0 likes)
Click Here!