CN Unit 3 Part 2

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

Congestion Control in Computer Networks

What is congestion?
A state occurring in network layer when the message traffic is so heavy that it
slows down network response time.

Effects of Congestion
• As delay increases, performance decreases.
• If delay increases, retransmission occurs, making situation worse.

Congestion control algorithms


• Congestion Control is a mechanism that controls the entry of data
packets into the network, enabling a better use of a shared network
infrastructure and avoiding congestive collapse.
• Congestive-Avoidance Algorithms (CAA) are implemented at the TCP
layer as the mechanism to avoid congestive collapse in a network.
• There are two congestion control algorithm which are as follows:

• Leaky Bucket Algorithm


• The leaky bucket algorithm discovers its use in the context of
network traffic shaping or rate-limiting.
• A leaky bucket execution and a token bucket execution are
predominantly used for traffic shaping algorithms.
• This algorithm is used to control the rate at which traffic is sent to
the network and shape the burst traffic to a steady traffic stream.
• The disadvantages compared with the leaky-bucket algorithm are
the inefficient use of available network resources.
• The large area of network resources such as bandwidth is not being
used effectively.

Let us consider an example to understand

Imagine a bucket with a small hole in the bottom.No matter at what rate water
enters the bucket, the outflow is at constant rate.When the bucket is full with
water additional water entering spills over the sides and is lost.
Similarly, each network interface contains a leaky bucket and the
following steps are involved in leaky bucket algorithm:
1. When host wants to send packet, packet is thrown into the bucket.
2. The bucket leaks at a constant rate, meaning the network interface
transmits packets at a constant rate.
3. Bursty traffic is converted to a uniform traffic by the leaky bucket.
4. In practice the bucket is a finite queue that outputs at a finite rate.

Token bucket Algorithm

• The leaky bucket algorithm has a rigid output design at an average


rate independent of the bursty traffic.
• In some applications, when large bursts arrive, the output is allowed
to speed up. This calls for a more flexible algorithm, preferably one
that never loses information. Therefore, a token bucket algorithm
finds its uses in network traffic shaping or rate-limiting.
• It is a control algorithm that indicates when traffic should be sent.
This order comes based on the display of tokens in the bucket.
• The bucket contains tokens. Each of the tokens defines a packet of
predetermined size. Tokens in the bucket are deleted for the ability
to share a packet.
• When tokens are shown, a flow to transmit traffic appears in the
display of tokens.
• No token means no flow sends its packets. Hence, a flow transfers
traffic up to its peak burst rate in good tokens in the bucket.
Need of token bucket Algorithm:-

The leaky bucket algorithm enforces output pattern at the average rate, no
matter how bursty the traffic is. So in order to deal with the bursty traffic we
need a flexible algorithm so that the data is not lost. One such algorithm is
token bucket algorithm.

Steps of this algorithm can be described as follows:

1. In regular intervals tokens are thrown into the bucket. ƒ


2. The bucket has a maximum capacity. ƒ
3. If there is a ready packet, a token is removed from the bucket, and
the packet is sent.
4. If there is no token in the bucket, the packet cannot be sent.

Let’s understand with an example,

In figure (A) we see a bucket holding three tokens, with five packets waiting to
be transmitted. For a packet to be transmitted, it must capture and destroy
one token. In figure (B) We see that three of the five packets have gotten
through, but the other two are stuck waiting for more tokens to be generated.

Ways in which token bucket is superior to leaky bucket: The leaky bucket
algorithm controls the rate at which the packets are introduced in the
network, but it is very conservative in nature. Some flexibility is introduced in
the token bucket algorithm. In the token bucket, algorithm tokens are
generated at each tick (up to a certain limit). For an incoming packet to be
transmitted, it must capture a token and the transmission takes place at the
same rate. Hence some of the busty packets are transmitted at the same rate if
tokens are available and thus introduces some amount of flexibility in the
system.

Formula: M * s = C + ? * s where S – is time taken M – Maximum output rate ?


