0% found this document useful (0 votes)
17 views

Routing

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)
17 views

Routing

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/ 75

Static & Dynamic Routing

Malaka Pathirana
MSc – Cyber Security (Reading), BSc in IT | Cisco Certified CCNA Instructor
Static Routing
When to Use Static Routes

Three uses for static routes:


Stub Networks and
▪ Smaller networks that are not expected Stub Routers
to grow
▪ Routing to and from stub networks
• Stub network accessed by a single
route and has one neighbour
• 172.16.3.0 is a stub network
▪ A single default route to represent a
path to any network not found in the
routing table
• Use default route on R1 to point to R2
for all other networks
Default Static Route

▪ Default route matches all packets and is


used when a packet does not match a
specific route in the routing table

▪ Can be dynamically learned or statically


configured

▪ Default Static route uses 0.0.0.0/0 as the


destination IPv4 address

▪ Creates a Gateway of Last Resort

▪ Common use is when connecting a


company’s edge router to the ISP network
Configure a Default Static Route

Any packets
not matching
route entries
are forwarded
to 172.16.2.2
ip route Command
Configure a Directly Connected Static Route
▪ Use the exit interface to specify next-hop so
no other lookups are required
▪ Administrative distance of static route is 1
Configure a Fully Specified Static Route
▪ Both the exit interface and the next-hop IP
address are specified
▪ When the exit interface is an Ethernet
network, the fully specified static route is
used
Default Static Route
▪ Default static routes are commonly used when connecting:

• An edge router to a service provider network


• A stub router (a router with only one upstream neighbour router)

▪ Default route is used when no other routes in the routing table match the destination IP
Dynamic Routing
Dynamic Routing Protocols
▪ Routing Protocols are used to facilitate the exchange of routing information between routers.

▪ The purpose of dynamic routing protocols includes:


• Discovery of remote networks
• Maintaining up-to-date routing information
• Choosing the best path to destination networks
• Ability to find a new best path if the current path is no longer available
Advantages of dynamic routing Disadvantages of dynamic routing

Automatically share information about remote networks Part of a router’s resources are dedicated for protocol
operation, including CPU time and network link bandwidth
Determine the best path to each network and add this Times when static routing is more appropriate
information to their routing tables
Compared to static routing, dynamic routing protocols require
less administrative overhead
Help the network administrator manage the time-consuming
process of configuring and maintaining static routes
Dynamic Routing Protocols Uses

▪ Dynamic routing is the best choice


for large networks
▪ Dynamic routing protocols help the
network administrator manage the
network:
• Providing redundant paths
• Automatically implementing the
alternate path when a link goes down.
Dynamic Routing Protocol Components
▪ Purpose of dynamic routing protocols includes:
• Discovery of remote networks
• Maintaining up-to-date routing information
• Choosing the best path to destination networks
• Ability to find a new best path if the current path is no
longer available
▪ The main components of dynamic routing
protocols include:
• Data structures - tables or databases kept in RAM.
• Routing protocol messages - to discover
neighbouring routers, exchange routing information, and
maintain accurate information about the network.
• Algorithms – to facilitate learning routing information
and for best path determination.
Routing Protocols
Autonomous System (AS)
▪ The Internet is divided into autonomous systems. An autonomous
system (AS) is a group of networks and routers under the
authority of a single administration.

▪ An AS is assigned a unique identification number known as an


Autonomous System Number (ASN) by a Regional Internet Registry
(RIR). ASNs facilitate routing and the exchange of routing information
between different networks.

▪ Routing inside an AS is referred to as intradomain routing.

▪ Routing between autonomous systems is referred to as interdomain


routing.

▪ Each AS can choose one or more intradomain routing protocols to

handle routing inside the AS. However, only one interdomain routing
protocol handles routing between AS.
Regional Internet Registry (RIR)
RIR Located Service Region

African Network Coordination Centre Mauritius Africa


(AFRINIC)

Asia-Pacific Network Coordination Australia Asia Pacific


Centre
(APNIC)

American Registry for Internet USA United States, Canada,


Numbers many Caribbean and
(ARIN) North Atlantic islands

Latin American and Caribbean Uruguay Latin America and the


