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

Routing Fundamentals and Protocols

Routing Fundamentals ACN unit no 2 notes

Uploaded by

saksham24097
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)
11 views21 pages

Routing Fundamentals and Protocols

Routing Fundamentals ACN unit no 2 notes

Uploaded by

saksham24097
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

Unit 2: Routing Fundamentals and

Protocols

Contents
1 Introduction to Routers 3
1.1 What is a Router? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Router vs Switch vs Hub . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Role of Routers in Networks . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Example: Router placement in Computer Lab . . . . . . . . . . . 4

2 Router Architecture 6
2.1 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 How Do Routers Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Routing Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Structure of a Routing Table . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Example of a Routing Table . . . . . . . . . . . . . . . . . . . . . 9
2.3.3 Example Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.4 Static vs. Dynamic Routing Tables . . . . . . . . . . . . . . . . . 10

3 Routing Protocols and Applications 12


3.1 Examples of Routing Protocols . . . . . . . . . . . . . . . . . . . . . . . 12

4 Routing Information Protocol (RIP) 13


4.1 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Key Features of RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Working Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.4 Illustrative Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Step-by-Step Routing Table Updates . . . . . . . . . . . . . . . . . . . . 15
4.6 Advantages and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.7 Variants of RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.8 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Open Shortest Path First (OSPF) 16


5.1 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Network Topology Example . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.3 Features of OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1
5.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

6 Enhanced Interior Gateway Routing Protocol (EIGRP) 18


6.1 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2 EIGRP Topology Example . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.3 EIGRP Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.4 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7 Border Gateway Protocol (BGP) 19


7.1 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.2 BGP Network Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.3 BGP Path Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.4 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

8 Comparative Summary of Routing Protocols 21


8.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8.2 Applications of Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2
1 Introduction to Routers
1.1 What is a Router?
A router is a specialized network device responsible for forwarding data packets between
different networks. Unlike switches or hubs that operate mainly within a single network
or LAN, routers connect multiple distinct networks, such as linking a home network to
the Internet or connecting corporate LANs across various locations. Routers perform
packet forwarding based on the destination IP address contained in each packet, making
decisions about the optimal path to send the data further towards its destination.
Fundamentally, routers operate at the Network Layer (Layer 3) of the OSI model,
enabling logical addressing and inter-network communication. They examine the packet’s
header to extract addressing information and consult their internal routing tables to
determine the next hop. Routers help establish an internetwork by managing the traffic
flow between different subnetworks, ensuring that packets take the most efficient route.
This role makes routers a critical component in modern networking, especially with the
expansion of the Internet and large-scale enterprise networks.
Furthermore, routers are equipped to handle packet fragmentation, error detection,
and sometimes security functions such as filtering traffic and implementing access con-
trol lists (ACLs). Their functionality is foundational in enabling the complex, dynamic
routing environment of today’s interconnected systems.

1.2 Router vs Switch vs Hub


Understanding the distinction between routers, switches, and hubs is essential for grasping
how networks function. While all three devices facilitate communication, they operate at
different layers of the OSI model and serve different purposes.
A hub is the simplest device and operates at the Physical Layer (Layer 1). It functions
as a repeater that broadcasts incoming signals to all connected devices without any
filtering or addressing. Due to this indiscriminate broadcasting, hubs can cause collisions
and degrade network performance, making them largely obsolete in modern networks.
A switch operates at the Data Link Layer (Layer 2). Unlike hubs, switches forward
frames only to the destination device by using MAC addresses. This selective forwarding
reduces unnecessary traffic and collisions, improving network efficiency. Switches are used
within LANs to create separate collision domains for each port.
A router, on the other hand, operates at the Network Layer (Layer 3) and is designed
to route packets between different networks. Routers use logical IP addresses and routing
protocols to determine the best path for forwarding packets. They connect dissimilar
networks and often provide additional features such as firewall functions, NAT (Network
Address Translation), and DHCP services.
Table 1 summarizes key differences among these three devices:

3
Table 1: Comparison of Hub, Switch, and Router

Sr. No. Parameter Hub Switch Router


