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

IPunit3

Routing protocols are rules that enable routers to communicate and update routing tables, facilitating data transfer across networks. They are categorized into static and dynamic protocols, with various types including Distance Vector, Link State, and Border Gateway Protocol (BGP), each having distinct advantages and disadvantages. The purpose of these protocols is to optimize path selection, ensure loop-free routing, and adapt to network changes, making them essential for efficient network management.
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)
5 views

IPunit3

Routing protocols are rules that enable routers to communicate and update routing tables, facilitating data transfer across networks. They are categorized into static and dynamic protocols, with various types including Distance Vector, Link State, and Border Gateway Protocol (BGP), each having distinct advantages and disadvantages. The purpose of these protocols is to optimize path selection, ensure loop-free routing, and adapt to network changes, making them essential for efficient network management.
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/ 17

What is Routing Protocols?

Routing Protocols are the set of defined rules used by the routers to communicate between source &
destination. They do not move the information to the source to a destination, but only update the
routing table that contains the information.
Network Router protocols helps you to specify way routers communicate with each other. It allows
the network to select routes between any two nodes on a computer network.
Types of Routing Protocols
There are mainly two types of Network Routing Protocols
 Static
 Dynamic

Routing Protocols
Static Routing Protocols
Static routing protocols are used when an administrator manually assigns the path from source to the
destination network. It offers more security to the network.
Advantages
 No overhead on router CPU.
 No unused bandwidth between links.
 Only the administrator is able to add routes
Disadvantages
 The administrator must know how each router is connected.
 Not an ideal option for large networks as it is time intensive.
 Whenever link fails all the network goes down which is not feasible in small networks.

Dynamic Routing Protocols


Dynamic routing protocols are another important type of routing protocol. It helps routers to add
information to their routing tables from connected routers automatically. These types of protocols
also send out topology updates whenever the network changes’ topological structure.
Advantage
 Easier to configure even on larger networks.
 It will be dynamically able to choose a different route in case if a link goes down.
 It helps you to do load balancing between multiple links.
Disadvantage
 Updates are shared between routers, so it consumes bandwidth.
 Routing protocols put an additional load on router CPU or RAM.

Distance Vector Routing Protocol (DVR)


Distance Vector Protocols advertise their routing table to every directly connected neighbor at
specific time intervals using lots of bandwidths and slow converge.
In the Distance Vector routing protocol, when a route becomes unavailable, all routing tables need to
be updated with new information.
Advantages
 Updates of the network are exchanged periodically, and it is always broadcast.
 This protocol always trusts route on routing information received from neighbor routers.
Disadvantages
 As the routing information are exchanged periodically, unnecessary traffic is generated, which
consumes available bandwidth.

Internet Routing Protocols


The following are types of protocols which help data packets find their way across the Internet:
Routing Information Protocol (RIP)
RIP is used in both LAN and WAN Networks. It also runs on the Application layer of the OSI model.
The full form of RIP is the Routing Information Protocol. Two versions of RIP are
1. RIPv1
2. RIPv2
The original version or RIPv1 helps you determine network paths based on the IP destination and the
hop count journey. RIPv1 also interacts with the network by broadcasting its IP table to all routers
connected with the network.
RIPv2 is a little more sophisticated as it sends its routing table on to a multicast address.

Interior Gateway Protocol (IGP)


IGRP is a subtype of the distance-vector interior gateway protocol developed by CISCO. It is
introduced to overcome RIP limitations. The metrics used are load, bandwidth, delay, MTU, and
reliability. It is widely used by routers to exchange routing data within an autonomous system.
This type of routing protocol is the best for larger network size as it broadcasts after every 90
seconds, and it has a maximum hop count of 255. It helps you to sustain larger networks compared to
RIP. IGRP is also widely used as it is resistant to routing loop because it updates itself automatically
when route changes occur within the specific network. It is also given an option to load balance traffic
across equal or unequal metric cost paths.

Link State Routing Protocol


Link State Protocols take a unique approach to search the best routing path. In this protocol, the route
is calculated based on the speed of the path to the destination and the cost of resources.
Routing protocol tables:
Link state routing protocol maintains below given three tables:
 Neighbor table: This table contains information about the neighbors of the router only. For
