0% found this document useful (0 votes)
9 views58 pages

Routing

Uploaded by

Juan Dela Cruz
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)
9 views58 pages

Routing

Uploaded by

Juan Dela Cruz
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
You are on page 1/ 58

Routing

Presenter Name
Routing
Routing is the process of directing data packets from their source to their
destination across a network. This process is accomplished by using routing
algorithms that determine the best path for data to travel based on factors
such as network topology, congestion, link cost, and routing metrics.

Routers are devices responsible for routing data packets between


networks. They examine the destination address of each incoming packet
and determine the most efficient path to forward it to its destination.
Routing tables stored in routers contain information about network
topology and available paths, which they use to make routing decisions.

9/3/20XX Presentation Title 2


Routing Table
Here's a simplified example of a routing tables

In this example:

1. Destination: This column specifies the destination network or subnet.


2. Next Hop: This column indicates the next router or gateway to which the packet
should be forwarded in order to reach the destination network. It may be an IP address
or the word "local" if the destination is directly connected.
3. Interface: This column specifies the network interface through which the packet should
be forwarded to reach the next hop.

9/3/20XX Presentation Title 3


Routing
For instance:

If a packet with a destination IP address of 192.168.1.50 arrives, the router


would forward it to the next hop 192.168.2.1 via the interface eth0.
If a packet with a destination IP address of 10.1.2.3 arrives, the router
would forward it to the next hop 10.0.0.1 via the interface eth1.
If a packet with a destination IP address outside of the networks listed in
the table arrives, the router would forward it to the default gateway
203.0.113.1 via the interface eth2.

9/3/20XX Presentation Title 4


Routing Table – Huawei Network Simulator

9/3/20XX Presentation Title 5


Routing Table – Huawei Network Simulator
Here's what each column represents:
1. Destination Network: This is the network address for which this route is
valid.
2. Subnet Mask: The subnet mask helps identify which part of the IP
address belongs to the network and which identifies the device within
that network.
3. Gateway: This is the IP address of the next-hop router the device should
use to reach the destination network.
4. Metric: The metric is a value used by some routing protocols to choose
the best path. Lower metrics indicate a more preferred route.

9/3/20XX Presentation Title 6


Routing Table – Huawei Network Simulator
5. Interface: This specifies the network interface (like an ethernet port) the
router will use to send data packets to the destination network.
6. Admin Distance: This value reflects the trustworthiness of a route based
on the routing protocol used. Lower values are more trustworthy.
7. Flags: These flags indicate additional information about the route, such
as whether it's statically configured or learned dynamically through a
routing protocol. (The specific flag meanings may vary depending on
the simulator)

9/3/20XX Presentation Title 7


Routers
• A router is a piece of network hardware responsible for forwarding
packets to their destinations.
• Routers connect to two or more IP networks or subnetworks and pass
data packets between them as needed.
• Routers are used in homes and offices for setting up local network
connections.

9/3/20XX Presentation Title 8


Routers
• Routers use routing protocols for the following purposes.
• To discover all the available paths in the network.
• To learn how many paths exist between each source and destination.
• To select the fastest path if multiple paths exist between a source and
the destination.

9/3/20XX Presentation Title 9


Routing protocols
• A routing protocol is like a set of rules routers use to talk to each other
and share information.
• This information helps them figure out the best way to send data packets
across a network to their destination.
• Imagine a road trip - routing protocols are like having a map and getting
updates on traffic conditions along the way..

9/3/20XX Presentation Title 10


Functions of routing protocols
• Learn routing information from neighboring routers
• Advertise local routing information to neighboring routers
• Calculate the best route for each subnet of the network
• Provide a virtual map of all routes of the network
• Calculate the cost of each route and help the router choose the best and
fastest route
• Detect any change in the network and update all routers about that
change

9/3/20XX Presentation Title 11


Types of routing protocols
Routing protocols are classified into the following based on the used
routing algorithms:
1. Distance vector routing protocols, for example: Routing Information
Protocol (RIP)
2. Link state routing protocols, for example: Open Shortest Path First
(OSPF)

9/3/20XX Presentation Title 12