1 OSI Layer Physical (Layer 1) Data Link (Layer 2) Network (Layer 3)
2 Addressing None (broadcast) MAC Address IP Address
3 Traffic Handling Broadcasts all frames Forwards frames selectively Routes packets between networks
4 Collision Domains Single domain Separate per port Separate per interface
5 Broadcast Domains Single domain Single domain Multiple (segmentation)
6 Intelligence None Low (MAC learning) High (Routing algorithms)
7 Security Features None Basic (VLANs) Advanced (ACLs, NAT, Firewall)
8 Typical Usage Legacy, small networks LANs WANs, Internetworks

This comparison illustrates the increasing complexity and functionality from hub to
router, aligning with their roles in network infrastructure.

1.3 Role of Routers in Networks


Routers serve as the primary devices that facilitate communication between different
networks. In a typical network environment, data generated by an end device (such as a
computer or smartphone) must often traverse multiple networks before reaching its final
destination. Routers ensure that data packets are directed appropriately at each network
boundary, functioning much like a traffic cop at busy intersections of a city’s road system.
Their role goes beyond simple forwarding; routers maintain routing tables that contain
information about network topology and available paths. This information allows routers
to select the best route for each packet based on various metrics such as hop count,
bandwidth, delay, or policy constraints. The ability to dynamically determine routes
enables efficient use of network resources and supports fault tolerance in case of link
failures.
Additionally, routers contribute to network segmentation and security by isolating
broadcast domains and applying policies that control the flow of traffic. In enterprise
environments, routers also support VPNs (Virtual Private Networks) and QoS (Quality
of Service) mechanisms, providing optimized and secure network connectivity. This mul-
tifaceted role underscores routers as vital infrastructure elements in the architecture of
modern communication networks.

1.3.1 Example: Router placement in Computer Lab


Figure.1 illustrates the placement and role of a Router within a computer lab network
environment. It shows how different devices and network segments are interconnected to
provide both internal communication and Internet access.

Internet The cloud symbol represents the global Internet network providing exter-
nal connectivity. The connection is labeled ISP Link, indicating the Internet Service
Provider’s connection to the local network.

ISP Modem The ISP modem acts as the interface between the local network and the
ISP. It performs functions such as signal modulation and demodulation and acts as a
gateway to the Internet. It connects directly to the Internet via the ISP Link and to the
Router through the WAN Port.

4
Internet

ISP Link

ISP Modem

WAN Port
File Server PC
LAN Port
Router Lab-1 Switch

Printer
PC 1 PC 2

Figure 1: Router in a Computer Lab Network

Router The Router is the central device managing data traffic between the Internet,
internal devices, and local networks. The WAN Port connects to the ISP modem for
external Internet access, while the LAN Port connects to the Lab-1 Switch, linking the
local computers. Additionally, it is directly connected to other devices such as a File
Server PC and a Printer, which are shared resources accessible by lab users. The Router’s
key functions include routing packets between the Internet and local devices, managing
IP addresses, and directing traffic efficiently.

Lab-1 Switch The Lab-1 Switch connects multiple devices within the computer lab
segment. It acts as a network bridge allowing PCs to communicate locally within the lab.
The Switch receives data from the Router’s LAN port and distributes it to the connected
PCs, providing efficient handling of local network traffic.

PC 1 and PC 2 These are individual computers used by students or lab users. They
are connected to the Lab-1 Switch for local network communication and Internet access.
They rely on the Router to manage external connectivity and routing.

Network Traffic Flow Inbound data from the Internet travels through the ISP Link,
ISP Modem, and Router’s WAN Port before being routed via the LAN Port to the Lab-1
Switch, which distributes it to the PCs. Outbound traffic from the PCs follows the reverse
path. Local traffic between PCs is handled directly by the switch without involving the
Router, improving efficiency. The File Server PC and Printer are connected directly to
the Router, allowing access by lab PCs and external users if necessary.
In summary, this network setup enables multiple devices within a computer lab to
share Internet access and resources such as file servers and printers, while facilitating
efficient internal communication. The Router plays a critical role in managing traffic
between internal networks and the external Internet, while the Switch handles local traffic

5
within the lab.

2 Router Architecture

Data Plane

Input Ports Switching Fabric Output Ports


Signal Reception, Header Check Data Transfer Path Queuing, Scheduling

Routing Processor
Routing Decisions

Control Plane

Figure 2: Router Architecture

A router is a device that directs data packets between different networks. To under-
stand how it works, we divide its functions into two main parts: the Control Plane and
the Data Plane.

Data Plane: This is the part of the router that actually moves packets from one place
to another. It includes three main components:

