0% found this document useful (0 votes)
11 views12 pages

Unit 4

Uploaded by

Pon Murugan
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)
11 views12 pages

Unit 4

Uploaded by

Pon Murugan
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/ 12

UNIT IV

ROUTING

Routing and protocols: Unicast routing - Distance Vector Routing - RIP - Link State
Routing – OSPF– Path-vector routing - BGP - Multicast Routing: DVMRP – PIM

Routing

 A Router is a process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a
router.
 A Router works at the network layer in the OSI model and internet layer in TCP/IP
model
 A router is a networking device that forwards the packet based on the information
available in the packet header and forwarding table.
 The routing algorithms are used for routing the packets. The routing algorithm is
nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
 The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count, bandwidth,
delay, current load on the path, etc. used by the routing algorithm to determine the
optimal path to the destination.
 The routing algorithm initializes and maintains the routing table for the process
of path determination.

The most common metric values are given below:

 Hop count: Hop count is defined as a metric that specifies the number of passes
through internetworking devices such as a router, a packet must travel in a route to
move from source to the destination. If the routing protocol considers the hop as a
primary metric value, then the path with the least hop count will be considered as the
best path to move from source to the destination.
 Delay: It is a time taken by the router to process, queue and transmit a datagram to
an interface. The protocols use this metric to determine the delay values for all the
links along the path end-to-end. The path having the lowest delay value will be
considered as the best path.
 Bandwidth: The capacity of the link is known as a bandwidth of the link. The
bandwidth is measured in terms of bits per second. The link that has a higher transfer
rate like gigabit is preferred over the link that has the lower capacity like 56 kb. The
protocol will determine the bandwidth capacity for all the links along the path, and
the overall higher bandwidth will be considered as the best route.
 Load: Load refers to the degree to which the network resource such as a router or
network link is busy. A Load can be calculated in a variety of ways such as CPU
utilization, packets processed per second. If the traffic increases, then the load value
will also be increased. The load value changes with respect to the change in the
traffic.
 Reliability: Reliability is a metric factor may be composed of a fixed value. It
depends on the network links, and its value is measured dynamically. Some networks
go down more often than others. After network failure, some network links repaired
more easily than other network links. Any reliability factor can be considered for the
assignment of reliability ratings, which are generally numeric values assigned by the
system administrator.

Types of Routing

Routing can be classified into three categories:

 Static Routing
 Default Routing
 Dynamic Routing

Static Routing

 Static Routing is also known as Nonadaptive Routing.


 It is a technique in which the administrator manually adds the routes in a routing
table.
 A Router can send the packets for the destination along the route defined by the
administrator.
 In this technique, routing decisions are not made based on the condition or topology
of the networks

Advantages Of Static Routing

Following are the advantages of Static Routing:

 No Overhead: It has ho overhead on the CPU usage of the router. Therefore,


the cheaper router can be used to obtain static routing.
 Bandwidth: It has not bandwidth usage between the routers.
 Security: It provides security as the system administrator is allowed only to have
control over the routing to a particular network.

Disadvantages of Static Routing:

Following are the disadvantages of Static Routing:

 For a large network, it becomes a very difficult task to add each route manually to the
routing table.
 The system administrator should have a good knowledge of a topology as he has
to add each route manually.

Default Routing

 Default Routing is a technique in which a router is configured to send all the packets
to the same hop device, and it doesn't matter whether it belongs to a particular
network or not. A Packet is transmitted to the device for which it is configured in
default routing.
 Default Routing is used when networks deal with the single exit point.
 It is also useful when the bulk of transmission networks have to transmit the data to
the same hp device.
 When a specific route is mentioned in the routing table, the router will choose the
specific route rather than the default route. The default route is chosen only when a
specific route is not mentioned in the routing table.

Dynamic Routing

 It is also known as Adaptive Routing.


 It is a technique in which a router adds a new route in the routing table for each packet
in response to the changes in the condition or topology of the network.
 Dynamic protocols are used to discover the new routes to reach the destination.
 In Dynamic Routing, RIP and OSPF are the protocols used to discover the new routes.
 If any route goes down, then the automatic adjustment will be made to reach the
destination.

The Dynamic protocol should have the following features:

 All the routers must have the same dynamic routing protocol in order to exchange the
routes.
 If the router discovers any change in the condition or topology, then router
broadcast this information to all other routers.

Advantages of Dynamic Routing:

 It is easier to configure.
 It is more effective in selecting the best route in response to the changes in the
condition or topology.

Disadvantages of Dynamic Routing:

 It is more expensive in terms of CPU and bandwidth usage.


 It is less secure as compared to default and static routing.

Unicast routing