– Token arrival rate C – Capacity of the token bucket in byte
Let’s understand with an example,
NUMERICAL ON TOKEN BUCKET
A computer on a 10Mbps network is regulated by a token bucket. The
token bucket is filled at a rate of 2Mbps. It is initially filled to capacity
with 16Megabits. What is the maximum duration for which the
computer can transmit at the full 10Mbps?
(A) 1.6 seconds
(B) 2 seconds
(C) 5 seconds
(D) 8 seconds
Answer (B)
New tokens are added at the rate of r bytes/sec which is
2Mbps in the given question.

Capacity of the token bucket (b) = 16 Mbits


Maximum possible transmission rate (M) = 10Mbps
So the maximum burst time = b/(M-r) = 16/(10-2) = 2 seconds
In the above formula, r is subtracted from M to calculate the maximum
burst time. The reason for this subtraction is, new tokens are added at
the rate of r while transmission happens at maximum transmission rate
M.
Internet Protocol version 6 (IPv6) Header

IP version 6 is the new version of Internet Protocol, which is way better


than IP version 4 in terms of complexity and efficiency. Let’s look at the
header of IP version 6 and understand how it is different from the IPv4
header.
IP version 6 Header Format :

Version (4-bits): Indicates version of Internet Protocol which contains bit


sequence 0110.
Traffic Class (8-bits): The Traffic Class field indicates class or priority of
IPv6 packet which is similar to Service Field in IPv4 packet. It helps
routers to handle the traffic based on the priority of the packet. If
congestion occurs on the router then packets with the least priority will
be discarded.
As of now, only 4-bits are being used (and the remaining bits are under
research), in which 0 to 7 are assigned to Congestion controlled traffic
and 8 to 15 are assigned to Uncontrolled traffic.
Priority assignment of Congestion controlled traffic :
Uncontrolled data traffic is mainly used for Audio/Video data. So we give
higher priority to Uncontrolled data traffic.
The source node is allowed to set the priorities but on the way, routers
can change it. Therefore, the destination should not expect the same
priority which was set by the source node.
Flow Label (20-bits): Flow Label field is used by a source to label the
packets belonging to the same flow in order to request special handling
by intermediate IPv6 routers, such as non-default quality of service or
real-time service. In order to distinguish the flow, an intermediate router
can use the source address, a destination address, and flow label of the
packets. Between a source and destination, multiple flows may exist
because many processes might be running at the same time. Routers or
Host that does not support the functionality of flow label field and for
default router handling, flow label field is set to 0. While setting up the
flow label, the source is also supposed to specify the lifetime of the
flow.
Payload Length (16-bits): It is a 16-bit (unsigned integer) field, indicates
the total size of the payload which tells routers about the amount of
information a particular packet contains in its payload. The payload
Length field includes extension headers(if any) and an upper-layer
packet. In case the length of the payload is greater than 65,535 bytes
(payload up to 65,535 bytes can be indicated with 16-bits), then the
payload length field will be set to 0 and the jumbo payload option is
used in the Hop-by-Hop options extension header.
Next Header (8-bits): Next Header indicates the type of extension
header(if present) immediately following the IPv6 header. Whereas In
some cases it indicates the protocols contained within upper-layer
packets, such as TCP, UDP.
Hop Limit (8-bits): Hop Limit field is the same as TTL in IPv4 packets. It
indicates the maximum number of intermediate nodes IPv6 packet is
allowed to travel. Its value gets decremented by one, by each node that
forwards the packet and the packet is discarded if the value decrements
to 0. This is used to discard the packets that are stuck in an infinite loop
because of some routing error.
Source Address (128-bits): Source Address is the 128-bit IPv6 address
of the original source of the packet.
Destination Address (128-bits): The destination Address field indicates
the IPv6 address of the final destination(in most cases). All the
intermediate nodes can use this information in order to correctly route
the packet.
Extension Headers: In order to rectify the limitations of the IPv4 Option
Field, Extension Headers are introduced in IP version 6. The extension
header mechanism is a very important part of the IPv6 architecture. The
next Header field of IPv6 fixed header points to the first Extension
Header and this first extension header points to the second extension
header and so on.

