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

Routing Protocols Overview

Uploaded by

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

Routing Protocols Overview

Uploaded by

MSc 201921
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 55

Routing Protocols: An Overview

Sankhayan Choudhury
Routing: Overview
• Routing is the most crucial design issue in layer 3.
• Routing is the process of establishing the routes (Via
intermediate nodes) that data packets must follow to reach the
destination.
• Each node must contain a routing table that holds the path to
reach all possible destinations with the assigned cost.
• In a simplest form, the attributes could be Destination, Next
hop and the cost for reaching the destination. The following
could be the routing table of a node A.
Destination Next Hop Cost (in hops)

A - -
B C 5
D B 4
08/09/2024 2
Routing: Classification
• Static: Contents of the routing table is fixed and entered manually
• Adaptive: The routing decision changes with the
– Changes in topology
– Changes in traffic density

• Adaptive routing (s)

• Isolated : Table changes based on the information available in a specific


node

• Centralized: Routing Control centre (RCC); all nodes gather


information and send to RCC; RCC computes the decision on behalf of
all the nodes and transmit the routing table

• Distributed: All nodes are exchanging information with the neighbouring


nodes (Nodes those are one-hop away) and updates the table accordingly3
08/09/2024
Flooding: A simplest example of Routing

• Flooding is a simplest example of routing. (Broadcasting)


• This adapts the technique in which every incoming packet
is sent on every outgoing line except from which it
arrived. One problem with this is that packets may go in
loop and as a result, a node may receive duplicate
packets.
• This duplication wastes huge bandwidth, the most costly
resource in the network.
• The strength is simplicity; and the nodes are receiving the
packets using best path, second best path and so on.
Reliability is increased.

08/09/2024 4
Flooding

• Duplications.....Major problem
• Solution:
• One such measure is to have a hop counter contained in
the header of each packet that is decremented at each hop,
The packet is discarded when the counter reaches zero.
• Ideally, the hop counter could be initialized by the full
diameter of the network i.e. the worst-case.

08/09/2024 5
Unicast Routing
A network can be modelled by a Graph; Minimum Spanning Tree
of a graph is a sub-graph having all the vertices and those vertices
are connected by a route having minimum cost. One of the these
algos is Dijkstra algorithm and can be used as a unicast routing
algorithm.

08/09/2024 6
Distance Vector (Bellman-Ford) Algorithm
Adaptive; Distributed Routing
Each node is exchanging information with their neighbours
Information to be exchanged is the information about the entire
network as captured by the specific neighbour node (Routing table)
Periodic updates; accordingly the routing tables are updated

Compute new route JG; JG = JA +AG/ JI+IG/ JH+HG/ JK+KG; 8+18/ 10+31/
12+6/ 6+31; Minimum cost is 18, Next hop to reach G from J will be H.
08/09/2024 7
Count-to-Infinity Problem
Good news propagate within a network in a satisfactory way
Bad news are propagating slowly; which is not desirable

08/09/2024 8
Link-State Routing
• Adaptive; Distributed Routing
• Each node is generating a packet that contains the local
information i.e. Information about the neighbours
• Each node floods the packet to all the nodes within the
network
• Each node have an accurate perception about the changed
topology of the network; thus the decision will be more
accurate compared to Distance Vector.
• Demands huge bandwidth due to flooding
• In general No Periodic updates; triggers whenever needed

08/09/2024 9
Link-State Routing

Sequence Number: used for distinguishing between fresh and stale


Information ; e.g. A,1..(the Link State Packet generated by A with
Sequence Number 1) is the old information compared to (A,2)

Age: Counter that ensures that a packet must exist a finite time within
network; Chances of congestion will be reduced
:
08/09/2024 10
Link-State Routing
• Discover its neighbours and learn their network
addresses.
• Set the distance or cost metric to each of its
neighbours.
• Construct a packet telling all it has just learned.
• Send this packet to and receive packets from all other
routers.
• Compute the shortest path to every other router.

