Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

CS3591 COMPUTER NETWORKS

GNANAMANI COLLEGE OF TECHNOLOGY


DEPARTMENT OF AI&DS
UNIT III
NETWORK LAYER
1. Switching : Packet Switching
2. Internet protocol
a. IPV4 – IP Addressing – Subnetting
b. IPV6
3. ARP
4. RARP
5. ICMP
6. DHCP
Chapter1:
1. Switching : Packet Switching

Switching techniques
In large networks, there can be multiple paths from sender to receiver. The switching technique will
decide the best route for data transmission.Switching technique is used to connect the systems for
making one-to-one communication.

Classification of Switching Techniques


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

Switched communication networks are those in which data transferred from source to
destination is routed between various intermediate nodes. Switching is the technique by which
nodes control or switch data to transmit it between specific points on a network. There are 3
common switching techniques:

1. Circuit Switching
2. Packet Switching
3. Message Switching

1.Circuit Switching:

In circuit switching network resources (bandwidth) are divided into pieces and bit delay is constant
during a connection. The dedicated path/circuit established between sender and receiver provides a
guaranteed data rate. Data can be transmitted without any delays once the circuit is
established.

Telephone system network is one of the example of Circuit switching. TDM (Time Division
Multiplexing) and FDM (Frequency Division Multiplexing) are two methods of multiplexing
multiple signals into a single carrier.

 Frequency Division Multiplexing : Divides into multiple bands


Frequency Division Multiplexing or FDM is used when multiple data signals are combined
for simultaneous transmission via a shared communication medium.It is a technique by
which the total bandwidth is divided into a series of non-overlapping frequency sub-
bands,where each sub-band carry different signal. Practical use in radio spectrum & optical
fibre to share multiple independent signals.

 Time Division Multiplexing : Divides into frames


Time-division multiplexing (TDM) is a method of transmitting and receiving independent
signals over a common signal path by means of synchronized switches at each end of the
transmission line. TDM is used for long-distance communication links and bears heavy data
traffic loads from end user.
Time division multiplexing (TDM) is also known as a digital circuit switched.

What are the phases of circuit switching?

These are the three main phases of circuit switching:


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
1. Connection establishment. Also called call setup, this phase establishes a dedicated circuit between
two communicating endpoints. The parties send a message back and forth acknowledging the
established connection. There are usually intermediate links or switches between the two parties.
2. Data transfer. Data -- usually voice -- is transmitted from the source to the destination. The
connection remains intact for the length of the interaction.
3. Connection relinquishment. This is also called the teardown phase. At the end of the interaction,
one of the two endpoints sends a message initiating a disconnection. The communication path,
including the intermediate links, is terminated.

2.MessageSwitching

Message switching was a technique developed as an alternative to circuit switching before packet
switching was introduced. In message switching, end-users communicate by sending and receiving
messages that included the entire data to be shared. Messages are the smallest individual unit.
Also, the sender and receiver are not directly connected. There are a number of intermediate nodes
that transfer data and ensure that the message reaches its destination. Message switched data
networks are hence called hop-by-hop systems.
They provide 2 distinct and important characteristics:
1. Store and forward – The intermediate nodes have the responsibility of transferring the
entire message to the next node. Hence, each node must have storage capacity. A message
will only be delivered if the next hop and the link connecting it are both available,
otherwise, it’ll be stored indefinitely. A store-and-forward switch forwards a message only
if sufficient resources are available and the next hop is accepting data. This is called the
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
store-and-forwardproperty.

2. Message delivery – This implies wrapping the entire information in a single message and
transferring it from the source to the destination node. Each message must have a header
that contains the message routing information, including the source and destination.

3.Packet Switching Definition

Packet Switching transmits data across digital networks by breaking it down into blocks or
packets for more efficient transfer using various network devices. Each time one device sends a
file to another, it breaks the file down into packets so that it can determine the most efficient
route for sending the data across the network at that time. The network devices can then route the
packets to the destination where the receiving device reassembles them for use.

What is Packet Switching?

Packet switching is the transfer of small pieces of data across various networks. These data
chunks or “packets” allow for faster, more efficient data transfer.

Often, when a user sends a file across a network, it gets transferred in smaller data packets, not in
one piece. For example, a 3MB file will be divided into packets, each with a packet header that
includes the origin IP address, the destination IP address, the number of packets in the entire
data file, and the sequence number.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Types of Packet Switching

There are two major types of packet switching:

Connectionless Packet Switching. This classic type of packet switching includes multiple
packets, each individually routed. This means each packet contains complete routing
information—but it also means different paths of transmission and out-of-order delivery are
possible, depending on the fluctuating loads on the network’s nodes (adapters, switches and routers)
at the moment. This kind of packet switching is sometimes called datagram switching.

