Lecture 7 Routing Fundamentals and Routing Protocols
Lecture 7 Routing Fundamentals and Routing Protocols
Routable Protocols: Routable protocols are protocols that can be used with routers to forward
data packets from one network to another. In essence, any protocol that supports addressing
and routing of data packets across networks can be considered routable. These protocols
typically define a set of rules for addressing, encapsulation, and routing. Examples include IP,
IPv6, Internetwork Packet Exchange (IPX), and AppleTalk.
Routing Protocols: These are protocols specifically designed to facilitate the routing of data
packets within a network or across multiple networks. They enable routers to dynamically learn
about the network topology, exchange routing information with other routers, and make
decisions on the best paths for forwarding packets. Routing protocols include protocols like
Routing Information Protocol (RIP), Open Shortest Path First (OSPF), Border Gateway
Protocol (BGP), and Enhanced Interior Gateway Routing Protocol (EIGRP).
Routable and Routed Protocols
Routed protocols refer to the protocols that actually carry data across a network.
They provide the necessary addressing and packet structure for data transmission.
A routed protocol allows the router to forward data between nodes on different
networks.
Routable protocols, on the other hand, are protocols that can be used by routers
to forward data packets. They define the rules and addressing schemes that routers
understand to efficiently route data between networks.
In order for a protocol to be routable, it must provide the ability to assign a network
number and a host number to each individual device.
In essence, all routed protocols are routable, but not all routable protocols are
routed. For instance, IP is both a routed and routable protocol because it carries
data packets across networks and can be routed by routers. However, protocols
like IPX and AppleTalk are considered routable but not necessarily routed, as they
might not be commonly used for data transmission in modern networks.
Routable/Routed Protocols
Addressing Provide addresses that routers use to Support addressing schemes that allow
forward packets to their destinations. routers to identify both network and host
portions of addresses.
Transmission Actually carry data packets across Enable routers to route data packets by
networks. providing the necessary addressing and
encapsulation.
Network Layer Define how data is addressed and Focus specifically on providing addressing
Functions routed across networks. and routing capabilities.
Configuration Have limitations in terms of scalability. Designed with scalability to support
efficient routing.
Routed and Routing Protocols
Routed protocols are network protocols that define the format and structure of data
packets and provide enough information in their network layer addresses to allow
routers to forward them to their destinations across different networks.
Routed protocols:
• Includes any network protocol suite that provides enough information in its network
layer address to allow a router to forward it to the next device and finally to its
destination.
• Defines the format and use of the fields within a packet.
Routing protocols are protocols used by routers to determine the optimal path for
forwarding data packets from their source to their destination across an interconnected
network. These protocols facilitate the exchange of routing information between
routers, allowing them to build and maintain routing tables that contain information
about network topology and available routes.
Routing protocols:
• Provides processes for sharing route information.
• Allows routers to communicate with other routers to update and maintain the routing
tables.
In terms of: Routed protocols Routing protocols
Functionality focus on defining addressing and packet focus on facilitating the exchange of
structure. routing information between routers
Purpose: Facilitate data transmission between Determine best paths for forwarding data
hosts. between networks.
Scope: End-to-end host communication. Inter-router communication, path
determination.
Packet Handling Define packet format. Exchange routing info between routers.
2. The MAC address is checked to see if the frame is directly addressed to the router
interface, or a broadcast.
3. The frame header and trailer are removed and the packet is passed up to Layer 3.
5. The packet is switched to the outgoing interface and given the proper frame
header.
Path determination occurs at the network layer. The router uses the
routing table to determine the best path and then uses the switching
function to forward the packet.
The routers learn of these available routes through static routing or dynamic routing.
The router uses path determination to decide which port an incoming packet should be
sent out of to travel on to its destination.
Similarly, routers can make decisions based on the load, bandwidth, delay, cost, and
reliability of a network link.
Routing Algorithms and Metrics
Routing protocols have one or more of the following design goals:
Optimization
Simplicity and low overhead
Robustness and stability
Flexibility
Rapid convergence
The goal of a routing protocol is to build and maintain a routing table. This
table contains the learned networks and associated ports for those networks.
Routers use routing protocols to manage information received from other
routers and its interfaces, as well as manually configured routes.
The routing protocol learns all available routes, places the best routes into
the routing table, and removes routes when they are no longer valid.
Protocol type
Destination/next-hop associations
Routing metric
Outbound interfaces
Routers communicate with one another to maintain their routing tables through the transmission
of routing update messages.
Some routing protocols transmit update messages periodically, while others send them only
when there are changes in the network topology.
Some protocols transmit the entire routing table in each update message, and some transmit
only routes that have changed.
By analyzing the routing updates from the neighboring routers, a router builds and maintains its
routing table.
Types of Routing Protocols Routing
Protocols
Intra Inter
Domain Domain
IGP EGP
Path
Dynamic Static
Vector
RIP OSPF
RIP 2 IS-IS
IGRP
EIGRP
Inter-domain and Intra-domain
Today, an internet can be so large that one routing protocol cannot handle
the task of updating the routing tables of all routers. For this reason, an
internet is divided into autonomous systems.
Widely adopted by major companies and Internet Service Providers (ISPs), BGP is
the primary route advertising protocol used on the Internet.
BGP4, the latest version, introduced support for classless Inter-domain routing
(CIDR) and route aggregation.
Unlike common Internal Gateway Protocols (IGPs) such as RIP, OSPF, and EIGRP,
BGP does not rely on metrics like hop count, bandwidth, or delay.
Intra-domain IGPs can be categorized into two main types: static and
dynamic routing protocols.
Each type has its own set of features and variations, which we will discuss in
detail.
Static and Dynamic Routes
2. Default Static
Host A
Any Other R2
Host B
1. Distance Vector
2. Link State
In distance-vector routing, the first thing each node creates is its own least-cost routing table with
the primary information it has about its immediate neighbors.
The interface that leads to each directly connected network has a distance of 0.
The distance vector routing algorithm passes periodic copies of a routing table from router to
router.
These regular updates between routers communicate topology changes.
Distance vector routing protocols use hop count as the metric to determine the best path to a
destination network. Each hop represents a router along the path to the destination, and the
route with the fewest hops is considered the best route.
The distance vector routing algorithm is also known as the Bellman-Ford algorithm.
As the distance vector discovery process proceeds, routers discover the best path to destination
networks based on the information they receive from each neighbor.
01 Distance Vector Routing Protocol – RIPv1
RIPv1 is one of the oldest distance-vector routing protocols used in computer networks
It exchanges routing information between routers within the same autonomous system (AS).
RIP is a distance vector routing protocol that uses hop count as its metric.
Because hop count is the only routing metric used by RIP, it does not always select the fastest
path to a destination.
RIP Version 1 (RIPv1) requires that all devices in the network use the same subnet mask
(default), because it does not include subnet mask information in routing updates. This is also
known as classful routing.
02 Distance Vector Routing Protocol – RIPv2
RIP Version 2 (RIPv2) provides prefix routing, and does send subnet mask
information in routing updates. This is also known as classless routing.
With classless routing protocols, different subnets within the same network
can have different subnet masks.
The use of different subnet masks within the same network is referred to as
variable-length subnet masking (VLSM).
03 Distance Vector Routing Protocol – IGRP
IGRP (Interior Gateway Routing Protocol) is a distance-vector routing protocol developed by
Cisco.
IGRP was developed specifically to address problems associated with routing in large and
complex networks that were beyond the range of protocols such as RIP.
IGRP uses a composite metric to select the best and fastest available path to a destination
network path based on delay, bandwidth, load, and reliability.
IGRP also has a much higher maximum hop count limit than RIP, The maximum configurable
hop count of IGRP-routed packets is 255 (default 100).
Routing updates are broadcast every 90 seconds, by default.
IGRP uses only classful routing, meaning it does not include subnet mask information in its
routing updates. It assumes that all subnets within a classful network use the same subnet mask.
IGRP, like RIP version 1 (RIPv1), cannot support VLSM because it does not include subnet
mask information in its routing updates.
04 Distance Vector Routing Protocol – EIGRP
EIGR (Enhanced Interior Gateway Routing Protocol) is a distance-vector routing
protocol developed by Cisco.
EIGRP is a classless routing protocol which supports Variable Length Subnet Masking
(VLSM).
IGRP Routing Metric Components
Routing table for Router 1 Routing table for Router 2 Routing table for Router 3
N2 0 N3 0 N4 0
N3 1 N4 1 N2 1
N4 2 N1 1 N1 2
Distance Vector Routing – Initialization Tables Meanings for the routing table
To: Destination
A’s Table B’s Table Co: Cost (Metric)
To Co Ne To Co Ne Ne: Next Hop
Each router first identify
A 0 - A 5 B A 5 -
its neighbors in its
B 5 - B 0 - routing table.
C 2 - C 4 -
2 Each router will mention
D 3 - 4 D ∞ the cost to reach to each
E ∞ C 3 E 3 - other node.
A 3 - A 2 - E A ∞
B ∞ B 4 - B 3 -
C ∞ D C 0 - C 4 -
D 0 - D ∞ D ∞
E ∞ E 4 - E 0 -
Distance Vector Routing – Final Tables
A 0 - A 5 B A 5 -
B 5 - B 0 -
C 2 - C 4 -
D 3 - 2 4 D 8 A
E 6 C
C 3 E 3 - In distance vector routing,
each router shares its routing
3 table with its
immediate neighbors
D’s Table C’s Table 4 E’s Table periodically and when there is
To Co Ne To Co Ne To Co Ne a change.
A 3 - A 2 - E A 6 C
B 8 A B 4 - B 3 -
C 5 A C 0 - C 4 -
D
D 0 - D 5 A D 9 C
E 9 A E 4 - E 0 -
Link State Routing Protocol
Link-state routing protocols maintain a complete and detailed understanding of the entire
network topology. Each router has knowledge of all other routers in the network and the links
connecting them.
The distance vector algorithm has nonspecific information about distant networks and no
knowledge of distant routers. The link-state routing algorithm maintains full knowledge of
distant routers and how they interconnect.
Link-state routing protocols quickly detect changes in the network topology, such as link
failures or additions, and propagate this information throughout the network.
Link-state routing protocols support hierarchical network designs by dividing large networks
into areas or domains. Each area has its own link-state database and runs a separate SPF
algorithm.
The link-state algorithm is also known as Dijkstra's algorithm (Which is an algorithm used to
build the routing table) or as the shortest path first (SPF) algorithm.
Link State Routing Protocol (Cont.)
Link-state routing uses the following features:
• SPF Algorithm – Link state routing protocols use a Shortest Path First (SPF) algorithm, such
as Dijkstra's algorithm. This algorithm calculates the shortest path to each network
destination based on the network topology information provided by LSAs. The result is an
SPF tree or routing table, which contains a list of known paths and interfaces for reaching
each destination.
01 Link State Routing Protocol – OSPF
Open Short Path First (OSPF) is a link-state routing protocol developed by the
Internet Engineering Task Force (IETF) in 1988.
OSPF was written to address the needs of large, scalable internetworks that RIP
could not.
While EIGRP may be easier to configure, it only works on Cisco routers, OSPF does
not have that limitation.
OSPF uses the SPF (Shortest Path First) algorithm to quickly calculate the shortest
path and lowest cost to each destination based on the network topology information
provided by LSAs.
OSPF supports Variable Length Subnet Masking (VLSM).
02 Link State Routing Protocol – IS-IS
Intermediate System-to-Intermediate System (IS-IS) is a link-state routing protocol
used for routed protocols other than IP.
IS-IS is similar to OSPF, that maintains a detailed and up-to-date view of the network
topology by exchanging link-state information between routers.
IS-IS can run over multiple network layer protocols, including IPv4 and IPv6, making it
versatile and adaptable to different network environments.
2
C
4 A 5 B 2
C
4
3 3 3
3
4 4
E E
D 2 4 D
Each router
C 3 sees itself
System seen by E
3 as the root
4 A 5 B router.
System seen by D 2 4
C 3
3
A 5 B 4
A 5 B E
2 4
C 3 2 4
3 D
4 3
D 3
4
E
E
D
System seen
byCB
Example 1. Forming shortest path three for router A in a graph - OSPF
Topology
2 5
A B C 3 Root node
D E F 1
5 2 Node not in the path
0 2 ∞ Path
A B C
∞
Initialization G
D E F
3 ∞ ∞
Example 1. (Cont.)
0 2 7
A B C
∞
Iteration 1 G
D E F
3 6 ∞
0 2 7
A B C
∞
Iteration 2 G
D E F
3 6 ∞
0 2 7
A B C
∞
Iteration 3 G
D E F
3 6 8
Routing Table for Node A
Example 1. (Cont.)
Destination Cost Next
Router
A 0 -
Iteration 4 B 2 -
0 2 7 C 7 B
A B C
9 D 3 -
G E 6 B
D E F F 8 B
3 6 8 G 9 B
Iteration 5 Iteration 6
0 2 7 0 2 7
A B C A B C
9 9
G G
D E F D E F
3 6 8 3 6 8
Example 1. (Cont.) - Least-cost trees for each node
0 2 7 2 0 5
of this topology. A B C 3
A B C 8 A least-cost tree
G G Is a tree with the source
D E F D E F router as the root that
10 6 4 0 5 7 spans the whole graph
9 7 3 6 4 6 (visits all other nodes) and
A B C 0 A B C 3 in which the path between
G G the root and any other
D E F D E F node is the shortest.
8 3 1 5 0 2
8 6 4
Root of the tree
A B C 1
G Intermediate or end mode
3 4 4 G D ∞
D E F 1
E ∞
5 2 F 1
A 3 A ∞ A ∞ G 0
B ∞ B 4 B ∞
C ∞ C ∞ C 4
D 0 D 5 D ∞
E 5 E 0 E 2
F ∞ F 2 F 0
G ∞ G ∞ G 1
Example 1. (Cont.)
The Final Tree and Distance Vector for node A
0 2 7
A 0
A B C
9 B 2
G C 7
D E F D 3
3 6 8 E 6
F 8
G 9
Route Calculation: Based on hop counts and Based on the shortest path.
neighbor's information.
Static Routing Dynamic Routing
Host A Host b
R1 R2
R1
Network 1 Network 2