CN Unit 4
CN Unit 4
(Information Technology)
2018 Pattern
ITUA22183-Computer Networks
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 1
▪ Prerequisites :
▪ Course Objectives :
▪ To study the fundamentals of networking
▪ To understand functionalities of Physical and Data link layer
▪ To understand the functionalities of Network Layer
▪ To study various protocols at Transport and Application Layer
▪ To learn different techniques for routing and routing configuration.
▪ To learn and demonstrate VLAN, ACL and NAT in networking
▪ Course Outcomes :
▪ After completion of the course, student will be able to
▪ 1. Explore network design issues
▪ 2. Understand the functions of OSI layers & TCP/IP protocol stack
▪ 3. Understand the functionality of network layer
▪ 4. Understand the functionality of Transport and Application Layer
▪ 5. Analyze the routing requirements for a given network/LAN and decide the most
▪ appropriate routing strategy.
▪ 6. Design Switched networks and demonstrate the concepts of VLAN and ACL for
▪ switched networks. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
UNIT 4- Routing Essentials
▪ Introduction to Routing,
▪ Routing Table,
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
1: Routing Concepts
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Router Functions
Characteristics of a Network
▪ Networks are relied on for web applications,
IP telephony, video conferencing, interactive
gaming, e-commerce, and much more.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
Router Functions
Routers Are Computers ▪ A router is a specialized computer and
requires the same components to operate as
computers including:
• Central Processing Unit (CPU)
• Operating System (OS)
• A desktop computer might use the Windows
Operating System, but a Cisco Router uses the
Cisco Internetwork Operating System (IOS).
• Memory and storage (RAM, ROM, NVRAM,
Flash, hard drive)
• Non-volatile vs. volatile memory
• Which one requires constant power to retain
content?
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
Router Functions
Routers Interconnect Networks
▪ Router is responsible for forwarding
packets from network to network, from the
source to the destination
• Process switching –
• Slower and older packet forwarding mechanism
• Packet arrives on an interface, it is forwarded to the
control plane where the CPU matches the destination
address with an entry in its routing table in order to
determine the exit interface
• Slow because it does this for every packet in a stream
• Fast Switching –
• Common packet forwarding mechanism which uses a
fast-switching cache to store the next-hop information
• Packet arrives on an interface, it is forwarded to the
control plane where the CPU searches for a match in
the fast-switching cache
• If no match, it is process-switched and forwarded to
the exit interface
• Packet flow information stored
© 2016 Cisco and/or its affiliates. in the
All rights fast-switching
reserved. Cisco Confidential 13
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Router Functions
Lab – Mapping the Internet
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Connect Devices
Connect to a Network
▪ Home Office devices might connect as
follows:
• Laptops and tablets connect wirelessly
to a home router.
• A network printer connects using an
Ethernet cable to the switch port on the
home router
• The home router connects to the
Internet service provider cable modem
using an Ethernet cable.
• The cable modem connects to the ISP
network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
Connect Devices
Connect to a Network (Cont.)
▪ Branch site devices might connect as
follows:
• Desktop PCs, VoIP phones, and corporate
resources such as file servers and printers
connect to Layer 2 switches using
Ethernet cables.
• Laptops and smartphones connect
wirelessly to wireless access points
(WAPs).
• The WAPs connect to switches using
Ethernet cables.
• Layer 2 switches connect to an Ethernet
interface on the edge router using
Ethernet cables.
• The edge router connects to a WAN
service provider.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
Connect Devices
Connect to a Network (Cont.)
▪ Central site devices might connect as
follows:
• Desktop PCs and VoIP phones connect to
Layer 2 switches using Ethernet cables.
• Layer 2 switches connect redundantly to
multilayer Layer 3 switches using Ethernet
fiber-optic cables.
• Layer 3 multilayer switches connect to an
Ethernet interface on the edge router
using Ethernet cables.
• The corporate website server connects to
the edge router interface.
• The edge router connects to a WAN SP
and also to an ISP for backup purposes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Connect Devices
Default Gateways ▪ Devices need the following information
for network access: IP address, subnet
mask, and default gateway.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
Connect Devices
▪ Host computers connect to a wired network
Device LEDs using a RJ-45 Ethernet cable.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
Connect Devices
Enable IP on a Switch
▪ Network devices require IP
addresses in order for the network
administrator to connect to the
devices using Telnet, SSH, HTTP,
or HTTPS.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
Connect Devices
Packet Tracer – Documenting the Network
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
Router Basic Settings
Configure Basic Router Settings ▪ Cisco routers and switches have
similar initial configuration steps:
• Name the device in order to
distinguish it from other devices in
the network using the hostname
command in global config mode.
• Secure management access as
shown in the figure to the left in
order to secure privileged EXEC,
user EXEC, and remote access.
• Configure a banner to provide legal
notification of unauthorized access
in global config mode: banner motd
** Authorized Access Only! **
▪ Always save your configuration
changes and verify your settings:
R1# copy running-config startup-
config
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Router Basic Settings
▪ Layer 2 switches support LANs and
Configure an IPv4 Router Interface have multiple FastEthernet or
Gigabit Ethernet ports.
▪ The clock rate 128000 command was used since this is being ▪ An interface can generate its own
configured in a lab environment. IPv6 link-local address without having
a global unicast address by using the
ipv6 enable interface config
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
command.
Router Basic Settings
Configure an IPv6 Router Interface (Cont.)
▪ Unlike IPv4, IPv6 interfaces will typically
have more than one IPv6 address.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
Verify Connectivity of Directly Connected Networks
Verify Interface Settings ▪ The following commands are used to verify
the operation and configuration of an
interface:
• show ip interface brief – Displays a summary
for all interfaces including the IPv4 address of
the interface as well as the current operational
status.
• show ip route – Displays the contents of the
IPv4 routing table.
• show running-config interface interface-id –
Displays the commands configured on the
specified interface.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37
Verify Connectivity of Directly Connected Networks
Lab – Configuring Basic Router Settings with IOS CLI
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38
1.2 Routing Decisions
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 39
Switching Packets Between Networks
Router Switching Function
▪ The primary function of a router
is to forward packets toward
their destination.
• Uses a switching function which
is a process that accepts a
packet on one interface and
forwards it out of another
interface. This is not to be
confused with the function of a
Layer 2 switch.
• The switching function also
encapsulates the packets in the
appropriate data link frame type
for the outgoing interface.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 40
Switching Packets Between Networks
▪ When a router receives a packet from one
Router Switching Function (Cont.) network that is destined for another network,
the router performs the following three
steps:
• Step 1. De-encapsulates the Layer 2 frame
header and trailer to expose the Layer 3
packet.
• Step 2. Examines the destination IP address
of the IP packet to find the best path in the
routing table.
• Step 3. If the router finds a path to the
destination, it encapsulates the Layer 3
packet into a new Layer 2 frame and
forwards the frame out the exit interface.
▪ As a packet travels from the source device
to the destination device, the Layer 3 IP
addresses do not change. However, the
Layer 2 data link addresses change at every
hop as it is de-encapsulated and re-
encapsulated.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 41
Switching Packets Between Networks
Send a Packet ▪ For PC1 to send a packet to PC2,
the following occurs:
• PC1 must determine if the
destination IPv4 address is on the
same network. If it is on the same
network, PC1 will obtain the
destination MAC address from its
ARP cache or use an ARP request.
• Because the destination network is
on a different network, PC1 forwards
the packet to its default gateway.
• To determine the MAC address of
the default gateway, PC1 checks its
ARP table for the IPv4 address of the
default gateway and its
corresponding MAC address. An
ARP request is sent if it is not found.
• When PC1 has the MAC address of
Router R1,its affiliates.
© 2016 Cisco and/or it can forward
All rights the
reserved. Cisco packet.
Confidential 42
Switching Packets Between Networks
▪ When R1 receives the Ethernet frame
Forward to the Next Hop from PC1, the following occurs:
• R1 examines the destination MAC
address which matches the MAC
address of the receiving interface and
copies the frame into its buffer.
• R1 identifies the Ethernet Type field as
0x800 which indicates that the Ethernet
frame contains an IPv4 packet in the
data portion of the frame.
• R1 de-encapsulates the Ethernet frame.
• Because the destination IPv4 address
of the packet, 192.168.4.10, does not
match any of the directly connected
networks on R1, R1 searches the
routing table for a corresponding route.
• R1’s Routing Table has a route for the
192.168.4.0/24 network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 43
Switching Packets Between Networks ▪ When R1 receives the Ethernet frame
Forward to the Next Hop (Cont.) from PC1, the following occurs:
• The route that R1 finds to the
192.168.4.0/24 network has a next-hop
address of 192.168.2.2 and an exit
interface of FastEthernet 0/1.
• This will require that the IPv4 packet be
encapsulated in a new Ethernet frame
with the destination MAC address of the
IPv4 address of the next-hop router,
192.168.2.2
• Because the exit interface is on an
Ethernet network, R1 must resolve the
next-hop IPv4 address with a
destination MAC address using ARP,
assuming it is not in its ARP cache.
• When R1 has the MAC address for the
next-hop, the Ethernet frame is
forwarded out of the FastEthernet 0/1
interface of R1.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 44
Switching Packets Between Networks
Packet Routing
▪ R2 examines the destination MAC
address. Because it matches the
MAC address of its receiving
interface, R2 copies the frame into
its buffer.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 48
Path Determination ▪ Determining the best path to a destination network
Best Path involves the evaluation of multiple paths and
selecting the optimum or shortest path to reach that
network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 52
Analyze the Routing Table
▪ The routing table of a router stores
The Routing Table information about:
• Directly connected routes – Obtained
from the active router interfaces.
• Remote routes – These are remote
networks connected to other routers
that are learned from dynamic routing
protocols or are statically configured.
▪ A routing table is a data file in RAM
that is used to store information about
directly connected and remote
networks.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 56
Directly Connected Routes
Directly Connected Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 58
Directly Connected Routes
Directly Connected IPv6 Example ▪ The figure to the left shows the
configuration steps for the directly
connected interfaces of R1 with the
indicated IPv6 addresses.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 60
Statically Learned Routes
Static Routes
▪ After directly connected interfaces are
configured and added to the routing
table, then static or dynamic routing can
be configured.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 61
Statically Learned Routes
Static Routes (Cont.) ▪ There are two main types of static routes in the
routing table:
• Static route to a specific network
• Default static route
▪ IPv4 static routes are configured using the
following command:
• ip route network mask { next-hop-ip | exit-intf }
▪ A static route appears in the routing table with
the code ‘S’.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 67
2.1 Implement Static Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 68
Static Routing
Reach Remote Networks
▪ A router learns about remote networks in two ways:
• Manually entered into the route table using static routes
• Static routes are not automatically updated and must be reconfigured when topology changes
• Dynamically (Automatically) learned using a routing protocol
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 69
Static Routing
Why Use Static Routing?
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 70
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
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 71
Types of Static Routes
Static Route Applications
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 72
Types of Static Routes
Standard Static Route
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 73
Types of Static Routes
Default Static Route
▪ Default route matches all packets and is used
when a packet does not match a specific route
in the routing table
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 74
Types of Static Routes
Summary Static Route
▪ Multiple static routes can be summarized into a single network address
• Destination networks must be contiguous
• Multiple static routes must use the same exit interface or next hop
• In figure, four networks is summarized into one summary static route
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 75
Types of Static Routes
Floating Static Route
▪ Static routes that are used to provide
a backup path Floating
▪ Used when primary route is not
Static Route
available
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 76
2.2 Configure Static and Default
Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 77
Configure IPv4 Static Routes
ip route Command
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 78
Configure IPv4 Static Routes
Next-Hop Options
▪ In this example, each router only has entries for directly connected network
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 79
Configure IPv4 Static Routes
Next-Hop Options (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 80
Configure IPv4 Static Routes
Configure a Next-Hop Static Route
▪ In this example, only the next-hop IP
address is specified
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 81
Configure IPv4 Static Routes
Configure a Next-Hop Static Route (Cont.)
▪ In example, when a packet is destined
for 192.168.2.0/24 network, R1:
• Looks for match (#1) and needs to
forward packets to 172.16.2.2
• R1 must determine how to reach
172.16.2.2 first
• Searches a second time for
172.16.2.0/24 (#2) and matches to exit
interface s0/0/0
• Takes two routing table lookups,
process referred to as recursive lookup
• If the exit interface is “down” or
“administratively down” then the static
route configured with next-hop will not
be installed in routing table
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 82
Configure IPv4 Static Routes
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
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 83
Configure IPv4 Static Routes
Configure a Directly Connected Static Route (Cont.)
▪ Cisco Express Forwarding (CEF)
• default behavior on IOS 12.0 or later
• provides optimized lookup
• uses a Forwarding Information Base (FIB) which is a copy of the routing table and an adjacency table
that includes Layer 2 addresses
• no recursive lookup needed for next-hop IP address lookups
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 84
Configure IPv4 Static Routes
Configure a Fully Specified Static Route
▪ Both the exit interface and the next-hop IP address
are specified
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 85
Configure IPv4 Static Routes
Verify a Static Route
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 86
Configure IPv4 Default Routes
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 neighbor router)
▪ Default route is used when no other routes in the routing table match the destination IP
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 87
Configure IPv4 Default Routes
Configure a Default Static Route
Any packets
not matching
route entries
are forwarded
to 172.16.2.2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 88
Configure IPv4 Default Routes
Verify a Default Static Route
▪ show ip route static displays
just the static routes
• S indicates static route
• candidate default route indicated
by *
• /0 mask in route entry indicates
none of the bits are required to
match
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 89
Configure IPv4 Default Routes
Packet Tracer – Configuring IPv4 Static and Default Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 90
Configure IPv4 Default Routes
Lab – Configuring IPv4 Static and Default Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 91
Configure IPv6 Static Routes
The ipv6 route Command
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 92
Configure IPv6 Static Routes
The ipv6 route Command (Cont.)
▪ ipv6 unicast-routing
enables the router to
forward IPv6 packets
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 93
Configure IPv6 Static Routes
Next-Hop Options
▪ Each router only knows about directly connected networks
• R1 can ping R2 (ipv6 2001:DB8:ACAD:4::2) but cannot ping R3 (ipv6 2001:DB8:ACAD:3::2)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 94
Configure IPv6 Static Routes
Next-Hop Options (Cont.)
▪ Next hop can be identified by an IPv6 address, exit interface, or both.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 95
Configure IPv6 Static Routes
Configure a Next Hop Static IPv6 Route
As with IPv4, must resolve the route to determine
the exit interface to use to forward the packet
Three next-
hop static
routes are
configured
on R1
▪ Packet destined for 2001:DB8:ACAD:3::/64 network, forwarded out Serial 0/0/0 – no other lookups
needed
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 97
Configure IPv6 Static Routes
Configure a Fully Specified Static IPv6 Route
▪ Fully specified static route must be used if IPv6 link-local address is used as next-hop
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 98
Configure IPv6 Static Routes
Verify IPv6 Static Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 99
Configure IPv6 Default Routes
Default Static IPv6 Route
▪ Default static route matches all packets not specified in routing table
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 100
Configure IPv6 Default Routes
Configure a Default Static IPv6 Route
▪ R1 is a stub router
because it is only
connected to R2
▪ More efficient to
configure a default
static IPv6 route in
this topology
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 101
Configure IPv6 Default Routes
Verify a Default Static Route
▪ ::/0 mask indicates that none of the bits are required to match
▪ If a more specific match does not exist, the default static IPv6 route matches all packets.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 102
Configure IPv6 Default Routes
Packet Tracer – Configuring IPv6 Static and Default Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 103
Configure IPv6 Default Routes
Lab – Configuring IPv6 Static and Default Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 104
Configure Floating Static Routes
Floating Static Routes
Floating static routes have an administrative distance
greater than the dynamic routing protocol or other
static route
▪ Used as backup routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 106
Configure Floating Static Routes
Test the IPv4 Floating Static Route
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 107
Configure Floating Static Routes
Test the IPv4 Floating Static Route (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 108
Configure Floating Static Routes
Configure an IPv6 Floating Static Route
▪ Similar to IPv4 floating static routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 109
Configure Floating Static Routes
Packet Tracer - Configuring Floating Static Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 110
Configure Static Host Routes
Automatically Installed Host Routes
Host route is an IPv4 address with a 32-bit mask or IPv6 address with a 128-bit mask.
▪ Automatically installed when IP address is configured
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 111
Configure Static Host Routes
Configure IPv4 and IPv6 Static Host Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 112
2.3 Troubleshoot Static and
Default Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 113
Packet Processing with Static Routes
Static Routes and Packet Forwarding
PC1 sending R1 has no
packet to PC3 - specific route
Packet arrives to 192.168.2.0
on G0/0 so uses
default route
R1 Frame
encapsulates forwarded
packet in new out S0/0/0
frame
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 114
Packet Processing with Static Routes
Static Routes and Packet Forwarding (Cont.)
R2 de-
Packet encapsulates
arrives on the frame and
S0/0/0 looks for a
interface R2 has a R2
route to the static route to encapsulates
on R2 destination 192.168.2.0/24 the packet in
out the Serial a new frame
0/0/1 interface and forwards
out S0/0/1
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 115
Packet Processing with Static Routes
Static Routes and Packet Forwarding (Cont.)
• R3 encapsulates the
R3 de- R3 looks up the
packet in a new
encapsulates the ARP table entry for
frame with the MAC
frame and sees a 192.168.2.10 to find
address of the G0/0
connected route the Layer 2 MAC
interface as the
to 192.168.2.0/24 address for PC3
source Layer 2
out G0/0 (ARP used if
address and the
needed for PC3
MAC address of PC3
MAC)
as the destination
MAC address
• Frame is forwarded
out of G0/0 interface
and packet arrives
on the NIC interface
of PC3
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 116
Troubleshoot IPv4 Static and Default Route Configuration
Troubleshoot a Missing Route
▪ Common IOS troubleshooting commands
include:
• ping
• traceroute
• show ip route
• show ip interface brief
• show cdp neighbors detail
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 117
Troubleshoot IPv4 Static and Default Route Configuration
Troubleshoot a Missing Route (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 118
Troubleshoot IPv4 Static and Default Route Configuration
Solve a Connectivity Problem
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 119
Troubleshoot IPv4 Static and Default Route Configuration
Solve a Connectivity Problem (Cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 120
Troubleshoot IPv4 Static and Default Route Configuration
Packet Tracer – Troubleshooting Static Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 121
Troubleshoot IPv4 Static and Default Route Configuration
Lab – Troubleshooting Static Routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 122
2.4 Summary
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 123
3: Dynamic Routing
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 125
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
▪ RIP protocol was updated to RIPv2 to accommodate growth in the network environment
• RIPv2 does not scale to current larger network implementations
▪ Routing Protocols developed to meet the need of larger networks include:
• Open Shortest Path First (OSPF)
• Intermediate System-to-Intermediate System (IS-IS).
• Enhanced IGRP (EIGRP)
▪ Border Gateway Protocol (BGP) is used between Internet service providers (ISPs)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 126
Dynamic Routing Protocol Overview
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 neighboring
routers, exchange routing information, and maintain
accurate information about the network.
• Algorithms – to facilitate learning routing information
and for best path determination.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 127
Dynamic versus Static Routing
Static Routing Uses
▪ Networks often use both static
and dynamic routing.
▪ Static Routing is used as
follows:
• For easy routing table
maintenance in small networks.
• Routing to and from a stub
network.
• Accessing a single default route.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 128
Dynamic versus Static Routing
Static Routing Advantages and Disadvantages
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 129
Dynamic versus Static Routing
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.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 130
Dynamic versus Static Routing
Dynamic Routing Advantages and Disadvantages
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 131
Dynamic routing
▪ Routing Algorithm (Dijkstra / Bellman-Ford) – idealization
• All routers are identical
• Network is flat.
• Not true in Practice
▪ Hierarchical routing
• Internet = network of networks
• Each network admin may want to control routing in its own routing network.
• Hierarchical routing solves
• Scale problems.
• Administrative autonomy.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 132
Routing Protocols RIP, OSPF, BGP
▪ Dynamic protocols
• Sharing neighborhood information
▪ RIP (one hop count, how many networks a packet crosses), Networks areits affiliates.
© 2016 Cisco and/or treated All rightsequally
reserved. Cisco Confidential 133
Routing Information Protocol RFC 1058
• Receive a RIP message (a response)
• Add one hop for each advertised dest
• Repeat
• If (dest not in routing table)
• Add the advertised info to the
table
• Else
• If (next-hop is the same)
• Replace with the
advertised one
• Else
▪ http://www.faqs.org/rfcs/rfc1058.html • If (advertised hop count
< one in the table)
▪ Distance vector algorithm (Bellman-Ford) • Replace entry in the
• Sharing knowledge about the entire AS routing table
• Return
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 134
▪ Dest D G
▪ If Information is from G
• Always update
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 135
RIP message format
• RIP messages uses UDP
datagrams on port 520
• Implemented in Unix systems by
the ‘routed’ daemon.
• Command: 8 bits
• Request (1), reply (2)
• Version: 1 or 2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 137
RIP timers
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 139
RIP Instability
Triggered Updates
Split Horizons
Poison reverse
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 140
Border Gateway Protocol (RFC 1771)
▪ Based on the path vector routing.
▪ Distance-vector protocol not preferred for inter-AS routing (exterior
routing protocol)
• Assumes all routers have a common distance metrics to judge route
preferences.
• If routers have different meanings of a metric, it may not be possible to create stable, loop
free routes.
• A given AS may have different priorities from another AS.
• Gives no information about the ASs that will be visited.
▪ Link-state routing protocol
• Different metrics.
• Flooding is not realistic.
▪ Path vector routing
• No metrics, © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 141
BGP (continued)
▪ Functional procedures
• Neighbor acquisition (open message, acceptance through Keepalive message)
• Neighbor reachability (periodic Keepalive messages)
• Network reachability (broadcast an update message)
• Each routers maintains a database of networks that can be reached
• + preferred route to this network.
▪ RFC does not address © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 142
BGP (cont.)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 144
Open Shortest Path First (RFC 1247)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 145
OSPF (type of links)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 146
OSPF (link state advertisement)
Network Link
Router Link
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 147
OSPF (LSA cont.)
External Link
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 148
Shortest Path Calculation
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 149
Types of OSPF packets and header
format
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 150
Link State Update Packet
A router link example
LSA header not covered
Refer to RFC 1247
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 151
A Network Link Example
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 152
Summary Links state Advertisements
External Link
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 153
3.2 RIPv2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 154
Dynamic versus Static Routing
Router RIP Configuration Mode
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 155
Configuring the RIP Protocol
Advertise Networks
▪ The network network-address
router configuration mode
command:
• Enables RIP on all interfaces that
belong to a specific network
• Advertises the network in RIP routing
updates sent to other routers every 30
seconds.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 156
Configuring the RIP Protocol
Verify RIP Routing
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 158
Configuring the RIP Protocol
Disable Auto Summarization
▪ RIPv2 automatically
summarizes networks at major
network boundaries.
▪ Use the no auto-summary
router configuration mode
command to disable auto
summarization.
▪ Use the show ip protocols
command to verify that auto
summarization is off.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 159
Configuring the RIP Protocol
Configure Passive Interfaces
▪ RIP updates:
• Are forwarded out all RIP-enabled interfaces
by default.
• Only need to be sent out interfaces that are
connected to other RIP-enabled routers.
▪ Sending RIP updates to LANs wastes
bandwidth, wastes resources, and is a
security risk.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 160
Configuring the RIP Protocol
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.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 161
Configuring the RIP Protocol
Packet Tracer - Configuring RIPv2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 162
Configuring the RIP Protocol
Lab - Configuring Basic RIPv2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 163
3.3 The Routing Table
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 164
Parts of an IPv4 Route Entry
Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 165
Parts of an IPv4 Route Entry
Directly Connected Entries ▪ Directly Connected Networks (C) are
automatically added to the routing table
when the interface is configured and
activated.
▪ Entries contain the following information:
• Route source - how the route was learned.
• Destination network – remote network.
• Outgoing Interface – exit interface used to
forward packets to destination.
▪ Other route source entries include:
• S –Static Route
• D – EIGRP routing protocol
• O – OSPF routing protocol
• R - RIP routing protocol
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 166
Parts of an IPv4 Route Entry
Remote Network Entries
▪ Routes to remote networks contain the
following information:
• Route source – how route was learned
• Destination network
• Administrative distance (AD) -
trustworthiness of the route.
• Metric – value assigned to reach the remote
network. Lower is better.
• Next hop – IPv4 address of the next router
that the packet should be forwarded to.
• Route timestamp – time since the route was
updated.
• Outgoing interface - the exit interface to use
to forward the packet
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 167
Dynamically Learned IPv4 Routes
Routing Table Terms
▪ The routing table is a hierarchical
structure that is used to speed up the
lookup process when locating routes
and forwarding packets.
▪ The hierarchy includes:
• Ultimate Routes
• Level 1 routes
• Level 1 parent routes
• Level 2 child routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 168
Dynamically Learned IPv4 Routes
Ultimate Route
▪ An ultimate route is a routing table
entry that contains either a next-hop
IPv4 address or an exit interface.
▪ Directly connected, dynamically
learned, and local routes are
ultimate routes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 169
Dynamically Learned IPv4 Routes
Level 1 Route
▪ A level 1 route can be a:
• Network route - a network route that
has a subnet mask equal to that of the
classful mask.
• Supernet route - a network address
with a mask less than the classful
mask, for example, a summary
address.
• Default route - a static route with the
address 0.0.0.0/0
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 170
Dynamically Learned IPv4 Routes
Level 1 Parent Route
▪ A parent route is a level 1 network
route that is subnetted.
▪ In the routing table, it basically
provides a heading for the specific
subnets it contains.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 171
Dynamically Learned IPv4 Routes
Level 2 Child Route
▪ A level 2 child route is a route that
is a subnet of a classful network
address.
▪ Level 1 parent routes contain level
2 child routes.
▪ Level 2 child routes are also
ultimate routes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 172
The IPv4 Route Lookup Process
Route Lookup Process ▪ Router lookup process:
• If the best match is a level 1 ultimate
route, then this route is used to forward
the packet.
• If the best match is a level 1 parent
route, the router then examines child
routes (the subnet routes).
• If there is a match with a level 2 child
route, that is used to forward the packet.
• If there is no match with level 2 child
routes, the router searches level 1
supernet or default routes. If there is a
match, that route is used.
• If there is no match found in the routing
table the packet is dropped.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 173
The IPv4 Route Lookup Process
Best Route = Longest Match
▪ The best match is the route in the
routing table that has the most
number of far left matching bits with
the destination IPv4 address of the
packet.
▪ The route with the greatest number of
equivalent far left bits, or the longest
match, is always the preferred route.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 174
Analyze an IPv6 Routing Table
IPv6 Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 175
Analyze an IPv6 Routing Table
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 preferred route).
• Outgoing interface – Exit interface used to
forward packet.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 176
Analyze an IPv6 Routing Table
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.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 177
3.4 Summary
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 178
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 179