Chapter 1: Routing Concepts: Ts Mohamad Rizal Abdul Rejab CISCO Networking Academy LMC/Manager
Chapter 1: Routing Concepts: Ts Mohamad Rizal Abdul Rejab CISCO Networking Academy LMC/Manager
Chapter 1: Routing Concepts: Ts Mohamad Rizal Abdul Rejab CISCO Networking Academy LMC/Manager
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Chapter 1: Routing Concepts
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Chapter 1 - Sections & Objectives
1.3 Router Operation
• Explain how a router learns about remote networks when operating in a small to medium-sized
business network.
• Explain routing table entries for directly connected networks.
• Explain how a router builds a routing table of directly connected networks.
• Explain how a router builds a routing table using static routes.
• Explain how a router builds a routing table using a dynamic routing protocol.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
1.1 Router Initial Configuration
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
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 9
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 11
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 14
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Router Functions
Lab – Mapping the Internet
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
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 18
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 19
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 20
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 23
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 25
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 26
Connect Devices
Packet Tracer – Documenting the Network
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
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 28
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 30
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 33
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 38
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 39
1.2 Routing Decisions
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 40
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 41
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 42
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 43
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 44
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 45
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 49
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 53
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 57
Directly Connected Routes
Directly Connected Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 59
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 61
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 62
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 68
Conclusion
Chapter 2: Routing Concepts
Configure a router to route between multiple directly connected networks.
Explain how routers use information in data packets to make forwarding decisions in a small to medium-
sized business network
Explain how a router learns about remote networks when operating in a small to medium-sized business
network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 69