IPunit3
IPunit3
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.
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.
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
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.
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
Servers
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
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.
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).
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.
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.