Week1 - CLO1 - Routing Concepts - SRWE - Module - 14
Week1 - CLO1 - Routing Concepts - SRWE - Module - 14
Delivery Outline
• W1: CLO1 – Routing Concepts
• W2: CLO1 – IP Static Routing Quiz 1
• W3: CLO1 – Troubleshoot Static and Default Routes
• W4: CLO2 – Dynamic Routing
• W5: CLO2 – Routing Concepts (Cont.)
• W6: CLO1 – Dynamic Routing
• W7: CLO3 – Single-Area OSPF Concepts
• W8: CLO3 - Single-Area OSPFv2 Configuration (Part 1)
• W9: CLO3 – Single-Area OSPFv2 Configuration (Part 2)
• W10: CLO4 – ACL Concepts
• W11: CLO4 - ACLs for IPv4 Configuration (Part 1)
• W12: CLO4 – ACLs for IPv4 Configuration (Part 2)
• W13: CLO5 – NAT for IPv4 (Part 1)
• W14: CLO5 – NAT for IPv4 (Part 2)
• W15: ALL CLO’s – Static and Dynamic Routing Scenario
Week 1
Module
module?
Objectives
Topic Title Topic Objective
Path Determination Explain how routers determine the best path.
Static and Dynamic Routing Compare static and dynamic routing concepts.
Presenter Notes
2023-01-12 15:13:03
-------------------------------------------- Routing Concepts 5
14 - Routing Concepts 14.1 - Path Determination
14.1.1 - Two Functions of a Router
Path Determination
Two Functions of a Router
• When a router receives an IP packet on one interface, it determines which interface to use to forward
the packet to the destination. This is known as routing. The interface that the router uses to forward
the packet may be the final destination, or it may be a network connected to another router that is
used to reach the destination network. Each network that a router connects to typically requires a
separate interface, but this may not always be the case.
• The primary functions of a router are to determine the best path to forward packets based on the
information in its routing table, and to forward packets toward their destination.
1.Routing – Build
routing table
2.Forwarding
Presenter Notes
2023-01-12 15:13:03
Routing Concepts 6
--------------------------------------------
14 - Routing Concepts 14.1
Path - Path Determination
Determination Router 14.1.2 - Router Functions Example
Functions Example
Path Determination
Best Path Equals Longest Match
• The best path in the routing table is also known as the longest match.
• The routing table contains route entries consisting of a prefix (network address) and prefix
length. For there to be a match between the destination IP address of a packet and a route
in the routing table, a minimum number of far-left bits must match between the IP
address of the packet and the route in the routing table. The prefix length of the route in
the routing table is used to determine the minimum number of far-left bits that must
match.
• The longest match is the route in the routing table that has the greatest number of far-left
matching bits with the destination IP address of the packet. The longest match is always
the preferred route.
Note: The term prefix length will be used to refer to the network portion of both IPv4 and
IPv6 addresses.
Presenter Notes
2023-01-12 15:13:04
8
A0-127 Routing Concepts
--------------------------------------------
14 - Routing Concepts 14.1
Path Determination B->128-191 - Path Determination
14.1.4 - IPv4 Longest Match Example
IPv4 Longest Match Example C->192-223
In the table, an IPv4 packet has the destination IPv4 address 172.16.0.10. The router has three route
entries in its IPv4 routing table that match this packet: 172.16.0.0/12, 172.16.0.0/18, and 172.16.0.0/26.
Of the three routes, 172.16.0.0/26 has the longest match and would be chosen to forward the packet. For
any of these routes to be considered a match there must be at least the number of matching bits
indicated by the subnet mask of the route.
172/B
Destination IPv4 Address Address in Binary
A/8 Prefix->16
N.H.H.H 172.16.0.10 10101100.00010000.00000000.00001010
B/16 Route
Entry
Prefix/Prefix Length Address in Binary
An IPv6 packet has the destination IPv6 address 2001:db8:c000::99. This example shows three
route entries, but only two of them are a valid match, with one of those being the longest match.
The first two route entries have prefix lengths that have the required number of matching bits as
indicated by the prefix length. The third route entry is not a match because its /64 prefix requires 64
matching bits.
Destination 2001:db8:c000::99/48
Path
Determination Build
the Routing Table
Directly Connected Networks: Added to the routing table when a local interface is configured with an IP address and subnet mask
(prefix length) and is active (up and up).
Remote Networks: Networks that are not directly connected to the router. Routers learn about remote networks in two ways:
• Static routes - Added to the routing table when a route is manually configured.
• Dynamic routing protocols - Added to the routing table when routing protocols dynamically learn about the remote
network.
Default Route: Specifies a next-hop router to use when the routing table does not contain a specific route that matches the
destination IP address. The default route can be entered manually as a static route, or learned automatically from a dynamic routing
protocol.
• A default route has a /0 prefix length. This means that no bits need to match the destination IP address for this route entry to be
used. If there are no routes with a match longer than 0 bits, the default route is used to forward the packet. The default route is
sometimes referred to as a gateway of last resort.
Presenter Notes
2023-01-12 15:13:05
Routing Concepts 11
--------------------------------------------
14.2.1 - Packet Forwarding Decision
After a router has determined the best path, it could do the following:
After a router has determined the best path, it could do the following:
Note: This process will vary for other types of Layer 2 networks.
Presenter Notes
2023-01-12 15:13:05
Routing Concepts 14
--------------------------------------------
14.2.1 - Packet Forwarding Decision
Process (Cont.)
Packet Forwarding Decision Process (Cont.)
After a router has determined the best path, it could do the following:
• The topology in the figure will be used for configuration and verification
examples. It will also be used in the next topic to discuss the IP routing table.
10.0.0.2/8 255.2
R1 to reach 10.0.4.0
Ip route 10.0.4.0 255.255.255.0 10.0.3.2
Presenter Notes
2023-01-12 15:13:07
Routing Concepts 21
--------------------------------------------
Configuration Commands 14.3.2 - Configuration Commands
Verification Commands
Common verification commands include the following:
• show ip interface brief
• show running-config interface interface-type number
• show interfaces
• show ip interface
• show ip route
• ping
In each case, replace ip with ipv6 for the IPv6 version of the command.
Presenter Notes
2023-01-12 15:13:08
Routing Concepts 23
--------------------------------------------
14.3.4 - Filter Command Output
The filtering parameters that can be configured after the pipe include:
• section - This displays the entire section that starts with the filtering expression.
• include - This includes all output lines that match the filtering expression.
• exclude - This excludes all output lines that match the filtering expression.
• begin - This displays all the output lines from a certain point, starting with the line
that matches the filtering expression.
Note: Output filters can be used in combination with any show command.
Presenter Notes
2023-01-12 15:13:08
Routing Concepts 24
--------------------------------------------
14.3.5 - Packet Tracer - Basic Rouetr
Configuration Review
Packet Tracer - Basic Router Configuration Review
In this Packet Tracer, you will do the following:
• Configure Devices and Verify Connectivity
• Display Router Information
Presenter Notes
2023-01-12 15:13:08
Routing Concepts 25
--------------------------------------------
IP Routing Table 14.4.1 - Route Sources
Route Sources
A routing table contains a list of routes to known networks (prefixes and prefix lengths). The source of
this information is derived from the following:
• Directly connected networks
• Static routes
• Dynamic routing protocols
The source for each route in the routing table is identified by a code. Common codes include
the following:
• L - Identifies the address assigned to a router interface.
• C - Identifies a directly connected network.
• S - Identifies a static route created to reach a specific network.
• O - Identifies a dynamically learned network from another router using the OSPF routing
protocol.
• * - This route is a candidate for a default route.
Presenter Notes
2023-01-12 15:13:08
Routing Concepts 26
--------------------------------------------
14.4.2 - Routing Table Principles
Routing Table Principles
There are three routing table principles as described in the table. These are issues that are
addressed by the proper configuration of dynamic routing protocols or static routes on all the routers
between the source and destination devices.
Every router makes its decision alone, based • R1 can only forward packets using its own routing table.
on the information it has in its own routing •R1 does not know what routes are in the routing tables of other routers (e.g.,
table. R2).
The information in a routing table of one Just because R1 has route in its routing table to a network in the internet
router does not necessarily match the via R2, that does not mean that R2 knows about that same network.
routing table of another router.
R1 receives a packet with the destination IP address of PC1 and the source IP
address of PC3. Just because R1 knows to forward the packet out its G0/0/0
Routing information about a path does not interface, doesn’t necessarily mean that it knows how to forward packets
provide return routing information. originating from PC1 back to the remote network of PC3
Presenter Notes
2023-01-12 15:13:08
Routing Concepts 27
--------------------------------------------
14.4.3 - Routing Table Entries
Static Routes
After directly connected interfaces are configured and added to the routing table, static or
dynamic routing can be implemented for accessing remote networks. Static routes are
manually configured. They define an explicit path between two networking devices. They
are not automatically updated and must be manually reconfigured if the network topology
changes.
The topology in the figure is simplified to show only one LAN attached to each router. The
figure shows IPv4 and IPv6 static routes configured on R1 to reach the 10.0.4.0/24 and
2001:db8:acad:4::/64 networks on R2.
Presenter Notes
2023-01-12 15:13:09
Routing Concepts 31
--------------------------------------------
14.4.7 - Dynamic Routing Protocols
Dynamic Routing Protocols
Dynamic routing protocols are used by routers to automatically share information about the
reachability and status of remote networks. Dynamic routing protocols perform several activities,
including network discovery and maintaining routing tables.
Presenter Notes
2023-01-12 15:13:09
Routing Concepts 32
--------------------------------------------
14.4.8 - Dynamic Routes in the Ronuigt
Dynamic Routes in the Routing Table Table
OSPF is now being used in our sample topology to dynamically learn all the networks
connected to R1 and R2. The routing table entries use the status code of O to indicate the
route was learned by the OSPF routing protocol. Both entries also include the IP address of
the next-hop router, via ip-address.
Note: IPv6 routing protocols use the link-local address of the next-hop router.
Note: OSPF routing configuration for IPv4 and IPv6 is beyond the scope of this course.
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP,
EX - EIGRP external, O - OSPF, IA - OSPF inter area
(output omitted for brevity)
O 10.0.4.0/24 [110/50] via 10.0.3.2, 00:24:22, Serial0/1/1
O 10.0.5.0/24 [110/50] via 10.0.3.2, 00:24:15,
Serial0/1/1
R1# show ipv6 route
IPv6 Routing Table - default - 10 entries
(Output omitted)
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
O 2001:DB8:ACAD:4::/64 [110/50]
via FE80::2:C, Serial0/1/1
O 2001:DB8:ACAD:5::/64
[110/50]
via FE80::2:C,
Presenter Notes
2023-01-12 15:13:09
Routing Concepts 33
--------------------------------------------
14.4.9 - Default Route
Default Route
The default route specifies a next-hop router to use when the routing table does not
contain a specific route that matches the destination IP address. A default route can be
either a static route or learned automatically from a dynamic routing protocol. A default
route has an IPv4 route entry of 0.0.0.0/0 or an IPv6 route entry of ::/0. This means that
zero or no bits need to match between the destination IP address and the default route.
Presenter Notes
2023-01-12 15:13:09
Routing Concepts 34
--------------------------------------------
14.4.10 - Structure of an IPv4 Rounitg
Table
Structure of an IPv4 Routing Table
IPv4 was standardized using the now obsolete classful addressing architecture. The IPv4
routing table is organized using this same classful structure. Although the lookup process
no longer uses classes, the structure of the IPv4 routing table still retains in this format.
An indented entry is known as a child route. A route entry is indented if it is the subnet of a
classful address (class A, B or C network). Directly connected networks will always be
indented (child routes) because the local address of the interface is always entered in the
routing table as a /32. The child route will include the route source and all the forwarding
information such as the next-hop address. The classful network address of this subnet will
be shown above the route entry, less indented, and without a source code. That route is
known as a parent route.
Presenter Notes
2023-01-12 15:13:09
Routing Concepts 35
--------------------------------------------
14.4.10 - Structure of an IPv4 Rounitg
Table
Structure of an IPv4 Routing Table (Cont.)
• An indented entry is known as a child route. A Router# show ip route
route entry is indented if it is the subnet of a (Output omitted)
classful address (class A, B or C network). 192.168.1.0/24 is variably..
C 192.168.1.0/24 is
• Directly connected networks will always be indented direct.. L
(child routes) because the local address of the 192.168.1.1/32 is direct.. O
interface is always entered in the routing table as a 192.168.2.0/24 [110/65].. O
/32. 192.168.3.0/24 [110/65]..
• The child route will include the route 192.168.12.0/24 is variab..
C 192.168.12.0/30 is
source and all the forwarding information such as
direct.. L
the next-hop address.
192.168.12.1/32 is direct..
• The classful network address of this subnet will be 192.168.13.0/24 is variably..
shown above the route entry, less indented, and C 192.168.13.0/30 is
without a source code. That route is known as a direct.. L
parent route. 192.168.13.1/32 is direct..
192.168.23.0/30 is subnette..
O 192.168.23.0/30 [110/128]..
Router#
Presenter Notes
2023-01-12 15:13:10
Routing Concepts 36
--------------------------------------------
14.4.11 - Structure of an IPv6 Rounitg
Structure of an IPv6 Routing Table Table
Cisco IOS uses what is known as the administrative distance (AD) to determine the route to
install into the IP routing table. The AD represents the "trustworthiness" of the route.
The lower the AD, the more trustworthy the route source.
Presenter Notes
2023-01-12 15:13:10
Routing Concepts 38
--------------------------------------------
14.4.12 - Administrative Distance C (o)n.t
Delivery Outline
• W1: CLO1 – Routing Concepts
• W2: CLO1 – IP Static Routing
• W3: CLO1 – Troubleshoot Static and Default Routes
• W4: CLO2 – Dynamic Routing
• W5: CLO2 – Routing Concepts (Cont.)
• W6: CLO1 – Dynamic Routing
• W7: CLO3 – Single-Area OSPF Concepts
• W8: CLO3 - Single-Area OSPFv2 Configuration (Part 1)
• W9: CLO3 – Single-Area OSPFv2 Configuration (Part 2)
• W10: CLO4 – ACL Concepts
• W11: CLO4 - ACLs for IPv4 Configuration (Part 1)
• W12: CLO4 – ACLs for IPv4 Configuration (Part 2)
• W13: CLO5 – NAT for IPv4 (Part 1)
• W14: CLO5 – NAT for IPv4 (Part 2)
• W15: ALL CLO’s – Static and Dynamic Routing Scenario