Types of routing protocols
Routing protocols are classified into the following based on where they are
used:
1. Interior Gateway Protocol (IGP): exchanges routing information within a
single autonomous system (AS),for example: OSPF.
2. Exterior Gateway Protocol (EGP): exchanges routing information in
different ASs, for example, Border Gateway Protocol (BGP).

9/3/20XX Presentation Title 13


Distance-vector routing protocols
• Routers running distance-vector routing protocols periodically broadcast
routing and reachability information from all active interfaces.
• They also receive the same information from their neighbors on their
enable interfaces.
• Distance-vector protocols use timers to broadcast routing information.
Once their periodic timer expires, they broadcast their routing
information from all enable interfaces, no matter whether the routing
information has changed since the previous broadcast or not.

9/3/20XX Presentation Title 14


Calculating/selecting the best route
• Distance-vector protocols use distance and direction to calculate and
select the best route for each subnet in the network. Distance is the
number of routers that a packet crosses to reach its destination.
• Distance is measured in terms of hops. Each instance where a packet
goes through a router is called a hop. For example, if a packet crosses
four routers to reach its destination, the number of hops is 4. The route
with the least number of hops is selected as the best route.
• The vector indicates the direction that a packet uses to reach its
destination.

9/3/20XX Presentation Title 15


Calculating/selecting the best route
• The following figure shows an example of a network running distance
victor protocol.

9/3/20XX Presentation Title 16


Calculating/selecting the best route
• In this network, the router R1 has three routes to reach the destination
network. These routes are the following.

• The four-hop route (distance) through R2 (vector)


• The two-hop route (distance) through R6 (vector)
• The three-hop route (distance) through R7 (vector)

9/3/20XX Presentation Title 17


Key points
• Distance-vector protocols do not use any mechanism to know who their
neighbors are.
• Distance-vector protocols learn about their neighbors by receiving their
broadcasts.
• Distance-vector protocols do not perform any formal handshake or hello
process with neighbors before broadcasting routing information.
• Distance-vector protocols do not verify whether neighbors received
routing updates or not.
• Distance-vector protocols assume that if a neighbor misses an update, it
will learn about the change in the next broadcast update.
• Routing Information Protocol (RIP) are examples of distance-vector
routing protocols.

9/3/20XX Presentation Title 18


Link-state routing protocols
• Unlike distance-vector routing protocols, the link-state routing protocols
do not share routing and reachability information with anyone. Routers
running link-state protocols share routing information only with
neighbors. To discover neighbors, link-state protocols use a special
protocol known as the Hello protocol.

• After discovering all neighbors, the link-state protocols create three


separate tables. One of these tables keeps track of directly attached
neighbors, one determines the topology of the entire internetwork, and
one is used as the routing table.

9/3/20XX Presentation Title 19


Link-state routing protocols
• From all available routes, to select the best route for each destination in
the network, the link-state protocols use an algorithm called the Shortest
Path First (SPF) algorithm.

• OSPF is an example of link-state routing protocols.

9/3/20XX Presentation Title 20


Distance vector protocol vs Link-state protocol
Feature Distance Vector Link State
Network Knowledge Local (limited to neighboring Global (complete network map)
routers)
Information Sharing Periodic updates of entire routing Updates only on changes to
table directly connected links
Convergence Slow (can lead to routing loops) Fast (faster adaptation to network
changes)
Problems Prone to "count to infinity" problem More complex to implement
Scalability Better for smaller networks Better for larger and complex
networks
Resource Usage Lower CPU and memory Higher CPU and memory
requirements requirements due to maintaining
network
Examples RIP (Routing Information Protocol) OSPF (Open Shortest Path First), IS-
IS (Intermediate System to
Intermediate System)
9/3/20XX Presentation Title 21
Autonomous Systems
• In the networking scenario, an autonomous system means a network
(represented by a group of IP addresses) under the control of the same
organization or group of operators, with a single and clearly defined
routing policy enforced.

• For different Internet Service Providers (ISP) to identify and communicate


with each other, they need exclusive autonomous system numbers
provided by the Internet Assigned Numbers Authority (IANA).

9/3/20XX Presentation Title 22


