0% found this document useful (0 votes)
9 views37 pages

LO2 LO3 Routing Algorithms Shortest Path Routing, Flooding, Hierarchical Routing, Broadcast, Multicast, Distance Vector Routing

The document outlines various networking devices and routing algorithms used in computer networks, including repeaters, hubs, bridges, switches, routers, and gateways. It details the differences between adaptive and non-adaptive routing algorithms, as well as unicast, broadcast, and multicast methods. Additionally, it explains intradomain and interdomain routing protocols, highlighting implementations like RIP, OSPF, and BGP.

Uploaded by

bharatiyaboy1267
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)
9 views37 pages

LO2 LO3 Routing Algorithms Shortest Path Routing, Flooding, Hierarchical Routing, Broadcast, Multicast, Distance Vector Routing

The document outlines various networking devices and routing algorithms used in computer networks, including repeaters, hubs, bridges, switches, routers, and gateways. It details the differences between adaptive and non-adaptive routing algorithms, as well as unicast, broadcast, and multicast methods. Additionally, it explains intradomain and interdomain routing protocols, highlighting implementations like RIP, OSPF, and BGP.

Uploaded by

bharatiyaboy1267
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/ 37

ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Learning Outcomes (LO):

2. Analyze the various routing algorithms used in the network layer. [L4]
3. Compare Unicast, Broadcast and Multicast in Computer Network. [L6]

INTERNETWORKING DEVICES

Computer networks can be established by using various network devices such as


Repeaters, Bridges, Routers, and Gateways. The following diagram are various internetwork
devices that are used in LAN/WAN.

Networking Devices used in OSI Model

The difference between the two is that


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 a network could be defined as a group of locally connected computers (Eg: Computers


connected in an office building).
 whereas, an internetwork is a collection of individual networks, connected by
intermediate networking devices, that functions as a single large network

Repeater

 A repeater operates at the physical layer.


 Its job is to regenerate the signal over the same network before the signal becomes too
weak or corrupted.

Repeater in OSI Model

Function of repeater
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Hub

 A hub is basically a multiport repeater.


 A hub connects multiple wires coming from different branches, for example, the
connector in star topology which connects different stations.
 Hubs cannot filter data, so data packets are sent to all connected devices.

Types of Hub
 Active Hub: -
 These are the hubs which have their own power supply and can clean, boost and
relay the signal along with the network. It serves both as a repeater as well as
wiring centre.
 These are used to extend the maximum distance between nodes.
 Passive Hub: -
 These are the hubs which collect wiring from nodes and power supply from active
hub.
 These hubs relay signals onto the network without cleaning and boosting them
and can’t be used to extend the distance between nodes.
Bridge
 A bridge operates at data link layer.
 A bridge is a repeater, with add on the functionality of filtering content by reading the
MAC addresses of source and destination.
 It is also used for interconnecting two LANs working on the same protocol.

Bridge in OSI Model


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Function of a Bridge
Types of Bridges
 Transparent Bridges: - These are the bridge in which the stations are completely unaware
of the bridge’s existence i.e. whether or not a bridge is added or deleted from the network,
reconfiguration of the stations is unnecessary. These bridges make use of two processes i.e.
bridge forwarding and bridge learning.
 Source Routing Bridges: - In these bridges, routing operation is performed by source
station and the frame specifies which route to follow. The hot can discover frame by
sending a special frame called discovery frame, which spreads through the entire network
using all possible paths to destination.
Switch – A switch is a multiport bridge with a buffer and a design that can boost its efficiency (a
large number of ports imply less traffic) and performance. A switch is a data link layer
device. The switch can perform error checking before forwarding data.
Routers –
 A router is a device like a switch that routes data packets based on their IP addresses.
 Router is mainly a Network Layer device.
 Routers normally connect LANs and WANs together and have a dynamically updating