ˆ Input Ports: These are like the doors where packets enter the router. They check
the packet headers to make sure the data is intact and ready to be processed.

ˆ Switching Fabric: Think of this as the router’s internal highway. It carries packets
from the input ports to the correct output ports as quickly as possible.

ˆ Output Ports: These are the exit doors where packets leave the router. They
manage packet order and timing, making sure data flows smoothly.

Example: Imagine a post office sorting mail. The input ports are where mail arrives,
the switching fabric is the conveyor belt moving mail to different sorting bins, and the
output ports are the bins where mail is grouped for delivery.

Control Plane: This is the “brain” of the router. It makes decisions about the best
path for each packet by running routing protocols and updating the routing tables. The
key component here is the Routing Processor.
Example: In the post office analogy, the control plane is like the supervisor who decides
which route each letter should take based on the destination address and available delivery
routes.

6
How They Work Together: The control plane figures out the best routes and updates
the routing table. The data plane then uses this information to quickly forward packets
without having to decide the route each time. This separation allows routers to handle
large amounts of data efficiently.
The coordination of these components enables the router to process and forward
packets efficiently, even at very high data rates. The routing processor also communicates
with network administrators for configuration and monitoring.

2.1 Routing
2.1.1 Definition
Routing is the fundamental process by which routers determine the path that data packets
take from a source to a destination across interconnected networks. This process involves
two major functions: path determination (finding the best route) and packet forwarding
(sending the packet along that route).
Routing enables devices in different physical or logical networks to communicate as
if they were part of the same network, by relaying packets through intermediate routers.
It plays a crucial role in internetwork communication, including the global Internet.
The complexity of routing depends on network size and topology. Small networks
may use fixed paths, whereas large and dynamic networks require routers to adapt routes
based on current network conditions such as congestion or failures.

2.2 How Do Routers Work?


Routers play a key role in directing data packets between different networks. To under-
stand how routers work, let’s break down the process step-by-step:

ˆ Receiving Data Packets When a device (like your computer or smartphone) sends
data over a network, the data is divided into smaller units called packets. Each
packet contains several important pieces of information:

– Source IP address: The address of the device sending the data.


– Destination IP address: The address of the device receiving the data.
– Payload : The actual data being sent.
– Other header information: Includes details for routing and error-checking.

These packets travel from the source device to the first router in the network.

ˆ Examining the Destination Address Once the router receives a packet, it looks at
the destination IP address in the packet header. This tells the router where the
packet is supposed to go.

ˆ Consulting the Routing Table The router uses a routing table, which is like a map
of network paths, to decide the best next step for the packet. The routing table
contains:

– Information about directly connected networks.


– Routes learned from other routers.

7
– Metrics such as the cost or distance of each route.

Using this information, the router determines the most efficient path toward the
packet’s destination.

ˆ Making a Routing Decision Based on the routing table and routing algorithms, the
router chooses the best next hop for the packet. This could be:

– A local device on the same network.


– Another router on a different network.
– The final destination device, if it is directly connected.

Routing algorithms, such as Distance Vector or Link State protocols, help the router
make these decisions intelligently by calculating the shortest or fastest path.

ˆ Forwarding the Packet After deciding the next hop, the router forwards the packet
out through the appropriate interface (network connection) towards the next router
or device.

ˆ Handling Special Cases Routers also handle special tasks such as:

– Fragmentation: Breaking down large packets into smaller pieces if the next
network supports smaller packet sizes.
– Network Address Translation (NAT): Changing private IP addresses to
a public IP address when sending packets to the internet.
– Firewall Rules: Filtering packets to block unauthorized access or harmful
traffic.

ˆ Reaching the Destination This process repeats as packets hop from router to router
across different networks until they finally reach the destination device. The receiv-
ing device then reassembles the packets into the original data.

Source Device(Sender) Packet Creation(Add IP headers) Router

Consult Routing Table Select Best Path Forward Packet Next Routeror Destination

Figure 3: Router processing steps

2.3 Routing Table


Routing tables are fundamental data structures maintained by routers to determine the
optimal path for forwarding packets. Each router uses its routing table to decide the next
hop for packets destined to different networks. A routing table can be built manually
through static configuration or dynamically via routing protocols such as RIP, OSPF, or
BGP.