Autonomous Systems
• These autonomous system numbers are extensively employed, for
example, by the Border Gateway Protocol (BGP) that correlates them with
specific network routes, thus being able to successfully steer network
traffic between sources and destinations that do not belong to the same
autonomous system.

9/3/20XX Presentation Title 23


Autonomous Systems
• The following figure depicts a simple example of four Autonomous
Systems (AS) with their respective number on the Internet:

9/3/20XX Presentation Title 24


Autonomous Systems
• Notably, as the networks get popular and the Internet grows, the
complexity of managing the increasing number of autonomous systems
also grows. So, routing network traffic over the Internet becomes more
challenging daily.

• In this context, the IGP and EGP protocols emerge to tackle particular
challenges of the routing task. These protocols enable networked entities
to communicate internally and externally to the autonomous system they
belong to.

9/3/20XX Presentation Title 25


Interior Gateway Protocols
• In short, interior gateway protocols are tailored to route traffic between
entities in the same autonomous system. So, their design does not tackle
the specific challenges of external network traffic routing between entities
belonging to different autonomous systems.

9/3/20XX Presentation Title 26


Interior Gateway Protocols
• The following figure shows, in red, which kind of traffic routing IGP is
responsible for:

9/3/20XX Presentation Title 27


Interior Gateway Protocols
• The most popular IGP protocols are Open Shortest Path First (OSPF)

9/3/20XX Presentation Title 28


External Gateway Protocols
• Unlike interior gateway protocols, exterior gateway protocols route traffic
among autonomous systems. Thus, we can say that they focus on the
challenges of finding the particular autonomous system a networked
entity belongs to, not the entity itself.

9/3/20XX Presentation Title 29


External Gateway Protocols
• The figure next depicts with red lines the traffic routing of which EGP
protocols work with:

9/3/20XX Presentation Title 30


External Gateway Protocols
• The most prominent EGP protocol is called Border Gateway Protocol
(BGP), and, as we already commented, the current Internet infrastructure
(based on autonomous systems) strongly relies on it.

9/3/20XX Presentation Title 31