routing table based on which they make decisions on routing the data packets.
 Router divide broadcast domains of hosts connected through it.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Gateway –
 A gateway, as the name suggests, is a passage to connect two networks together that may
work upon different networking models.
 They basically work as the messenger agents that take data from one system, interpret it,
and transfer it to another system.
 Gateways are also called protocol converters and can operate at any network layer.
 Gateways are generally more complex than switch or router.

Routing algorithm

o In order to transfer the packets from source to the destination, the network layer must
determine the best route through which packets can be transmitted.
o Whether the network layer provides datagram service or virtual circuit service, the main
job of the network layer is to provide the best route. The routing protocol provides this
job.
o The routing protocol is a routing algorithm that provides the best path from the source to
the destination. The best path is the path that has the "least-cost path" from source to the
destination.
o Routing is the process of forwarding the packets from source to the destination but the
best route to send the packets is determined by the routing algorithm.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Classification of a Routing algorithm

The Routing algorithm is divided into two categories:

o Adaptive Routing algorithm


o Non-adaptive Routing algorithm

Adaptive Routing algorithm


o An adaptive routing algorithm is also known as dynamic routing algorithm.
o This algorithm makes the routing decisions based on the topology and network traffic.
o The main parameters related to this algorithm are hop count, distance and estimated
transit time.

An adaptive routing algorithm can be classified into three parts:

o Centralized algorithm: It is also known as global routing algorithm as it computes the


least-cost path between source and destination by using complete and global knowledge
about the network. This algorithm takes the connectivity between the nodes and link cost
as input, and this information is obtained before actually performing any
calculation. Link state algorithm is referred to as a centralized algorithm since it is
aware of the cost of each link in the network.
o Isolation algorithm: It is an algorithm that obtains the routing information by using local
information rather than gathering information from other nodes.
o Distributed algorithm: It is also known as decentralized algorithm as it computes the
least-cost path between source and destination in an iterative and distributed manner. In
the decentralized algorithm, no node has the knowledge about the cost of all the network
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

links. In the beginning, a node contains the information only about its own directly
attached links and through an iterative process of calculation computes the least-cost path
to the destination. A Distance vector algorithm is a decentralized algorithm as it never
knows the complete path from source to the destination, instead it knows the direction
through which the packet is to be forwarded along with the least cost path.

Non-Adaptive Routing algorithm


o Non Adaptive routing algorithm is also known as a static routing algorithm.
o When booting up the network, the routing information stores to the routers.
o Non Adaptive routing algorithms do not take the routing decision based on the network
topology or network traffic.

The Non-Adaptive Routing algorithm is of two types:

Flooding: In case of flooding, every incoming packet is sent to all the outgoing links except the
one from it has been reached. The disadvantage of flooding is that node may contain several
copies of a particular packet.

Random walks: In case of random walks, a packet sent by the node to one of its neighbors
randomly. An advantage of using random walks is that it uses the alternative routes very
efficiently.

Differences b/w Adaptive and Non-Adaptive Routing Algorithm


Basis Of Adaptive Routing algorithm Non-Adaptive Routing algorithm
Comparison

Define Adaptive Routing algorithm is an The Non-Adaptive Routing algorithm


algorithm that constructs the is an algorithm that constructs the
routing table based on the network static table to determine which node
conditions. to send the packet.

Usage Adaptive routing algorithm is used The Non-Adaptive Routing algorithm


by dynamic routing. is used by static routing.

Routing decision Routing decisions are made based Routing decisions are the static
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

on topology and network traffic. tables.

Categorization The types of adaptive routing The types of Non Adaptive routing
algorithm, are Centralized, algorithm are flooding and random
isolation and distributed algorithm. walks.

Complexity Adaptive Routing algorithms are Non-Adaptive Routing algorithms are


more complex. simple

UNICAST ROUTING PROTOCOLS

 A routing table can be either static or dynamic.


 A static table is one with manual entries. A dynamic table, on the other hand, is
