Unit 2 Routing - Protocols
Unit 2 Routing - Protocols
BY
Deepak W. Chinchkhede
B. E. (CSE), M. E. (CSE - I.T.)
Topic
Course Outcome :
Analyze the packet structure of IPv4 and IPv6.
Configure Static and Dynamic Routing Protocols Using Simulators.
Illustrate functions of Transport layer protocols.
Implement Application layer protocols on a network.
Work with various Wireless Networking Technologies.
Unit Outcome:
Student will understand routing architecture, table, Queueing &switching, routing protocol, types, shairing, update, inter
domain routing, Border Gateway protocols. Types of protocol, ICMP, types of messages, format, error reporting message.
Unit 2 Routing Protocols (10 hrs /16)
Content
1 Explain the Mechanism of routing.
2 Differentiate – Intra and Inter domain routing.
3 Explain message structure of ICMP
Unit 2 Routing Protocols (10 hrs /16)
Mechanism of routing
• A routing protocol mechanism involves routers exchanging information to determine the best
paths for data packets to travel across a network.
• It is a set of rules that govern how routers communicate and update their routing tables, which
are used to forward data.
• It ensures data reaches its destination efficiently and reliably, even as network conditions
change.
• A routing protocol is a set of rules and algorithms that enable routers to communicate,
exchange network information, and determine the most efficient paths for data packets to
travel across a network.
• These protocols allow routers to automatically discover network topology, adapt to changes,
and make dynamic forwarding decisions, ensuring reliable and optimized data delivery
without manual configuration.
Unit 2 Routing Protocols (10 hrs /16)
Mechanism of routing
They are categorized into interior gateway protocols (IGPs) for intra-network routing and
exterior gateway protocols (EGPs) for inter-network routing.
1. Route Discovery: Routers learn about network destinations by communicating with
neighboring routers and sharing routing information.
2. Path Selection: Routers use a routing metric (like hop count or bandwidth) and a routing algorithm to
calculate the best path for data packets to reach their destination.
3. Dynamic Adaptation: Routing protocols allow networks to be fault tolerant and highly
available by dynamically rerouting traffic around failed links or components.
4. Routing Table Maintenance: The best routes are stored in the router's routing table
, which is constantly updated with new information received through the protocol.
Unit 2 Routing Protocols (10 hrs /16)
Mechanism of routing
5. Information Exchange:
• Routers use routing protocols to share information about network topology and available paths with their
neighbors.
• This information exchange can happen periodically or when changes occur in the network.
6. Building Routing Tables:
• Based on the exchanged information, routers update their routing tables, which contain information about
known networks and the best paths to reach them.
• Routing tables are used to make forwarding decisions when data packets arrive.
7. Forwarding Data Packets:
• When a router receives a data packet, it consults its routing table to determine the next hop (the next router in
the path).
• The packet is then forwarded to the designated next hop, continuing this process until the packet reaches its
final destination.
Unit 2 Routing Protocols (10 hrs /16)
Mechanism of routing
8. Dynamic Adaptation:
• Routing protocols allow networks to adapt to changes, such as a link failure or
a new network being added.
• When changes occur, routers update their routing tables to reflect the new
network topology, ensuring that traffic is rerouted around affected areas.
9. Different Types of Routing Protocols:
Distance Vector:
• These protocols, like Routing Information Protocol (RIP), determine the best
path based on the number of hops (routers) a packet needs to travel.
Link State:
• Open Shortest Path First (OSPF) protocols, maintain a more detailed map of
the entire network topology, allowing for more intelligent path selection.
Routing protocols Design
Hybrid Protocols:
• These protocols combine elements of both distance vector and link state
protocols.
Routing protocols are the foundation for how data finds its way through complex
networks, ensuring reliable and efficient communication.
Unit 2 Routing Protocols (10 hrs /16)
Routing Table:
Types of routing:
• Static routing: Entries are manually configured and do not change
dynamically.
• Dynamic routing: Entries are updated automatically by routing protocols
(like RIP, OSPF) based on network conditions.
• Default routing – It is a fundamental networking concept where a router
forwards packets to a "last resort" gateway when there is no specific route for
a packet's destination IP address in its routing table
How it works ?
1. A router receives a data packet.
2. The router examines the destination IP address of the packet.
3. The router consults its routing table to find a matching route for the
destination.
4. If a match is found, the router forwards the packet to the next-hop address
associated with that route.
5. This process repeats hop by hop until the packet reaches its final
Unit 2 Routing Protocols (10 hrs /16)
Routing Protocol
Unit 2 Routing Protocols (10 hrs /16)
Routing Table:
• The process of choosing a path across one or more networks is known as Network Routing.
Nowadays, individuals are more connected on the internet and hence, the need to use Routing
Communication is essential.
• Routing chooses the routes along which Internet Protocol (IP) packets get from their source to
their destination in packet-switching networks. Need to understand of the Routing Process
along with its different types and working principles.
• Routers are pieces of N/w H/w that make these judgments about Internet routing. It is a
networking device that forwards data packets between computer networks.
• It helps to direct traffic based on the destination IP address. It ensures that data reaches its
destination.
• Router connects different N/ws, it manages data traffic between them. The Router operates at
Layer 3 (the network layer) of the OSI Model.
• It is also responsible for determining the best path for data to travel from one N/w to another.
Unit 2 Routing Protocols (10 hrs /16)
Routing Table:
• Routing refers to the process of directing a data packet from one node to another.
• It is an autonomous process handled by the network devices to direct a data packet to its
intended destination. Note that, the node here refers to a network device called - 'Router’.
• Routing is a crucial mechanism that transmits data from one location to another across a
network (LAN, WAN, or MAN).
• Process of routing involves making various routing decisions to ensure reliable & efficient
delivery of the data packet by finding the shortest path using various routing metrics which
we will be discussing in this article.
• Routing of a data packet is done by analyzing the destination IP Address of the packet. Look
at the below image:
Unit 2 Routing Protocols (10 hrs /16)
Router Architecture
Router architecture describes the internal design and organizational structure of a router,
encompassing its key components like input ports, a switching fabric, output ports, and
a routing processor, which collectively enable the device to receive, process, and
forward network packets along the most efficient paths to their destinations.
It also involves the functional separation into control, data, and management planes,
which handle routing logic, packet forwarding, and system configuration, respectively.
The Architecture of a Router. The input port can perform the physical layer operation of
terminating an incoming physical link to a router.
It carries out the data link layer functionality required to communicate with the data link
layer functionality on the opposite side of the incoming link.
Unit 2 Routing Protocols (10 hrs /16)
Router Architecture
Given below is a diagram that explains the architecture of a router in a computer network:
Unit 2 Routing Protocols (10 hrs /16)
Uses of a Router
• To ensure that data is flowing to the right destination, users send the emails to the correct recipient.
• Routers defend against unwanted data, such as when an enormous file is delivered to each workstation
on the network, and also increase network performance.
• Router in networking acts as a buffer between the modem and the network and allows software
protection to reduce the danger of viruses and other malware.
• To share information with other routers connected to the network.
• Routers perform the primary role of segregating the internet network from an internal network in the
residential area or business.
• Dynamic host configuration protocol (DHCP) allows the IP addresses of each computer that is joined
to the network. Most routers are enabled with DHCP protocol over the internet that is utilized for
small home and office networks.
• Routers give protection from intruders and malicious users via the internal networks and are identified
through the internet along with firewall firmware and software.
• Routers help many users to share resources like faxes, scanners, printers, and file folders on the discs
located remotely.
Unit 2 Routing Protocols (10 hrs /16)
The following are several variables that contribute to the successful operation of a router:
Input Port
• The input port can perform the physical layer operation of terminating an incoming physical link to a router. It
carries out the data link layer functionality required to communicate with the data link layer functionality on the
opposite side of the incoming link.
• The input port also conducts a lookup and forwarding function, ensuring that a datagram forwarded into the
router’s switching fabric arrives at the correct output port.
Output Port
• The output port stores packets from the switching fabric and sends them to the incoming link by executing link-
layer and physical-layer functions.
• As a result, the output port serves the same reverse data link and physical layer functions as the input port.
Switching Fabric
• It is a mix of hardware and software that sends data from a network node to the next node in the network via the
correct port.
Routing Processor
• Routing processors carry out routing protocols. It stores routing information as well as forwarding tables. It also
Unit 2 Routing Protocols (10 hrs /16)
Input Port
Edge Routers
• The most common forms of Edge Routers are low-capacity routers located at the network’s
peripherals. An edge router connects the internal network to the external networks and can send
data packets across networks. They employ the Border Gateway Protocol (BGP) for
connectivity. There are two types of edge routers: label edge routers and subscriber edge
routers.
Unit 2 Routing Protocols (10 hrs /16)
Broadband Router : A broadband router is a N/w H/w device that allows multiple
devices to share a single high-speed internet connection, acting as a central hub to manage
data flow and assign IP addresses to devices on a local network (LAN).
It connects to a modem, which provides the internet service from an Internet Service Provider
(ISP), and then distributes that connection to other computers, smartphones, and other
gadgets, often providing security features like a firewall.
Internet Connection Sharing: Takes a single broadband internet connection from the
modem and shares it with multiple devices on a local network.
Network Traffic Management: Directs "data packets" to their correct destinations within the
local N/w and to the internet, using routing tables to find the most efficient paths.
IP Address Assignment: Assigns a unique IP address to each connected device using
DHCP (Dynamic Host Configuration Protocol), ensuring that data is sent to the right device.
Security: Provides basic security features, such as a H/w firewall, to inspect incoming traffic
and block potential threats or unauthorized access attempts.
Unit 2 Routing Protocols (10 hrs /16)
Broadband Router :
1. Connection to Modem: Router connects to the modem, which in turn connects to the ISP.
2. Data Packet Routing: When a device on the network wants to send data, the router reads the
data packet's destination.
3. Path Determination: Using its internal routing table, the router determines the best path for
the data packet to reach its destination.
4. Forwarding: The router then forwards the data packet to the next network device or the
correct segment of the internet.
Types of Broadband Routers:
Wireless Routers: Include a built-in wireless access point to create Wi-Fi networks for devices
to connect wirelessly.
Wired Routers:Connect multiple devices using Ethernet cables, distributing the data from the
modem to wired devices.
Unit 2 Routing Protocols (10 hrs /16)
Routing Protocol
Unit 2 Routing Protocols (10 hrs /16)
Routing Protocol
Unit 2 Routing Protocols (10 hrs /16)
Core Router
Core routers are powerful, high-speed, and high-
capacity network devices positioned at the heart of
a network's backbone to efficiently route data
packets between different internal network
segments and other core networks, rather than
connecting directly to end-user devices.
They are designed to handle massive data loads,
ensuring high-speed transmission and preventing
network bottlenecks.
Function:
Their primary role is to quickly forward data
packets across the network or the internet,
interconnecting various communication networks.
Unit 2 Routing Protocols (10 hrs /16)
Edge Router
An edge router is a networking device located at the
boundary of a network, serving as the gateway that
connects an internal network (like a home or
business) to an external network, such as the
Internet or a Wide Area Network (WAN).
https://www.google.com/search?
q=video+on+Routing+Protocol+Queueing+and+Switching&sca_esv=db574b12b5cc4f7e&sxsrf=AE3TifOUWnZKR9b
FHRhXoI-Jz2C592FN1A%3A1753718191499&source=hp&ei=r52HaOmPHKv04-
EPzLvRmQQ&iflsig=AOw8s4IAAAAAaIerv1pNeqwhGR03xUyDTddU_J7QwMW-&ved=0ahUKEwipo9qu9d-OAxUr-
jgGHcxdNEMQ4dUDCBo&uact=5&oq=video+on+Routing+Protocol+Queueing+and+Switching&gs_lp=Egdnd3Mtd2
l6IjB2aWRlbyBvbiBSb3V0aW5nIFByb3RvY29sIFF1ZXVlaW5nIGFuZCBTd2l0Y2hpbmcyBRAhGKABSMYuUABY2idwAH
gAkAEAmAGqBKAB2x2qAQkyLTIuNS4yLjG4AQPIAQD4AQH4AQKYAgqgAuEewgIEECMYJ8ICCxAAGIAEGJECGIoFwgIL
EAAYgAQYsQMYgwHCAggQABiABBixA8ICCBAuGIAEGLEDwgIKEAAYgAQYQxiKBcICBRAAGIAEwgIKEAAYgAQYAhjLAcIC
ChAAGIAEGBQYhwKYAwCSBwcyLTEuNC41oAfqVbIHBzItMS40LjW4B-EewgcJMC4xLjEuNy4xyAdl&sclient=gws-
wiz#fpstate=ive&vld=cid:16d7d938,vid:HKrcypRr3uw,st:0
Unit 2 Routing Protocols (10 hrs /16)
Routing Protocol Queueing and Switching
Unit 2 Routing Protocols (10 hrs /16)
Queueing and Switching
In a routing architecture, switching and queuing are crucial for efficient data
forwarding. Switching handles the physical movement of data packets between network
interfaces on the same local network, while routing determines the optimal path for packets
to travel between different networks.
Queuing manages the flow of packets within a router, preventing congestion and ensuring
efficient transmission.
• Path Selection: Routers use a routing metric (like hop count or bandwidth) and a routing algorithm to calculate the best path for
data packets to reach their destination.
• Dynamic Adaptation : Routing protocols allow networks to be fault tolerant and highly available by dynamically rerouting traffic
around failed links or components.
• Routing Table Maintenance : The best routes are stored in the router's routing table, which is constantly updated with new
information received through the protocol
Unit 2 Routing Protocols (10 hrs /16)
Routing Protocols:
https://www.google.com/search?q=video+on+intra+domain+routing&sca_esv=4565f1f6b703c1dd&sxsrf=AE3TifPfIdFVg4h_esv8TvrVUMGTO20PAQ
%3A1753428621958&source=hp&ei=jTKDaLfdN62a4-
EP8_CZOQ&iflsig=AOw8s4IAAAAAaINAndZwEevASOExfF9WeXrGwYSDdHHz&oq=video+on+intra+domain+&gs_lp=Egdnd3Mtd2l6IhZ2aWRlbyBvbiBpbnRyYSBkb2
1haW4gKgIIADIFECEYoAEyBRAhGKABMgUQIRifBTIFECEYnwUyBRAhGJ8FMgUQIRifBTIFECEYnwUyBRAhGJ8FMgUQIRifBTIFECEYnwVIlsUBUABYg5gBcAF4AJABAJgB1
AGgAaQgqgEGMC4yMC4zuAEByAEA-
AEBmAIXoALeIMICCxAAGIAEGLEDGIMBwgIIEAAYgAQYsQPCAggQLhiABBixA8ICCBAuGIAEGOUEwgILEC4YgAQY0QMYxwHCAgUQABiABMICBBAjGCfCAgoQIxjwBRgn
GMkCwgILEAAYgAQYkQIYigXCAgoQABiABBgCGMsBwgIEEAAYA8ICBhAAGBYYHsICBxAAGIAEGA3CAgkQABiABBgKGA3CAggQABgKGA0YHsICCBAAGBYYChgewgIIEAA
YBRgNGB7CAgoQABgFGAoYDRgewgIHECEYoAEYCsICCBAAGAgYDRgewgIIEAAYgAQYogTCAgUQABjvBcICBBAhGBWYAwCSBwYxLjE2LjagB6mnAbIHBjAuMTYuNrgH2C
DCBwgwLjIuOS4xMsgHsAE&sclient=gws-wiz#fpstate=ive&vld=cid:40df3bc1,vid:svOGbh4rmDU,st:0
Unit 2 Routing Protocols (10 hrs /16)
Difference between Inter-domain and Intra-domain routing.
Intra domain is any protocol in which Routing algorithm works only within domains on the other hand Inter domain is any
protocol in which Routing algorithm works within and between domains. S.NOINTRADOMAIN ROUTINGINTERDOMAIN
ROUTING
1. Routing algorithm works only within domains. Routing algorithm works within and between domains.
2. It needs to know only about other routers within their domain. It needs to know only about other routers within and
between their domains.
3. Protocols used in intradomain routing are known as Interior-gateway protocols. Protocols used in interdomain routing are
known as Exterior-gateway protocols.
4. In this Routing, routing takes place within an autonomous network. In this Routing, routing takes place between the
autonomous networks.
5. Intradomain routing protocols ignores the internet outside the AS(autonomous system).Interdomain routing protocol
assumes that the internet contains the collection of interconnected AS (autonomous systems).
6. Some Popular Protocols of this routing are RIP (resource information protocol)and OSPF (open shortest path first).Popular
Protocols of this routing is BGP(Border Gateway Protocol) used to connect two or more AS (autonomous system).1
Unit 2 Routing Protocols (10 hrs /16)
Intra-Domain Routing
It is known as interior gateway routing, is the process of forwarding data packets within a single
autonomous system (AS), which is a network or group of networks under a single administrative control.
It focuses on routing within a specific network, using protocols like OSPF or RIP, to determine the best
paths for packet delivery inside that domain.
Static (Non-Adaptive) Routing Algorithms are a class of routing algorithms in computer networks
where routing decisions are pre-determined and do not change dynamically based on real-time network
conditions like traffic congestion or topology changes.
Dynamic (Adaptive) Routing Algorithms are a class of routing algorithms that make routing decisions
based on real-time network conditions. Unlike static routing, where paths are predetermined, adaptive
algorithms dynamically adjust routing paths in response to changes in network topology, traffic load, or
link failures.
Unit 2 Routing Protocols (10 hrs /16)
Distance Vector Routing
Distance-vector routing is a type of
dynamic routing protocol where each router
maintains a routing table with the best
known distance to every destination,
measured by a metric like hop count.
CIDR (Classless Inter-Domain Routing) and VLSM (Variable Length Subnet Masking) are complementary
networking techniques that work together to enable efficient IP address allocation and routing, especially for
IPv4.
It supports VLSM and CIDR, uses multicast address 224.0.0.9 for updates, and can be configured with
authentication to enhance security.
Unit 2 Routing Protocols (10 hrs /16)
Routing Information Protocol version 2
(RIPv2):
What is Link State Routing Protocol? - Introduction and Functioning - Binary Terms
https://binaryterms.com/link-state-routing.html
Unit 2 Routing Protocols (10 hrs /16)
Unit 2 Routing Protocols (10 hrs /16)
Open Shortest Path First (OSPF)
OSPF is a link-state routing protocol used in IP networks to determine the most efficient path for data
to travel between routers. It's an Interior Gateway Protocol (IGP) known for its scalability and
efficiency in large and complex networks.
OSPF uses the Shortest Path First (SPF) algorithm, also known as Dijkstra's algorithm, to calculate the
best routes, and it employs a hierarchical structure using areas to manage network complexity.
A point-to-point link in routing protocols refers to a direct connection between two network devices
(routers) without any intermediary devices or hosts. This type of link is common in scenarios where a
dedicated connection is needed between two specific points, such as a WAN link connecting two
routers in different locations.
Unit 2 Routing Protocols (10 hrs /16)
Transient link
Disadvantages OSPF
• It needs lots of information to calculate the best route for each destination. To store this
information, OSPF consumes more memory than other routing protocols.
• It runs the SPF algorithm to calculate the best route, which requires extra CPU processing.
• It is complex to configure and difficult to troubleshoot. Only experienced network administrators
can configure it.
Unit 2 Routing Protocols (10 hrs /16)
Inter-domain routing
It is the process of forwarding network traffic between different autonomous
systems (ASes), which are independent networks managed by different
organizations. It involves protocols like BGP to determine the most efficient
paths for data transmission across the internet. Essentially, it's how your data
finds its way from your network to another, possibly across the globe.
BGP Open message is a crucial part of establishing a BGP session between two routers. It's the
first message sent after a TCP connection is established, and it contains information that must be
agreed upon for the session to proceed.
Key elements within the Open message include the BGP version, the AS number, the router's hold
Unit 2 Routing Protocols (10 hrs /16)
BGP Update messages are used by Border Gateway Protocol routers to exchange network
reachability information, specifically to announce or withdraw routes. These messages are
crucial for maintaining the routing table and ensuring proper communication between
different networks. They are sent over a TCP connection, typically on port 179.
BGP Keepalive message is a type of message used to maintain BGP sessions by periodically confirming the
liveness of a BGP peer. These messages are sent at intervals determined by the negotiated hold time, ensuring
the session remains active and preventing it from timing out.
Unit 2 Routing Protocols (10 hrs /16)
Internet Control Message Protocol (ICMP)
ICMP is a network layer protocol used for error reporting and diagnostics in TCP/IP networks. It's a
companion to the IP protocol, providing a way for devices to communicate issues and information
about network connectivity.
ICMP is essential for tasks like pinging (testing reachability) and troubleshooting network problems.
ICMP error message format includes a header and a data section. The header is 8 bytes long and
contains fields like Type, Code, and Checksum.
The Type field identifies the specific error, like "Destination Unreachable" or "Time Exceeded". The
Code field provides more detail about the error.
The data section provides additional information, often including the IP header and data of the original
packet that caused the error
Unit 2 Routing Protocols (10 hrs /16)
ICMP error message format includes a header with Type, Code, Checksum, and an unused
field, followed by a variable-length data section. The Type and Code fields indicate the
specific error, while the Checksum verifies the message's integrity. The data section often
includes the IP header and data of the original packet that triggered the error.
Unit 2 Routing Protocols (10 hrs /16)
ICMP error message format includes a header with Type, Code, Checksum, and an unused
field, followed by a variable-length data section. The Type and Code fields indicate the
specific error, while the Checksum verifies the message's integrity. The data section often
includes the IP header and data of the original packet that triggered the error.
Unit 2 Routing Protocols (10 hrs /16)
Internet Control Message Protocol (ICMP)
ICMP messages are primarily divided into two types: Error-Reporting Messages and Query Messages.
• Error-reporting messages, like Destination Unreachable and Time Exceeded, inform devices of
problems with packet delivery, while query messages, such as Echo Request (used by ping) and
Timestamp Request, are used to gather specific network information and diagnose connectivity
issues.
Query Messages
• Echo Request (Type 8): Sent by a host to test network connectivity with a target device.
• Echo Reply (Type 0): Sent by the receiving device to confirm receipt of an Echo Request.
• Timestamp Request (Type 13): Requests the timestamp from a target device.
• Timestamp Reply (Type 14): Provides the timestamp to the requesting device.
• Router Advertisement (Type 9): A router uses this to announce its presence and capabilities.
• Router Solicitation (Type 10): A host uses this to ask routers to send a Router Advertisement.
Unit 2 Routing Protocols (10 hrs /16)
Internet Control Message Protocol (ICMP)
Error-Reporting Messages
• Destination Unreachable (Type 3): Sent by a router or device to indicate a network
problem, such as the destination being unreachable.
• Time Exceeded (Type 11): Sent when a packet's Time To Live (TTL) value expires,
typically indicating that a packet is looping or has reached the end of its path, a key
component of traceroute.
• Parameter Problem (Type 12): Indicates an error with a field in the IP header.
• Redirect (Type 5): Sent by a router to inform a source device that a better path to the
destination exists.
• Source Quench (Type 4): (Deprecated) Instructs the sending host to slow down its data rate
Unit 2 Routing Protocols (10 hrs /16)
Unit 2 Routing Protocols (10 hrs /16)
Assignment No 2