4 Dhcp Configuration And Management

Network and System Administration · Unit 4

DHCP Configuration and Management

Exam-focused notes for DHCP Configuration and Management (Network and System Administration, BIT451): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

DHCP Configuration and Management in short

DHCP gives IP settings to computers automatically. Without it, an administrator would need to type an address on every device by hand.

DHCP Configuration and Management: notes

DHCP principles and operation

DHCP (Dynamic Host Configuration Protocol) assigns an IP address, subnet mask, default gateway and DNS servers to clients. The server uses UDP port 67 and the client uses UDP port 68.

The client gets its address through four messages, known as DORA.

  • Discover: The client broadcasts to find a DHCP server.
  • Offer: A server offers an address and settings.
  • Request: The client asks to use the offered address.
  • Acknowledge: The server confirms and records the lease.

If the network has more than one subnet, a DHCP relay agent on the router forwards the broadcasts to the server. Benefits of DHCP are less manual work, fewer address conflicts, and easy changes of settings.

DHCP server configuration

On Ubuntu, install the server and edit the main file.

sudo apt install isc-dhcp-server
sudo nano /etc/dhcp/dhcpd.conf
sudo nano /etc/default/isc-dhcp-server

Set the listening interface in the second file, for example INTERFACESv4="eth0". A sample dhcpd.conf:

default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.10.0 netmask 255.255.255.0 {
    range 192.168.10.100 192.168.10.200;
    option routers 192.168.10.1;
    option domain-name-servers 192.168.10.2, 8.8.8.8;
    option domain-name "example.com";
}

host printer1 {
    hardware ethernet 00:11:22:33:44:55;
    fixed-address 192.168.10.50;
}

What this unit covers

  • DHCP principles and operation
  • DHCP server configuration
  • DHCP options and common options
  • DHCP troubleshooting procedures
  • DHCP lease management

DHCP troubleshooting procedures

2082 · 5 marks

How DHCP troubleshooting is carried out? Explain. [5]

DHCP troubleshooting involves systematic diagnosis and resolution of Dynamic Host Configuration Protocol issues. Here are the main approaches: - Check if the DHCP server is running and operational - Confirm the server is listening on port 67 (UDP) - Verify server configuration files are correct -...

Open this answer on its own page →

DHCP options and common options

2081 · 5 marks

List three common DHCP options and explain any one. [5]

  1. Option 3: Router (Default Gateway) 2. Option 6: Domain Name Server (DNS) 3. Option 15: Domain Name --- Option 6 is a DHCP option that provides the IP addresses of DNS servers to the client. This allows the client to resolve domain names (like www.example.com) into their corresponding IP addres...
Open this answer on its own page →

DHCP principles and operation

2082.1 · 5 marks

What is DHCP? How can you configure the DHCP server? Explain. [1+4]

Show solved answer

DHCP: Definition and Server Configuration

1. What is DHCP? (1 mark)

DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically assigns IP addresses and other network configuration parameters to devices (clients) on a network. Instead of manually configuring each device with a static IP address, DHCP enables devices to obtain their network settings dynamically from a DHCP server.

Key purpose: Simplifies network administration by automating IP address allocation and management.


2. How to Configure the DHCP Server (4 marks)

Configuration Steps:

Step 1: Install DHCP Server Software

  • Install the DHCP server package on the designated server machine
  • Example: apt-get install isc-dhcp-server (on Linux/Ubuntu)

Step 2: Configure the DHCP Configuration File

The main configuration file is typically /etc/dhcp/dhcpd.conf. Key configurations include:

  • Define Subnet: Specify the network subnet and netmask

    subnet 192.168.1.0 netmask 255.255.255.0 {
    }
    
  • Set IP Address Pool: Define the range of IP addresses to be assigned

    range 192.168.1.100 192.168.1.200;
    
  • Configure Default Gateway: Specify the router/gateway address

    option routers 192.168.1.1;
    
  • Set DNS Servers: Provide DNS server addresses

    option domain-name-servers 8.8.8.8, 8.8.4.4;
    
  • Set Lease Time: Define how long a client can use an assigned IP

    default-lease-time 600;
    max-lease-time 7200;
    

Step 3: Specify Network Interface

  • Configure which network interface the DHCP server listens on
  • Edit /etc/default/isc-dhcp-server and set INTERFACESv4="eth0"

Step 4: Start and Enable the Service

  • Start the DHCP server: systemctl start isc-dhcp-server
  • Enable on boot: systemctl enable isc-dhcp-server

Step 5: Verify Configuration

  • Check service status: systemctl status isc-dhcp-server
  • Monitor DHCP logs for client requests and IP assignments

Result: Clients on the network can now automatically obtain IP addresses and network settings from the configured DHCP server.

Open this answer on its own page →