Internet Addresses Registry Caribbean
(LACNIC)
Réseaux IP Européens Network The Netherlands Europe, the Middle East
Coordination Centre and parts of Central Asia
(RIPE NCC)
ASN NAME TYPE NUMBER OF IPS
AS9329 Sri Lanka Telecom Internet isp 262,400
AS18001 Dialog Axiata PLC. isp 171,008
AS38229 Lanka Education & Research Network, LERN education 33,792
AS5087 Lanka Communication Services isp 21,760
AS45356 Mobitel Pvt Ltd isp 17,408
AS45224 Lanka Bell Limited isp 16,384
AS17904 Sri Lankan Airlines business 16,384
AS132045 Bharti Airtel Lanka Pvt. Limited isp 15,360
AS17470 Hutchison Telecommunications Lanka (Private) Limited isp 4,096
AS132447 234, Galle Road, Colombo 4 isp 2,048
AS132124 Information and Communication Technology Agency of Sri business 2,048
Lanka
AS45489 Sri Lanka Telecom PLC, GLobal Peering isp 1,536
AS151197 OREL I T Private Limited business 512
AS139032 Nations Trust Banks Plc business 512
AS139731 Hatton National Bank PLC business 256
AS136934 Bank Of Ceylon business 256
AS133051 COMMERCIAL BANK OF CEYLON PLC business 256
AS131218 Innodata Lanka Pvt Ltd business 256
AS45517 Bharti Airtel Lanka Pvt. Limited inactive 0
AS45338 Sri Lanka Internet Exchange point inactive 0
AS204307 Rishikeshan Lavakumar business 0
AS17770 Dialog Telekom Plc inactive 0
AS17627 Dialog Broadband Networks (Pvt.) Ltd. inactive 0
AS151485 CEYLON ELECTRICITY BOARD inactive 0
AS151362 DTV inactive 0
AS138984 Sri Lanka Telecom Ltd inactive 0
AS136420 Dialog Broadband Networks (Pvt) Ltd. inactive 0
AS131173 SLT-IX Sri Lanka Telecom Internet Exchange inactive 0
IGP and EGP Routing Protocols

Interior Gateway Protocols (IGP) -


▪ Used for routing within an AS
▪ Include RIP, EIGRP, OSPF, and IS-IS

Exterior Gateway Protocols (EGP) -


▪ Used for routing between AS
▪ Official routing protocol used by the
Internet
Link State & Distance Vector Algorithms
▪ Link state and distance vector are two distinct routing algorithms in computer networks.

▪ Link state protocols send information about directly connected links to all the routers in the network

▪ Distance vector protocols send their entire routing table to directly connected neighbours.

Link State Routing:


• Information Exchange: In link state routing, routers exchange information about their directly connected links
with all other routers in the network. Each router constructs a complete map of the network's topology, which
includes information about all routers and links.
• Routing Table Calculation: Each router independently calculates the shortest path to every other router in the
network using algorithms like Dijkstra's algorithm. It considers factors like link costs, bandwidth, or delay to
determine the optimal path.
• Routing Updates: Link state routers periodically exchange updates containing only the changes in the network's
topology. These updates are small and contain specific information about link failures or additions.
• Convergence Time: Link state routing generally converges faster because routers have immediate and up-to-
date information about the network's topology.
• Scalability: Link state routing protocols, such as OSPF (Open Shortest Path First) and IS-IS (Intermediate
System to Intermediate System), are more scalable and suitable for larger networks due to their efficient handling
of updates and their ability to divide networks into areas.
Distance Vector Routing:
▪ Information Exchange: In distance vector routing, routers only exchange routing information with
their directly connected neighbours. Each router maintains a table (vector) that lists the distance or
cost to reach each destination network.

▪ Routing Table Calculation: Routers iteratively update their routing tables by exchanging information
with neighbours. The Bellman-Ford algorithm calculates the shortest path based on each destination's
minimum cumulative distance (hop count).

▪ Routing Updates: Distance vector routers periodically send their routing tables to neighbouring
routers. Updates include information about all known destinations.

▪ Convergence Time: Distance vector routing may experience longer convergence time than link state
routing. It takes time for routers to exchange information, update routing tables, and propagate
changes throughout the network.

▪ Scalability: Distance vector routing protocols, such as RIP (Routing Information Protocol), are less
scalable and may face challenges in larger networks due to the continuous exchange of large routing
tables.
Routing Metrics
▪ Routing metrics are parameters or factors used by routing algorithms to determine the
best path for forwarding data packets between network nodes. These metrics measure the
characteristics of network links or paths and influence the routing decisions routers make.

• Path length - Total hop count

• Reliability - Dependability (bit error rate)

• Delay - Depends on bandwidth, queues,


network congestion and physical distance

• Communication Cost - Operating expenses of


links

• Bandwidth and Load