one that is updated automatically when there is a change somewhere in the
internet. Today, an internet needs dynamic routing tables.

Intra- and Interdomain Routing

 For this reason, an internet is divided into autonomous systems.


 An autonomous system (AS) is a group of networks and routers under the authority of a
single administration.
 Routing inside an autonomous system is referred to as intradomain routing.
 Routing between autonomous systems is referred to as interdomain routing. Each
autonomous system can choose one or more intradomain routing protocols to handle
routing inside the autonomous system.
 However, only one interdomain routing protocol handles routing between autonomous
systems.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 We discuss two intradomain routing protocols: distance vector and link state.
 We also introduce one interdomain routing protocol: path vector.
 Routing Information Protocol (RIP) is an implementation of the distance vector
protocol.
 Open Shortest Path First (OSPF) is an implementation of the link state protocol.
 Border Gateway Protocol (BGP) is an implementation of the path vector protocol.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Distance Vector Routing Algorithm

o The Distance vector algorithm is iterative, asynchronous and distributed.


o Distributed: It is distributed in that each node receives information from one or
more of its directly attached neighbors, performs calculation and then distributes
the result back to its neighbors.
o Iterative: It is iterative in that its process continues until no more information is
available to be exchanged between neighbors.
o Asynchronous: It does not require that all of its nodes operate in the lock step
with each other.
o The Distance vector algorithm is a dynamic algorithm.
o It is mainly used in ARPANET, and RIP.
o Each router maintains a distance table known as Vector.
o It is adaptive routing algorithm.

Three Keys to understand the working of Distance Vector Routing Algorithm:


o Knowledge about the whole network: Each router shares its knowledge through the
entire network. The Router sends its collected knowledge about the network to its
neighbors.
o Routing only to neighbors: The router sends its knowledge about the network to only
those routers which have direct links. The router sends whatever it has about the network
through the ports. The information is received by the router and uses the information to
update its own routing table.
o Information sharing at regular intervals: Within 30 seconds, the router sends the
information to the neighboring routers.
Let's understand through an example:
Sharing Information
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o In the above figure, each cloud represents the network, and the number inside the cloud
represents the network ID.
o All the LANs are connected by routers, and they are represented in boxes labeled as A, B,
C, D, E, F.
o 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.
o In Distance vector routing, the cost is based on hop count.

In the above 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
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

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 atleast three types of
information such as Network ID, the cost and the next hop.

o NET ID: The Network ID defines the final destination of the packet.
o Cost: The cost is the number of hops that packet must take to get there.
o Next hop: It is the router to which the packet must be delivered.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o 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.
o 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.
o 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.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Final routing tables of all the routers are given below:

Rules:
1. Add one hop to the hop count for each advertised destination.
2. Repeat the following steps for each advertised destination.
a. If destination not in the routing table, Add the advertised information to the table.
b. Else
i. If next hop field is the same, Replace entry in the table with the advertised
one.
ii. Else
iii. If advertised hop count smaller than one in the table, replace entry in the
routing table.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Link State Routing


Link state routing is a technique in which each router shares the knowledge of its neighborhood
with every other router in the internetwork.
The three keys to understand the Link State Routing algorithm:
o Knowledge about the neighborhood: Instead of sending its routing table, a router sends
the information about its neighborhood only. A router broadcast its identities and cost of
the directly attached links to other routers.
o Flooding: Each router sends information to every other router on the internetwork except
its neighbors. This process is known as Flooding. Every router that receives the packet
sends the copies to all its neighbors. Finally, each and every router receives a copy of the
same information.
o Information sharing: A router sends the information to every other router only when the
change occurs in the information.

Link State Routing has two phases:


Reliable Flooding
o Initial state: Each node knows the cost of its neighbors.
o Final state: Each node knows the entire graph.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Cost in Link State Routing

Link State Packet


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Flooding of A’s LSP

Link State Database


