0% found this document useful (0 votes)
10 views18 pages

Understanding Distance Vector Routing

Distance Vector Routing is a simple routing protocol that determines the best route based on the number of hops between source and destination. It involves periodic updates and broadcasting of full routing tables among routers, which maintain information about network IDs, costs, and next hops. The Routing Information Protocol (RIP), a distance vector protocol, uses hop count as a metric and has a maximum hop count of 15, with updates sent every 30 seconds.

Uploaded by

sohailahmeda2323
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views18 pages

Understanding Distance Vector Routing

Distance Vector Routing is a simple routing protocol that determines the best route based on the number of hops between source and destination. It involves periodic updates and broadcasting of full routing tables among routers, which maintain information about network IDs, costs, and next hops. The Routing Information Protocol (RIP), a distance vector protocol, uses hop count as a metric and has a maximum hop count of 15, with updates sent every 30 seconds.

Uploaded by

sohailahmeda2323
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Distance Vector Routing

Distance Vector is simple routing protocol which takes routing decision on the
number of hops between source and destination. A route with a smaller number
of hops is considered as the best route. Every router advertises its set best routes
to other routers.

• Updates of network are exchanged periodically.


• Updates (routing information) is always broadcast.
• Full routing tables are sent in updates.

Sharing Information

Let's understand through an example:


• In the above figure, each cloud represents the network, and the number
inside the cloud represents the network ID.
• All the LANs are connected by routers, and they are represented in boxes
labeled as A, B, C, D, E, F.
• Distance vector routing algorithm simplifies the routing process by
assuming the cost of every link is one unit. Therefore, the efficiency of
transmission can be measured by the number of links to reach the
destination.
• In Distance vector routing, the cost is based on hop count.
In the below figure, we observe that the router sends the knowledge to the
immediate neighbors. The neighbors add this knowledge to their own knowledge
and sends the updated table to their own neighbors. In this way, routers get its
own information plus the new information about the neighbors.

Routing Table

Two process occurs:

o Creating the Table


o Updating the Table

Creating the Table

Initially, the routing table is created for each router that contains at least three
types of information such as Network ID, the cost and the next hop.
• NET ID: The Network ID defines the final destination of the packet.
• Cost: The cost is the number of hops that packet must take to get there.
• Next hop: It is the router to which the packet must be delivered.
• In the above figure, the original routing tables are shown of all the routers.
In a routing table, the first column represents the network ID, the second
column represents the cost of the link, and the third column is empty.
• These routing tables are sent to all the neighbors.

For Example:

1. A sends its routing table to B, F & E.


2. B sends its routing table to A & C.
3. C sends its routing table to B & D.
4. D sends its routing table to E & C.
5. E sends its routing table to A & D.
6. F sends its routing table to A.
Updating the Table

o When A receives a routing table from B, then it uses its information to


update the table.

o The routing table of B shows how the packets can move to the networks 1
and 4.

o The B is a neighbor to the A router, the packets from A to B can reach in


one hop. So, 1 is added to all the costs given in the B's table and the sum
will be the cost to reach a particular network

After adjustment, A then combines this table with its own table to create a
combined table.
The combined table may contain some duplicate data. In the above figure, the
combined table of router A contains the duplicate data, so it keeps only those
data which has the lowest cost. For example, A can send the data to network 1 in
two ways. The first, which uses no next router, so it costs one hop. The second
requires two hops (A to B, then B to Network 1). The first option has the lowest
cost, therefore it is kept and the second one is dropped.

o The process of creating the routing table continues for all routers. Every router

receives the information from the neighbors, and update the routing table.
Final routing tables of all the routers are given below:
Routing Information Protocol (RIP)
• Routing Information Protocol (RIP) is a dynamic routing protocol which
uses hop count as a routing metric to find the best path between the
source and the destination network.

• It is a distance vector routing protocol which has AD value 120 and works
on the application layer of OSI model. RIP uses port number 520.

• Hop Count :

• Hop count is the number of routers occurring in between the source and
destination network.

• The path with the lowest hop count is considered as the best route to reach
a network and therefore placed in the routing table.