Unicast – Unicast means the transmission from a single sender to a single receiver. It is
a point-to-point communication between sender and receiver. There are various unicast
protocols such as TCP, HTTP, etc.

 TCP is the most commonly used unicast protocol. It is a connection-oriented protocol


that relies on acknowledgement from the receiver side.
 HTTP stands for HyperText Transfer Protocol. It is an object-oriented protocol for
communication.

There are three major protocols for unicast routing:

1. Distance Vector Routing


2. Link State Routing
3. Path-Vector Routing

Distance Vector Routing

Distance vector routing algorithm is also called as Bellman-Ford algorithm or Ford


Fulkerson algorithm as this algorithm is used to find the shortest route from one node
to another node in the network.

The routing protocol is used to calculate the best route from source to destination based on
the distance or hops as its primary metric to define an optimal path. The distance vector refers
to the distance to the neighbor nodes, where routing defines the routes to the established
node.

The Distance Vector routing algorithm(DVR) shares the information of the routing table
with the other routers in the network and keeps the information up-to-date to select an
optimal path from source to destination.

The Bellman-Ford algorithm is defined as :


where, dx(y)=dx(y)= The least distance from x to y
c(x,v)=c(x,v)= Node x's cost from each of its neighbour v
dv(y)=dv(y)= Distance to each node from initial node
minv=minv= selecting shortest distance

It works in the following steps-


Step-01:
Each router prepares its routing table. By their local knowledge. each router knows about-

 All the routers present in the network


 Distance to its neighboring routers

Step-02:
 Each router exchanges its distance vector with its neighboring routers.
 Each router prepares a new routing table using the distance vectors it has obtained
from its neighbors.
 This step is repeated for (n-2) times if there are n routers in the network.
 After this, routing tables converge / become stable.

Example − Distance Vector Router Protocol

In the network shown below, there are three routers, A, B, and C, with the following weights
− AB =2, BC =3 and CA =5.

Step 1 − In this DVR network, each router shares its routing table with every neighbor.
For example, A will share its routing table with neighbors B and C and neighbors B and C
will share their routing table with A.

Form A A B C
A 0 2 3
B
C

Form B A B C
A
B 2 0 1
C

Form C A B C
A
B
C 3 1 0
Step 2 − If the path via a neighbor has a lower cost, then the router updates its local table to
forward packets to the neighbor. In this table, the router updates the lower cost for A and C
by updating the new weight from 4 to 3 in router A and from 4 to 3 in router C.

Form A A B C
A 0 2 3
B
C

Form B A B C
A
B 2 0 1
C

Form C A B C
A
B
C 3 1 0

Step 3 − The final updated routing table with lower cost distance vector routing protocol for all routers A, B,

Form AA
Router A B C

A 0 2 3

B 2 0 1

C 3 1 0

Form B A B C
Router B
A 0 2 3

B 2 0 1

C 3 1 0
Router C
Form C A B C

A 0 2 3

B 2 0 1

C 3 1 0

RIP Protocol

RIP stands for Routing Information Protocol. RIP is an intra-domain routing protocol used
within an autonomous system. Here, intra-domain means routing the packets in a defined
domain, for example, web browsing within an institutional area. To understand the RIP
protocol, our main focus is to know the structure of the packet, how many fields it contains,
and how these fields determine the routing table.

Before understanding the structure of the packet, we first look at the following points:

 RIP is based on the distance vector-based strategy, so we consider the entire


structure as a graph where nodes are the routers, and the links are the networks.
 In a routing table, the first column is the destination, or we can say that it is a
network address.
 The cost metric is the number of hops to reach the destination. The number of
hops available in a network would be the cost. The hop count is the number of
networks required to reach the destination.
 In RIP, infinity is defined as 16, which means that the RIP is useful for smaller
networks or small autonomous systems. The maximum number of hops that RIP
can contain is 15 hops, i.e., it should not have more than 15 hops as 16 is infinity.
 The next column contains the address of the router to which the packet is to be sent to
reach the destination.

How is hop count determined?

When the router sends the packet to the network segment, then it is counted as a single hop.

In the above figure, when the router 1 forwards the packet to the router 2 then it will count as
1 hop count. Similarly, when the router 2 forwards the packet to the router 3 then it will count
as 2 hop count, and when the router 3 forwards the packet to router 4, it will count as 3 hop
count. In the same way, RIP can support maximum upto 15 hops, which means that the 16
routers can be configured in a RIP.

RIP Message Format

Now, we look at the structure of the RIP message format. The message format is used to
share information among different routers. The RIP contains the following fields in a
message:

 Command: It is an 8-bit field that is used for request or reply. The value of the request
is 1, and the value of the reply is 2.
 Version: Here, version means that which version of the protocol we are