Route Calculation

Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o The Link state routing algorithm is also known as Dijkstra's algorithm which is used to
find the shortest path from one node to every other node in the network.
o The Dijkstra's algorithm is an iterative, and it has the property that after k th iteration of the
algorithm, the least cost paths are well known for k destination nodes.
o A tree is a graph of nodes and links; one node is called the root. All other nodes can be
reached from the root through only one single route.
o A shortest path tree is a tree in which the path between the root and every other node is
the shortest. What we need for each node is a shortest path tree with that node as the root.
o The Dijkstra algorithm creates a shortest path tree from a graph. The algorithm divides
the nodes into two sets: tentative and permanent.
o It finds the neighbors of a current node, makes them tentative, examines them, and if they
pass the criteria, makes them permanent.
o We can informally define the algorithm by using the flowchart in following diagram.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o Let us apply the algorithm to node A of our sample graph in following diagram. To find
the shortest path in each step, we need the cumulative cost from the root to each node,
which is shown next to the node.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o The following shows the steps. At the end of each step, we show the permanent (filled
circles) and the tentative (open circles) nodes and lists with the cumulative costs.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Routing Table for Router A


Let's understand through an example:
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

In the above figure, source vertex is A.

Step 1:

The first step is an initialization step. The currently known least cost path from A to its directly
attached neighbors, B, C, D are 2,5,1 respectively. The cost from A to B is set to 2, from A to D
is set to 1 and from A to C is set to 5. The cost from A to E and F are set to infinity as they are
not directly linked to A.

Step N D(B),P(B) D(C),P(C) D(D),P(D D(E),P(E) D(F),P(F)


)

1 A 2,A 5,A 1,A ∞ ∞

Step 2:

In the above table, we observe that vertex D contains the least cost path in step 1. Therefore, it is
added in N. Now, we need to determine a least-cost path through D vertex.

a) Calculating shortest path from A to B

1. v = B, w = D
2. D(B) = min( D(B) , D(D) + c(D,B) )
3. = min( 2, 1+2)>
4. = min( 2, 3)
5. The minimum value is 2. Therefore, the currently shortest path from A to B is 2.

b) Calculating shortest path from A to C

1. v = C, w = D
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

2. D(B) = min( D(C) , D(D) + c(D,C) )


3. = min( 5, 1+3)
4. = min( 5, 4)
5. The minimum value is 4. Therefore, the currently shortest path from A to C is 4.

c) Calculating shortest path from A to E

1. v = E, w = D
2. D(B) = min( D(E) , D(D) + c(D,E) )
3. = min( ∞, 1+1)
4. = min(∞, 2)
5. The minimum value is 2. Therefore, the currently shortest path from A to E is 2.
Note: The vertex D has no direct link to vertex E. Therefore, the value of D(F) is infinity.

Ste N D(B),P(B D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)


p )

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

Step 3:

In the above table, we observe that both E and B have the least cost path in step 2. Let's consider
the E vertex. Now, we determine the least cost path of remaining vertices through E.

a) Calculating the shortest path from A to B.


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

1. v = B, w = E
2. D(B) = min( D(B) , D(E) + c(E,B) )
3. = min( 2 , 2+ ∞ )
4. = min( 2, ∞)
5. The minimum value is 2. Therefore, the currently shortest path from A to B is 2.

b) Calculating the shortest path from A to C.

1. v = C, w = E
2. D(B) = min( D(C) , D(E) + c(E,C) )
3. = min( 4 , 2+1 )
4. = min( 4,3)
5. The minimum value is 3. Therefore, the currently shortest path from A to C is 3.

c) Calculating the shortest path from A to F.

1. v = F, w = E
2. D(B) = min( D(F) , D(E) + c(E,F) )
3. = min( ∞ , 2+2 )
4. = min(∞ ,4)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Step N D(B),P(B) D(C),P(C D(D),P(D) D(E),P(E) D(F),P(F)


)