example, adjacency has been formed.
 Topology table: This table stores information about the whole topology. For example, it
contains both the best and backup routes to a particular advertised network.
 Routing table: This type of table contains all the best routes to the advertised network.
Advantages
 This protocol maintains separate tables for both the best route and the backup routes, so it
has more knowledge of the inter-network than any other distance vector routing protocol.
 Concept of triggered updates are used, so it does not consume any unnecessary bandwidth.
 Partial updates will be triggered when there is a topology change, so it does not need to
update where the

Difference between these Distance Vector and Link State routing protocols:
Distance Vector Link State
Distance Vector protocol sends Link State protocol sends only
the entire routing table. link-state information.
It is susceptible to routing It is less susceptible to routing
loops. loops.
Updates are sometimes sent Uses only multicast method for
using broadcast. routing updates.
It is simple to configure. It is hard to configure this
routing protocol.
Does not know network Know the entire topology.
topology.
Example RIP, IGRP. Examples: OSPF IS-IS.

Border Gateway Protocol (BGP)


BGP is the last routing protocol of the Internet, which is classified as a DPVP (distance path vector
protocol). The full form of BGP is the Border Gateway Protocol.
This type of routing protocol sends updated router table data when changes are made. Therefore,
there is no auto-discovery of topology changes, which means that the user needs to configure BGP
manually.

What is the purpose of Routing Protocols?


Routing protocols are required for the following reasons:
 Allows optimal path selection
 Offers loop-free routing
 Fast convergence
 Minimize update traffic
 Easy to configure
 Adapts to changes
 Scales to a large size
 Compatible with existing hosts and routers
 Supports variable length
Open Shortest Path First (OSPF)
 Open shortest path first is a routing protocol that determines the shortest distance between
two routers in an autonomous system. The OSPF protocol is developed on the basis of link-
state routing
 OSPF routing allows you to maintain databases detailing information about the surrounding
topology of the network. It also uses the Dijkstra algorithm (Shortest path algorithm) to
recalculate network paths when its topology changes. This protocol is also very secure, as it
can authenticate protocol changes to keep data secure.

What Does Autonomous System Mean?


 An autonomous system (AS) is a network or a collection of networks that are all managed and
supervised by a single entity or organization.
 An AS is a heterogeneous network typically governed by a large enterprise. An AS has many
different subnetworks with combined routing logic and common routing policies. Each
subnetwork is assigned a globally unique 16 digit identification number (known as the AS
number or ASN) by the Internet Assigned Numbers Authority (IANA).

What is area in Autonomous system?How Open Shortest Path First Works ?


 Open shortest path first (OSPF) is a dynamic routing protocol that is developed on the basis of
a link-state routing protocol. Being an intradomain routing protocol it helps the routers inside
an autonomous system to propagate the routing information to other routers in the domain.
 When a router is initialized in the domain, it first determines the cost of the link at each of its
interfaces. The router then advertises this information to each and every router in the domain
by flooding. So, each router in the domain develops the topology of the entire autonomous
system.
 To make routing more efficient the OSPF divides the autonomous system into multiple areas.
The area can be referred to as a group of networks, hosts, and routers. The routers present in
the particular area flood routing information to all other routers of that area. Each area has a
distinct identification number.
 Among these multiple areas, there is a distinct area which is termed as backbone area whose
area identification is zero. Each area in the AS must be connected to this backbone area.
 The router connecting the area to the backbone area is referred to as the area border
router as you can see in the figure below. An area border router can connect multiple areas to
the backbone area, for this one of the interfaces of the area border router must be in the
backbone area other interfaces must be in another area.
Autonomous System divided into Area in OSPF

What do you mean by Routing Protocol Metrics


 There are cases when a routing protocol learns(come to know) of more than one route to the
same destination. To select the best path, the routing protocol must be able to evaluate and
differentiate between the available paths. This is accomplished through the use of
routing metrics.
 A metric is a measurable value that is assigned by the routing protocol to different routes
based on the usefulness of that route. In situations where there are multiple paths to the same
remote network, the routing metrics are used to determine the overall “cost” of a path from
source to destination. Routing protocols determine the best path based on the route with the
lowest cost.
 Different routing protocols use different metrics. The metric used by one routing protocol is