Each packet in connectionless packet switching includes the following information in its header
section:

 Source address
 Destination address
 Total number of packets
 Sequence number (Seq#) for reassembly

Once the packets reach their destination via various routes, the receiving devices rearrange them
to form the original message.

Connection-Oriented Packet Switching. In connection-oriented packet switching, also called


virtual circuit switching or circuit switching, data packets are first assembled and then numbered.
They then travel across a predefined route, sequentially. Address information is not needed in
circuit switching, because all packets are sent in sequence.

Here are some of the types of delays that can occur in packet switching:

1. Transmission delay: This is the time it takes to transmit a packet over a link. It is affected by the
size of the packet and the bandwidth of the link.
2. Propagation delay: This is the time it takes for a packet to travel from the source to the destination.
It is affected by the distance between the two nodes and the speed of light.
3. Processing delay: This is the time it takes for a packet to be processed by a node, such as a router or
switch. It is affected by the processing capabilities of the node and the complexity of the routing
algorithm.
4. Queuing delay: This is the time a packet spends waiting in a queue before it can be transmitted. It
is affected by the number of packets in the queue and the priority of the packets.

Modes of Packet Switching:

1. Connection-oriented Packet Switching (Virtual Circuit): Before starting the transmission, it


establishes a logical path or virtual connection using a signaling protocol, between sender and
receiver and all packets belongs to this flow will follow this predefined route. Virtual Circuit ID is
provided by switches/routers to uniquely identify this virtual connection. Data is divided into small
units and all these small units are appended with help of sequence numbers. Packets arrive in order
at the destination. Overall, three phases take place here- The setup, data transfer and tear-down
phases.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
All address information is only transferred during the setup phase. Once the route to a destination is
discovered, entry is added to the switching table of each intermediate node. During data transfer,
packet header (local header) may contain information such as length, timestamp, sequence
number, etc.

2. Connectionless Packet Switching (Datagram): Unlike Connection-oriented packet switching,


In Connectionless Packet Switching each packet contains all necessary addressing information
such as source address, destination address, port numbers, etc.

In Datagram Packet Switching, each packet is treated independently. Packets belonging to one
flow may take different routes because routing decisions are made dynamically, so the packets
that arrived at the destination might be out of order. It has no connection setup and teardown phase,
like Virtual Circuits.

A---R1---R2---B

A is the sender (start)


R1, R2 are two routers that store and forward data
B is receiver(destination)

To send a packet from A to B there are delays since this is a Store and Forward network.

Chapter2:
2.Internet protocol
a. IPV4 – IP Addressing – Subnetting

What is IPv4?
IP stands for Internet Protocol and v4 stands for Version Four (IPv4). IPv4 was the primary
version brought into action for production within the ARPANET in 1983.
IP version four addresses are 32-bit integers which will be expressed in decimal notation.

Example- 192.0.2.126 could be an IPv4 address.

Parts of IPv4

 Network part:
The network part indicates the distinctive variety that’s appointed to the network. The network part
conjointly identifies the category of the network that’s assigned.
 Host Part:
The host part uniquely identifies the machine on your network. This part of the IPv4 address is
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
assigned to every host.
For each host on the network, the network part is the same, however, the host half must vary.
 Subnet number:
This is the nonobligatory part of IPv4. Local networks that have massive numbers of hosts are
divided into subnets and subnet numbers are appointed to that.

Characteristics of IPv4

 IPv4 could be a 32-Bit IP Address.


 IPv4 could be a numeric address, and its bits are separated by a dot.
 The number of header fields is twelve and the length of the header field is twenty.
 It has Unicast, broadcast, and multicast style of addresses.
 IPv4 supports VLSM (Virtual Length Subnet Mask).
 IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
 RIP may be a routing protocol supported by the routed daemon.
 Networks ought to be designed either manually or with DHCP.
 Packet fragmentation permits from routers and causing host.

IPv4 Datagram Header


Size of the header is 20 to 60 bytes.

VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The minimum
value for this field is 5 and the maximum is 15.

Type of service: Low Delay, High Throughput, Reliability (8 bits)

Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the
maximum is 65,535 bytes.

Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16
bits)

Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag
(same order)

Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the
particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of
65,528 bytes.

Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by
restricting the number of Hops taken by a Packet before delivering to the Destination.

Protocol: Name of the protocol to which the data is to be passed (8 bits)

Header Checksum: 16 bits header checksum for checking errors in the datagram header

Source IP address: 32 bits IP address of the sender