• RIP prevents routing loops by limiting the number of hopes allowed in a


path from source and destination.

• The maximum hop count allowed for RIP is 15 and hop count of 16 is
considered as network unreachable.

Features

• Updates of the network are exchanged periodically.

• Updates (routing information) are always broadcast.

• Full routing tables are sent in updates.

• Distance Vector Routing protocol( least HOP count and shortest path)

• Supports up to 15 HOP counts.


• Classful protocol ( does not send subnet mask information between
routing table.

• So it considered default, not support sub netting, VLSM, CIDR)

• Sends routing table information after each 30 seconds

• Administrative distance 120


• Metric value depends on HOP count.
Practical of RIP V1 Protocol

Configuration of ROUTER1
Router>enable
Router#config terminal
Router(config)#router rip
Router(config-router)#network [Link]
Router(config-router)#network [Link]
Configuration of ROUTER2
Router>enable
Router#config t
Router(config)#router rip
Router(config-router)#network [Link]
Router(config-router)#network [Link]
Router(config-router)#exit
Router(config)#exit
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

R [Link]/8 [120/1] via [Link], 00:00:03, Serial0/1


C [Link]/8 is directly connected, Serial0/1
C [Link]/8 is directly connected, FastEthernet0/0

Router#sh ip route
Router#sh ip protocol
Router#sh run
Router(config)#no router rip

Practical of RIP V2 Protocol


Configuration of ROUTER1

Router#enable

Router#config t

Router(config)#router RIp

Router(config-router)#network [Link]

Router(config-router)#version 2

Router(config-router)#network [Link]

Router(config-router)#version 2

Configuration of ROUTER2

Router>enable

Router#config t

Router(config)#Router Rip

Router(config-router)#network [Link]

Router(config-router)#version 2
Router(config-router)#network [Link]

Router(config-router)#version 2

Router(config-router)#exit
Unicast routing
Broadcast routing
Multicast Routing

Unicast routing
Most of the traffic on the internet and intranets known as unicast data or unicast
traffic is sent with specified destination. Routing unicast data over the internet is
called unicast routing. It is the simplest form of routing because the destination is
already known. Hence the router just has to look up the routing table and forward
the packet to next hop.
Broadcast routing
By default, the broadcast packets are not routed and forwarded by the routers on any
network. Routers create broadcast domains. But it can be configured to forward
broadcasts in some special cases. A broadcast message is destined to all network
devices.
Broadcast routing can be done in two ways (algorithm):
• A router creates a data packet and then sends it to each host one by one. In this
case, the router creates multiple copies of single data packet with different
destination addresses. All packets are sent as unicast but because they are sent
to all, it simulates as if router is broadcasting.
This method consumes lots of bandwidth and router must destination address of
each node.
• Secondly, when router receives a packet that is to be broadcasted, it simply floods
those packets out of all interfaces. All routers are configured in the same way.

This method is easy on router's CPU but may cause the problem of duplicate packets
received from peer routers.
Reverse path forwarding is a technique, in which router knows in advance about its
predecessor from where it should receive broadcast. This technique is used to detect
and discard duplicates.
Multicast Routing
Multicast routing is special case of broadcast routing with significance difference and
challenges. In broadcast routing, packets are sent to all nodes even if they do not want it. But in
Multicast routing, the data is sent to only nodes which wants to receive the packets.

The router must know that there are nodes, which wish to receive multicast packets (or
stream) then only it should forward. Multicast routing works spanning tree protocol to
avoid looping.
Multicast routing also uses reverse path Forwarding technique, to detect and discard
duplicates and loops.
References / links

• [Link]
• [Link]
• [Link]
[Link]
• [Link]
[Link]

Channel link
MJaved Learning
[Link]

Video links
Distance Vector Routing Protocol

[Link]
Feg5OD&index=34

Routing Information Protocol (RIP) Theory


[Link]
OD&index=35

Practical of Routing Information Protocol (RIP) using Packet tracer

[Link]
eg5OD&index=36

uni-cast, multi-cast, broad-cast routing

[Link]

For any query or suggestion, students can send E-mail at:


mjavedpk2000@[Link]
Thanks

You might also like