not comparable to the metric used by another routing protocol. Two different routing
protocols might choose different paths to the same destination.
For example, assume that PC1 wants to send a packet to PC2. In Figure 3-19, the RIP routing protocol
has been enabled on all routers and the network has converged. RIP makes a routing protocol
decision based on the least number of hops. Therefore, when the packet arrives on R1, the best route
to reach the PC2 network would be to send it directly to R2 even though the link is much slower that

all other links. Figure 3-19 RIP Uses Shortest Hop Count
Path
In Figure 3-20, the OSPF routing protocol has been enabled on all routers and the network has
converged. OSPF makes a routing protocol decision based on the best bandwidth. Therefore, when the

packet arrives on R1, the best Figure 3-20 OSPF Uses


Faster Links
route to reach the PC2 network would be to send it to R3, which would then forward it to R2.

Explain types of Links

Administrators of an autonomous system assign a cost to each route or link (connection) to which we
refer as a metric. This metric depends on the kind of service the link is providing. So, a router can
have multiple routing tables each based on a different kind of service.

1. Point-to-Point :-The point-to-point link connects two routers directly. There is no router or host in
between the two routers connected by a point-to-point link. That means at each end of the point-to-
point link there is only one router.

2. Transient :-The transient link connects multiple routers to a particular network. LANs and some
kind of WANs that have two or more routers are of this kind. The transient link is neither realistic nor
it is efficient. As in the OSPF, each router has to advertise its neighborhood to every other router
which increases the traffic in the network making it inefficient.
There is no direct link between the pair of routers instead it has a network in between which acts as a
crossroad between the pair of routers. Now a network can’t function as a router that supports
routing. So, a router is assigned to perform this function and we refer to it as a designated router.
In this scenario, each router has only one neighbor i.e., the designated router, and the designated
router has several neighbors.
3. Stub:-Stub link connects only one router to the network which is a special kind of transient link.
Here the router has only one neighbor (designated router) and even the designated router has only
one neighbor (the single router connected to it).

4. Virtual:-The virtual link is established between the pair of routers if the link between them is
broken for any reason. The administrator establishes this virtual link between the pair of routers
through a longer path which may include several routers.

Graphical Representation
The figure below shows an AS in Open Shortest Path First. The pair of routers AD and BE are
connected through point-to-point links. The network N1 represents a transient network as it has three
neighbors C, A, and B. The network N2 is a stub network that has only one neighbor i.e., router C. We
have three stub networks N2, N4, and N5.

The graphical representation of the above AS is shown below. Here the routers are represented using
the colored node and the networks are represented using shaded nodes. In the graphical
representation, the router and network both are considered nodes.

What is BGP? Border Gateway Protocol (BGP) refers to a gateway protocol that enables the internet
to exchange routing information between autonomous systems (AS). As networks interact with each
other, they need a way to communicate. This is accomplished through peering. BGP makes peering
possible. Without it, networks would not be able to send and receive information with each other.
Border Gateway Protocol (BGP) is the postal service of the Internet. When someone drops a letter
into a mailbox, the Postal Service processes that piece of mail and chooses a fast, efficient route to
deliver that letter to its recipient. Similarly, when someone submits data via the Internet, BGP is
responsible for looking at all of the available paths that data could travel and picking the best route,
which usually means hopping between autonomous systems.
If we continue to think of BGP as the Postal Service of the Internet, ASes are like individual post office
branches. A town may have hundreds of mailboxes, but the mail in those boxes must go through the
local postal branch before being routed to another destination. The internal routers within an AS are
like mailboxes. They forward their outbound transmissions to the AS, which then uses BGP routing to
get these transmissions to their destinations.

How Does BGP Work?


When you have a network router that connects to other networks, it does not know which network is
the best one to send its data to. BGP takes into consideration all the different peering options a router
has and chooses the one closest to where the router is. Each potential peer communicates the routing
information it has and that gets stored within a routing information base (RIB). BGP can access this
information and use it to choose the best peering option.
BGP Sessions
 The exchange of routing information between two routers using BGP takes place in a
session. A session is a connection that is established between two BGP routers only for the
sake of exchanging routing information.
 To create a reliable environment, BGP uses the services of TCP. In other words, a session