Destination IP address: 32 bits IP address of the receiver

Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.

IPv4

An IPv4 address is made up of 32 binary bits, which is divided into a Network portion and a Host
portion with the help of a Subnet Mask.
The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to
decimal and separated by a period (dot).

How IPv4 addresses look:

IP addresses have two common formats. IP version 4 addresses are comprised of four numbers-only
segments separated by dots:
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
e.g. 127.0.0.1
e.g. 253.17.35.22
e.g. 192.168.108.105

The value in each octet ranges from 0 to 255 decimal, or 00000000 – 11111111
binary.

1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1 = (128+64+32+16+8+4+2+1=255)

And this sample below shows an IP address represented in binary and decimal.
192 . 168 . 4 . 10 (decimal)
11000000.10101000.00000100.00001010 (binary).

2.IPV6:

IPv6

 The IPv4 provides host to host communication systems, which are connected through the Internet.
 The IPv6 (Internetworking Protocol, version 6) is designed to overcome the shortfalls of the IPv4.

Advantages of IPv6
Some advantages of IPv6 over IPv4 are mentioned below:

1. Address Space : IPv6 has a 128 bit long address, which is larger than IPv4.
2. Header format : IPv6 has a new header format, in which options are separated from the base header
and inserted between the base header and the upper layer data.
3. Extension : IPv6 is designed to allow the extension of the protocol, if required for new applications.
4. Security : Encryption and authentication mechanism provides confidentiality and integrity to the
packets in IPv6.

Packet Format of IPv6


The IPv6 packet is shown in the diagram. Each packet is composed of base header and the payload. The
payload consists of two fields, optional extension headers and the data from upper layer.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

The Base header consists of eight fields:

1. Version : This is 4 bit field, which defines the version number of an IP and its value is 6 for IPv6.
2. Priority : This is 4 bit field, which defines the priority of the packet with respect to the traffic congestion.
3. Flow label : This is 24 bit field, which is designed to provide facility of specially handling the specific
flow of the data.
4. Payload length : This is 16 bit field, which defines the length of an IP datagram excluding the base
header.
5. Next header : This is 8 bit field, which defines the header that follows the base header in the datagram.
6. Hop limit : This is 8 bit field, which serves the same purpose as the TTL( Time to Live field in IPv4)
field. It is a mechanism that limits the life span of the data in computer networks.
7. Source address : This is 128 bit source address field, which identifies the original source of the datagram.
8. Destination address : It is 128 bit destination address field, which identifies the original destination of the
datagram.

Priority field of IPv6


Defines the priority of each packet with respect to other packets from the same source.

The IPv6 divides the traffic into two categories:

 Congestion-Controlled Traffic : If source can adjust itself with traffic slowdown due to congestion,
the traffic is referred to as congestion controlled traffic.
 Non Congestion-Controlled Traffic : Non-Congestion - Controlled Traffic is a type of traffic
which can accept a minimum delay.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

IPV6 Packet Format

It is a compulsory base header followed by the payload. The payload includes two parts (1) optional
extension headers and data called payload from the upper layer.

The base header occupies 40 bytes, and extension headers and data from the upper layer usually
contain up to 65, 535 bytes of data.

Base Header has 8 fields which are as follows−

 Version: It is a four-bit field that defines the version number of the IP. IP6 version is 6, IP4
version is 4.
 Priority: It is a 4-bit priority field that defines the priority of the packet with respect to
traffic congestion that a packet is to reject or not.
 Flow Label: It is three bytes or 24-bit field designed to provide special handling for a
particular flow of data to speed flow on an already flowing packet path.
 Payload Length: It is a two-byte payload length field that defines the total length of the IP
datagram, excluding the base header.
 Next Header: It is an 8-bit field that defines the header that follows the base header in the
datagram. In IPV4, this field is called a protocol. Some of the values in this field indicate
options that are
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

 Source Address: This field is 16-byte which specifies the original source of the datagram
destination address. This is a 16-byte internet address that usually identifies the final
destination of the datagram.
 Priority: IPV6 divides traffic into two broad categories, which are as follows:

Chapter3:
ARP
Address Resolution Protocol (ARP) is a procedure for mapping a dynamic IP address to a permanent
physical machine address in a local area network (LAN). The physical machine address is also known as
a media access control (MAC) address.

What is ARP?

Address Resolution Protocol (ARP) is an important protocol of the network layer in the OSI
model, which helps find the MAC (Media Access Control) address given the system’s IP address.
The ARP’s main task is to convert the 32-bit IP address (for IPv4) to a 48-bit MAC address.