8
2.3.1 Structure of a Routing Table
A routing table consists of multiple entries, each corresponding to a destination network
or subnet. Each entry typically contains the following fields:

ˆ Destination Network: Specifies the network address or subnet that the route
covers. For example, [Link]/24.

ˆ Next Hop: Indicates the IP address of the next router to which packets should be
sent.

ˆ Interface: Denotes the outgoing interface (e.g., GigabitEthernet0/1) used to


forward the packet.

ˆ Metric: Represents a cost value associated with the route (e.g., hop count, delay,
bandwidth). Lower metric values indicate more preferred routes.

ˆ Route Source: Identifies how the route was learned (e.g., static, OSPF, BGP,
connected).

2.3.2 Example of a Routing Table


Table 2 illustrates an example routing table from a router in a small network.

Table 2: Example of a Routing Table

Destination Network Next Hop Interface Metric Source


[Link]/24 [Link] GigabitEthernet0/0 1 Static
[Link]/24 [Link] GigabitEthernet0/1 2 OSPF
[Link]/8 [Link] GigabitEthernet0/2 3 BGP
[Link]/16 Directly Connected GigabitEthernet0/3 0 Connected
[Link]/0 [Link] GigabitEthernet0/0 5 Default

2.3.3 Example Scenario


Consider a packet arriving at a router with destination IP address [Link]. The
router performs the following steps:

1. Extracts the destination IP address from the packet header.

2. Searches the routing table for the longest prefix match — in this case, [Link]/24.

3. Determines that the next hop for this network is [Link].

4. Forwards the packet out of the GigabitEthernet0/1 interface toward the next
router.

This process is called IP forwarding or route lookup. The router repeats this for
every incoming packet, ensuring efficient delivery to the correct destination.

9
2.3.4 Static vs. Dynamic Routing Tables
Routing tables can be maintained using two primary methods:
ˆ Static Routing: Routes are manually configured by network administrators. They
are suitable for small or stable networks but require manual updates if the network
topology changes.
ˆ Dynamic Routing: Routes are automatically updated through routing protocols
such as RIP (distance vector), OSPF (link state), and BGP (path vector). This
approach enables routers to adapt to topology changes and maintain efficient routes
automatically.

Routing Algorithms
Routing algorithms are techniques used in computer networks to determine the best path
for data packets to travel from a source to a destination across interconnected networks.
Their main goal is to find an optimal route based on criteria like shortest distance, lowest
cost, or minimum delay.
Routing algorithms operate within routers or network devices to ensure efficient data
transmission, improve network performance, and avoid congestion or failures. These
algorithms form the basis of routing protocols.

Primary Concepts
ˆ Path: The route or sequence of nodes through which data packets pass.
ˆ Metric: A value used to evaluate the best path (e.g., distance, cost, delay).
ˆ Convergence: The state when all routers have consistent routing information.
ˆ Dynamic Routing: Algorithms that adjust routes automatically as the network
changes.
ˆ Static Routing: Manually configured routes that remain fixed unless updated.

Types of Routing Algorithms


Routing algorithms are broadly classified into:

1. Static Routing
Routes are manually set by network administrators and do not change automatically.
Suitable for small or simple networks.

2. Dynamic Routing
Routes are determined automatically based on current network conditions. Dynamic
routing algorithms exchange routing information and adapt to changes.
Dynamic routing can be further divided into:

10
a) Distance Vector Routing
ˆ Routers maintain a table of distances to all destinations.

ˆ Share their tables with immediate neighbors periodically.

ˆ Choose routes based on the smallest distance metric.

ˆ Example protocols: RIP (Routing Information Protocol).

ˆ Advantages: Simple implementation.

ˆ Disadvantages: Slow convergence and possible routing loops.

b) Link State Routing


ˆ Routers maintain a complete network map (topology).

ˆ Share link state information with all routers in the network.

ˆ Use algorithms like Dijkstra’s shortest path algorithm to compute routes.

ˆ Example protocols: OSPF (Open Shortest Path First).

ˆ Advantages: Fast convergence, reliable routing.

ˆ Disadvantages: Higher memory and processing requirements.

c) Path Vector Routing


ˆ Maintains the full path information to avoid routing loops.

ˆ Used for routing between autonomous systems (inter-domain).

ˆ Example protocol : BGP (Border Gateway Protocol).

ˆ Advantages: Scalable and loop-free routing.