Best Path ▪ Determining the best path to a destination
network involves the evaluation of multiple
paths and selecting the optimum or shortest
path to reach that network.
▪ The best path is selected based on the
routing protocol’s metric or value.
▪ The best path to a network is the path with the
lowest metric.
▪ Each dynamic routing protocol has rules and
metrics to build and update routing tables. For
example:
• Routing Information Protocol (RIP) – Hop count
• Open Shortest Path First (OSPF) – Cost
• Enhanced Interior Gateway Routing Protocol
(EIGRP) – Bandwidth, delay, load, reliability
Load Balancing
▪ If a router has two or more paths with identical
metrics to the same destination network, the
router will forward the packets using both paths
equally.
▪ The routing table contains a single destination
network but has multiple exit interfaces – one
for each equal cost path. This is referred to as
equal cost load balancing.
▪ If configured correctly, load balancing can
increase the effectiveness and performance of
the network.
▪ Equal cost load balancing can be configured to
use dynamic and static routing protocols.
▪ EIGRP supports unequal cost load balancing.
▪ If a router has multiple routing
Administrative Distance protocols configured and static
routes, it is possible that the routing
table might have more than one
route source for the same destination
network.
▪ Each routing protocol might prefer a
different path to reach the same
destination. How does the router
know which path to choose?
▪ The Cisco IOS uses what is known
as the administrative distance (AD)
to determine which route to install in
the routing table.
▪ Which route source is more trustworthy, Internal
▪ The AD represents the
EIGRP or OSPF?
“trustworthiness” of the route.
The lower the AD, the more
trustworthy.
RIPv2
Router RIP Configuration Mode

▪ Use the router rip command to enable RIP v1

▪ Use the no router rip command to disable RIP


Advertise Networks

▪ The network network-address


router configuration mode
command:
• Enables RIP on all interfaces that
belong to a specific network
• Advertise the network in RIP
routing updates sent to other
routers every 30 seconds.

Note: RIPv1 is a classful routing


protocol for IPv4.
Verify RIP Routing

show ip protocols – displays IPv4 routing show ip route – displays RIP routes
protocols configured on the router. installed in the routing table.
Enable and Verify RIPv2

▪ Use the version 2 router


configuration mode command
to enable RIPv2
▪ Use the show ip protocols
command to verify that RIPv2
is configured.
▪ Use the show ip route
command to verify the RIPv2
routes in the routing table.
Configure Passive Interfaces

▪ RIP updates:
• Are forwarded out all RIP-enabled
interfaces by default.
• Only need to be sent out interfaces
connected to other RIP-enabled
routers.
▪ Sending RIP updates to LANs wastes
bandwidth and resources and is a
security risk.
▪ Use the passive-interface router
configuration command to stop routing
updates out of the interface. Still allows
that network to be advertised to other
routers.
Propagate a Default Route

▪ In the diagram, a default static


route to the Internet is configured
on R1.
▪ The default information originate
router configuration command
instructs R1 to send the default
static route information in the RIP
updates.
Routing Table Entries

Routing Table for R1


IPv6 Routing Table Entries

▪ An IPv6 routing table includes


directly connected, static and
dynamically learned routes.
▪ All IPv6 routes are level 1
ultimate routes.
Directly Connected Entries
▪ Use the show ipv6 route command to display
the IPv6 routing table.
▪ The directly connected route entries include
the following:
• Route source – How the route was learned.
Directly connected indicated with a C and L
for local route.
• Directly connected network address.
• Administrative distance – Trustworthiness of
the route (lower, more trustworthy).
• Metric – Value assigned to reach the
network (lower is the preferred route).
• Outgoing interface – Exit interface used to
forward the packet.
Remote IPv6 Network Entries
▪ The remote IPv6 route entries also
include the following:
• Route source – How the route was
learned. Common codes include O
(OSPF), D (EIGRP), R (RIP), and S
(Static route).
• Next hop - Identifies the IPv6 address
of the next router to forward the packet
to.
▪ The IPv6 router lookup process:
• Examines level 1 network routes for
the best match.
• Longest match is the best match.
Single-Area OSPF
(Open Shortest Path First)
Single-area and Multiarea OSPF
Single-area and Multiarea OSPF (cont.)
Evolution of OSPF

Interior Gateway Protocols

1989
1988 updated in
2008
Features of OSPF
Components of OSPF
Components of OSPF (cont.)

OSPF Routers Exchange Packets - These packets are used to discover


neighbouring routers and exchange routing information to maintain accurate
information about the network.
Link-State Operation

If a neighbour is present, the OSPF-


enabled router attempts to establish a
neighbour adjacency with that
neighbour
Link-State Operation (cont.)