IPv6 packet may contain zero, one or more extension headers but these
should be present in their recommended order:
Rule: Hop-by-Hop options header(if present) should always be placed
after the IPv6 base header.

Conventions :
1. Any extension header can appear at most once except
Destination Header because Destination Header is present two
times in the above list itself.
2. If Destination Header is present before Routing Header then it
will be examined by all intermediate nodes specified in the
routing header.
3. If Destination Header is present just above the Upper layer then
it will be examined only by the Destination node.
Given order in which all extension header should be chained in IPv6
packet and working of each extension header :

What is IPv6?

The•• most common version of the Internet Protocol currently in use, IPv4, will
soon be replaced by IPv6, a new version of the protocol. The well-known IPv6
protocol is being used and deployed more often, especially in mobile phone
markets. IP address determines who and where you are in the network of
billions of digital devices that are connected to the Internet.
IPv6 or Internet Protocol Version 6 is a network layer protocol that allows
communication to take place over the network. IPv6 was designed by Internet
Engineering Task Force (IETF) in December 1998 with the purpose of
superseding the IPv4 due to the global exponentially growing internet users.

The next generation Internet Protocol (IP) address standard, known as IPv6, is
meant to work in tandem with IPv4, which is still in widespread use today, and
eventually replace it. To communicate with other devices, a computer, smartphone,
home automation component, Internet of Things sensor, or any other Internet-
connected device needs a numerical IP address. Because so many connected
devices are being used, the original IP address scheme, known as IPv4, is running
out of addresses.
IPv4 vs IPv6
The common type of IP address (is known as IPv4, for “version 4”). Here’s an
example of what an IP address might look like:

25.59.209.224
An IPv4 address consists of four numbers, each of which contains one to
three digits, with a single dot (.) separating each number or set of digits.
This group of separated numbers creates the addresses that let you and
everyone around the globe to send and retrieve data over our Internet
connections. The IPv4 uses a 32-bit address scheme allowing to store
2^32 addresses which is more than 4 billion addresses. To date, it is
considered the primary Internet Protocol and carries 94% of Internet
traffic. Initially, it was assumed it would never run out of addresses but
the present situation paves a new way to IPv6, let’s see why? An IPv6
address consists of eight groups of four hexadecimal digits. Here’s an
example IPv6 address:
3001:0da8:75a3:0000:0000:8a2e:0370:7334
This new IP address version is being deployed to fulfil the need for more
Internet addresses. With 128-bit address space, it allows 340
undecillion unique address space.
IPv6 support a theoretical maximum of 340, 282, 366, 920, 938, 463,
463, 374, 607, 431, 768, 211, 456. To keep it straightforward, we will
never run out of IP addresses again.
The next iteration of the IP standard is known as Internet Protocol
version 6 (IPv6). Although IPv4 and IPv6 will coexist for a while, IPv6 is
meant to work in tandem with IPv4 before eventually taking its place.
We need to implement IPv6 in order to proceed and keep bringing new
gadgets and services to the Internet. We can only move forward with an
innovative and open Internet if we implement it, which was created with
the needs of a global commercial Internet in mind.
Types of IPv6 Address
Now that we know about what is IPv6 address let’s take a look at its
different types.
• Unicast addresses : Only one interface is specified by the
unicast address. A packet moves from one host to the
destination host when it is sent to a unicast address destination.
• Multicast addresses It represents a group of IP devices and can
only be used as the destination of a datagram.
• Anycast addresses The multicast address and the anycast
address are the same. The way the anycast address varies from
other addresses is that it can deliver the same IP address to
several servers or devices. Keep in mind that the hosts do not
receive the IP address. Stated differently, multiple interfaces or a
collection of interfaces are assigned an anycast address.
Advantages of IPv6
• Faster Speeds: IPv6 supports multicast rather than broadcast in
IPv4.This feature allows bandwidth-intensive packet flows (like
multimedia streams) to be sent to multiple destinations all at
once.
• Stronger Security: IPSecurity, which provides confidentiality,
and data integrity, is embedded into IPv6.
• Routing efficiency
• Reliability
• Most importantly it’s the final solution for growing nodes in
Global-network.
• The device allocates addresses on its own.
• Internet protocol security is used to support security.
• Enable simple aggregation of prefixes allocated to IP networks;
this saves bandwidth by enabling the simultaneous transmission
of large data packages.
Disadvantages of IPv6
• Conversion: Due to widespread present usage of IPv4 it will
take a long period to completely shift to IPv6.
• Communication: IPv4 and IPv6 machines cannot communicate
directly with each other.
• Not going backward Compatibility: IPv6 cannot be executed on
IPv4-capable computers because it is not available on IPv4
systems.
• Conversion Time: One significant drawback of IPv6 is its
inability to uniquely identify each device on the network, which
makes the conversion to IPV4 extremely time-consuming.
• Cross-protocol communication is forbidden since there is no way
for IPv4 and IPv6 to communicate with each other.
Differenece Between IPv6 and IPv4