ˆ Disadvantages: Complex and slower updates.

Other Types of Routing Algorithms


Besides the primary types, there are additional routing methods worth mentioning:

a) Flooding
ˆ Each incoming packet is sent through all outgoing links except the one it arrived
on.

ˆ Simple but leads to high redundancy and network congestion.

11
b) Hierarchical Routing
ˆ The network is divided into regions or levels.

ˆ Routing decisions are made hierarchically to reduce routing table size and complex-
ity.

c) Hybrid Routing
ˆ Combines features of both distance vector and link state routing.

ˆ Examples include protocols like EIGRP (Enhanced Interior Gateway Routing Pro-
tocol).

Summary Table
Type Key Feature Example Pro- Advantages Disadvantages
tocol
Static Rout- Manually config- N/A Simple, low No adaptability
ing ured routes overhead
Distance Vec- Shares distance RIP Simple, easy to Slow convergence,
tor info with neigh- implement routing loops
bors
Link State Shares link state OSPF Fast conver- High memory and
info with all gence, reliable CPU usage
routers
Path Vector Shares full path BGP Scalable, loop- Complex, slower
info to avoid free routing updates
loops
Flooding Sends packets N/A Simple, guaran- High redundancy,
on all outgoing teed delivery congestion
links
Hierarchical Divides network N/A Scalable, re- Complex setup
into regions duces routing
table size
Hybrid Combines dis- EIGRP Efficient and More complex
tance vector and scalable
link state

3 Routing Protocols and Applications


3.1 Examples of Routing Protocols
Routing protocols are algorithms used by routers to dynamically discover network desti-
nations and determine the best path to forward packets. They ensure efficient, loop-free
routing in complex networks.
Routing protocols can be broadly categorized as:

ˆ Distance Vector Protocols

12
ˆ Link State Protocols

ˆ Hybrid Protocols

This document covers four key routing protocols:

ˆ Routing Information Protocol (RIP)

ˆ Open Shortest Path First (OSPF)

ˆ Border Gateway Protocol (BGP)

ˆ Enhanced Interior Gateway Routing Protocol (EIGRP)

4 Routing Information Protocol (RIP)


Routing Information Protocol (RIP) is one of the earliest and simplest distance vector
routing protocols. It operates at the network layer of the OSI model and uses the
hop count as a routing metric to determine the shortest path between the source and
destination networks.

4.1 Working Principle


RIP works on the concept of the Bellman-Ford algorithm. Each router maintains a
routing table that contains:

ˆ Destination Network

ˆ Next Hop (Neighbor Router)

ˆ Distance Metric (in hop count)

The maximum hop count allowed in RIP is 15 hops. Any route with more than 15
hops is considered unreachable, which limits RIP to small or medium-sized networks.
RIP routers periodically exchange their entire routing tables with neighboring routers
every 30 seconds. This helps all routers update their knowledge of the network topology.

4.2 Key Features of RIP


ˆ Type: Distance Vector Protocol

ˆ Routing Metric: Hop Count

ˆ Maximum Hop Count: 15

ˆ Update Interval: 30 seconds

ˆ Transport Protocol: UDP (Port 520)

ˆ Algorithm Used: Bellman-Ford

13
4.3 Working Steps
RIP performs route discovery and maintenance through the following steps:

1. Each router initializes its routing table with directly connected networks (hop count
= 0).
2. Every 30 seconds, routers broadcast their routing table to all neighboring routers.
3. Upon receiving a neighbor’s table, a router:
ˆ Adds 1 to the hop count of all received routes.
ˆ Compares these new routes with existing entries.
ˆ Updates its routing table if a shorter path is found.

4. This process continues until all routers have consistent routing tables.
5. If a route becomes unreachable, it is marked with hop count 16 (infinity).

4.4 Illustrative Example


Consider a small network shown in Figure 4 with four routers connected as follows:

Net A Net C

R1 R2 R3

R4

Net D

Figure 4: Example Network Topology for RIP

Explanation:
ˆ R1 is directly connected to Network A.

ˆ R3 is directly connected to Network C.

ˆ R4 is directly connected to Network D.

ˆ R2 is the central router connected to R1, R3, and R4.

14
4.5 Step-by-Step Routing Table Updates
Step 1: Initial State
Each router knows only its directly connected network.

Table 3: Initial Routing Table (R1)