Feature EGP (Exterior Gateway Protocol) IGP (Interior Gateway Protocol)pen_spark
EGP vs IGP
Scope Between Autonomous Systems (AS) Within a single Autonomous System (AS)
Function Shares routing information between Shares routing information between routers
different networks managed by within the same
different administrative entities
Protocol BGP (Border Gateway Protocol) RIP (Routing Information Protocol), OSPF
Example (Open Shortest Path First), EIGRP (Enhanced
Interior Gateway Routing Protocol), IS-IS
(Intermediate System to Intermediate
System
Information Negotiates policies and path attributes Exchanges reachability information and
Exchange for routing between AS metrics to determine best paths within the
AS
Focus Policy-based routing considering Efficient routing based on metrics like hop
factors like cost, security, and network count or bandwidth
performance
Convergence Can be slower due to complex policy Generally faster convergence due to focus
negotiations on internal network topology

9/3/20XX Presentation Title 32


Feature OSPF (Open Shortest Path RIP (Routing Information BGP (Border Gateway
First) Protocol) Protocol)
Type Interior Gateway Protocol Interior Gateway Protocol Exterior Gateway
(IGP) (IGP) Protocol (EGP)
Scope Used within a single Used within a single Used between different
autonomous system (AS) autonomous system (AS) autonomous systems
(ASes)
Algorithm Link-state routing Distance-vector routing Path-vector routing
Routing Routers share information Routers exchange Routers learn about
Table about the entire network information about networks and paths
Creation topology neighboring networks and from other BGP routers
their hop count
Convergence Faster convergence (updates Slower convergence Convergence speed
Speed happen quickly) (updates can be slow) depends on network
complexity
Scalability More scalable for larger Less scalable for very large Highly scalable for
networks networks internet-sized networks
Security Can be configured with Limited security features Supports various
authentication security features
Complexity More complex configuration Simpler configuration Most complex
9/3/20XX Presentation Title configuration 33
Analogy OSPF (Open Shortest Path RIP (Routing Information BGP (Border Gateway
First) Protocol) Protocol)
Finding a You have a detailed map of You ask your neighbors You ask other cities
way in a city the entire city and can about the best way to get to (ASes) about how to
choose the shortest path. your destination, relying on reach a specific
hop count. location, considering
factors like traffic and
policies.

9/3/20XX Presentation Title 34


Choosing the Right Protocol
The choice of routing protocol depends on several factors like:
1. Network Size: OSPF is better for larger networks due to its scalability.
2. Complexity: RIP is simpler to configure but might not be suitable for
complex networks.
3. Security: BGP offers the most security features for critical internet
routing.

9/3/20XX Presentation Title 35


Packet Forwarding
• Packet forwarding, also known as packet routing or internetworking, is the
process of transmitting a data packet from one network to another
network.
• In computer networking, packets are small pieces of data that are
transmitted over a network.
• Packet forwarding involves receiving a packet at one network node,
examining the destination address contained in the packet header, and
then forwarding the packet to the next node in the network that is closer
to the destination.

9/3/20XX Presentation Title 36


Packet Forwarding
• Packet forwarding is a fundamental function of networking devices such
as routers, switches, and firewalls.
• These devices are responsible for forwarding packets between networks
and routing packets to their destination.
• They use routing tables and protocols to determine the best path for a
packet to take through the network.

9/3/20XX Presentation Title 37


Packet Forwarding
• Packet forwarding is an important part of how the Internet works, as it
enables packets to be transmitted between networks and devices that are
physically separated by large distances.
• It allows devices to communicate with each other and enables the
exchange of information over the Internet.
• For example, a router receives packets from hosts on one attached
network and forwards them to hosts on another attached network or to
another router for further forwarding.
• How a packet is forwarded is based on a comparison of the packet’s
destination address with the routing table stored in the router. Each act of
forwarding performed by a router is called a hop across the internetwork.

9/3/20XX Presentation Title 38


Packet Forwarding Techniques
• Packet forwarding techniques are different methods routers and switches
use to decide the best path (next hop) for a data packet to reach its
destination.
• Imagine you're giving directions to someone, and the forwarding
technique determines whether you tell them to follow the main highway,
scenic backroads, or a combination depending on the situation
1. Next-Hop Method
2. Network-Specific Method:
3. Source Routing:
4. Policy-Based Routing:
5. Load Balancing:
9/3/20XX Presentation Title 39
Next-Hop Method
• This is a basic and widely used technique.
• Routers maintain a routing table that contains the next-hop router's
address for each destination network.
• When a packet arrives, the router simply looks up the destination IP
address in its table and forwards the packet to the next-hop router listed
for that network.
• This method is efficient for smaller networks but can become complex for
very large ones due to the size of routing tables.

9/3/20XX Presentation Title 40


Network-Specific Method
• Instead of having entries for every single destination host, this technique
focuses on entire networks.
• The routing table only contains information about networks directly
connected to the router or reachable through other routers.
• When a packet arrives, the router checks if the destination network is
directly connected. If not, it forwards the packet to a router on a network
closer to the destination.
• This method simplifies routing tables but might require more processing
power on the router to determine the best path.

9/3/20XX Presentation Title 41


Source Routing
• This less common technique embeds the entire path the packet should
take within the packet header itself.
• The source (sender) specifies the complete list of routers the packet
should traverse to reach the destination.
• While offering more control, this method can be cumbersome to
configure and inflexible for dynamic network environments.

9/3/20XX Presentation Title 42


Policy-Based Routing
• This technique allows for more granular control over packet forwarding
based on pre-defined policies.
• You can configure rules that consider factors like traffic type (voice, video,
data), source and destination IP addresses, or even time of day.
• This offers greater flexibility for network administrators to prioritize certain
types of traffic or restrict access to specific destinations.

9/3/20XX Presentation Title 43


Load Balancing
• In scenarios with multiple paths to a destination, load balancing
techniques distribute traffic across these paths to optimize network
performance.
• This helps prevent congestion on any single path and ensures efficient
data flow.

9/3/20XX Presentation Title 44


Packet Forwarding Techniques
• Choosing the most appropriate packet forwarding technique depends on
various factors like network size, complexity, and desired level of control.
• For most modern networks, a combination of these techniques might be
used to achieve optimal performance and security.

9/3/20XX Presentation Title 45


Route Preference
• Route preference, also known as administrative distance, is a value
assigned to routing information sources.
• This value influences which route a router will choose to send data
packets to a particular destination.
• Routes with lower route preference values are considered more
trustworthy and preferred by the router.

9/3/20XX Presentation Title 46


Route Preference
• Here's a breakdown of how route preference works:
• Multiple Paths: Routers often have multiple paths to reach a destination
network. These paths can be learned through different routing protocols
or configured statically.
• Decision Time: When a router needs to forward a packet, it needs to
choose the best route from the available options. Route preference helps
the router make this decision.
• Lower is Better: Routes with lower route preference values are considered
more reliable and are chosen by the router first. This ensures that routers
prioritize trustworthy sources for routing information.

9/3/20XX Presentation Title 47


Route Preference
• Imagine delivery options:
• Think of route preference like choosing a delivery service for an
important package.
• A well-known courier company with a proven track record (low route
preference) would be preferable to an unfamiliar local service (high route
preference).

9/3/20XX Presentation Title 48


Route Preference
Benefits of Route Preference:
1. Stability: It helps maintain network stability by prioritizing reliable
routes, reducing the chance of sending packets down congested or
unavailable paths.
2. Flexibility: Network administrators can configure route preference
values to favor specific routes based on their needs. For example, a
more secure route might have a lower preference even if it's slightly
slower.
3. Scalability: Route preference helps routers manage routing information
efficiently, especially in large networks with many paths.

9/3/20XX Presentation Title 49


Types of Routing
• A router connects different networks. It works as an intermediate device. It
has multiple interfaces.
• When it receives a packet on an interface, it reads the destination address
of the packet and forwards the packet from the interface that is
connected to the destination address.
• If no interface is connected to the destination network, the router discards
the packet. This process is known as routing.

9/3/20XX Presentation Title 50


Types of Routing
The routing process involves three steps. These steps are the following.

1. Receiving a packet
2. Forwarding decision
3. Forwarding the packet

To take the forwarding decision, the router must learn, store, maintain, and
update information about the connected networks. Routers use routing
tables to store information about the connected networks. This information
is known as routing information.

9/3/20XX Presentation Title 51


Types of Routing
There are three methods to add, update, and maintain routing information.
These methods are the following.

1. Automatic routing
2. Static or Manual routing
3. Dynamic routing

9/3/20XX Presentation Title 52


Automatic routing
In this method, a router automatically adds and manages the routing
information. To get the routing information, the router uses the IP
configuration of the active interfaces. When the administrator changes the
IP configuration or the state of the interface, the router automatically
updates the related information in the routing table.

Since automatic routing uses IP configurations of interfaces, it can’t add


routes that are not available on the router.

If you have two or more routers in the network, you have to use either static
routing or dynamic routing.

9/3/20XX Presentation Title 53


Manual or static routing
In this method, the administrator manages the routing information. The
administrator manually adds routing information to the routing table. If any
change occurs in the network, the administrator has to update the related
information in the routing table.

Static routing is a good option if the network size is small.

9/3/20XX Presentation Title 54


Dynamic routing
In this method, the administrator configures a routing protocol on the
router. The routing protocol automatically adds and manages the routing
information in the routing table. If any change occurs in the network, the
routing protocol automatically updates the related information in the
routing table.

Dynamic routing is a good option if the network size is large.

9/3/20XX Presentation Title 55


Differences between automatic, manual, and
dynamic routing

9/3/20XX Presentation Title 56


Types of routes
There are four types of routes. These types are connected route, local
route, static route, and dynamic route.

Automatic routing adds connected routes and local routes to the routing
table. Automatic routing calculates these routes from the IP configuration
of active interfaces. The routing table respectively uses codes C and L to
show connected and local routes.

9/3/20XX Presentation Title 57


Types of routes
Static or manual routing adds static routes to the routing table. An
administrator manually creates and adds these routes to the routing table.
The routing table uses the code S to show static routes.

Dynamic routing adds dynamic routes to the routing table. A routing


protocol learns and adds these routes to the routing table. Dynamic routes
are further classified based on the routing protocols. Each routing protocol
uses a different code to show its routes in the routing table.

9/3/20XX Presentation Title 58

You might also like