at the BGP level, as an application program, is a connection at the TCP level.
 However, there is a subtle difference between a connection in TCP made for BGP and other
application programs. When a TCP connection is created for BGP, it can last for a long
time, until something unusual happens. For this reason, BGP sessions are sometimes
referred to as semipermanent connections.
External and Internal BGP
 If we want to be precise, BGP can have two types of sessions: external BGP (E-BGP) and
internal BGP (I-BGP) sessions.
 The E-BGP session is used to exchange information between two speaker nodes
belonging to two different autonomous systems.
 The IBGP session, on the other hand, is used to exchange routing information between
two routers inside an autonomous system. Figure 3.19 shows the idea.

A2 A3 B3

B4
A4 A1 B1
A5 B2
AS 1 AS 2
Figure 3.19 Internal and external BGP sessions
E-BGP session I-BGP sessions

 The session established between AS1 and AS2 is an E-BGP session. The two speaker
routers exchange information they know about networks in the Internet.
However, these two routers need to collect information from other routers in the autonomous
systems. This is done using I-BGP sessions.
Path Vector Routing is a routing algorithm in unicast routing protocol of network layer, and it is
useful for interdomain routing, which maintains the path information that gets updated dynamically.
Updates which have looped through the network and returned to the same node are easily detected
and discarded. This algorithm is sometimes used in Bellman–Ford routing algorithms to avoid "Count
to Infinity" problems. Each entry in the routing table contains the destination network, the next
router and the path to reach the destination.
The principle of path vector routing is- It assumes that there is one node in each autonomous system
that acts on behalf of the entire autonomous system is called Speaker node .The speaker node in an
AS creates a routing cable and advertises to the speaker node in the neighbouring ASs . A speaker
node advertises the path, not the metrics of the nodes, in its autonomous system or other
autonomous systems.

It is the initial table for each speaker node in a system made four ASs. Here Node A1 is the
speaker node for AS1, B1 for AS2, C1 for AS3 and D1 for AS4, Node A1 creates an initial table
that shows A1 to A5 and these are located in AS1, it can be reached through it.
A speaker in an autonomous system shares its table with immediate neighbours ,here Node
A1 share its table with nodes B1 and C1 , Node C1 share its table with nodes A1,B1 and D1 ,
Node B1 share its table with nodes A1 and C1 , Node D1 share its table with node C1.
If router A1 receives a packet for nodes A3 , it knows that the path is in AS1,but if it receives
a packet for D1,it knows that the packet should go from AS1,to AS2 and then to AS3 ,then
the routing table shows that path completely on the other hand if the node D1 in AS4
receives a packet for node A2,it knows it should go through AS4,AS3,and AS1,
FUNCTIONS
PREVENTION OF LOOP :The creation of loop can be avoided in path vector routing .A router
receives a message it checks to see if its autonomous system is in the path list to the destination if it
is looping is involved and the message is ignored.
POLICY ROUTING: When a router receives a messages it can check the path, if one of the
autonomous system listed in the path against its policy, it can ignore its path and destination it does
not update its routing table with this path or it does not send the messages to its neighbors.

OPTIMUM PATH :A path to a destination that is the best for the organization that runs the
autonomous system

Path Vector Messages in BGP: The autonomous system boundary routers (ASBR), which participate
in path vector routing, advertise the reachability of networks. Each router that receives a path vector
message must verify that the advertised path is according to its policy. If the messages comply with
the policy, the ASBR modifies its routing table and the message before sending it to the next neighbor.
In the modified message it sends its own AS number and replaces the next router entry with its own
identification.
BGP is an example of a path vector protocol. In BGP the routing table maintains the autonomous
systems that are traversed in order to reach the destination system.
Here's a basic overview of path vector messages and their role in routing protocols:

Routing Protocols: Path vector messages are commonly used in Border Gateway Protocol (BGP), a
widely used exterior gateway protocol in the Internet. BGP uses path vector routing to make routing
decisions.
Path Attributes: In a path vector message, the routing information is conveyed through a series of
path attributes. These attributes describe various characteristics of the path from the source to the
destination, such as the Autonomous Systems (AS) through which the data must traverse.
AS Path: One of the most critical path attributes in BGP is the AS path. The AS path is a list of AS
numbers that the route has traversed. This information is used to prevent routing loops and to
determine the best path for data to follow.
Loop Prevention: By using the AS path attribute, BGP can prevent routing loops. If a router receives a
path vector message with its own AS number in the AS path, it will reject that route to avoid a routing
loop.
Policy-Based Routing: BGP allows network administrators to apply various policies to influence the
route selection process. This makes BGP highly customizable and suitable for complex routing
scenarios.
Path Selection: BGP routers use the information in path vector messages and apply various rules and
attributes to select the best path for routing data. These rules can take into account factors such as AS
path length, route preference, and other policies.
Path vector routing, particularly in BGP, plays a critical role in ensuring the stability and flexibility of
the global Internet by allowing for fine-grained control and decision-making in routing. It enables
network administrators to implement routing policies and make informed decisions about the paths
data takes through the network.

CLIENT-SERVER Model
The purpose of a network, or an internetwork, is to provide services to users: A user at a local site
wants to receive a service from a computer at a remote site. One way to achieve this purpose is to run
two programs. A local computer runs a program to request a service from a remote computer; the
remote computer runs a program to give service to the requesting program. This means that two
computers, connected by an internet, must each run a program, one to provide a service and one to
request a service.
At first glance, it looks simple to enable communication between two application programs, one
running at the local site, the other running at the remote site. But many questions arise when we
want to implement the approach. Some of the questions that we may ask are:
 Should both application programs be able to request services and provide services or should
the application programs just do one or the other? One solution is to have an application
program, called the client, running on the local machine, request a service from another
application program, called the server, running on the remote machine. In other words, the
tasks of requesting a service and providing a service are separate from each other. An
application program is either a requester (a client), or a provider (a server). In other words,
application programs come in pairs, client and server, both having the same name.
 Should a server provide services only to one specific client or should the server be able to
provide services to any client that requests the type of service it provides? The most common
solution is a server providing a service for any client that needs that type of service, not a
particular one. In other words, the server-client relationship is one-to-many.
 Should a computer run only one program (client or server)? The solution is that any computer
connected to the Internet should be able to run any client program if the appropriate software
is available. The server programs need to be run on a computer that can be continuously
running as we will see later.
 When should an application program be running? All of the time or just when there is a need
for the service? Generally, a client program, which requests a service, should run only when it
is needed. The server program, which provides a service, should run all the time because it
does not know when its service will be needed.
 Should there be only one universal application program that can provide any type of service a
user wants? Or should there be one application program for each type of service? In TCP/IP,
services needed frequently and by many users have specific client-server application
programs. For example, we have separate client-server application programs that allow users
to access files, send e-mail, and so on. For services that are more customized, we should have
one generic application program that allows users to access the services available on a remote
computer. For example, we should have a client-server application program that allows the
user to log onto a remote computer and then use the services provided by that computer.

Server
A server is a program running on the remote machine providing service to the clients. When it starts,
it opens the door for incoming requests from clients, but it never initiates a service until it is
requested to do so.
A server program is an infinite program. When it starts, it runs infinitely unless a problem arises. It
waits for incoming requests from clients. When a request arrives, it responds to the request, either
iteratively or concurrently as we will see shortly.

Client
A client is a program running on the local machine requesting service from a server. A client program
is finite, which means it is started by the user (or another application program) and terminates when
the service is complete.
Normally, a client opens the communication channel using the IP address of the remote host and the
well-known port address of the specific server program running on that machine. After a channel of
communication is opened, the client sends its request and receives a response. Although the request-
response part may be repeated several times, the whole process is finite and eventually comes to an
end.

Concurrency
 Both clients and servers can run in concurrent mode.
Concurrency in Clients

 Clients can be run on a machine either iteratively or concurrently. Running clients


iteratively means running them one by one; one client must start, run, and terminate
before the machine can start another client. Most computers today, however, allow
concurrent clients; that is, two or more clients can run at the same time.
Concurrency in Servers
An iterative server can process only one request at a time; it receives a request, processes it, and
sends the response to the requestor before it handles another request. A concurrent server, on the
other hand, can process many requests at the same time and thus can share its time between many
requests.
The servers use either UDP, a connectionless transport layer protocol, or TCP/ SCTP, a connection-
oriented transport layer protocol. Server operation, therefore, depends on two factors: the transport
layer protocol and the service method. Theoretically we can have four types of servers:
connectionless iterative, connectionless concurrent, connection-oriented iterative, and connection-
oriented concurrent (see Figure 3.29).
Figure 3.29 Server types