Destination Next Hop Hop Count


Net A Direct 0

Similarly, R2 knows R1, R3, and R4; R3 knows Net C; R4 knows Net D.
Step 2: Exchange of Routing Tables
R1 sends its routing table to R2. R2 updates its table:
ˆ R2 learns about Net A via R1 with a hop count of 1.
R3 and R4 similarly send updates to R2, and R2 learns about Net C and Net D.
Step 3: Propagation
R2 now advertises its updated table to R1, R3, and R4.
ˆ R1 learns about Net C and Net D via R2 (2 hops).
ˆ R3 learns about Net A and Net D via R2 (2 hops).
ˆ R4 learns about Net A and Net C via R2 (2 hops).
Final Converged Table (Example for R1):

Table 4: Final Routing Table at R1 after Convergence

Destination Next Hop Hop Count


Net A Direct 0
Net C R2 2
Net D R2 2

All routers eventually converge with complete routing knowledge of the network.

4.6 Advantages and Limitations


Advantages:
ˆ Simple to configure and manage.
ˆ Suitable for small networks.
ˆ Automatically updates routes without manual intervention.
Limitations:
ˆ Maximum hop count of 15 limits network scalability.
ˆ Slow convergence due to periodic updates.
ˆ Prone to routing loops and count-to-infinity problems.
ˆ Inefficient for large or dynamic topologies.

15
4.7 Variants of RIP
ˆ RIP v1: Classful protocol (does not support subnet masks).

ˆ RIP v2: Classless protocol (supports CIDR and authentication).

ˆ RIPng: Extension of RIP for IPv6 networks.

4.8 Applications
RIP is primarily used in:

ˆ Small enterprise networks with limited routers.

ˆ Educational and training setups for understanding distance vector routing.

ˆ Early-stage LAN or departmental networks where simplicity is more important than


scalability.

4.9 Summary
RIP provides a foundational understanding of how routing protocols exchange information
dynamically. Although it has been largely replaced by more advanced protocols such as
OSPF and EIGRP, it remains a key educational tool for understanding distance vector
routing concepts.

5 Open Shortest Path First (OSPF)


Open Shortest Path First (OSPF) is a link-state routing protocol that dynamically
discovers network topology using the Dijkstra shortest path algorithm. It is designed
for large and hierarchical networks and supports variable-length subnet masks (VLSM)
and Classless Inter-Domain Routing (CIDR).

5.1 Working Principle


Unlike distance vector protocols (e.g., RIP), OSPF routers maintain a complete map of
the network. Each router:

1. Collects information about its directly connected links and neighbors.

2. Generates Link State Advertisements (LSAs) describing its connections.

3. Floods LSAs to all other routers in the area.

4. Uses the Dijkstra Algorithm to calculate the shortest path to every destination.

OSPF organizes routers into areas, reducing routing overhead. The backbone area
(Area 0) connects all other areas.

16
5.2 Network Topology Example

Area 0

R1 R2 R3

R4

Area 1

Figure 5: Example OSPF Network with Two Areas

Explanation: Routers R1, R2, and R3 belong to the backbone (Area 0), while R4
belongs to Area 1. R2 acts as an Area Border Router (ABR) connecting both areas.

5.3 Features of OSPF


ˆ Uses Dijkstra’s shortest path algorithm.

ˆ Supports hierarchical design through areas.

ˆ Uses cost (bandwidth) as the routing metric.

ˆ Fast convergence due to LSA flooding.

ˆ Supports authentication and CIDR.

5.4 Advantages
ˆ Efficient for large and complex networks.

ˆ Rapid convergence.

ˆ No routing loops.

ˆ Load balancing supported.

17
5.5 Limitations
ˆ More complex configuration than RIP.

ˆ High memory and CPU usage.

5.6 Applications
ˆ Used in large enterprise and service provider networks.

ˆ Common in campus and multi-area topologies.

6 Enhanced Interior Gateway Routing Protocol (EIGRP)


Enhanced Interior Gateway Routing Protocol (EIGRP) is a hybrid routing protocol
developed by Cisco. It combines the features of both distance vector and link-state
protocols and uses the DUAL (Diffusing Update Algorithm) for loop-free and fast
convergence routing.

6.1 Working Principle


EIGRP maintains three tables:

1. Neighbor Table: Tracks directly connected routers.

2. Topology Table: Stores all learned routes with metrics.

