Ccna Command Guide: by Mr. Adel Al Hamedi Tel: 00966/563923744
Ccna Command Guide: by Mr. Adel Al Hamedi Tel: 00966/563923744
AdelAlHamedi Tel:00966/563923744
CCNA
Command
Guide
By Mr. Adel Al-Hamedi
Riyadh, KSA
Tel: 00966563923744
1
ByMr.AdelAlHamedi Tel:00966/563923744
Cisco Devices
TCP/IP Version 4
How to Subnet
Class AE Addresses
VLSM
VLSM Example
A Class C network192.168.100.0/24is assigned. You need to create an IP plan for this network using VLSM.
Sample Network Needing a VLSM Address Plan
2
ByMr.AdelAlHamedi Tel:00966/563923744
Route Summarization
Example for Understanding Route Summarization
Four-City Network with Complete Route Summarization
Terminal Settings
PC Settings to Connect to a Router or Switch
LAN Connections
LAN Connections
4
ByMr.AdelAlHamedi Tel:00966/563923744
5
ByMr.AdelAlHamedi Tel:00966/563923744
6
ByMr.AdelAlHamedi Tel:00966/563923744
Using the [tab] Key to Complete Commands
Using the Question Mark for Help
enable Command
exit Command
disable Command
logout Command
Setup Mode
Keyboard Help
7
ByMr.AdelAlHamedi Tel:00966/563923744
show Commands
Configuring a Router
Configuring a Single Cisco Router
Router Modes
8
ByMr.AdelAlHamedi Tel:00966/563923744
Entering Global Configuration Mode
Configuring a Router Name
Configuring Passwords
Password Encryption
Configuring a Serial Interface
9
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring a Fast Ethernet Interface
Creating a Message-of-the-Day Banner
Creating a Login Banner
Setting the Clock Time Zone
Assigning a Local Host Name to an IP Address
The no ip domain-lookup Command
10
ByMr.AdelAlHamedi Tel:00966/563923744
The logging synchronous Command
The exec-timeout Command
Saving Configurations
Erasing Configurations
show Commands
11
ByMr.AdelAlHamedi Tel:00966/563923744
EXEC Commands in Configuration Mode: The do Command
Configuration Example: Basic Router Configuration
Boston Router
12
ByMr.AdelAlHamedi Tel:00966/563923744
13
ByMr.AdelAlHamedi Tel:00966/563923744
Routing
Static Routing
Configuring a Static Route on a Router
Static Routes and Administrative Distance (Optional)
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 permanent
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 200
14
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring a Default Route on a Router
Verifying Static Routes
Router#show ip route
Configuration Example: Static Routes
Boston Router
15
ByMr.AdelAlHamedi Tel:00966/563923744
Buffalo Router
Bangor Router
RIP
The ip classless Command
RIP Routing: Mandatory Commands
RIP Routing: Optional Commands
16
ByMr.AdelAlHamedi Tel:00966/563923744
17
ByMr.AdelAlHamedi Tel:00966/563923744
Configuration Example: RIPv2 Routing
Cancun Router
Acapulco Router
18
ByMr.AdelAlHamedi Tel:00966/563923744
Mazatlan Router
EIGRP
Configuring Enhanced Interior Gateway Routing Protocol (EIGRP)
19
ByMr.AdelAlHamedi Tel:00966/563923744
EIGRP Auto-Summarization
Load Balancing: variance
Bandwidth Use
20
ByMr.AdelAlHamedi Tel:00966/563923744
Authentication
Verifying EIGRP
21
ByMr.AdelAlHamedi Tel:00966/563923744
Troubleshooting EIGRP
Configuration Example: EIGRP
Austin Router
22
ByMr.AdelAlHamedi Tel:00966/563923744
Houston Router
23
ByMr.AdelAlHamedi Tel:00966/563923744
Single Area OSPF
Configuring OSPF: Mandatory Commands
24
ByMr.AdelAlHamedi Tel:00966/563923744
Using Wildcard Masks with OSPF Areas
Configuring OSPF: Optional Commands
Loopback Interfaces
Router ID
DR/BDR Elections
25
ByMr.AdelAlHamedi Tel:00966/563923744
Modifying Cost Metrics
Authentication: Simple
Authentication: Using MD5 Encryption
26
ByMr.AdelAlHamedi Tel:00966/563923744
Timers
Propagating a Default Route
Verifying OSPF Configuration
27
ByMr.AdelAlHamedi Tel:00966/563923744
Troubleshooting OSPF
Configuration Example: Single Area OSPF
Austin Router
28
ByMr.AdelAlHamedi Tel:00966/563923744
Houston Router
29
ByMr.AdelAlHamedi Tel:00966/563923744
Galveston Router
Switching
Configuring a Switch
Help Commands
Command Modes
30
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying Commands
Resetting Switch Configuration
31
ByMr.AdelAlHamedi Tel:00966/563923744
Setting Passwords
Setting IP Addresses and Default Gateways
Setting Interface Descriptions
Setting Duplex Operation
32
ByMr.AdelAlHamedi Tel:00966/563923744
Setting Operation Speed
Managing the MAC Address Table
Configuring Static MAC Addresses
Switch Port Security
33
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying Switch Port Security
34
ByMr.AdelAlHamedi Tel:00966/563923744
Sticky MAC Addresses
Configuration Example
35
ByMr.AdelAlHamedi Tel:00966/563923744
36
ByMr.AdelAlHamedi Tel:00966/563923744
37
ByMr.AdelAlHamedi Tel:00966/563923744
VLANs
Creating Static VLANs
Using VLAN Configuration Mode
Using VLAN Database Mode
Assigning Ports to VLANs
Using the range Command
Verifying VLAN Information
38
ByMr.AdelAlHamedi Tel:00966/563923744
Saving VLAN Configurations
Erasing VLAN Configurations
Configuration Example: VLANs
39
ByMr.AdelAlHamedi Tel:00966/563923744
40
ByMr.AdelAlHamedi Tel:00966/563923744
VLAN Trunking Protocol and Inter-VLAN Routing
Dynamic Trunking Protocol (DTP)
Setting the Encapsulation Type
41
ByMr.AdelAlHamedi Tel:00966/563923744
VLAN Trunking Protocol (VTP)
Using VLAN Database Mode
42
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying VTP
Inter-VLAN Communication Using an External Router:
Router-on-a-Stick
43
ByMr.AdelAlHamedi Tel:00966/563923744
Inter-VLAN Communication Tips
Router(config)#interface fastethernet 0/0
Router(config-if)#encapsulation dot1q 1 native
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#interface fastethernet 0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.10.1 255.255.255.0
Configuration Example: Inter-VLAN Communication
44
ByMr.AdelAlHamedi Tel:00966/563923744
ISP Router
45
ByMr.AdelAlHamedi Tel:00966/563923744
CORP Router
46
ByMr.AdelAlHamedi Tel:00966/563923744
47
ByMr.AdelAlHamedi Tel:00966/563923744
L2Switch1 (Catalyst 2960)
48
ByMr.AdelAlHamedi Tel:00966/563923744
49
ByMr.AdelAlHamedi Tel:00966/563923744
STP and EtherChannel
Spanning Tree Protocol
Enabling Spanning Tree Protocol
Configuring the Root Switch
50
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring a Secondary Root Switch
Configuring Port Priority
51
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring the Path Cost
Configuring the Switch Priority of a VLAN
Configuring STP Timers
Verifying STP
52
ByMr.AdelAlHamedi Tel:00966/563923744
Optional STP Configurations
PortFast
BPDU Guard
Changing the Spanning-Tree Mode
Different types of spanning tree can be configured on a Cisco switch. The options vary
according to the platform:
53
ByMr.AdelAlHamedi Tel:00966/563923744
Per-VLAN Spanning Tree (PVST)There is one instance of spanning tree for each
VLAN. This is a Cisco proprietary protocol.
Per-VLAN Spanning Tree Plus (PVST+)Also Cisco proprietary. Has added
extensions to the PVST protocol.
Rapid PVST+This mode is the same as PVST+ except that it uses a rapid
convergence based on the 802.1w standard.
Multiple Spanning Tree Protocol (MSTP)IEEE 802.1s. Extends the 802.1w
Rapid Spanning Tree (RST) algorithm to multiple spanning trees. Multiple VLANs
can map to a single instance of RST. You cannot run MSTP and PVST at the same
time.
Extended System ID
Enabling Rapid Spanning Tree
Troubleshooting Spanning Tree
54
ByMr.AdelAlHamedi Tel:00966/563923744
Configuration Example: STP
Core Switch (2960)
55
ByMr.AdelAlHamedi Tel:00966/563923744
Distribution 1 Switch (2960)
Distribution 2 Switch (2960)
56
ByMr.AdelAlHamedi Tel:00966/563923744
EtherChannel
EtherChannel provides fault-tolerant, high-speed links between switches, routers, and
servers. An EtherChannel consists of individual Fast Ethernet or Gigabit Ethernet links
bundled into a single logical link. If a link within an EtherChannel fails, traffic previously
carried over that failed link changes to the remaining links within the EtherChannel.
Interface Modes in EtherChannel
Guidelines for Configuring EtherChannel
Configuring Layer 2 EtherChannel
Verifying EtherChannel
57
ByMr.AdelAlHamedi Tel:00966/563923744
Configuration Example: EtherChannel
Core (2960)
58
ByMr.AdelAlHamedi Tel:00966/563923744
ALSwitch1 (2960)
59
ByMr.AdelAlHamedi Tel:00966/563923744
ALSwitch2 (2960)
60
ByMr.AdelAlHamedi Tel:00966/563923744
Extending the LAN
Implementing a Wireless LAN
Wireless Access Point Configuration: Linksys 300N Access Point
GUI Setup Wizard
61
ByMr.AdelAlHamedi Tel:00966/563923744
License Agreement
Unplugging Power to the Modem
Disconnecting the Modem from the Computer
62
ByMr.AdelAlHamedi Tel:00966/563923744
Connect the Modem to the Router
Connect the Power to the Modem
Connect the Router to a Computer
63
ByMr.AdelAlHamedi Tel:00966/563923744
Connect the Router to a Computer
Power on the Router
Check the Routers Status
64
ByMr.AdelAlHamedi Tel:00966/563923744
Checking Your Computers Settings
Configure Cable or DHCP Settings
Set the Routers Administrative Password
65
ByMr.AdelAlHamedi Tel:00966/563923744
Wireless Settings
Configure Wireless Security Settings (Optional)
Confirm New Settings
66
ByMr.AdelAlHamedi Tel:00966/563923744
Option to Install Norton Internet Security
End of Wizard
Username/Password Challenge
67
ByMr.AdelAlHamedi Tel:00966/563923744
Main Screen of Web-Based Management Utility
Web-Based Management Utility Menu Bar
Wireless Client Configuration: Linksys Wireless-N Notebook Adapter
GUI Setup Wizard
68
ByMr.AdelAlHamedi Tel:00966/563923744
License Agreement
Software Installation
Connecting the Adapter
69
ByMr.AdelAlHamedi Tel:00966/563923744
Found New Hardware Wizard
Found New Hardware Wizard Second Screen
Completing the Found New Hardware Wizard
70
ByMr.AdelAlHamedi Tel:00966/563923744
Creating a Profile: Available Wireless Networks
Security Warning
Security Connection
71
ByMr.AdelAlHamedi Tel:00966/563923744
Congratulations: End of Wizard
Link Information
Connect Screen
72
ByMr.AdelAlHamedi Tel:00966/563923744
Profiles Screen
Wireless Network Connection Status
73
ByMr.AdelAlHamedi Tel:00966/563923744
Network Administration and Troubleshooting
Backing Up and Restoring Cisco IOS Software and Configurations
Boot System Commands
The Cisco IOS File System
Backing Up Configurations to a TFTP Server
74
ByMr.AdelAlHamedi Tel:00966/563923744
Restoring Configurations from a TFTP Server
Backing Up the Cisco IOS Software to a TFTP Server
Restoring/Upgrading the Cisco IOS Software from a TFTP Server
75
ByMr.AdelAlHamedi Tel:00966/563923744
Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem
76
ByMr.AdelAlHamedi Tel:00966/563923744
Finding the Cisco IOS Software Image File
77
ByMr.AdelAlHamedi Tel:00966/563923744
Sending the Cisco IOS Software Image File to the Router
Restoring the Cisco IOS Software Using the ROM Monitor Environmental Variables and tftpdnld Command
78
ByMr.AdelAlHamedi Tel:00966/563923744
A Visual Representation
The configuration register is a 16-bit field stored in NVRAM. The bits are numbered
from 15 to 0 looking at the bit stream from left to right. Bits are split up into groups
of 4, and each group is represented by a hexadecimal digit.
What the Bits Mean
The Boot Field
Console Terminal Baud Rate Settings
79
ByMr.AdelAlHamedi Tel:00966/563923744
Changing the Console Line Speed: CLI
Changing the Console Line Speed: ROM Monitor Mode
80
ByMr.AdelAlHamedi Tel:00966/563923744
Password-Recovery Procedures for Cisco Routers
81
ByMr.AdelAlHamedi Tel:00966/563923744
Password Recovery for 2960 Series Switches
82
ByMr.AdelAlHamedi Tel:00966/563923744
Cisco Discovery Protocol (CDP)
Cisco Discovery Protocol
Telnet and SSH
Using Telnet to Remotely Connect to Other Devices
83
ByMr.AdelAlHamedi Tel:00966/563923744
Any of the preceding commands lead to the following configuration sequence:
84
ByMr.AdelAlHamedi Tel:00966/563923744
The ping and traceroute Commands
ICMP Redirect Messages
The ping Command
The following table describes the possible ping output characters.
Examples of Using the ping and the Extended ping Commands
85
ByMr.AdelAlHamedi Tel:00966/563923744
The traceroute Command
SNMP and Syslog
Configuring SNMP
86
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring Syslog
There are eight levels of severity in logging messages, as follows:
Basic Troubleshooting
Viewing the Routing Table
87
ByMr.AdelAlHamedi Tel:00966/563923744
Determining the Gateway of Last Resort
Determining the Last Routing Update
OSI Layer 3 Testing
OSI Layer 7 Testing
Interpreting the show interface Command
Clearing Interface Counters
Using CDP to Troubleshoot
88
ByMr.AdelAlHamedi Tel:00966/563923744
The show controllers Command
debug Commands
Using Time Stamps
Operating System IP Verification Commands
ipconfig (Windows 2000/XP):
Click Start > Run > Command > ipconfig or
ipconfig/all.
winipcfg (Windows 95/98/Me):
Click Start > Run > winipcfg.
ifconfig (Mac/Linux):
#ifconfig
The ip http server Command
The netstat Command
Managing IP Services
Network Address Translation
Private IP Addresses: RFC 1918
89
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring Dynamic NAT: One Private to One Public Address Translation
90
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring PAT: Many Private to One Public Address Translation
91
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring Static NAT: One Private to One Permanent Public Address Translation
92
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying NAT and PAT Configurations
Troubleshooting NAT and PAT Configurations
Configuration Example: PAT
Port Address Translation Configuration
93
ByMr.AdelAlHamedi Tel:00966/563923744
ISP Router
Company Router
94
ByMr.AdelAlHamedi Tel:00966/563923744
DHCP
Configuring DHCP
95
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying and Troubleshooting DHCP Configuration
Configuring a DHCP Helper Address
96
ByMr.AdelAlHamedi Tel:00966/563923744
DHCP Client on a Cisco IOS Software Ethernet Interface
Configuration Example: DHCP
Network Topology for DHCP Configuration
Edmonton Router
97
ByMr.AdelAlHamedi Tel:00966/563923744
Gibbons Router
98
ByMr.AdelAlHamedi Tel:00966/563923744
IPv6
Assigning IPv6 Addresses to Interfaces
99
ByMr.AdelAlHamedi Tel:00966/563923744
IPv6 and RIPng
100
ByMr.AdelAlHamedi Tel:00966/563923744
Austin Router
101
ByMr.AdelAlHamedi Tel:00966/563923744
Houston Router
IPv6 Tunnels: Manual Overlay Tunnel
illustrates the network topology for the configuration that follows, which shows how IPv6 tunnels are created.
Juneau Router
102
ByMr.AdelAlHamedi Tel:00966/563923744
Fairbanks Router
103
ByMr.AdelAlHamedi Tel:00966/563923744
Static Routes in IPv6
Network Topology for IPv6 Static Route Configuration
104
ByMr.AdelAlHamedi Tel:00966/563923744
Floating Static Routes in IPv6
Austin(config)# ipv6 route 2001:db8:c18:3::/64 fastethernet 0/0 200
Verifying and Troubleshooting IPv6
105
ByMr.AdelAlHamedi Tel:00966/563923744
IPv6 Ping
Router#ping ipv6 2001:db8::3/64
WANs
HDLC and PPP
Configuring HDLC Encapsulation on a Serial Line
Configuring PPP on a Serial Line (Mandatory Commands)
Configuring PPP on a Serial Line (Optional Commands): Compression
106
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring PPP on a Serial Line (Optional Commands): Link Quality
Configuring PPP on a Serial Line (Optional Commands): Multilink
Configuring PPP on a Serial Line (Optional Commands): Authentication
Verifying or Troubleshooting a Serial Link/PPP Encapsulation
107
ByMr.AdelAlHamedi Tel:00966/563923744
Configuration Example: PPP
Network Topology for PPP Configuration
Boston Router
Buffalo Router
108
ByMr.AdelAlHamedi Tel:00966/563923744
Frame Relay
Configuring Frame Relay
Setting the Frame Relay Encapsulation Type
Setting the Frame Relay Encapsulation LMI Type
Setting the Frame Relay DLCI Number
Configuring a Frame Relay map Statement
109
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring a Description of the Interface (Optional)
Configuring Frame Relay Using Subinterfaces
Verifying Frame Relay
Troubleshooting Frame Relay
110
ByMr.AdelAlHamedi Tel:00966/563923744
Configuration Examples: Frame Relay
Frame Relay Network
Edmonton Router
111
ByMr.AdelAlHamedi Tel:00966/563923744
Winnipeg Router
112
ByMr.AdelAlHamedi Tel:00966/563923744
Calgary Router
113
ByMr.AdelAlHamedi Tel:00966/563923744
114
ByMr.AdelAlHamedi Tel:00966/563923744
Network Security
IP Access Control List Security
Access List Numbers
ACL Keywords
Creating Standard ACLs
115
ByMr.AdelAlHamedi Tel:00966/563923744
Applying Standard ACLs to an Interface
116
ByMr.AdelAlHamedi Tel:00966/563923744
Verifying ACLs
Removing ACLs
Creating Extended ACLs
117
ByMr.AdelAlHamedi Tel:00966/563923744
Applying Extended ACLs to an Interface
The established Keyword (Optional)
Creating Named ACLs
118
ByMr.AdelAlHamedi Tel:00966/563923744
Using Sequence Numbers in Named ACLs
Removing Specific Lines in Named ACLs Using Sequence Numbers
119
ByMr.AdelAlHamedi Tel:00966/563923744
Including Comments About Entries in ACLs
Restricting Virtual Terminal Access
Configuration Examples: ACLs
Network Topology for ACL Configuration
120
ByMr.AdelAlHamedi Tel:00966/563923744
Example 1: Write an ACL that prevents the 10.0 network from accessing the 40.0 network but allows everyone else to.
Example 2: Write an ACL that states that 10.5 cannot access 50.7. Everyone else can.
Example 3: Write an ACL that states that 10.5 can Telnet to the Red Deer router. No one else can.
121
ByMr.AdelAlHamedi Tel:00966/563923744
Example 4: Write a named ACL that states that 20.163 can Telnet to 70.2. No one else from 20.0 can Telnet to 70.2. Any other host from any
other subnet can connect to 70.2 using anything that is available.
Example 5: Write an ACL that states that hosts 50.150.63 are not allowed web access to 80.16. Hosts 50.6450.254 are. Everyone can do
everything else.
Security Device Manager
Security Device Manager: Connecting with CLI
122
ByMr.AdelAlHamedi Tel:00966/563923744
Security Device Manager: Connecting with GUI
123
ByMr.AdelAlHamedi Tel:00966/563923744
Open your PCs Internet browser and enter the following command in the browsers address bar:
http://10.10.10.1
Connect to Router Challenge Window
HTTP or HTTPS
SDM Express Wizard with No CLI Preconfiguration
Welcome to the Cisco SDM Express Wizard
124
ByMr.AdelAlHamedi Tel:00966/563923744
Basic Configuration
Router Provisioning
125
ByMr.AdelAlHamedi Tel:00966/563923744
LAN Interface Configuration
DHCP Server Configuration
126
ByMr.AdelAlHamedi Tel:00966/563923744
WAN Configuration
Add Serial Connection
127
ByMr.AdelAlHamedi Tel:00966/563923744
Add Gigabit Ethernet Connection
Internet (WAN)Advanced Options
128
ByMr.AdelAlHamedi Tel:00966/563923744
Internet (WAN)Private IP Addresses
Add Address Translation Rule
129
ByMr.AdelAlHamedi Tel:00966/563923744
Security Configuration
Cisco SDM Express Configuration
130
ByMr.AdelAlHamedi Tel:00966/563923744
Reconnection Instructions
Loading Cisco SDM
131
ByMr.AdelAlHamedi Tel:00966/563923744
Cisco SDM Home Page
Resetting the Router to Factory Defaults Using SDM
Resetting the Router
132
ByMr.AdelAlHamedi Tel:00966/563923744
Relaunch SDM to Continue
SDM User Interfaces
Interfaces and Connections
133
ByMr.AdelAlHamedi Tel:00966/563923744
LAN Wizard
LAN Wizard
134
ByMr.AdelAlHamedi Tel:00966/563923744
LAN Wizard
LAN Wizard: IP Address and Subnet Mask
135
ByMr.AdelAlHamedi Tel:00966/563923744
LAN Wizard: DHCP Server
LAN Wizard: Summary
136
ByMr.AdelAlHamedi Tel:00966/563923744
Configuring Routing Using SDM
Routing
Add IP Static Route
137
ByMr.AdelAlHamedi Tel:00966/563923744
Edit IP Dynamic Routing
SDM Monitor Mode
SDM Monitor Mode
138
ByMr.AdelAlHamedi Tel:00966/563923744
Using SDM to Configure a Router to Act as a DHCP Server
Additional Tasks: DHCP
139
ByMr.AdelAlHamedi Tel:00966/563923744
Add DHCP Pool
Command Delivery Status
140
ByMr.AdelAlHamedi Tel:00966/563923744
DHCP Pool Status
Using SDM to Configure an Interface as a DHCP Client
Interfaces and Connections
141
ByMr.AdelAlHamedi Tel:00966/563923744
Welcome to the Ethernet WAN Configuration Wizard
Encapsulation
142
ByMr.AdelAlHamedi Tel:00966/563923744
IP Address
Authentication
143
ByMr.AdelAlHamedi Tel:00966/563923744
Summary
Connectivity Testing and Troubleshooting
144
ByMr.AdelAlHamedi Tel:00966/563923744
Test Connection Successful
145
ByMr.AdelAlHamedi Tel:00966/563923744
Using SDM to Configure NAT/PAT
NAT
146
ByMr.AdelAlHamedi Tel:00966/563923744
NAT Wizard
Sharing the Internet Connection
147
ByMr.AdelAlHamedi Tel:00966/563923744
Summary of the Configuration
What to Do If You Lose SDM Connectivity Because of an erase startup-config Command
148
ByMr.AdelAlHamedi Tel:00966/563923744
149