08/09/2024 11
Hierarchical Routing
Routing table becomes large (more entries); More CPU time will be
needed to scan them and for subsequent routing decision; chances of
congestion will be more.......Solution : Hierarchical routing; No of
entries are less

The best route from 1A to 5C is via region 2, but with hierarchical


routing all traffic to region 5 goes via region 3, because that is better for
most destinations in region 5.
08/09/2024 12
Broadcast Routing: Sink Tree Broadcasting
• A spanning tree is a subset of the network that includes all
the routers but contains no loops. Sink trees are spanning
trees. If each router knows which of its lines belong to the
spanning tree, it can copy an incoming broadcast packet
onto all the spanning tree lines except the one it arrived
on. This method makes excellent use of bandwidth,
generating the absolute minimum number of packets
necessary to do the job.
• Sink Tree knowledge is essential for each node.

08/09/2024 13
Broadcast : Reverse Path Forwarding
• When a broadcast packet arrives at a router, the router
checks to see if the packet arrived on the link that is
normally used (link within Sink Tree) for sending packets
toward the source of the broadcast. (Unicast Routing table
can be used for this purpose)
• There is an excellent chance that the broadcast packet itself
followed the best route from the router and is therefore the
first copy to arrive at the router. This being the case, the
router forwards copies of it onto all links except the one it
arrived on. If, however, the broadcast packet arrived on a
link other than the preferred one for reaching the source,
the packet is discarded as a likely duplicate.

08/09/2024 14
Broadcast Routing

Number of packet generation in Sink Tree = 14


Number of Packet generation in Reverse Path Forwarding = 24

08/09/2024 15
08/09/2024 16
IP (Logical) Addressing
• Identifier used to uniquely identify each device
connected to the Internet
• Two devices in Internet never have one IP at a time
instant; but one device may have more than one IP
addresses (Multi-homed devices) provided the device
has two connections in the Internet via two networks
• 32 bit address expressed in dotted decimal format e.g.
241.132.40.19
• Universal means all the nodes, interested to connect
in Internet, must accept it

08/09/2024 17
Classful IP Addressing

“class-full” addressing:
class
1.0.0.0 to
A 0 network host 127.255.255.255

B network 128.0.0.0 to
10 host
191.255.255.255
192.0.0.0 to
C 110 network host
223.255.255.255
224.0.0.0 to
D 1110 multicast address
239.255.255.255

32 bits
Classful Addressing

08/09/2024 19
Classful Addressing

08/09/2024 20
Masking
Masking is a process to find the netid from the given IP address.
For example, the mask for a class A address has eight 1s, which
means the first 8 bits of any address in class A define the netid; the
next 24 bits define the hostid.
Mask address of class A will be 11111111.0.0.0 and execute the bit
by bit AND ing with the given IP; you will get the network address.

08/09/2024 21
Classless Addressing
• The no of devices on Internet are still less than 2 32 but we
have run out of class A and B add, class C block is too small
for most midsize organizations.
• If an organization was granted a large block in class A or B, it
could divide the addresses into several contiguous groups and
assign each group to smaller networks, called subnets.
• The size of a class C block with a maximum number of 256
addresses did not satisfy the needs of most organizations. Even
a midsize organization needed more addresses. One solution is
to combine several class C blocks to create a largerrange of
addresses, called supernetting.
• Classless addressing addresses all the above said issues and
provides a single solution.

08/09/2024 22
Why Classless?
• What about a small Business House that requires only 16
address or a household that needed only 2 addresses?

• To overcome address depletion


• Addresses are granted in blocks.
• The size of the address block (the number of addresses)
varies based on the nature and size of the entity.
• The addresses in a block must be contiguous, one after
another.
• The number of addresses in a block must be a power of 2
• The first address must be evenly divisible by the number of
addresses.
08/09/2024 23
Masking
• A better way to define a block of addresses is to select any address
in the block and the mask.
• In IPv4 addressing, a block of addresses can be defined as x.y.z.t/n
in which x.y.z.t defines one of the addresses and the In defines the
mask.