▪ LSAs contain the state and cost of


each directly connected link.

▪ Routers flood their LSAs to adjacent


neighbors.

▪ Adjacent neighbours receiving the LSA


immediately flood the LSA to other
directly connected neighbours until all
routers in the area have all LSAs.
Link-State Operation

▪ Build the topology table based on


the received LSAs.

▪ This database eventually holds all


the information about the
network’s topology.

▪ Execute the SPF Algorithm.


Link-State Operation (cont.)

The best paths are inserted into the


routing table from the SPF tree.
Types of OSPF Packets
Hello Packet

OSPF Type 1 packet = Hello packet:

▪ Discover OSPF neighbours and establish neighbour adjacencies.

▪ Advertise parameters on which two routers must agree to become neighbours.

▪ Elect the Designated Router (DR) and Backup Designated Router (BDR) on
multiaccess networks like Ethernet and Frame Relay.
Hello Packet Intervals

OSPF Hello packets are transmitted:

▪ Every 10 seconds (default on multiaccess and point-to-point networks)

▪ Every 30 seconds (default on non-broadcast multiaccess [NBMA] networks)

▪ Dead interval is the period that the router waits to receive a Hello packet before
declaring the neighbour down

▪ Router floods the LSDB with information about down neighbors out all OSPF-
enabled interfaces

▪ Cisco’s default is 4 times the Hello interval


OSPF Operational States

When an OSPF router is initially connected to a network, it


attempts to:

▪ Create adjacencies with neighbors

▪ Exchange routing information

▪ Calculate the best routes

▪ Reach convergence

▪ OSPF progresses through several states while


attempting to reach convergence.
OSPF DR and BDR
OSPF Network Topology
Router IDs
The network Command
Passive Interface

▪ By default, OSPF messages are forwarded out to all OSPF-enabled interfaces.


However, these messages really only need to be sent out to interfaces connecting to
other OSPF-enabled routers.

▪ Sending out unneeded messages on a LAN affects the network in three ways:
▪ Inefficient Use of Bandwidth
▪ Inefficient Use of Resources
▪ Increased Security Risk

▪ The Passive Interface feature helps limit the scope of routing updates advertisements.
Configuring Passive Interfaces

Use the passive-interface router configuration mode command to prevent the transmission
of routing messages through a router interface but still allow that network to be advertised to
other routers.
OSPF Metric = Cost
Cost = reference bandwidth / interface bandwidth
(default reference bandwidth is 10^8)

Cost = 100,000,000 bps / interface bandwidth in bps


OSPF Accumulates Costs

The cost of an OSPF route is the accumulated value from one router to the destination
network.
Adjusting the Reference Bandwidth
▪ Use the command - auto-cost reference-bandwidth
▪ Must be configured on every router in the OSPF domain
▪ Notice that the value is expressed in Mb/s:
▪ Gigabit Ethernet - auto-cost reference-bandwidth 1000
▪ 10 Gigabit Ethernet - auto-cost reference-bandwidth 10000
Default Interface Bandwidths

On Cisco routers, the default bandwidth on most serial interfaces is set to 1.544 Mb/s.
Adjusting the Interface Bandwidths
Manually Setting the OSPF Cost

Both the bandwidth interface command and the ip ospf cost interface command achieve the same
result: to provide an accurate value for use by OSPF in determining the best route.
Verify OSPF Neighbors

Verify that the router has formed an adjacency with its neighbouring routers.
OSPFv3
Similarities Between OSPFv2 to OSPFv3
Differences Between OSPFv2 to OSPFv3
OSPFv3 Network Topology
OSPFv3 Network Topology (cont.)
Link-Local Addresses

▪ Link-local addresses are automatically created


when an IPv6 global unicast address is
assigned to the interface (required).
▪ Global unicast addresses are not required.
▪ Cisco routers create the link-local address using
FE80::/10 prefix and the EUI-64 process unless
the router is configured manually
▪ EUI-64 involves using the 48-bit Ethernet MAC
address, inserting FFFE in the middle and
flipping the seventh bit. For serial interfaces,
Cisco uses the MAC address of an Ethernet
interface.
▪ Notice in the figure that all three interfaces use
the same link-local address.
Configuring the OSPFv3 Router ID
Configuring the OSPFv3 Router ID (cont.)
Enabling OSPFv3 on Interfaces

Instead of using the network router configuration mode command to specify


matching interface addresses, OSPFv3 is configured directly on the interface.
Verify OSPFv3 Neighbors/Protocol Settings
Verify IPv6 Routing Table
Thank
You

You might also like