Servers

Connectionless iterativeConnectionless Connection-oriented Connection-oriented


concurrentiterative concurrent

UDP TCP/SCTP
Connectionless Iterative Server
 The servers that use UDP are normally iterative, which, as we have said, means that the
server processes one request at a time. A server gets the request received in a datagram
from UDP, processes the request, and gives the response to UDP to send to the client. The
server pays no attention to the other datagrams. These datagrams are stored in a queue,
waiting for service. They could all be from one client or from many clients. In either case
they are processed one by one in order of arrival.
 The server uses one single port for this purpose, the well-known port. All the datagrams
arriving at this port wait in line to be served, as is shown in Figure 3.30.
Figure 3.30 Connectionless iterative server

Connection-Oriented Concurrent Server


 The servers that use TCP (or SCTP) are normally concurrent. This means that the server
can serve many clients at the same time.
 Communication is connection-oriented, which means that a request is a stream of bytes
that can arrive in several segments and the response can occupy several segments.
 A connection is established between the server and each client, and the connection
remains open until the entire stream is processed and the connection is terminated.
 This type of server cannot use only one port because each connection needs a port and
many connections may be open at the same time.
 Many ports are needed, but a server can use only one well-known port. The solution is to
have one well-known port and many ephemeral ports. The server accepts connection
requests at the well-known port.
 A client can make its initial approach to this port to make the connection. After the
connection is made, the server assigns a temporary port to this connection to free the
well-known port.
 Data transfer can now take place between these two temporary ports, one at the client site
and the other at the server site.
 The well-known port is now free for another client to make the connection. To serve
several clients at the same time, a server creates child processes, which are copies of the
original process (parent process).
 The server must also have one queue for each connection. The segments come from the
client, are stored in the appropriate queue, and will be served concurrently by the server.
See Figure 3.31 for this configuration.
Socket Interfaces

 How can a client process communicate with a server process? A computer program is a
set of predefined instructions that tells the computer what to do.
 A computer program has a set of instructions for mathematical operations, another set
of instructions for string manipulation, still another set of instructions for input/output
access.
 If we need a program to be able to communicate with another program running on
another machine, we need a new set of instructions to tell the transport layer to open the
connection, send data to and receive data from the other end, and close the connection. A
set of instructions of this kind is normally referred to as an interface.
 An interface is a set of instructions designed for interaction between two entities.

What Is BOOTP?
Bootstrap Protocol (BOOTP) is a protocol used in computer networking to assign IP addresses to
network devices. It was originally designed for booting diskless workstations, but it is now used for a
variety of purposes, including the automatic configuration of network devices.
The BOOTP protocol is part of the Internet Protocol Suite, and it works at the network layer of the OSI
model. BOOTP operates over User Datagram Protocol (UDP) on port 67/68.

How Does BOOTP Work?


When a device is first connected to a network, it sends out a BOOTP request. This request contains
information about the device, such as its hardware address and the type of operating system it is
running. A BOOTP server on the network receives the request and assigns an IP address to the device.
The server may also provide additional configuration information, such as the address of the default
gateway or the name and location of the boot image the device should use.
Once the device has an IP address, it can communicate with other devices on the network. If the
device needs to reboot or reconnect to the network, it will send another BOOTP request to renew its
IP address lease.
Bootstrap Protocol (BOOTP)
 The Bootstrap Protocol (BOOTP) is the pre-runner of DHCP. It is a client/server
protocol designed to overcome the two deficiencies of the RARP protocol.
 First, since it is a client/server program, the BOOTP server can be anywhere in the
Internet.
 Second, it can provide pieces of information we mentioned above, including the IP
address. To provide the four pieces of information described above, it removes all
restriction about the RARP protocol. BOOTP, however, is a static configuration
protocol.

 When a client requests its IP address, the BOOTP server consults a table that matches the physical
address of the client with its IP address. This implies that the binding between the physical address
and the IP address of the client already exists. The binding is predetermined.
 There are some situations in which we need a dynamic configuration protocol. For example, when