IPv6 IPv4

IPv6 has a 128-bit address length IPv4 has a 32-bit address length

It supports Auto and renumbering It Supports Manual and DHCP


address configuration address configuration

The address space of IPv6 is quite


It can generate 4.29×109 address
large it can produce
space
3.4×1038 address space

Address Representation of IPv6 is in Address representation of IPv4 is in


hexadecimal decimal

In IPv6 checksum field is not


In IPv4 checksum field is available
available

IPv6 has a header of 40 bytes fixed IPv4 has a header of 20-60 bytes.

IPv4 supports VLSM(Variable


IPv6 does not support VLSM.
Length subnet mask).
ARP Protocol Packet Format

ARP is a communication mechanism that is used to translate a network


address, such as an IP address, to a physical (MAC) address on a local
network. ARP packets are transmitted and received on a network to
achieve this mapping. An ARP packet’s format, also known as an ARP
packet header, has numerous fields required to describe the type of ARP
message, the addresses being resolved, and other communication-related
information.
ARP Packet Format
The ARP packet format is used for ARP requests and replies and consists
of multiple fields including hardware type, protocol type, hardware and
protocol size, operation, sender and target hardware, and IP addresses.
These fields work together to help devices on a network find and
communicate with each other.

Hardware type: This is 16 bits field defining the type of the network on
which ARP is running. Ethernet is given type 1.
Protocol type: This is 16 bits field defining the protocol. The value of this
field for the IPv4 protocol is 0800H.
Hardware length: This is an 8 bits field defining the length of the physical
address in bytes. Ethernet is the value 6.
Protocol length: This is an 8 bits field defining the length of the logical
address in bytes. For the IPv4 protocol, the value is 4.
Operation (request or reply): This is a 16 bits field defining the type of
packet. Packet types are ARP request (1), and ARP reply (2).
Sender hardware address: This is a variable length field defining the
physical address of the sender. For example, for Ethernet, this field is 6
bytes long.
Sender protocol address: This is also a variable length field defining the
logical address of the sender For the IP protocol, this field is 4 bytes long.
Target hardware address: This is a variable length field defining the
physical address of the target. For Ethernet, this field is 6 bytes long. For
the ARP request messages, this field is all Os because the sender does not
know the physical address of the target.
Target protocol address: This is also a variable length field defining the
logical address of the target. For the IPv4 protocol, this field is 4 bytes
long.

RARP Packet Format


• ••
Reverse Address Resolution Protocol (RARP) is a networking protocol that
is used to map a physical (MAC) address to an Internet Protocol (IP) address. It
is used to obtain the IP address of a host based on its physical address. That is,
it performs in a way that is exactly opposite to that of the ARP. RARP works in
a very similar way to ARP but in the exact opposite direction.
RARP was developed in the early days of computer networking as a way to
provide IP addresses to diskless workstations or other devices that could not
store their own IP addresses. With RARP, the device would broadcast its MAC
address and request an IP address, and a RARP server on the network would
respond with the corresponding IP address.
Uses of RARP
• To convert the Ethernet address to an IP address.
• It is available for LAN technologies like FDDI, token ring LANs, etc.
RARP Packet Format
RARP packet format is the same as the ARP packet, except for the operation
field in either 3 or 4.
i.e. 3-RARP request and 4-RARP reply
RARP packet