1 A 2,A 5,A 1,A ∞ ∞


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

Step 4:

In the above table, we observe that B vertex has the least cost path in step 3. Therefore, it is
added in N. Now, we determine the least cost path of remaining vertices through B.

a) Calculating the shortest path from A to C.

1. v = C, w = B
2. D(B) = min( D(C) , D(B) + c(B,C) )
3. = min( 3 , 2+3 )
4. = min( 3,5)
5. The minimum value is 3. Therefore, the currently shortest path from A to C is 3.

b) Calculating the shortest path from A to F.


1. v = F, w = B
2. D(B) = min( D(F) , D(B) + c(B,F) )
3. = min( 4, ∞)
4. = min(4, ∞)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞


ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

Step 5:

In the above table, we observe that C vertex has the least cost path in step 4. Therefore, it is
added in N. Now, we determine the least cost path of remaining vertices through C.

a) Calculating the shortest path from A to F.

1. v = F, w = C
2. D(B) = min( D(F) , D(C) + c(C,F) )
3. = min( 4, 3+5)
4. = min(4,8)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

5 ADEBC 4,E
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Final table:

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

5 ADEBC 4,E

6 ADEBCF

Disadvantage:

Heavy traffic is created in Line state routing due to Flooding. Flooding can cause an infinite
looping, this problem can be solved by using Time-to-leave field

Let's describe some notations:


o c( i , j): Link cost from node i to node j. If i and j nodes are not directly linked, then c(i ,
j) = ∞.
o D(v): It defines the cost of the path from source code to destination v that has the least
cost currently.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

o P(v): It defines the previous node (neighbor of v) along with current least cost path from
source to v.
o N: It is the total number of nodes available in the network.

Algorithm

Initialization

N = {A} // A is a root node.

for all nodes v

if v adjacent to A

then D(v) = c(A,v)

else D(v) = infinity

loop

find w not in N such that D(w) is a minimum.

Add w to N

Update D(v) for all v adjacent to w and not in N:

D(v) = min(D(v) , D(w) + c(w,v))

Until all nodes in N

In the above algorithm, an initialization step is followed by the loop. The number of times the
loop is executed is equal to the total number of nodes available in the network.

Path Vector Routing( Hierarical Routing)


Introduction
 Distance vector and link state routing are both intradomain routing protocols.
 They can be used inside an autonomous system, but not between autonomous systems.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 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.

Description
 Path vector routing proved to be useful for interdomain routing. The principle of path
vector routing is similar to that of distance vector routing.
 In path vector routing, we assume that there is one node (there can be more, but one is
enough for our conceptual discussion) in each autonomous system that acts on behalf of
the entire autonomous system. Let us call it the speaker node.
 The speaker node in an AS creates a routing table and advertises it to speaker nodes in
the neighboring ASs. The idea is the same as for distance vector routing except that only
speaker nodes in each AS can communicate with each other.
 However, what is advertised is different. A speaker node advertises the path, not the
metric of the nodes, in its autonomous system or other autonomous systems.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

The following diagram shows the initial tables for each speaker node in a system made of
four ASs.

 Node Al is the speaker node for ASl, Bl for AS2, Cl for AS3, and Dl for AS4. Node
Al creates an initial table that shows Al to A5 are located in ASI and can be reached
through it. Node Bl advertises that Bl to B4 are located in AS2 and can be reached
through Bl. And so on.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

Sharing Just as in distance vector routing, in path vector routing, a speaker in an autonomous
system shares its table with immediate neighbors. In the above diagram, node Al shares its table
with nodes B1 and Cl. Node Cl shares its table with nodes Dl, B1, and Al. Node B1 shares its
table with Cl and Al. Node Dl shares its table with Cl.