• A block of addresses is granted to a small organization. We know


that one of the addresses is 205.16.37.39/28. What is the first
address in the block? What is the last address?
• Address: 11001101 00010000 00100101 00100111 [Class C]
Mask: 11111111 11111111 11111111 11110000
First add: 11001101 00010000 00100101 00100000 [205.16.37.32]
• [32-28] 4 bits are there for addressing no of hosts within a
network. Thus the number of host will be 24 = 16. The last address
within the block will be 205.16.37. 47
08/09/2024 24
Subnet
• An organization that is granted a large block of addresses may
want to create clusters of networks (called subnets) and divide
the addresses between the different subnets.
• The rest of the world still sees the organization as one entity;
however, internally there are several subnets.
• All messages are sent to the router address that connects the
organization to the rest of the Internet; the router routes the
message to the appropriate subnets.
• The organization, however, needs to create small subblocks of
addresses, each assigned to specific subnets.
• The organization has its own mask; each subnet must also have
its own.
08/09/2024 25
An Illustration of Subnetting
• Suppose an organization is given the block 17.12.40.0/26, which
contains 64 addresses. The organization has three offices and
needs to divide the addresses into three subblocks of 32, 16, and
16 addresses.

• Suppose the mask for the first subnet is n1, then 232- n1 must be
32, which means that n1 =27.
• Suppose the mask for the second subnet is n2, then 232- n2 must be
16, whichmeans that n2 = 28.
• Suppose the mask for the third subnet is n3, then 232- n3 must be
16, which means that n3 =28.
• This means that we have the masks 27, 28, 28 with the
organization mask being 26.
08/09/2024 26
08/09/2024 27
An Example
• An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to distribute
these addresses to three groups of customers as follows:
• a. The first group has 64 customers; each needs 256 addresses.
• b. The second group has 128 customers; each needs 128
addresses.
• c. The third group has 128 customers; each needs 64
addresses.
Design the sub-blocks and find out how many addresses are
still available after these allocations.

08/09/2024 28
An Example

08/09/2024 29
An Example

08/09/2024 30
NAT
• Consumers want to create small networks with several
hosts and need an IP address for each host. With the
shortage of addresses, this is a serious problem.
• NAT (Network Address Translation) enables a user to have a
large set of addresses internally and one address, or a small set
of addresses, externally.
• Private IP (e.g. 172.16.0.0 to 172.31.255.255) and Public IP
concepts help to offer a solution.
• The site must have only one single connection to the global
Internet through a router that runs the NAT software. The
private network is transparent to the rest of the Internet; the rest
of the Internet sees only the NAT router

08/09/2024 31
NAT

08/09/2024 32
NAT

communication must always be initiated by the private


network.

08/09/2024 33
NAT
• The NAT router may use a pool of global addresses.
• For example, instead of using only one global
address (200.24.5.8), the NAT router can use four
addresses (200.24.5.8, 200.24.5.9, 200.24.5.10, and
200.24.5.11) i.e. Four private network hosts can
communicate with the same external host at the same
time because each pair of addresses defines a
connection.
• No private-network host can access two external
server programs (e.g., HTTP and FTP) at the same
time.

08/09/2024 34
NAT
Suppose two hosts with addresses 172.18.3.1 and
172.18.3.2 inside a private network need to access the
HTTP server on external host 25.8.3.2.

08/09/2024 35
Intra & Inter Domain Routing
Internetwork is divided into smaller regions, called
Autonomous Systems (AS, as suggested in Hierarchical
Routing) for better scalability

Routing within an AS: Intra-domain Routing , Interior


Routing e.g RIP/ OSPF
Routing between AS: Inter domain Routing, Exterior e.g
BGP