The fields are further explained below:


• Hardware Address Type : It is 2-byte field. It is type of hardware
MAC address present in the packet. For Ethernet, the value of this
field is 1.
• Protocol Address Type (PTYPE): It is 2 byte field. It is type of the
protocol address requested for the MAC address. For IP address the
value of this field is 0*100.
• Hardware length(HLEN): It is 1–byte field. It indicates the size of
the hardware MAC address. For Ethernet, the value of this field is 6.
• Protocol length(PLEN): It is 1 byte field. It indicates the size of the
protocol address. For IP, the value of this field is 4.
• Operation : It is a 2-byte field. It indicates the type of operation
being performed. The value of this field can be 3 (RARP request) or 4
(RARP reply).
• Sender Hardware Address: It is 6-byte field. In a RARP request
packet, this is the hardware MAC address of the source host. In a
RARP reply packet, this is the hardware MAC address of the RARP
server sending the RARP reply.
• Sender Protocol Address : It is 4 byte field. In a RARP request
packet, this is undefined. In a RARP reply packet, this is the IP
address of the RARP server sending the RARP reply.
• Target Hardware Address : It is 6–byte field. In a RARP request
packet, this is the hardware MAC address of the source host. In a
RARP reply packet, this is the hardware MAC address of the host,
that sent the RARP request packet.
• Target Protocol Address : It is 4 byte field. In a RARP request
packet, this is undefined. In a RARP reply packet, this is the IP
address of the host that sent the RARP request packet.

DHCP stands for Dynamic Host Configuration Protocol. It is the critical


feature on which the users of an enterprise network communicate. DHCP
helps enterprises to smoothly manage the allocation of IP addresses to
the end-user clients’ devices such as desktops, laptops, cellphones, etc. is
an application layer protocol that is used to provide:
Subnet Mask (Option 1 - e.g., 255.255.255.0)
Router Address (Option 3 - e.g., 192.168.1.1)
DNS Address (Option 6 - e.g., 8.8.8.8)
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.
Why Use DHCP?
DHCP helps in managing the entire process automatically and centrally.
DHCP helps in maintaining a unique IP Address for a host using the server.
DHCP servers maintain information on TCP/IP configuration and provide
configuration of address to DHCP-enabled clients in the form of a lease
offer.
Components of DHCP
The main components of DHCP include:
• DHCP Server: DHCP Server is basically a server that holds IP
Addresses and other information related to configuration.
• DHCP Client: It is basically a device that receives configuration
information from the server. It can be a mobile, laptop, computer,
or any other electronic device that requires a connection.
• DHCP Relay: DHCP relays basically work as a communication
channel between DHCP Client and Server.
• IP Address Pool: It is the pool or container of IP Addresses
possessed by the DHCP Server. It has a range of addresses that
can be allocated to devices.
• Subnets: Subnets are smaller portions of the IP network
partitioned to keep networks under control.
• Lease: It is simply the time that how long the information
received from the server is valid, in case of expiration of the lease,
the tenant must have to re-assign the lease.
• DNS Servers: DHCP servers can also provide DNS (Domain
Name System) server information to DHCP clients, allowing them
to resolve domain names to IP addresses.
• Default Gateway: DHCP servers can also provide information
about the default gateway, which is the device that packets are
sent to when the destination is outside the local network.
• Options: DHCP servers can provide additional configuration
options to clients, such as the subnet mask, domain name, and
time server information.
• Renewal: DHCP clients can request to renew their lease before
it expires to ensure that they continue to have a valid IP address
and configuration information.
• Failover: DHCP servers can be configured for failover, where
two servers work together to provide redundancy and ensure that
clients can always obtain an IP address and configuration
information, even if one server goes down.
• Dynamic Updates: DHCP servers can also be configured to
dynamically update DNS records with the IP address of DHCP
clients, allowing for easier management of network resources.
• Audit Logging: DHCP servers can keep audit logs of all DHCP
transactions, providing administrators with visibility into which
devices are using which IP addresses and when leases are being
assigned or renewed.

