4 Introduction To Routing June23
4 Introduction To Routing June23
Topic Objectives
1. To define the term ‘routing’
2. To describe various routing algorithms
3. To describe various routing metrics applied in
IP networks
Introduction to Routing
4. To describe static routing
5. To describe various categories dynamic
routing protocols
6. Implement static routes in a simulated network
environment
2
What is Routing?
• Routing is the process of forwarding packets
from source node to the destination node
• In order to route the best route or path to send
the packets must be determined
Introduction to Routing
• This path or route information is stored in a
routing table
• The best route or path is computed by a
routing algorithm
3
What is a routing algorithm?
• A Routing Algorithm is a method or procedure or
formula used by a routing protocol to calculate or
determine the best path or route for data transfer
• A routing algorithm is a set of step-by-step
operations used to direct network traffic efficiently
Introduction to Routing
• When a packet leaves its source, there are could
be many different paths it can take to its
destination
• The routing algorithm is used to determine
mathematically the best path to take
• The algorithm should lead to consistent routing
i.e. the packets should be forwarded without 4
loops
What is a routing algorithm?
• A loop occurs when a packet is routed from one node
to another node that could send back the packet to the
previous node
Introduction to Routing
―This back and forth forwarding could occur endlessly
with the packet not being delivered
―Routing loops consume a lot of resources: CPU time and 5
bandwidth
Categories of Routing Algorithms
Distance
Non-Adaptive
Types of Vector
Routing
Introduction to Routing
Algorithms
Adaptive Link-State
Path Vector
6
Adaptive & Non-Adaptive Routing Algorithms
• Non-Adaptive Routing Algorithms
―Also known as a static routing algorithms
―When booting up the network, the routing information is
stored on the routers
―They do not make routing decisions based on the
Introduction to Routing
network topology or network traffic
• Adaptive Routing Algorithms
―Also known as dynamic routing algorithms
―They make routing decisions based on the topology and
network traffic
―The main parameters related to this algorithm are hop
count, distance and estimated transit time 7
Routing Metrics
• Determining a router's best path involves the
evaluation of multiple paths to the same destination
network and selecting the optimum or "shortest" path
to reach that network
• The best path is selected by a routing protocol based
on the value or metric it uses to determine the
Introduction to Routing
distance to reach a network
• The lower the metric the preferable the path
• Note:
―the routing algorithm determines how the best path is
computed while
―the routing metric is the parameter used in the
8
computation
Routing Metrics
• A routing metric is a value used by a routing protocol
to determine which routes are better than others.
―i.e. it is a calculated value used to determine the best
path to a destination
• Metrics used in IP networks:
Introduction to Routing
1. Bandwidth
2. Cost
3. Delay
4. Hop count
5. Load
6. Reliability
9
Routing Metrics
1. Hop count is the number of routers between a router
and the destination network. Each router is equal to
one hop.
―Example: a router will prefer a path that is 3 hops away
over a path that is 6 hops away
Introduction to Routing
2. Bandwidth is the data carrying capacity of a link,
sometimes referred to as the speed of the link.
―The route with an accumulation of links that have the
highest bandwidth values, or the fastest links would be a
preferable path
3. Load is the amount of traffic on a certain link
4. Delay is the time a packet takes to traverse a path 10
Routing Metrics
5. Reliability is the probability of a link failure,
calculated from the interface error count or previous
link failures
6. Cost is a value determined either by the router’s OS
or by the network administrator to indicate preference
Introduction to Routing
for a route.
―Cost can represent a metric, a combination of metrics or
a policy
11
Static and Dynamic Routing
Routers learn about remote networks in two ways:
1. Statically – by manual configuration
− Static routes are not automatically updated and must
be reconfigured when topology changes
− They use a non-adaptive routing algorithm
2. Dynamically
− They learn remote networks using adaptive
Introduction to Routing
algorithms
Dynamic
Routing
12
Static Routing
A static route is simply a route that is added manually
using a configuration command in a router
• After it is configured, IOS adds the route, including
details such as the subnet address, mask, outgoing
interface, and (or) next-hop router, into a new entry in
Introduction to Routing
that router’s IP routing table
After it is added, the router can then route packets
whose destination IP address matches the static route
NB: The connected interfaces must be reachable for the
remote network to be reached through the static route
13
Static Routing
Static routes are ideal for: No Routing Protocol
Introduction to Routing
found in the routing table 10.0.0.0/24
14
Static Routing
Static routes are ideal for: No Routing Protocol
Introduction to Routing
― In the topology:
10.0.0.0/24
10.0.0.0/24 is a stub
network
Example of a stub network where the link between
ISP and Router0 is configured using a static method
instead of using a routing protocol
15
Static Routing
4. Backup of other routes for use say when a
dynamic route fails
No Routing Protocol
192.168.0.0/24
192.168.2.1 192.168.2.2
Introduction to Routing
192.168.1.2
192.168.1.1
16
Types of Static Routes
1. Standard Static Routes
− consist of the destination network address and network
mask, and the IP address of the next-hop gateway or exit
interface
− you can configure multiple standard static routes with the
same metric for load sharing
Introduction to Routing
2. Default Static Routes
− a route that matches all packets
− The configuration has all zeros in the IP address and all
zeros in the subnet mask. i.e. in IPv4 - 0.0.0.0/0 while in
IPv6 - : :/0
− It identifies the gateway IP address to which the router sends
all IP packets that it does not have in its routing table 17
Types of Static Routes
3. Summary Static Routes
− A route that represents an aggregation of various network
gateways
− The multiple static routes in the aggregation all use the
same exit interface or next-hop IP address
Introduction to Routing
4. Floating Static Routes
− routes that are used to provide a backup path to a primary
static or dynamic route, in the event of a link failure
− the floating static route is configured with a higher
administrative distance than the primary route so that it is
not the preferred route but the one the router will resort to if
when the preferred route is unavailable
18
Static Routing
Advantages of static routing:
1. Can backup multiple interfaces/networks on a router
for use say when a dynamic route fails
2. Easy to configure
3. No extra resources are needed (RAM, powerful CPU,
bandwidth)
Introduction to Routing
4. More secure - the path a packet takes between two
destinations is always known precisely, and can be
controlled exactly
5. Predictability- the network administrator computes the
routing table in advance, the path a packet takes
between two destinations is always known precisely,
and can be controlled exactly
6. Ideal for small networks
19
Static Routing
Disadvantages of static routing
1. Initial configuration and maintenance is time-
consuming
2. Configuration is error-prone, especially in large
networks
Introduction to Routing
3. Administrator intervention is required to maintain
changing route information
4. Does not scale well with growing networks;
maintenance becomes cumbersome
5. Requires complete knowledge of the whole network
for proper implementation
20
Dynamic Routing
• Here a network routing protocol is configured e.g. RIP,
OSPF, EIGRP, IS-IS, BGP etc
• Dynamic routing protocols use adaptive algorithms i.e.
they adjust routing automatically when the topology
or traffic changes
Introduction to Routing
• Dynamic routing protocols will:
i. Discover remote networks and dynamically share this
information with other routers
ii. Maintaining up-to-date routing information
iii. Choosing the best path to destination networks
iv. Find a new best path if the current path is no longer
available 21
Dynamic Routing
• Despite of their classification, all dynamic routing protocols
have three main components:
i. Data structures
• How data is organised and stored. Some routing protocols use tables
and/or databases for their operations
• is a way of collecting and organizing data such that we can perform
operations on these data in an effective way
Introduction to Routing
• This information is stored in RAM
ii. Routing protocol messages
• Communication exchanged between routers to allow them to gather
information about the routing domain
• i.e. they are used to discover neighboring routers, exchange routing
information and maintain accurate information about the network
iii. Routing Algorithms
• It is a method or procedure or formula used by a routing protocol to
calculate or determine the best path for data transfer
• Examples: DUAL, SPF, Bellman Ford’s Algorithm 22
Categories of Dynamic Routing Protocols
Dynamic Routing
Protocols
Introduction to Routing
Interior Gateway Exterior Gateway
Protocols Protocols
(Intradomain) (Interdomain)
Introduction to Routing
• Exterior Gateway Protocols (EGP)- Used for routing
between autonomous systems
− Also known as interdomain routing protocols
− Example: BGPv4
24
IGP and EGP Routing Protocols
• An autonomous System is a group of routers under the
control of a single authority
• Also sometimes referred to as a routing domain
Introduction to Routing
25
Categories of Dynamic Routing Protocols
Dynamic
Routing
Protocols
Introduction to Routing
Classful Classless
Protocols Protocols
Introduction to Routing
− Not good to configure in topologies that have VLSM, CIDR or
are said to be discontiguous
• Classless routing protocols include a subnet mask in
the routing update
− They support VLSM, CIDR and can be configured where the
network is said to be discontiguous
27
Dynamic Routing Protocols
Advantages of dynamic routing
1. Prevents the time-consuming and laborious process of
configuring static routes
2. Dynamically adapt to network changes making them give
more current information
3. Scale better compared to static routing protocols
4. Less prone to configuration errors in scaling networks
Introduction to Routing
compared to static routing
Disadvantages of dynamic routing
1. Require more resources i.e. CPU time, interface bandwidth
and RAM
2. Some protocols are complex and require expertise to
configure and troubleshoot
3. Less secure. Additional configuration settings are needed to
secure
28
4. Routes depend on current topology i.e. they can change
Sources
• Computer Networks: A Top Down Approach(3rd Edition)
by James Kurose and Keith W.Ross
• Network Routing: Algorithms, Protocols, and
Architectures by Medhi D. and Ramasamy K, Morgan
Kaufmann Publishers (2007), ISBN: 13: 978-0-12-
088588-6, ISBN 10: 0-12-088588-3
Introduction to Routing
• Data Communications and Networking, Behrouz
Forouzan, McGraw-Hill, 5th ed. (2013), ISBN:
0073376221
• Data and Computer Communications, W. Stallings,
Prentice Hall, 10th ed. (2013), ISBN-10: 0133506487
ISBN-13: 978-0133506488
• Cisco curriculum version 6.0
• Various internet sources 29