0% found this document useful (0 votes)
19 views

Experiment 5

Uploaded by

Nidhi Hiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Experiment 5

Uploaded by

Nidhi Hiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Experiment 5

1. Explain DHCP and its configuration with a suitable diagram


Answer :

Dynamic Host Configuration Protocol (DHCP) is a network protocol used to automatically


assign IP addresses and other network configuration parameters to devices on a network. It
operates based on a client-server model, where DHCP clients request network configuration
information from a DHCP server.

Configuration Process:

DHCP Discover:

When a client connects to a network, it sends out a broadcast DHCP Discover message to
discover available DHCP servers on the network.

DHCP Offer:

DHCP servers respond with DHCP Offer messages, offering IP addresses and other
configuration parameters to the client. The server typically includes an IP address lease
duration in the offer.

DHCP Request:

The client selects one of the offered IP addresses and sends a DHCP Request message to the
chosen DHCP server, requesting that IP address.

DHCP Acknowledge:

The DHCP server acknowledges the client's request by sending a DHCP Acknowledge
message. It confirms the lease of the IP address to the client and provides other
configuration details, such as subnet mask, default gateway, DNS server addresses, etc.

DHCP Configuration Diagram:

In the diagram:

 The DHCP server manages a pool of available IP addresses and leases them to clients.
 When a client broadcasts a DHCP Discover message, the DHCP server responds with
a DHCP Offer, proposing an IP address lease.
 The client selects an offered IP address and requests it from the DHCP server.
 The DHCP server acknowledges the request and assigns the IP address lease to the
client.

2. Explain Dora process with a suitable diagram

Answer:
he DHCP process, often referred to as the DORA process, outlines the sequence of steps
involved in dynamic IP address assignment between a DHCP client and a DHCP server. Here's
a detailed explanation of each step along with a suitable diagram:
Discover:

The DHCP client begins by broadcasting a DHCP Discover message onto the network. This
message indicates the client's need for network configuration information and seeks
available DHCP servers.

Offer:

DHCP servers respond to the Discover message with a DHCP Offer message, indicating their
willingness to provide network configuration information.

Request:

After receiving the DHCP Offer messages, the client selects one of the offered IP addresses
and sends a DHCP Request message to the chosen DHCP server.

Acknowledge:

The DHCP server that receives the Request message responds with a DHCP Acknowledge
(ACK) message. This message confirms the client's lease of the offered IP address and
provides additional configuration parameters.

3.What are CLI commands?

Answer :

CLI commands, or Command Line Interface commands, in the context of DHCP (Dynamic
Host Configuration Protocol), refer to the commands used to interact with and configure
DHCP servers, clients, and related network settings through a command-line interface.

These commands allow network administrators to perform various tasks related to DHCP,
such as:

 Configuring DHCP server settings, including IP address ranges, lease durations,


and options.
 Monitoring DHCP server status and statistics, such as active leases, available
addresses, and error logs.
 Troubleshooting DHCP issues, such as resolving conflicts, renewing leases, or
releasing addresses.
 Managing DHCP client configurations, such as requesting IP addresses, renewing
leases, or releasing addresses.

Some common CLI commands used in DHCP management include:

 dhcpd: Starts or stops the DHCP server daemon.

 dhcpd.conf: Opens the DHCP server configuration file for editing.

 dhcpd -t: Tests the DHCP server configuration for syntax errors.

 dhcpd -r: Re-reads the DHCP server configuration file without restarting the daemon.

 dhcpd -l: Displays a list of active DHCP leases.


 dhcpd -H <hostname>: Specifies the hostname of the DHCP server.

 dhclient: Initiates the DHCP client on a network interface.

 dhclient -r: Releases the DHCP lease for a network interface.

 dhclient -n: Runs the DHCP client in non-daemon mode.

 dhclient -v: Enables verbose output for the DHCP client.

 ifconfig: Displays or configures network interface settings, including DHCP-related


information.

4. State and Explain all the cli commands used in this experiment

Answer

In the experiment conducted, several CLI (Command Line Interface) commands were utilized
to interact with the DHCP (Dynamic Host Configuration Protocol) server and perform various
tasks. Here are the commands used along with their explanations:

1. sudo service isc-dhcp-server status:

 Explanation: This command checks the status of the ISC DHCP server service.
The sudo command is used to execute the subsequent command with
superuser privileges. service is the command used to manage system services

2. sudo service isc-dhcp-server restart:

 Explanation: This command restarts the ISC DHCP server service. Similar to
the previous command, it uses sudo to execute with superuser privileges and
service to manage system services. isc-dhcp-server is the name of the DHCP
server service,

3. sudo nano /etc/dhcp/dhcpd.conf:

 Explanation: This command opens the DHCP server configuration file


(dhcpd.conf) for editing using the nano text editor. sudo grants superuser
privileges to edit system files.

4. sudo systemctl restart networking.service:

 Explanation: This command restarts the networking service, which includes


network interfaces and related configurations. sudo provides superuser
privileges, and systemctl is used to control system services.

5. ifconfig or ip addr show:

 Explanation: These commands display information about network interfaces,


including IP addresses assigned to them. ifconfig is a legacy command, while
ip addr show is the modern equivalent.
5.State and Expalin features of DHCP
Answer
1. Automatic IP Address Assignment:
 Explanation: DHCP automatically assigns IP addresses to devices on a
network. This eliminates the need for manual configuration of IP addresses,
reducing administrative overhead and ensuring efficient use of available IP
addresses.
2. Dynamic IP Address Allocation:
 Explanation: DHCP dynamically allocates IP addresses from a pool of available
addresses. When a device connects to the network, DHCP assigns it an IP
address from the pool. Upon disconnection, the IP address is returned to the
pool for reuse by other devices.
3. IP Address Lease Management:
 Explanation: DHCP leases IP addresses to devices for a specific duration called
the lease period. The lease duration can be configured by network
administrators. After the lease expires, the device must renew its lease or
request a new IP address.
4. Automatic Configuration of Network Parameters:
 Explanation: In addition to IP addresses, DHCP can automatically configure
other network parameters, such as subnet masks, default gateways, DNS
servers, and domain names. This simplifies network configuration for devices
and ensures consistency across the network.
5. Centralized IP Address Management:
 Explanation: DHCP centralizes the management of IP addresses within a
network. Administrators can configure DHCP servers to manage IP address
allocation for multiple subnets, simplifying network administration and
reducing the likelihood of conflicts.

You might also like