a host moves from one physical network to another, its physical address changes. As another
example, there are occasions when a host wants a temporary IP address to be used for a period of
time.
 BOOTP cannot handle these situations because the binding between the physical and IP
addresses is static and fixed in a table until changed by the administrator. As we will see shortly,
DHCP has been devised to handle these shortcomings
What is DHCP (Dynamic Host Configuration Protocol)?
DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to dynamically
assign an IP address to any device, or node, on a network so it can communicate using IP. DHCP
automates and centrally manages these configurations rather than requiring network administrators
to manually assign IP addresses to all network devices. DHCP can be implemented on small local
networks, as well as large enterprise networks.
DHCP assigns new IP addresses in each location when devices are moved from place to place, which
means network administrators do not have to manually configure each device with a valid IP address
or reconfigure the device with a new IP address if it moves to a new location on the network.
Versions of DHCP are available for use in IP version 4 (IPv4) and IP version 6 (IPv6).

How DHCP works


 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.
 DHCP is a client-server protocol in which servers manage a pool of unique IP addresses, as
well as information about client configuration parameters. The servers then assign addresses
out of those address pools. DHCP-enabled clients send a request to the DHCP server whenever
they connect to a network.
 Clients configured with DHCP broadcast a request to the DHCP server and request network
configuration information for the local network to which they're attached. A client typically
broadcasts a query for this information immediately after booting up. The DHCP server
responds to the client request by providing IP configuration information previously specified
by a network administrator. This includes a specific IP address, as well as a time period -- also
called a lease -- for which the allocation is valid.
 When refreshing an address assignment, a DHCP client requests the same parameters, but the
DHCP server may assign a new IP address based on policies set by administrators. DHCP
clients can also be configured on an Ethernet interface.
 A DHCP server manages a record of all the IP addresses it allocates to network nodes. If a
node is relocated in the network, the server identifies it using its media access control (MAC)
address, which prevents the accidental configuration of multiple devices with the same IP
address. Configuring a DHCP server also requires the creation of a configuration file, which
stores network information for clients.
 DHCP is not a routable protocol, nor is it a secure one. DHCP is limited to a specific local area
network, which means a single DHCP server per LAN is adequate -- or two servers for use in
case of a failover. Larger networks might have a wide area network (WAN) that contains
multiple individual locations. Depending on the connections between these points and the
number of clients in each location, multiple DHCP servers can be set up to handle the
distribution of addresses.
 If network administrators want a DHCP server to provide addressing to multiple subnets on a
given network, they must configure DHCP relay services located on
interconnecting routers that DHCP requests have to cross. These agents relay messages
between DHCP clients and servers located on different subnets.

Components of DHCP
DHCP is made up of numerous components, such as the DHCP server, client and relay.
 The DHCP server -- typically either a server or router -- is a networked device that runs on the
DHCP service. The DHCP server holds IP addresses, as well as related information pertaining
to configuration.
 The DHCP client is a device -- such as a computer or phone -- that connects to a network and
communicates with a DHCP server.
 The DHCP relay manages requests between DHCP clients and servers. Typically, relays are
used when an organization has to handle large or complex networks.
Other components include the IP address pool, subnet, lease and DHCP communications protocol.

DHCP is an automated method by which any newly added or transferred node in a network can be assigned or
reassigned an IP address instantly. Without DHCP, the network administrators would be forced to assign IP
address manually for every node in a network.

A DHCP server has many duties:

1. A DHCP server is configured to manage the provision of IP addresses and is an essential requirement
to run DHCP protocol. The server manages the record of all the IP addresses it allocates to the nodes. If
the node rejoins or is relocated in the network, the server identifies the node using its MAC address.
This helps to prevent the accidental configuration of same IP address to two different nodes.
2. For DHCP to operate, the clients need to be configured with it. When a DHCP-aware client connects to
the network, the client broadcasts a request to the DHCP server for the network settings.
3. The server responds to the client’s request by providing the necessary IP configuration information.
4. The DHCP server is ideally suited in scenarios where there is a regular inclusion and exclusion of
network nodes like wireless hotspots. In these cases, the DHCP server also assigns a lease time to
each client, after which the assigned IP address in invalid.

You might also like