Updating When a speaker node receives a two-column table from a neighbor, it updates its own
table by adding the nodes that are not in its routing table and adding its own autonomous system
and the autonomous system that sent the table. After a while each speaker has a table and knows
how to reach each node in other ASs. The following figure shows the tables for each speaker
node after the system is stabilized.
According to the figure, if router Al receives a packet for nodes A3, it knows that the
path is in AS1 (the packet is at home); but if it receives a packet for Dl, it knows that the packet
should go from AS1, to AS2, and then to AS3. The routing table shows the path completely. On
the other hand, if node Dl in AS4 receives a packet for node A2, it knows it should go through
AS4, AS3, and AS 1.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 Loop prevention. The instability of distance vector routing and the creation of loops can
be avoided in path vector routing. When 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. Policy routing can be easily implemented through path vector routing.
When a router receives a message, it can check the path. If one of the autonomous
systems listed in the path is against its policy, it can ignore that path and that destination.
It does not update its routing table with this path, and it does not send this message to its
neighbors.

 Optimum path. What is the optimum path in path vector routing? We are looking for a
path to a destination that is the best for the organization that runs the autonomous system.
We definitely cannot include metrics in this route because each autonomous system that
is included in the path may use a different criterion for the metric. One system may use,
internally, RIP, which defines hop count as the metric; another may use OSPF with
minimum delay defined as the metric. The optimum path is the path that fits the
organization. In our previous figure, each autonomous system may have more than one
path to a destination. For example, a path from AS4 to AS1 can be AS4-AS3-AS2-AS1,
or it can be AS4-AS3-AS1. For the tables, we chose the one that had the smaller number
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

of autonomous systems, but this is not always the case. Other criteria, such as security,
safety, and reliability, can also be applied.
Unicast, Multicast, and Broadcast
A message can be unicast, multicast, or broadcast. Let us clarify these terms as they relate
to the Internet.
Unicasting
 In unicast communication, there is one source and one destination.
 The relationship between the source and the destination is one-to-one.
 In this type of communication, both the source and destination addresses, in the IP
datagram, are the unicast addresses assigned to the hosts (or host interfaces, to be more
exact).
 The following figure, a unicast packet starts from the source S1 and passes through
routers to reach the destination D1.
 The router may discard the packet if it cannot find the destination address in its routing
table.

In unicasting, the router forwards the received packet through only one of its interfaces.
Multicasting
 In multicast communication, there is one source and a group of destinations.
 The relationship is one-to-many.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 In this type of communication, the source address is a unicast address, but the destination
address is a group address, which defines one or more destinations.
 The group address identifies the members of the group.
 A multicast packet starts from the source S1 and goes to all destinations that belong to
group G1. In multicasting, when a router receives a packet, it may forward it through
several of its interfaces.

In multicasting, the router may forward the received packet through several of its
interfaces.
Broadcasting
 In broadcast communication, the relationship between the source and the destination is
one-to-all.
 There is only one source, but all the other hosts are the destinations.
 The Internet does not explicitly support broadcasting because of the huge amount of
traffic
 it would create traffic, because of the bandwidth it would need.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 Imagine the traffic generated in the Internet if one person wanted to send a message to
everyone else connected to the Internet.
Multicasting Versus Multiple Unicasting
Before we finish this section,
we need to distinguish between multicasting and multiple unicasting. The following figure
illustrates both concepts.
ALLIANCE UNIVERSITY

ALLIANCE SCHOOL OF ADVANCED COMPUTING

Department of Computer Science and Engineering

 Multicasting starts with one single packet from the source that is duplicated by the
routers. The destination address in each packet is the same for all duplicates.
 Note that only one single copy of the packet travels between any two routers.
 In multiple unicasting, several packets start from the source.
 If there are five destinations, for example, the source sends five packets, each with a
different unicast destination address. Note that there may be multiple copies traveling
between two routers.
 For example, when a person sends an e-mail message to a group of people, this is
multiple unicasting. The e-mail software creates replicas of the message, each with a
different destination address and sends them one by one. This is not multicasting; it is
multiple unicasting.

You might also like