Professional Documents
Culture Documents
Ccna1 CH2
Ccna1 CH2
• Router - Forwards data packets to and receives data packets from the
Internet.
• Switch - Connects end devices using network cables.
• Wireless access point - Consists of a radio transmitter capable of
connecting end devices wirelessly.
• Firewall appliance - Secures outgoing traffic and restricts incoming
traffic.
4
Cisco IOS
Operating Systems
3
Cisco IOS
Operating Systems
4
Cisco IOS
Purpose of OS
5
Cisco IOS (Internetwork Operating System)
Router features vary based on the version of the IOS and the type of device.
8
The purpose of Cisco IOS Software
The size of the Flash and RAM determines the ability to have one or more IOS.
The IOS is copied into RAM to run from there when the device is powered on .
9
FYI - Router internal components Similar to PC
CPU • Buses
Memory • Interfaces
• RAM • Power Supply
• Flash
• NVRAM
• ROM
10
Router storage areas
ROM Flash
NVRAM RAM
11
Initial startup of Cisco routers
When a Cisco router powers up, it performs a power-on self test (POST).
During this self test, the router executes diagnostics from ROM on all
hardware modules.
After the POST, the following events occur as the router initializes:
12
Where is the permanent configuration file stored used during boot-up? NVRAM (B)
Where is the diagnostics software stored executed by hardware modules? ROM (D)
Where is the backup (partial) copy of the IOS stored? ROM (D)
Where is IOS permanently stored before it is copied into RAM? FLASH (C)
Where are all changes to the configuration immediately stored? RAM (A)
A B C D
12
Accessing a Cisco IOS Device
Console Access Method
13
Accessing the
router and switch
directly
The console port on the router allows you to connect a “dumb” terminal or a
computer with terminal emulator software directly using a console (Rollover) cable.
Used for:
14
Accessing a Cisco IOS Device
Console Access Method
Console port
Should be configured with passwords to prevent unauthorized access
Device should be located in a secure room so console port can not be easily
accessed
15
Establishing a HyperTerminal session
Connect PC using the RJ-45/mini-USB to Serial/USB rollover cable.
• PuTTY
• Tera Term
• SecureCRT
• HyperTerminal Console port
• OS X Terminal
• Zoc
Rollover cable
20
Accessing a Cisco IOS Device
Terminal Emulation Programs
PuTTY
Tera Term
SecureCRT
HyperTerminal
OS X Terminal
Zoc
18
Accessing a Cisco IOS Device
AUX Access Method
19
C:\> ping
C:\> ssh
Ethernet Connection
Network connection needed
NIC
What software/command do you need? TCP/IP, Terminal prompt (DOS), Tera Term, etc.
What cable and ports do you use? PC & Router: Ethernet NIC
Ethernet straight-through cable
When should you not use a network connection to
configure the router? When the change may disconnect the
20 telnet connection.
Power-up the router (and switch) – No configuration
Router>
24
User Exec Mode “ view-only mode”
• Identified by the CLI prompt that ends with the > symbol.
• Ex: Router> Switch>
• By default, there is no authentication required to access the user EXEC mode
from the console.
22
Navigating the IOS
Navigating between IOS Modes
enable
enable
24
The Cisco IOS Modes
• Each mode is used to accomplish particular tasks and has a specific set of
commands that are available when in that mode. “ i.e. IP’s configured in the
interface mode”
end
Exit
CTRL -Z
28
Navigating the IOS
Cisco IOS Modes of Operation
26
Navigating the IOS
Navigating between IOS Modes (cont.)
Switch> user mode
Switch> enable go to privilege mode
Switch# configure terminal go to global configuration mode
Switch(config)# interface vlan 1 go to interface mode
Switch(config-if)# Line console 0 go to line mode
Switch(config-line)# exit
Switch(config)# exit
Switch# config t Shortened commands and parameters
Switch(config)# vlan 1 go to VLAN configuration mode
Switch(config-vlan)# end go to privilege-EXEC mode
Switch# disable
Switch> enable
Switch# config t
27
Several forms of help
28
Getting Help (Router and Switch)
Router> ?
Exec commands:
access-enable Create a temporary Access-List
entry
access-profile Apply user-profile to interface
clear Reset functions
<text omitted>
ping Send echo messages
ppp Start IETF Point-to-Point Protocol
(PPP)
--More--
32
Command Syntax Check
If the interpreter cannot understand the command being entered, it will
provide feedback describing what is wrong with the command.
• Ambiguous command
• Incomplete command
• Incorrect command
30
Enhanced editing commands “Hot keys”
• Ctrl-Z : used to back out of configuration mode. This will return the user to the
privileged EXEC mode prompt.
• Ctrl-R: To redisplay to line that you were typing
• Tab - Completes the remainder of the command or keyword
• Ctrl-Shift-6 - Allows the user to interrupt an IOS process such as ping or traceroute
34
Router command history
35
Basic IOS Structure
36
Naming of Devices
Cisco devices uses the factory-assigned default hostnames "Router“ "Switch.“
Used not to get confused about which router you are configuring. “Imagine if you have
many devices to deal with” .
Some guidelines for naming conventions are that names should:
34
Limiting Device Access
Every device should have locally configured passwords to limit access.
36
Managing Console Input
Router(config)#line console 0
Router(config-line)#Password cisco
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exit
40
IP Domain-lookup
Router(config)# ip domain-lookup
Router#wreh
Translating "wreh"...domain server (255.255.255.255) (Takes a few seconds)
Translating "wreh"...domain server (255.255.255.255) (Takes a few seconds)
Router(config)# no ip domain-lookup
Router#wreh
Translating "wreh"
% Unknown command or computer name, or unable to find computer address
If enabled, with no DNS server on the network, may cause a slight, but irritable
delay when making typing mistakes.
If you are not using the services of a DNS server, it is best to disable this
process.
41
Limiting Access to Device Configurations
Encrypting Password Display
service password-
encryption
prevents passwords
from showing up as
plain text when
viewing the
configuration
purpose of this
command is to keep
unauthorized
individuals from
viewing passwords
in the configuration
file
once applied,
removing the
encryption service
does not reverse the
encryption
39
service password-encryption command
WARNING
service password-encryption uses a Cisco Level 7
43
Banner Messages
Declaring a message i.e. “authorized personnel only”. This can be an important
part of the legal liabilities for breaking into a device. Wording that implies that a
login is "welcome" or "invited" is not appropriate
Banner can include scheduled system shutdowns and other information that
affects all network users.
Viewing, Saving and Erasing the Configurations
45
Router#show running-config
Current configuration : 542 bytes
running-config
!
version 12.2 • It is the current configuration
! used by the router.
interface FastEthernet0/0
no ip address • Takes effect by the Cisco
IOS immediately or as the
shutdown system boots.
duplex auto
speed auto • Stored in the RAM memory.
! “lost when the router loses
interface Serial0/0 power or reloads”
no ip address
shutdown
! • Privilege mode command
line con 0 only because they display
line aux 0 password information.
line vty 0 4
!
end
Router#
46
Startup-config
Router#show startup-config
startup-config is not present
Router# • This file is the configuration
file saved in NVRAM.
• “ It might be saved as a
backup on a server”
47
Copy running-config to startup-config
Router#show startup-config
Current configuration : 542 bytes
!
version 12.2
!
interface FastEthernet0/0
• The running-config should be periodically saved to startup-config when you are satisfied
with your changes and you do not want to lose them. (Lab)
• Production network, startup-config should always match running-config in case of power
failure, etc.
• Privilege mode command.
Erase startup-config
Router#erase startup-config
Erasing the nvram filesystem will remove all files!
Continue? [confirm] <Press Enter>
[OK]
Erase of nvram: complete
Router#Reload
• When you are done with the routers in the lab, please be sure to erase the
startup-config.
If you are starting a lab, and you do not get the message:
<Changes made>
Switch# delete vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
Switch# erase startup-config
Switch# reload
System configuration has been modified. Save? [yes/no]: n
Proceed with reload? [confirm]
47
copy running-config startup-config
WARNING
Using an incorrect configuration file name could overwrite the router’s IOS in
flash, as the router believes you are trying to copy a blank file into flash.
51
Ports and Addresses
Interfaces and Ports
Terms are used interchangeably
Some interfaces can be can be configured with an IP address such as:
• NIC (Ethernet interface) on a host/computer
• Router’s Ethernet or Serial interfaces
Switches have ports (interfaces) but do not typically have IP addresses assigned to them
Used to connect devices on LANs that do have IP addresses such as hosts, routers,
printers.
49
Configuring an Ethernet interface
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter fastethernet 0/0
Router(config-if)#ip add 172.30.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#end
Router#
Ports and Addresses
IP Addressing in the Large
Each end device on a
network must be
configured with an IP
address
Structure of an IPv4
address is called dotted
decimal
IP address displayed in
decimal notation, with
four decimal numbers
between 0 and 255
With the IP address, a
subnet mask is also
necessary
IP addresses can be
assigned to both
physical ports and
virtual interfaces
IPv4 and IPv6 addresses
will be discussed in more
detail later
51
Configuring Router Serial Interfaces
52
Description
Provides valuable information about:
IP address is not required for a switch to perform its job of frame forwarding
57
Testing the Interface Assignment
56
Addressing Devices
IP Address Conflicts
57
Addressing Devices
Automatic IP Address Configuration for End Devices
58
The Command Structure
IOS Examination Commands
59
The show version command
Router>show version
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-D-L), Version 12.0(5), RELEASE SOFTWARE (fc1) IOS Version
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Tue 15-Jun-99 20:08 by phanguye
Image text-base: 0x030380DC, data-base: 0x00001000 ROM Version – not usually an issue
ROM: System Bootstrap, Version 11.0(10c)XB2, PLATFORM SPECIFIC RELEASE SOFTWARE (fc1)
BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c)XB2, PLATFORM
SPECIFIC RELEASE SOFTWARE (fc1)
The show flash command is used to verify that the system has sufficient
memory to load a new Cisco IOS image.
Cisco IOS software features
A serial interface will not show “up” and “up” unless both ends are
properly configured (mostly) and a the no shutdown command is
used.
If one router’s configuration looks okay, check the other router’s
configuration.
Up or down
• Up
• Down
• Administratively down (no shutdown to bring up)
Protocol: Layer 2
• Up
• Down (no keepalive signal received)
69
Configuring a serial interface
RouterA RouterB
DTE cable DCE cable
How can you tell which end is the DTE and which end is the DCE?
Use the show controllers command.
It will also tell you the type of cable, in our labs we will be using a V.35 cable.
70
Examining the show commands
show interfaces – Displays all the statistics for all the interfaces on the router , or
Router#show interfaces serial 0/1
show users – Displays all users who are connected to the router
71
Testing layer 3
connectivity
Ping is the best way to test layer 3 connectivity
Time to Live and defines the number of hops that the ping packet has remaining
before it will be dropped.
72
Testing the Loopback C:\>ping 127.0.0.1
• This verifies the protocol stack from the Network layer to the Physical
layer - and back - without actually putting a signal on the media.
• This test verifies that the NIC driver and most of the NIC hardware are
working properly. It also verifies that the IP address is properly bound to
the NIC, without actually putting a signal on the media.
Testing Gateway
Ping gateway to verify that a local host can connect with a gateway address.
Extended Ping
Router IOS Ping Indicators
The IOS offers an "extended" mode of the ping command from the privileged
EXEC mode .
• Router#ping
• Protocol [ip]:
• Target IP address:10.0.0.1
• Repeat count [5]:
• Datagram size [100]:
• Timeout in seconds [2]:5
• Extended commands [n]: n
Entering a longer timeout period than the default allows for possible latency
issues to be detected. 75
Tracing & Interpreting Trace Results
76
Given a scenario like the following, let put all the tests together to figure
out the problem
C:\>tracert 192.168.11.1
79
Configuration backup , IOS backup and documentation
83
Saving Configurations
Capturing Text
77
Restore text file
Or
85
79