Routing Protocols
Routing Protocols
Network Layer:
Delivery, Forwarding,
and Routing
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
22.1
Introduction
• This chapter describes the delivery,
forwarding, and routing of IP
packets to their final destinations.
Delivery - the way a packet is handled by the
underlying networks .
Forwarding - the way a packet is delivered to
the next station.
Routing - the way routing tables are created to
help in forwarding.
• Routing protocols - continuously update - are
22.2
The network layer supervises the handling of
the packets by the underlying physical
networks.
Direct versus Indirect Delivery
• Default method
neighbourhood.
Routing Algorithm
• Network layer software 20
a)Routing requires a host or a router to have a routing table.
b)Usually when a host has a packet to send or when a router has received a
packet to be forwarded, it looks at this table to find the route to the final
destination.
d)Need to make the size of table manageable and handles issues such security at
the same time. The key question is how to design the routing table.
governmental
Idea: offices, research institutes, companies etc.).
administrative authority use its own routing protocol within the AS.
23
Intra- and Interdomain Routing
• One routing protocol cannot handle the task of updating the
routing tables of all routers in Internet is so large that. For
this reason, an internet is divided into autonomous systems.
22.25
Example of Routing Protocols
22.26
The least cost route between any two
nodes is the route with minimum
distance.
In this protocol, as the name implies,
each node maintains a vector (table) of
minimum distances to every node.
The table at each node also guides the
packets to the desired by showing the
next stop in the route (next hop routing)
The whole idea of distance vector
routing is the sharing info between
neighbors
Let A connect to B and B connect to C.
A don’t know about C. But B does.
So if node B shares the routing table
with A, so node A also know how to
reach node C.
a)3 keys to understand how this algorithm works:
• Sharing knowledge about the entire AS. Each router
shares its knowledge about the entire AS with
• Process:
i. Initialization
• Each node can know only distance with its
immediate neighbors.
• No neighbor; entry in table is mark as
infinite(unreachable)
ii. Sharing
• Sharing table with neighbors.
iii.Updating
• Update the routing table: calculate the
distance, add new node, modify the existing
record if needed.
22.34
Periodic update: A node sends its routing table, normally every 30 s
Triggered update: A node sends its two-column routing table to its neighbors anytime
there is a change in its routing table
Two-node instability
b)RIP treats all network equals; the cost of passing thru a network is the same:
one hop count per network.
number of hop-count).
d)The hop-count is the number of networks that a packet encounters to reach its
destination. Path costs are based on number of hops.
e)In distance vector routing, each router periodically shares its knowledge about
39
RIP: an intradomain routing protocol used inside an AS
Simple protocol based distance vector routing
Metric is simple, a hop count. The distance is defined as the number
of links (networks) to reach the destination
autonomous system
Final routing tables for the previous figure
a) Like RIP, in link state routing, each router also shares its knowledge about its
neighbourhood with every routers in the area.
b)However, in LSR, the link-state packet (LSP) defines the best known network topology (of
an area) is sent to every routers (of other area) after it is constructed locally. Whereas RIP
slowly converge to final routing list based information received from immediate
neighbours.
state of its neighbourhood thr all its output ports and each neighbour sends to every
45
Link State Routing (LSR)
22.47
Figure 22.21 Link state knowledge
The topology must be dynamic, representing the latest state of each node and
each link. If there are changes in any point in the network (a link is down), the
1.It discards the old LSP and keeps the new one
22.53
Figure 22.23 Example of formation of shortest path tree
22.54
Each node uses the shortest path tree protocol to construct
its routing table
The routing table shows the cost of reaching each node from
the root
b)Unlike RIP, OSPF treats the entire network within differently with different
philosophy; depending on the types, cost (metric) and condition of each
c)OSPF allows the administrator to (only) assign a cost for passing through a
network based on the type of service required. e.g. minimum delay,
d)Each router should have the exact topology of the AS network(a picture of
entire AS network) at every moment. The topology is a graph consisting of
56
Popular intradomain routing protocol based on link state routing
To handle routing efficiently and in a timely manner, OSPF divides an autonomous
system into area
Area is a collection of network, hosts, and routers all contained within an AS
AS can also be divided into many different areas
Area border gateway, backbone router, virtual link
22.58
The OSPF allows the administrator to assign a cost, called the metric, to each route
The metric can be based on a type of service (minimum delay, maximum throughput,
and so on)
22.60
Figure 22.26 Point-to-point link
22.61
Figure 22.27 Transient link
22.62
Figure 22.28 Stub link
between them using longer path that probably goes through several routers
22.63
Figure 22.29 Example of an AS and its graphical representation in OSPF
22.64
a)Border Gateway Protocol (BGP) is an inter-domain or inter-
autonomous system routing protocol: routing between different
ASs.
c)DVR and LSR are not suitable candidates for inter-AS routing :
• DVR: there are occasions in which the route with the smallest
hop count is not the preferred route; non-secure path although
65
d)PVR defines the exact paths as an ordered list of ASs that a
packet should travel thru to reach the destination (besides
routing table.
route.
f) 66
• Distance vector routing is subject to instability if there are more than
22.68
• Sharing: Like distance vector routing, a speaker shares its table
• Loop prevention
• Policy routing
• Optimum path
c)If one of the ASs listed in the path is against its policy, the router can ignore that
path entirely and that destination.
d)For any unapproved paths, the router does not update its routing table with this
path, and it does not send the PV message to its neighbours.
e)This means that the routing table in path vector routing are not based on the
smallest hop count (as in distance vector routing) or the minimum delay metric
(as in open shortest path first routing); they are based on the policy imposed on
70
Interdomain routing protocol using path
vector routing
Types of autonomous systems (ASs)
Stub AS: only one connection to another AS
Multihomed AS: more than one connection
to other Ass, but still only a source or sink
for data traffic
Transit AS: a multihomed AS that also
allows transient traffic
Optional attribute
Optional transitive attribute
22.74
Thank you !!!