3. dhclient

Lesson Content

We’ve discussed DHCP before and most often you will never need to statically set your IP addresses, subnet masks, etc. Instead you’ll be using DHCP! The dhclient starts up on boot and gets a list of network interfaces from the dhclient.conf file. For each interface listed it tries to configure the interface using the DHCP protocol.

In the dhclient.leases file, dhclient keeps track of a list of leases across system reboots, after reading dhclient.conf, the dhclient.leases file is read to let it know what leases it’s already assigned.

To obtain a fresh IP

$ sudo dhclient

Exercise

No exercises for this lesson.

Quiz Question

# What tries to assign IP addresses with the DHCP protocol? > DHCP runs at the application layer of the TCP/IP stack. It dynamically assigns IP addresses to DHCP clients and allocates TCP/IP configuration information to DHCP clients. This information includes subnet mask information, default gateway IP addresses and domain name system (DNS) addresses. 1. [ ] TCP 2. [ ] IPv4 3. [ ] dhcp 4. [x] dhclient