Routing Concepts: Routing Protocols and Switching Essentials - CCNA 5
Routing Concepts: Routing Protocols and Switching Essentials - CCNA 5
Routing Concepts
Spring 2015
Inside the Router
Routers are computers
Router CPU and Memory
Internetwork Operating System
Router Bootup Process
Router Ports and Interfaces
Routers and the Network Layer
Chapter 4
1.0 Routing Concepts
1.1 Initial Configuration of a Router
1.2 Routing Decisions
1.3 Router Operation
1.4 Summary
3
Chapter 4: Objectives
Configure a router to route between multiple directly connected
networks
Describe the primary functions and features of a router.
Explain how routers use information in data packets to make
forwarding decisions in a small- to medium-sized business network.
Explain the encapsulation and de-encapsulation process used by
routers when switching packets between interfaces.
Compare ways in which a router builds a routing table 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.
4
Note
Almost everything in this chapter will be covered in more
detail in later chapters.
This course is about understanding and to be able to
analyze/troubleshoot networks, not how to type in a
command.
Example: show ip route
Type in the command (easy)
Explain what the output is displaying (more
understanding)
Analyze why you are seeing this information but also
know if there is anything missing or if there is
something you shouldn’t be seeing.
That is what this course is about!
5
Characteristics of a Network
Network Characteristics and Attributes
7
Topology
Physical Topology:
Is the arrangement of the cables, network devices, and end
systems.
It describes how the network devices are actually interconnected
with wires and cables.
Logical Topology:
Is the path over which the data is transferred in a network.
It describes how the network devices appear connected to
8
network users.
Network
Characteristics and
Attributes
Speed:
The measure of the data rate in bits per second (b/s) of a given
link.
Cost:
Indicates the general expense for purchasing of network
components, and installation and maintenance of the network.
Security:
Indicates how protected the network is, including the information
that is transmitted over the network. 9
Network
Characteristics and
Attributes
Availability:
Is a measure of the probability that the network is available for use
when it is required.
Scalability:
Indicates how easily the network can accommodate more users
and data transmission requirements.
Reliability:
Indicates the dependability of the components that make up the
network, such as the routers, switches, PCs, and servers.
Often measured as a probability of failure or as the mean time
10
between failures (MTBF).
Routers
Why Routing?
The router is responsible for the routing of traffic between
networks.
12
What is a Router?
Volatile /
Memory Stores
Non-Volatile
• Running IOS
RAM
• Running configuration file
Volatile
(Random Access • IP routing and ARP tables
Memory)
• Packet buffer
• Bootup instructions
ROM
(Read-Only Non-Volatile • Basic diagnostic software
Memory)
• Limited IOS
• IOS
Flash Non-Volatile
• Other system files
15
Router Backplane
Console
RJ45 USB
Ports
Two 4 GB flash card slots Console
USB Type B
16
Routers vs Multilayer Switches
19
Best Path Decisions
Routers use routing tables to determine the best path to send packets.
Routers encapsulate the packet and forward it to the interface indicated
in routing table.
20
Router
Functions
CPU
2nd Packet
3rd Packet
4th Packet
5th Packet
CPU
CPU
27
Branch Site Devices Connect …
• Corporate resources (i.e., file
servers and printers) connect to
Layer 2 switches.
• PCs and VoIP phones connect to
Layer 2 Ethernet switches.
• Laptops and smartphones connect
wirelessly to WAPs.
• WAPs connect to switches.
• Layer 2 switches connect to the
edge router.
• The edge router connects to a WAN
service provider (SP) and an ISP for
backup purposes.
28
Central Site Devices Connect …
• PCs and VoIP phones connect to
Layer 2 Ethernet switches.
• Layer 2 switches connect to Layer 3
switches using Ethernet fiber-optic
cables.
• Layer 3 switches connect to the
edge router.
• The corporate website server is
connected to the edge router
interface.
• The edge router connects to a WAN
SP and an ISP for backup purposes.
29
Default
Gateways
.1 .1 .1
.2
.10 .10
32
Hosts Addressing
A host can be assigned IP address
information either:
Statically - The host is manually
assigned the correct IP address,
subnet mask, and default gateway.
The DNS server IP address can also
be configured.
33
Device LEDs
Most network interfaces have one or two LED link indicators next to
the interface.
Generally:
Green LED means a good connection
Blinking green LED indicates network activity.
No light then there may be a problem with either the network
cable or the network itself.
The switch port where the connection terminates would also have
an LED indicator lit.
If one or both ends are not lit, try a different network cable. 34
Cisco 1941 LEDs
35
Console Connection
SSH Console Connection
38
Console Connection Requirements
Port on Terminal
Cable required Port on ISR
Computer emulation
Serial port
USB
Type-A port
39
Configuring Routers
Name the Device
.2
.2
41
Secure Management Access
.2
.2
.2
.2
43
Save the Configuration
.2
.2
44
Configure Basic Settings on R2
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# enable secret class
R2(config)# username admin secret class
R2(config)# line console 0
R2(config-line)# password cisco
R2(config-line)# login
R2(config-line)# exit
R2(config)# ip domain-name cisco.com
R2(config)# crypto key generate rsa 1024
R2(config)# line vty 0 4
R2(config-line)# transport input ssh
R2(config-line)# login local
R2(config-line)# exit
R2(config)#
R2(config)# service password-encryption
R2(config)#
R2(config)# banner motd $ Authorized Access Only! $
R2(config)# end
R2# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R2#
45
Configure the Gi0/0 Interface
.2
.2
.2
.2
.2
.2
48
Configure the R2 Interfaces
R2(config)#interface gigabitethernet 0/0
R2(config-if)#description Link to LAN 3
R2(config-if)#ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:08:34.139: Output omitted
R2(config)#
R2(config)#interface gigabitethernet 0/1
R2(config-if)#description Link to LAN 4
R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:09:56.915: Output omitted
R2(config)#
R2(config)#interface serial 0/0/0
R2(config-if)#description Link to R1
R2(config-if)#ip address 209.165.200.226 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:09:18.451: %LINK-3-UPDOWN: Interface Serial0/0/0, changed
state to up
*Jan 30 23:09:19.451: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Serial0/0/0, changed state to up
R2(config)# R1’s Serial 0/0/0 interface will also now be in the up state
49
Statically Assign IPv6 Address to Host
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1
2001:0DB8:ACAD:2::/64
50
Configuring IPv6 Address on Gi0/0
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1
2001:0DB8:ACAD:2::/64
2001:0DB8:ACAD:2::/64
2001:0DB8:ACAD:2::/64
53
Configuring the R2 Interfaces
2001:0DB8:ACAD:0004::/64
2001:0DB8:ACAD:0003::/64 :10
G0/0
:1
:2
S0/0/0 R2
G0/1 .:10
:1
2001:0DB8:ACAD:0005::/64
.2
.2
55
Verify Routing Table
.2
.2
<output omitted.
.2
.2
R1#
60
Verify the R1 Interface Status
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1
2001:0DB8:ACAD:2::/64
2001:0DB8:ACAD:2::/64
2001:0DB8:ACAD:2::/64
<output omitted>
C 2001:DB8:ACAD:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:ACAD:1::1/128 [0/0]
via GigabitEthernet0/0, receive
C 2001:DB8:ACAD:2::/64 [0/0]
via GigabitEthernet0/1, directly connected
L 2001:DB8:ACAD:2::1/128 [0/0]
via GigabitEthernet0/1, receive
C 2001:DB8:ACAD:3::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:ACAD:3::1/128 [0/0]
via Serial0/0/0, receive
L FF00::/8 [0/0]
via Null0, receive
R1# 63
Verify the R1 Interface Status
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1
2001:0DB8:ACAD:2::/64
64
Tweaking Show Command Output
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
GigabitEthernet0/0 192.168.10.1 YES manual up up
GigabitEthernet0/1 192.168.11.1 YES manual up up
Serial0/0/0 209.165.200.225 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
R1#
R1#show ip interface brief | include up
GigabitEthernet0/0 192.168.10.1 YES manual up up
GigabitEthernet0/1 192.168.11.1 YES manual up up
Serial0/0/0 209.165.200.225 YES manual up up
R1#
66
Tweaking Show Command Output
R1#show ip route | begin Gateway
Gateway of last resort is not set
67
Tweaking Show Command Output
R1#show running-config | section line con
line con 0
password 7 110A1016141D
login
R1#
R1#show ip interface brief | include down
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
R1#
R1#show ip interface brief | exclude up
Interface IP-Address OK? Method Status
Protocol
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
R1#
R1#show running-config | begin line
line con 0
password 7 110A1016141D
login
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4 68
password 7 030752180500
Command History Feature
R1#terminal history size 200
R1#
R1#show history
show ip interface brief
show interface g0/0
show ip interface g0/1
show ip route
show ip route 209.165.200.224
show running-config interface s0/0/0
terminal history size 200
show history
R1#
The command history feature temporarily stores a list of executed commands:
To recall commands press Ctrl+P or the UP Arrow.
To return to more recent commands press Ctrl+N or the Down Arrow.
By default, command history is enabled and the system captures the last 10
commands in the buffer.
Use the show history privileged EXEC command to display the buffer contents.
Use the terminal history size user EXEC command to increase or decrease size of
69
the buffer.
Lab 1.1.4.6
70
Routers Operate at Layers 1, 2, and 3
(Decisions made at Layer 3)
71
Remember: Encapsulation
These addresses
do not change!
72
Layer 2 Data Link Frame Layer 3 IP Packet
Dest.
Dest.Add
MAC
MAC Source Add
MAC Type Dest. IP Source IP IP Data Trailer
0B-31
FF-FF
00-10 0A-10
00-20 800 192.168.4.10 192.168.1.10 fields
73
Layer 2 Data Link Frame Layer 3 IP Packet
Dest. MAC Source MAC Type Dest. IP Source IP IP Data Trailer
00-10 0A-10 800 192.168.4.10 192.168.1.10 fields
74
Layer 2 Data Link Frame Layer 3 IP Packet
Dest. MAC Source
Source MAC
MAC Type
Type Dest. IP Source IP IP Data Trailer
Trailer
0B-31
00-10 00-20
0A-10 800
800 192.168.4.10 192.168.1.10 fields
75
Layer 2 Data Link Frame Layer 3 IP Packet
Dest. MAC
Add Source MAC
Add Type Dest. IP Source IP IP Data Trailer
FF-FF
0B-31 00-20 800 192.168.4.10 192.168.1.10 fields
76
Layer 2 Data Link Frame Layer 3 IP Packet
Dest.
Dest.Add
MAC Source
SourceAdd
MAC Type
Type Dest. IP Source IP IP Data Trailer
FF-FF
0B-20 0C-22 800
800 192.168.4.10 192.168.1.10 fields
77
Layer 2 Data Link Frame Layer 3 IP Packet
Dest. MAC Source MAC Type Dest. IP Source IP IP Data Trailer
0B-20 0C-22 800 192.168.4.10 192.168.1.10 fields
78
Layer 2 Data Link Frame Layer 3 IP Packet
Dest.
Dest.Add
MAC
MAC Source Add
MAC Type Dest. IP Source IP IP Data Trailer
0B-31
FF-FF
00-10 0A-10
00-20 800 192.168.4.10 192.168.1.10 fields
79
Routing Decisions
80
Alex Zinin’s Routing Table Principles
I know about my remote
networks but it is not my
responsibility if R2 and R3
know about their remote
networks.
Principle 2: The fact that one router has certain information in its
routing table does not mean that other routers have the same
information.
82
Alex Zinin’s Routing Table Principles
And if the packet for R3’s
LAN reaches 192.168.2.0/24,
I don’t know if R3 has a route
back to 172.16.3.0/24 for any
return traffic.
???
OSPF’s metric is
bandwidth
?
EIGRP is bandwidth +
delay
Equal Cost ?
Load
Balancing ?
192.168.1.0/24
86
The Routing Table
The Routing Table
A routing table is a file stored in RAM that contains information about:
Directly connected routes
Remote routes
Network or next hop associations
87
The show ip route and show ipv6 route commands are used to
display the contents of the routing table:
Local route interfaces - Added to the routing table when an
interface is configured. (displayed in IOS 15 or newer)
Directly connected interfaces - Added to the routing table when an
interface is configured and active.
Static routes - Added when a route is manually configured and the
exit interface is active.
Dynamic routing protocol - Added when EIGRP or OSPF are
implemented and networks are identified. 88
Interpreting the entries in the routing table.
89
Directly Connected Interfaces
A newly deployed router, without any configured interfaces, has an
empty routing table.
An active, configured, directly connected interface creates two routing
table entries:
Local (L)
Directly Connected (C)
90
Directly Connected Example
A routing table with
the directly
connected
interfaces of R1
configured and
activated.
91
Directly Connected IPv6 Example
The show ipv6 route command shows the ipv6 networks and routes
installed in the routing table.
92
Statically Learned Routes
Static Routes
Static routes and default static routes can be implemented after
directly connected interfaces are added to the routing table:
Static routes are manually configured
Covered in Chapter 6
93
Static Routes Example
94
Default Static Routes Example
95
Dynamic Routing (Chapters 7 and later)
Dynamic routing is used by routers to share information about the
reachability and status of remote networks.
It performs network discovery and maintains routing tables.
96
IPv4 and IPv6 Routing Protocols
Cisco ISR routers can support a variety of dynamic IPv4 routing protocols
including:
EIGRP – Enhanced Interior Gateway Routing Protocol
OSPF – Open Shortest Path First
IS-IS – Intermediate System-to-Intermediate System
RIP – Routing Information Protocol
Cisco ISR routers can support a variety of dynamic IPv6 routing protocols
including:
RIPng - RIP next generation
OSPFv3
EIGRP for IPv6
MP-BGP4 - Multicast Protocol-Border Gateway Protocol
97
Summary
This chapter introduced the router.
The main purpose of a router is to connect multiple networks and forward
packets from one network to the next.
The routing table is a list of networks known by the router.
A remote network is a network that can only be reached by forwarding
the packet to another router.
Remote networks are added to the routing table in one of two ways: either
by the network administrator manually configuring static routes or by
implementing a dynamic routing protocol.
In many cases, a routing table will contain both static and dynamic routes.
Components of the IPv6 routing table are very similar to the IPv4 routing
table.
For instance, it is populated using directly connected interfaces, static
routes and dynamically learned routes.
98
Chapter 4
Routing Concepts