using. Suppose we are using the protocol of version1, then we put the 1 in
this field.
 Reserved: This is a reserved field, so it is filled with zeroes.
 Family: It is a 16-bit field. As we are using the TCP/IP family, so we put 2 value
in this field.
 Network Address: It is defined as 14 bytes field. If we use the IPv4 version, then we
use 4 bytes, and the other 10 bytes are all zeroes.
 Distance: The distance field specifies the hop count, i.e., the number of hops used to
reach the destination.

Link State Routing

Link state routing has a different philosophy from that of distance vector routing. In link state
routing, if each node in the domain has the entire topology of the domain the list of nodes and
links, how they are connected including the type, cost (metric), and condition of the links (up
or down)-the node can use Dijkstra's algorithm to build a routing table.

The figure shows a simple domain with five nodes. Each node uses the same topology to
create a routing table, but the routing table for each node is unique because the calculations
are based on different interpretations of the topology. This is analogous to a city map. While
each person may have the same map, each needs to take a different route to reach her specific
destination

Building Routing Tables:

In link state routing, four sets of actions are required to ensure that each node has the routing
table showing the least-cost node to every other node.

a) Creation of the states of the links by each node, called the link state packet (LSP).

b) Dissemination of LSPs to every other router, called flooding, in an efficient and reliable
way.

c) Formation of a shortest path tree for each node.

d)Calculation of a routing table based on the shortest path

tree.
d) OSPF header analysis is given below :

1. Version: This field specifies the protocol version.


2. Type: This field indicates messages as one of the following type.

a. Hello b. Database description


c. Link status d. Link status update e. Link status acknowledgement.

3. Packet length: This field specifies the length of OSPF packet in bytes,
4. Router ID: It identifies the sending router.

5. Area ID: Network ID of destination networks.


6. Checksum: The checksum field is used to detect errors in the packet.
7. Authentication type: It identifies the authentication type that is used.
8. Authentication: This field includes a value from the authentication type.

OSPF Advantages

1.Low traffic overhead.


2. Fast convergence.
3. Larger network metrics.
4. Area based topology.
5. Route summaries.
6. Support for complex address structures.
7. Authentication.
OSPF Disadvantages
1. Memory overhead.
2. Processor overhead.
3. Configuration OSPF can be complex to configure.

Path Vector Routing

Distance vector and link state routing are both intradomain routing protocols. They can be
used inside an autonomous system, but not between autonomous systems. These two
protocols are not suitable for interdomain routing mostly because of scalability. Both of these
routing protocols become intractable when the domain of operation becomes large. Distance
vector routing is subject to instability if there are more than a few hops in the domain of
operation. Link state routing needs a huge amount of resources to calculate routing tables. It
also creates heavy traffic because of flooding. There is a need for a third routing protocol
which we call path vector routing.

Path Vector Routing is a routing algorithm in unicast routing protocol of network layer, and it
is useful for interdomain routing. The principle of path vector routing is similar to that of
distance vector routing. It assumes that there is one node in each autonomous system that acts
on behalf of the entire autonomous system is called Speaker node . It is different from the
distance vector routing and link state routing. Each entry in the routing table contains the
destination network, the next router and the path to reach the destination.
1. BGP easily solves the count-to-infinity problem.

Disadvantages of BGP
1. BGP is complex.
2. BGP routes to destination networks, rather than to specific hosts or routers.
Multicast Routing: DVMRP – PIM
Multicast is a method of group communication where the sender sends data to multiple
receivers or nodes present in the network simultaneously. Multicasting is a type of one-to-
many and many-to-many communication as it allows sender or senders to send data
packets to multiple receivers at once across LANs or WANs. This process helps in
minimizing the data frame of the network

There are different Multicast Routing Protocols used for multicst routing

 Distance Vector Multicast Routing Protocol (DVMRP)


 Multicast Source Discovery Protocol (MSDP)
 MOSPF (Multicast OSPF)
 Multicast BGP
 Protocol Independent Multicast (PIM)

Distance Vector Multicast Routing Protocol (DVMRP):


A distance-vector routing (DVR) protocol requires that a router inform its neighbors of
topology changes periodically.

1. A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from
each of its neighbors.
3. A router recalculates its distance vector when:
o It receives a distance vector from a neighbor containing different
information than before.
o It discovers that a link to a neighbor has gone down.

The DV calculation is based on minimizing the cost to each destination


Dx(y) = Estimate of least cost from x to y

Dx = [Dx(y): y ∈ N ] = Node x maintains distance vector


C(x,v) = Node x knows cost to each neighbor v

– For each neighbor v, x maintains Dv = [Dv(y): y ∈ N ]


Node x also maintains its neighbors' distance vectors

You might also like