Operation Code Hardware type Hardware length Hop count


Transition ID

Number of seconds Flags

Client IP address

Your IP address

Server IP address

Gateway IP address

Client hardware address


(16 bytes)

Server name
(64 bytes)

Boot file name


(128 bytes)

Options
( Variable length)

Fig. DHCP Packet Format


1.Hardware length:
This is an 8-bit field defining the length of the physical address in bytes.
e.g for Ethernet the value is 6.
2.Hop count:
This is an 8-bit field defining the maximum number of hops the packet can
travel.
3.Transaction ID:
This is a 4-byte field carrying an integer. The transcation identification
is set by the client and is used to match a reply with the request. The
server returns the same value in its reply.
4.Number of seconds:
This is a 16-bit field that indicates the number of seconds elapsed since
the time the client started to boot.
5.Flag:
This is a 16-bit field in which only the leftmost bit is used and the rest of
the bit should be set to os.
A leftmost bit specifies a forced broadcast reply from the server. If the
reply were to be unicast to the client, the destination. IP address of the IP
packet is the address assigned to the client.
6.Client IP address:
This is a 4-byte field that contains the client IP address . If the client does
not have this information this field has a value of 0.
7.Your IP address:
This is a 4-byte field that contains the client IP address. It is filled by the
server at the request of the client.
8.Server IP address:
This is a 4-byte field containing the server IP address. It is filled by the
server in a reply message.
9.Gateway IP address:
This is a 4-byte field containing the IP address of a routers. IT is filled by
the server in a reply message.
10.Client hardware address:
This is the physical address of the client .Although the server can retrieve
this address from the frame sent by the client it is more efficient if the
address is supplied explicity by the client in the request message.
11.Server name:
This is a 64-byte field that is optionally filled by the server in a reply
packet. It contains a null-terminated string consisting of the domain name
of the server. If the server does not want to fill this filed with data, the
server must fill it with all 0s.
12.Boot filename:
This is a 128-byte field that can be optionally filled by the server in a reply
packet. It contains a null- terminated string consisting of the full pathname
of the boot file. The client can use this path to retrieve other booting
information. If the server does not want to fill this field with data, the
server must fill it with all 0s.
13.Options:
This is a 64-byte field with a dual purpose. IT can carry either additional
information or some specific vendor information. The field is used only in
a reply message. The server uses a number, called a magic cookie, in the
format of an IP address with the value of 99.130.83.99. When the client
finishes reading the message, it looks for this magic cookie. If present the
next 60 bytes are options.
Working of DHCP
The working of DHCP is as follows:
DHCP works on the Application layer of the TCP/IP Protocol. The main
task of DHCP is to dynamically assigns IP Addresses to the Clients and
allocate information on TCP/IP configuration to Clients. For more, you can
refer to the Article Working of DHCP.
The DHCP port number for the server is 67 and for the client is 68. It is a
client-server protocol that uses UDP services. An 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 the
DORA process, but there are 8 DHCP messages in the process.
Working of DHCP

The 8 DHCP Messages:

1. DHCP discover message: This is the first message generated in the


communication process between the server and the client. This message
is generated by the 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
DHCP discover message

As shown in the figure, the source MAC address (client PC) is


08002B2EAF2A, the destination MAC address(server) is FFFFFFFFFFFF,
the source IP address is 0.0.0.0(because the PC has had no IP address till
now) and the destination IP address is 255.255.255.255 (IP address used
for broadcasting). As they discover message is broadcast to find out the
DHCP server or servers in the network therefore broadcast IP address and
MAC address is used.
2. DHCP offers a message: The server will respond to the host in this
message specifying the unleased IP address and other TCP configuration
information. This message is broadcasted by the server. The size of the
message is 342 bytes. If there is more than one DHCP server present in
the network then the 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.
DHCP offer message

Now, for the offer message, the source IP address is 172.16.32.12