3. Routing Table: Contains the best paths selected from the topology table.

EIGRP shares only partial updates when changes occur, making it bandwidth-efficient.

6.2 EIGRP Topology Example

R1 R2

R3

R4

Figure 6: Example EIGRP Network Topology

Explanation: Each router shares its topology and neighbor information using EIGRP
packets. The DUAL algorithm ensures loop-free and efficient path calculation.

18
6.3 EIGRP Metrics
EIGRP uses a composite metric that includes:

Metric = f (Bandwidth, Delay, Reliability, Load)

where bandwidth and delay are primary factors.

6.4 Advantages
ˆ Faster convergence than RIP and OSPF.

ˆ Supports VLSM and CIDR.

ˆ Uses incremental updates.

ˆ Loop-free routing through DUAL.

6.5 Limitations
ˆ Proprietary to Cisco (though later partially open).

ˆ More complex metric calculation.

6.6 Applications
ˆ Used in Cisco-based enterprise networks.

ˆ Ideal for medium to large organizations requiring high stability.

7 Border Gateway Protocol (BGP)


Border Gateway Protocol (BGP) is the path vector routing protocol used to exchange
routing information between different Autonomous Systems (AS) on the Internet. It
is the protocol that literally powers the global Internet.

7.1 Working Principle


Each BGP router (known as a BGP Speaker) maintains a table of networks and the
paths to reach them. BGP does not rely on simple metrics like hop count or bandwidth;
instead, it uses policy-based routing based on attributes such as AS path, next hop,
and local preference.

1. Routers within the same AS use iBGP (Internal BGP).

2. Routers between different ASes use eBGP (External BGP).

3. BGP routers exchange reachability information rather than full topology.

19
7.2 BGP Network Example

AS 100 AS 200

eBGP Session
R1 R2 R3 R4

Figure 7: Example BGP Communication Between Two Autonomous Systems

Explanation:

ˆ Routers R1 and R2 exchange routes within AS 100 using iBGP.

ˆ Routers R3 and R4 exchange routes within AS 200 using iBGP.

ˆ R2 and R3 communicate using eBGP to exchange inter-domain routes.

7.3 BGP Path Attributes


Common BGP attributes include:

ˆ AS Path: Sequence of AS numbers a route passes through.

ˆ Next Hop: IP address of the next router.

ˆ Local Preference: Used to choose the preferred exit point from an AS.

ˆ MED (Multi-Exit Discriminator): Suggests preferred entry point into an AS.

7.4 Advantages
ˆ Scalable and reliable for inter-domain routing.

ˆ Policy-based route control.

ˆ Supports multiple routing policies and redundancy.

7.5 Limitations
ˆ Slow convergence compared to OSPF or EIGRP.

ˆ Complex configuration and maintenance.

7.6 Applications
ˆ Used by ISPs and Internet backbone providers.

ˆ Interconnecting large enterprise networks to the Internet.

20
8 Comparative Summary of Routing Protocols

Table 5: Comparison of RIP, OSPF, EIGRP, and BGP

Feature RIP OSPF EIGRP BGP


Type Distance Vector Link State Hybrid Path Vector
Algorithm Bellman-Ford Dijkstra DUAL Policy-based
Metric Hop Count Cost (Bandwidth) Composite Metric Path Attributes
Convergence Slow Fast Very Fast Moderate
Scalability Low High Medium-High Very High
Protocol Type IGP IGP IGP EGP
Use Case Small LANs Enterprise LANs Cisco Networks Internet Backbone

8.1 Summary
RIP, OSPF, EIGRP, and BGP represent the evolutionary stages of routing protocols.

ˆ RIP introduced simplicity and basic route discovery.

ˆ OSPF brought scalability and structure through link-state design.

ˆ EIGRP combined rapid convergence with intelligent metrics.

ˆ BGP enables global Internet routing through policy-based control.

Together, these protocols form the backbone of modern computer networks and the
Internet.

8.2 Applications of Routing


Routing protocols and routers enable a wide range of applications:

ˆ Internet Backbone: Facilitating packet delivery across the global Internet.

ˆ Enterprise Networks: Interconnecting multiple branches and data centers.

ˆ Wireless Networks: Supporting mobile users and dynamic topologies.

ˆ Traffic Engineering: Managing network resources for performance optimization.

21

You might also like