This protocol is mostly used to determine the hardware (MAC) address of a device from an IP
address. It is also used when one device wants to communicate with some other device on a local
network. The full form of ARP is Address Resolution Protocol.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

Most of the computer programs/applications use logical address (IP address) to send/receive messages,
however, the actual communication happens over the physical address (MAC address) i.e from layer 2 of
the OSI model. So our mission is to get the destination MAC address which helps in communicating with
other devices. This is where ARP comes into the picture, its functionality is to translate IP address to
physical addresses.

The acronym ARP stands for Address Resolution Protocol which is one of the most important protocols of
the Network layer in the OSI model.
Note: ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host from
its known IP address.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

ARP: ARP stands for (Address Resolution Protocol). It is responsible to find the hardware
address of a host from a known IP address. There are three basic ARP terms.
The important terms associated with ARP are:

(i) Reverse ARP

(ii) Proxy ARP

(iii) Inverse ARP

1. ARP Cache: After resolving the MAC address, the ARP sends it to the source where it is
stored in a table for future reference. The subsequent communications can use the MAC
address from the table
2. ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache
can reside
3. ARP request: This is nothing but broadcasting a packet over the network to validate
whether we came across the destination MAC address or not.
1. The physical address of the sender.
2. The IP address of the sender.
3. The physical address of the receiver is FF:FF:FF:FF:FF:FF or 1’s.
4. The IP address of the receiver
4. ARP response/reply: It is the MAC address response that the source receives from the
destination which aids in further communication of the data.

Now, entries of the ARP table can be seen by typing the command.
This is how ARP table looks like:
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

Types of ARP

Here are four types of Address Resolution Protocol, which is given below:

 Proxy ARP
 Gratuitous ARP
 Reverse ARP
 Inverse ARP

Let us learn them all in detail:


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
ARP Header:

 Hardware Type–It is 1 for Ethernet.


 Protocol Type–It is a protocol used in the network layer.
 Hardware Address Length–It is the length in bytes so that it would be 6 for Ethernet.
 Protocol Address Length – Its value is 4 bytes.
 Operation Code indicates that the packet is an ARP Request (1) or an ARP Response (2).
 Senders Hardware Address – It is a hardware address of the source node.
 Senders Protocol Address -It is a layer 3 address of the source node.
 Target Hardware Address – It is used in a RARP request, which response impact both the
destination’s hardware and layer 3 addresses.
 Target Protocol Address – It is used in an ARP request when the response carries both
layer 3 addresses and the destination’s hardware.

RARP
Reverse Address Resolution Protocol (RARP) is a protocol a physical machine in a local area network
(LAN) can use to request its IP address. It does this by sending the device's physical address to a
specialized RARP server that is on the same LAN and is actively listening for RARP requests.

RARP, short for “Reverse Address Resolution Protocol” or “Reverse ARP,” is a networking
protocol employed by a computer to ask for its IP address from a gateway server’s Address
Resolution Protocol (ARP) table or cache. Let’s simplify by looking at the tech terms individually.

A gateway server serves as a middleman between a computer and a remote server, providing
additional security by hiding the remote server’s address from the computer. The ARP, meanwhile,
is the communication protocol used to discover the media access control (MAC) address associated
with an IP address. The ARP table lists the MAC addresses and their corresponding IP addresses.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
The network administrator creates the ARP table, which gets stored in the gateway server. This
table points the user to the server (identified by its MAC address) that provides the computer’s IP
address.

RARP is abbreviation of Reverse Address Resolution Protocol which is a protocol based on


computer networking which is employed by a client computer to request its IP address from a
gateway server’s Address Resolution Protocol table or cache. The network administrator creates a
table in gateway-router, which is used to map the MAC address to corresponding IP address.

This protocol is used to communicate data between two points in a server. The client doesn’t
necessarily need prior knowledge the server identities capable of serving its request. Media Access
Control (MAC) addresses requires individual configuration on the servers done by an administrator.
RARP limits to the serving of IP addresses only.
When a replacement machine is set up, the machine may or might not have an attached disk that
may permanently store the IP Address so the RARP client program requests IP Address from the
RARP server on the router. The RARP server will return the IP address to the machine under the
belief that an entry has been setup within the router table.

Working of RARP :
The RARP is on the Network Access Layer and is employed to send data between two points in a
very network.
Each network participant has two unique addresses:- IP address (a logical address) and MAC
address (the physical address).

The IP address gets assigned by software and after that the MAC address is constructed into the
hardware.
The RARP server that responds to RARP requests, can even be any normal computer within the
network. However, it must hold the data of all the MAC addresses with their assigned IP addresses.
If a RARP request is received by the network, only these RARP servers can reply to it. The info
packet needs to be sent on very cheap layers of the network. This implies that the packet is
transferred to all the participants at the identical time.