(server’s IP address in the example), the destination IP address is
255.255.255.255 (broadcast IP address), the source MAC address is
00AA00123456, the destination MAC address is FFFFFFFFFFFF. Here, the
offer message is broadcast by the DHCP server therefore destination IP
address is the broadcast IP address and destination MAC address is
FFFFFFFFFFFF and the source IP address is the server IP address and the
MAC address is the server MAC address.
Also, the server has provided the offered IP address 192.16.32.51 and a
lease time of 72 hours(after this time the entry of the host will be erased
from the server automatically). Also, the client identifier is the PC MAC
address (08002B2EAF2A) for all the messages.
3. DHCP request message: When a client receives an 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 the same IP address. If there is no reply from another
host, then there is no host with the same TCP configuration in the network
and the message is broadcasted to the server showing the acceptance of
the IP address. A Client ID is also added to this message.

DHCP request message

Now, the request message is broadcast by the client PC therefore source


IP address is 0.0.0.0(as the client has no IP right now) and destination IP
address is 255.255.255.255 (the broadcast IP address) and the source
MAC address is 08002B2EAF2A (PC MAC address) and destination MAC
address is FFFFFFFFFFFF.
Note – This message is broadcast after the ARP request broadcast by the
PC to find out whether any other host is not using that offered IP. If there
is no reply, then the client host broadcast the DHCP request message for
the server showing the acceptance of the IP address and Other TCP/IP
Configuration.
4. DHCP acknowledgment message: In response to the request message
received, the server will make an entry with a specified client ID and bind
the IP address offered with lease time. Now, the client will have the IP
address provided by the server.
DHCP acknowledgment message

Now the server will make an entry of the client host with the offered IP
address and lease time. This IP address will not be provided by the server
to any other host. The destination MAC address is FFFFFFFFFFFF and the
destination IP address is 255.255.255.255 and the source IP address is
172.16.32.12 and the source MAC address is 00AA00123456 (server
MAC address).
5. DHCP negative acknowledgment message: Whenever a DHCP server
receives a request for an IP address that is invalid according to the scopes
that are configured, it sends a DHCP Nak message to the client. Eg-when
the server has no IP address unused or the pool is empty, then this
message is sent by the server to the client.
6. DHCP decline: If the DHCP client determines the offered configuration
parameters are different or invalid, it sends a DHCP decline message to
the server. When there is a reply to the gratuitous ARP by any host to the
client, the client sends a DHCP decline message to the server showing the
offered IP address is already in use.
7. DHCP release: A DHCP client sends a DHCP release packet to the
server to release the IP address and cancel any remaining lease time.
8. DHCP inform: If a client address has obtained an IP address manually
then the client uses DHCP information to obtain other local configuration
parameters, such as domain name. In reply to the DHCP inform message,
the DHCP server generates a DHCP ack message with a local
configuration suitable for the client without allocating a new IP address.
This DHCP ack message is unicast to the client.
Note – All the messages can be unicast also by the DHCP relay agent if
the server is present in a different network.
Advantages of DHCP
The advantages of using DHCP include:
• Centralized management of IP addresses.
• Centralized and automated TCP/IP configuration.
• Ease of adding new clients to a network.
• Reuse of IP addresses reduces the total number of IP addresses
that are required.
• The efficient handling of IP address changes for clients that must
be updated frequently, such as those for portable devices that
move to different locations on a wireless network.
• Simple reconfiguration of the IP address space on the DHCP
server without needing to reconfigure each client.
• The DHCP protocol gives the network administrator a method to
configure the network from a centralized area.
• With the help of DHCP, easy handling of new users and the reuse
of IP addresses can be achieved.
Disadvantages of DHCP
The disadvantage of using DHCP is:
• IP conflict can occur.
• The problem with DHCP is that clients accept any server.
Accordingly, when another server is in the vicinity, the client may
connect with this server, and this server may possibly send invalid
data to the client.
• The client is not able to access the network in absence of a DHCP
Server.
• The name of the machine will not be changed in a case when a
new IP Address is assigned.

You might also like