08/09/2024 36
Routing Information Protocol
• Interior , Intra-AS routing; Working principle is Distance vector
Routing (Bellman–Ford Routing)
• In an AS, Only routers and networks (links) are considered. The
routers have routing tables; networks do not.
• The destination in a routing table is a network
• The metric used by RIP is very simple; the distance is defined as the
number of links (networks) to reach the destination. Thus the metric
is hop count.
• Infinity is defined as 16, which means that any route in an
autonomous system using RIP cannot have more than 15 hops.
• The next-node column defines the address of the router to which the
packet is to be sent to reach its destination.

08/09/2024 37
Open Shortest Path First - OSPF

Inerior/ Intra-AS routing; working Principle: Link-state


Routing
Flooding becomes the key issue for offering a global view (of
the network) to each node; Accuracy high than RIP
Bandwidth requirement is too high compared to RIP; As a
result an Autonomous System is also divided into Areas
08/09/2024 38
Link Classifications in OSPF

A point-to-point link connects two routers without any


other host or router in between An example of this type
of link is two routers connected by a telephone line.
Graphically, the routers are represented by nodes, and
the link is represented by a bidirectional edge
connecting the nodes. The metrics, which are usually
the same, are shown at the two ends

08/09/2024 39
Transient Link

A transient link is a network with several routers attached to it.


The data can enter through any of the routers and leave through
any router. Each router has many neighbours.
Router A has routers B, C, D, and E as neighbours.
The representation in (b) is not efficient because each router needs
to advertise the neighbourhood to four other routers, for a total of
20 advertisements
Each router is connected to every other router through one single
network, the network itself is represented by a node (designated
router); Thus the adv for neighbourhood estimation goes down to
08/09/2024 40
10.
Stub and Virtual Link

A stub link is a network that is connected to only one router.


The data packets enter the network through this single
router and leave the network through this same router. This
is a special case of the transient network.

When the link between two routers is broken, the


administration may create a virtual link between them, using a
longer path that probably goes through several routers.
08/09/2024 41
Graphical Representation of the Network

08/09/2024 42
Link State Advertisement

08/09/2024 43
Shortest Path Routing

08/09/2024 44
Path Vector Routing
• Inter AS routing
• Distance Vector & Link State are not used for Inter AS
routing
• The principle of path vector routing is similar to that of
distance vector routing.
• Speaker node is a special node within each AS that acts
on behalf of the entire autonomous system.
• The speaker node in an AS creates a routing table and
advertises it to speaker nodes in the neighbouring ASs.
• A speaker node advertises the path, not the metric of the
nodes.

08/09/2024 45
Path Vector Routing: Initialization

08/09/2024 46
Path Vector Routing: Sharing

Policy Routing; Optimum Path? .....Loop Free


08/09/2024 47
Unicast vs Multicast Routing

08/09/2024 48
Multicasting vs. Multiple Unicasting

Multicasting requires less bandwidth than Multiple Unicasting


In Multiple Unicasting, Packets are created with a specific
delay. Thus for a large no of pkts, the solution is not
acceptable.
08/09/2024 49
Source Based Tree Approach

08/09/2024 50
Group Shared Tree Approach

08/09/2024 51
DVMRP
• Multicast distance vector algorithm uses a process based
on four decision-making strategies.
• Flooding
• Reverse Path Forwarding: RPF eliminates the loop in the
flooding process. RPF guarantees that each network
receives a copy of the multicast packet without
formation of loops.
• RPF does not guarantee that each network receives only
one copy; a network may receive two or more copies.
• The reason is that RPF is not based on the destination
address (a group address); forwarding is based on the
source address.
08/09/2024 52
DVMRP

08/09/2024 53
Reverse Path Broadcasting

Preventing duplication, only one parent router for each network is needed.
A network can receive a multicast packet from a particular source only
through a designated parent router.
RPB guarantees that the packet reaches every network and that every
network receives only one copy.
08/09/2024 54
Reverse Path Multicasting

08/09/2024 55

You might also like