The client broadcasts a RARP request with an Ethernet broadcast address and with its own physical
address. The server responds by informing the client its IP address.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

Chapter 5:
ICMP
ICMP (Internet Control Message Protocol) is an error-reporting protocol that network devices such as
routers use to generate error messages to the source IP address when network problems prevent
delivery of IP packets.

Since IP does not have an inbuilt mechanism for sending error and control messages. It depends on Internet
Control Message Protocol(ICMP) to provide an error control. It is used for reporting errors and management
queries. It is a supporting protocol and is used by networks devices like routers for sending error messages
and operations information., e.g. the requested service is not available or that a host or router could not be
reached.

ICMPv4 Packet Format :


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

Source quench message :


Source quench message is a request to decrease the traffic rate for messages sending to the
host(destination). Or we can say when receiving host detects that the rate of sending packets (traffic rate) to
it is too fast it sends the source quench message to the source to slow the pace down so that no packet can be
lost.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
ICMP will take the source IP from the discarded packet and informs the source by sending a source
quench message.

Then source will reduce the speed of transmission so that router will be free from congestion.

When the congestion router is far away from the source the ICMP will send hop by hop source quench
message so that every router will reduce the speed of transmission.

If there is a mismatch packet will be dropped by the router.


CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
ICMP will take the source IP from the discarded packet and informs to the source by sending a
parameter problem message.

Destinationun-reachable:
Destination unreachable is generated by the host or its inbound gateway to inform the client that the
destination is unreachable for some reason.

There is no necessary condition that the only the router gives the ICMP error message some time
the destination host sends an ICMP error message when any type of failure (link failure, hardware
failure, port failure, etc) happens in the network.

Redirection message :
Redirect requests data packets are sent on an alternate route. The message informs a host to update
its routing information (to send packets on an alternate route).

Chapter6:

DHCP
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an
Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet
mask and default gateway.

Dynamic Host Configuration Protocol(DHCP) is an application layer protocol which is used


to provide:
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
1. Subnet Mask (Option 1 – e.g., 255.255.255.0)
2. Router Address (Option 3 – e.g., 192.168.1.1)
3. DNS Address (Option 6 – e.g., 8.8.8.8)
4. Vendor Class Identifier (Option 43 – e.g., ‘unifi’ = 192.168.1.9 ##where unifi = controller)

DHCP is based on a client-server model and based on discovery, offer, request, and ACK.

DHCP port number for server is 67 and for the client is 68. It is a Client server protocol which
uses UDP services. IP address is assigned from a pool of addresses. In DHCP, the client and the
server exchange mainly 4 DHCP messages in order to make a connection, also called DORA
process, but there are 8 DHCP messages in the process.

These messages are given as below:

1. DHCP discover message –


This is a first message generated in the communication process between server and client.
This message is generated by Client host in order to discover if there is any DHCP
server/servers are present in a network or not. This message is broadcasted to all devices
present in a network to find the DHCP server. This message is 342 or 576 bytes long

2.DHCP offer message –


The server will respond to host in this message specifying the unleased IP address and other TCP
configuration information. This message is broadcasted by server. Size of message is 342 bytes. If there are
more than one DHCP servers present in the network then client host will accept the first DHCP OFFER
message it receives. Also a server ID is specified in the packet in order to identify the server.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

3.DHCP request message –


When a client receives a offer message, it responds by broadcasting a DHCP request message. The client
will produce a gratuitous ARP in order to find if there is any other host present in the network with same IP
address. If there is no reply by other host, then there is no host with same TCP configuration in the network
and the message is broadcasted to server showing the acceptance of IP address .A Client ID is also added in
this message.

4. DHCP acknowledgement message –


In response to the request message received, the server will make an entry with specified client ID and bind
the IP address offered with lease time. Now, the client will have the IP address provided by server.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS

DHCP negative acknowledgement message –


Whenever a DHCP server receives a request for IP address that is invalid according to the scopes
that is configured with, it send DHCP Nak message to client. Eg-when the server has no IP address
unused or the pool is empty, then this message is sent by the server to client.

DHCP decline –
If DHCP client determines the offered configuration parameters are different or invalid, it sends
DHCP decline message to the server .When there is a reply to the gratuitous ARP by any host to
the client, the client sends DHCP decline message to the server showing the offered IP address
is already in use.

DHCP release –
A DHCP client sends DHCP release packet to server to release IP address and cancel any
remaining lease time.

You might also like