IT Route Training Solution
CCNA Command List
Version 3
Exec Modes
ITroute-Switch> (User mode)
ITroute-Switch> enable
ITroute-Switch# (Moves to privileged mode)
ITroute-Switch# configure terminal
ITroute-Switch(config)# (Moves to global configuration mode)
ITroute-Switch(config)# interface fastethernet 0/1
ITroute-Switch(config-if)# (Moves to interface configuration mode)
ITroute-Switch(config)# line console 0
ITroute-Switch(config-line)# (Moves to line configuration mode)
Accessing Help
ITroute-Switch> ? (Lists all commands available in user mode)
ITroute-Switch# ? (Lists all commands available in privileged mode)
ITroute-Switch# help (Describes how to get help)
ITroute-Switch# cl? (Lists all commands beginning with cl)
ITroute-Switch# clock ? (Lists the parameter available after clock)
ITroute-Switch# clo<Tab> (Completes the command - clock)
Setting the Clock
ITroute-Switch# clock set 01:00:00 25 August 2000 (Sets the time and
date)
Enhanced Editing
Moves the cursor to the beginning of the
Ctrl + A command line
Moves the cursor to the end of the command
Ctrl + E line
Ctrl + D Deletes a single character
Ctrl + F Moves the cursor forward one character
Ctrl + B Moves the cursor back one character
Ctrl + P / Up Arrow Recalls last (previous) command
Ctrl + N / Down
Arrow Recalls more recent command
Console Password
ITroute-Switch(config)# line console 0 (Moves to console line config
mode)
ITroute-Switch(config-line)# login (Password checking enabled at
login)
ITroute-Switch(config-line)# password ITrouteconsole (Sets the console
password)
VTY/Telnet Password
ITroute-Switch(config)# line vty 0 15 (Moves to vty line config mode)
ITroute-Switch(config-line)# login (Password checking enabled at
login)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
ITroute-Switch(config-line)# password ITroutetelnet (Sets the vty
password)
Enable Secret Password
ITroute-Switch(config)# enable secret ITroutesecret (Sets enable
secret password)
Encrypting Passwords
ITroute-Switch(config)# service password-encryption (Encrypts console,
vty passwords)
Switch Name
ITroute-Switch(config)# hostname ITrouteSystemsSwitch (Sets the switch
name)
ITrouteSystemsSwitch(config)# (Notice the hostname changes
immediately)
Message of the Day Banner
ITroute-Switch(config)# banner motd $
No Unauthorized Access $ (Sets the banner for users connecting to
switch)
Interface Description
ITroute-Switch(config)# interface fastethernet 0/24
ITroute-Switch(config-if)# description *** Connected to File-Server
*** (Sets the interface description; useful to keep track of interface
usage)
Enabling/Disabling an Interface
ITroute-Switch(config)# interface fastethernet 0/24
ITroute-Switch(config-if)# shutdown (Disables the interfaces)
ITroute-Switch(config-if)# no shutdown (Enables the interfaces)
Interface Speed
ITroute-Switch(config)# interface fastethernet 0/1
ITroute-Switch(config-if)# speed 10 (Sets the interface speed to 10
Mbps)
ITroute-Switch(config-if)# speed 100 (Sets the interface speed to 100
Mbps)
ITroute-Switch(config-if)# speed auto (Sets the interface speed to
auto negotiation)
Interface Duplex
ITroute-Switch(config)# interface fastethernet 0/2
ITroute-Switch(config-if)# duplex half (Sets the interface duplex to
half)
ITroute-Switch(config-if)# duplex full (Sets the interface duplex to
full)
ITroute-Switch(config-if)# duplex auto (Sets the interface duplex to
autonegotiation)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
Setting a Switch Management Interface IP Address
ITroute-Switch(config)# interface VLAN 1
ITroute-Switch(config-if)# ip address 192.168.0.1 255.255.255.0 (Sets
the interface IP Address to 192.168.0.1 for management and monitoring
purposes)
IOS Copy Commands
ITroute-Switch# copy running-config startup-config (Copies current
config to NVRAM)
ITroute-Switch# copy running-config tftp (Copies the current config to
a TFTP Server)
ITroute-Switch# copy flash tftp (Copies IOS in the Flash to a TFTP
Server)
Show Commands
ITroute-Switch# show interfaces (Displays detailed statistics of all
interfaces)
ITroute-Switch# show interface fastethernet 0/24 (Displays interface
statistics)
ITroute-Switch# show interface vlan 1 (Displays VLAN 1 statistics)
ITroute-Switch# show interface status (Displays all interfaces
summary)
ITroute-Switch# show mac address-table (Displays complete MAC table)
ITroute-Switch# show mac address-table dynamic (Displays dynamic MAC
entries)
ITroute-Switch# show running-config (Displays current config in DRAM)
ITroute-Switch# show startup-config
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
Port Security
Sw1(config)#int range fa 1/0/7-8
Sw1(config-if-range)#switchport mode access
Sw1(config-if-range)#switchport port-security
• (Optional) set the max number of allowed MAC addresses
o Switchport port-security maximum number
• (Optional) set the security violation
o Switchport port-security violation {protect | restrict | shutdown}
• (Optional) predefine any allowed source MAC address(es)
o Switchport port-security mac-address mac-address
• (Optional) tell the switch to “sticky learn” MAC addresses
o Switchport port-security mac-address sticky
Verifying Port security
Hostname# show port-security interface fa 0/1
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
VLAN Configuration
ITroute-Switch(config)# vlan 100 (Creates VLAN 100)
ITroute-Switch(config-vlan)# name ITroute-CCNA (Assigns VLAN the name
ITroute-CCNA)
ITroute-Switch(config)# interface fastethernet 0/1
OR
ITroute-Switch(config)# interface range fastethernet 0/1 - 5
ITroute-Switch(config-if)# switchport mode access (Disables trunking on
an interface)
ITroute-Switch(config-if)# switchport access vlan 100 (Puts the
specified interface(s) into VLAN 100)
Verifying VLAN Configuration
ITroute-Switch# show vlan brief (Displays brief information about all
VLANs)
ITroute-Switch# show vlan id 100 (Displays detailed information about
VLAN 100)
Trunking Configuration
Before configuring Trunk links ensure specified interfaces of both
switches are connected to each other; then configure both switches for
trunking
ITroute-Switch(config)# interface fastethernet 0/1
Sw1(config-if)# switchport trunk encapsulation {dot1q | isl |
negotiate}
ITroute-Switch(config-if)# switchport mode trunk (Forces an interface
to trunking)
OR
ITroute-Switch(config-if)# switchport mode dynamic desirable (Makes the
interface initiate negotiation for trunking)
OR
ITroute-Switch(config-if)# switchport mode dynamic auto (Makes the
interface respond to trunking)
Verifying Trunking
ITroute-Switch# show interfaces fastethernet 0/1 switchport (Displays
Layer 2 information of the interface)
ITroute-Switch# show interfaces trunk (Displays trunking information of
all interfaces configured as trunk)
ITroute-Switch# show interfaces fastethernet 0/1 trunk (Displays
trunking information of the interface Fastethernet 0/1)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
VTP Configuration
ITroute-Switch(config)# vtp mode server (Configures VTP mode to
server)
ITroute-Switch(config)# vtp mode client (Configures VTP mode to client)
ITroute-Switch(config)# vtp mode transparent (Configures VTP mode to
transparent)
ITroute-Switch(config)# vtp domain ITroute (Configures switch to VTP
domain ITroute)
ITroute-Switch(config)# vtp password ITroutevtp (Password protects VTP
domain; password configured to ITroutevtp)
ITroute-Switch(config)# vtp pruning (Enables pruning in VTP domain)
Verifying VTP Configuration
ITroute-Switch# show vtp status (Displays detailed VTP information)
IP Addressing Commands
ITroute-Router(config-if)# ip address 1.1.1.1 255.0.0.0 (Configures IP
address)
ITroute-Router(config-if)# ip address dhcp (Obtains IP address from the
DHCP server)
ITroute-Router(config-if)# no shutdown (Enables the interface)
Verifying IP Addressing Configuration
ITroute-Router# show ip interface brief (Displays summarized interface
information)
ITroute-Router# show interfaces (Displays detailed interface
information)
Serial Interface Configuration
ITroute-Router(config-if)# clock rate 64000 (Sets interface clocking to
64000bps, this command is required in a lab environment)
ITroute-Router(config-if)# bandwidth 64 (Sets interface bandwidth to
64kbps)
Static and Default Route Commands
ITroute-Router(config)# ip route 192.168.1.0 255.255.255.0
1.1.1.1 (Configures a static route to 192.168.1.0 /24 network via next
hop router IP address 1.1.1.1)
ITroute-Router(config)# ip route 192.168.1.0 255.255.255.0
serial0/0/0 (Configures a static route to 192.168.1.0 /24 network via
router’s serial 0/0/0 interface)
ITroute-Router(config)# ip route 0.0.0.0 0.0.0.0 10.1.1.1 (Configures a
static default route via next hop router IP address 10.1.1.1)
Verifying IP Routing Configuration
ITroute-Router# show ip route (Displays the routing table)
ITroute-Router# show ip route static (Displays only the static routes)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
OSPF Configuration
ITroute-Router(config)# router ospf 1 (Configures OSPF with process-id 1)
ITroute-Router(config-router)# network 10.1.1.1 0.0.0.0 area 0 (Enables OSPF on
an interface with IP address 10.1.1.1 and configures it in area 0)
ITroute-Router(config-router)# network 10.1.0.0 0.0.255.255 area 1 (Enables OSPF
on all interfaces with IP addresses starting with 10.1 and configures
them in area 1)
ITroute-Router(config-router)# router-id 1.1.1.1 (Configures router-id to
1.1.1.1)
ITroute-Router(config-router)# auto-cost reference-bandwidth 1000 (Configures
OSPF reference bandwidth to 1000Mbps, the default is 100Mbps)
ITroute-Router(config-if)# ip ospf hello-interval 15 (Sets the OSPF hello
interval to 15 sec. Timers must match between OSPF routers for
neighbor relationship)
ITroute-Router(config-if)# ip ospf dead-interval 80 (Sets the OSPF dead
interval to 80 sec. Timers must match between OSPF routers for
neighbor relationship)
ITroute-Router(config-if)# ip ospf cost 22 (Overrides OSPF interface cost
to 22)
ITroute-Router(config-if)# ip ospf authentication (Enables clear text
authentication)
ITroute-Router(config-if)# ip ospf authentication-key ITroute (Sets password to
ITroute)
Verifying OSPF Configuration
ITroute-Router# show ip protocols (Displays routing protocols information)
ITroute-Router# show ip route ospf (Displays only OSPF routes)
ITroute-Router# show ip ospf neighbor (Displays OSPF neighbor table)
ITroute-Router# show ip ospf interfaces (Displays interface information
running OSPF)
ITroute-Router# show ip ospf database (Displays OSPF link state database)
ITroute-Router# clear ip ospf process (Clears OSPF process(es) on the router)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
EIGRP Configuration
ITroute-Router(config)# router eigrp 10 (Configures EIGRP in autonomous
system 10)
ITroute-Router(config-router)# network 10.0.0.0 (Enables EIGRP on all
interfaces in network 10.0.0.0)
ITroute-Router(config-router)# network 10.1.1.1 0.0.0.0 (Enables EIGRP on an
interface with IP address 10.1.1.1)
ITroute-Router(config-router)# network 10.1.0.0 0.0.255.255 (Enables EIGRP on
all interfaces with IP addresses starting with 10.1)
ITroute-Router(config-router)# no auto-summary (Disables auto
summarization)
ITroute-Router(config-if)# ip hello-interval eigrp 15 20 (Sets EIGRP hello
interval to 20 sec for autonomous system 15)
ITroute-Router(config-if)# ip hold-time eigrp 15 30 (Sets EIGRP hold interval
to 30 sec for autonomous system 15)
Verifying EIGRP Configuration
ITroute-Router# show ip protocols (Displays routing protocols information)
ITroute-Router# show ip route eigrp (Displays only EIGRP routes)
ITroute-Router# show ip eigrp neighbor (Displays EIGRP neighbor table)
ITroute-Router# show ip eigrp topology (Displays EIGRP topology table)
ITroute-Router# show ip eigrp interfaces (Displays interfaces running EIGRP)
EIGRP Route Summarization Configuration
ITroute-Router(config)# interface serial 0
ITroute-Router(config-if)# ip summary-address eigrp 100 10.1.0.0
255.255.0.0 (Configures summary route of 10.1.0.0 /16 out of serial 0
interface for EIGRP 100)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
Access Control List Configuration
ITroute-Router(config)# access-list 20 permit 192.168.0.1 0.0.0.0 (Configures standard
ACL entry permitting traffic from source IP 192.168.0.1)
ITroute-Router(config)# access-list 20 permit host 192.168.0.1 (Same result as
above, configures standard ACL entry permitting traffic from source IP
192.168.0.1)
ITroute-Router(config)# access-list 20 deny 192.168.0.1 0.0.0.0 (Configures standard
ACL entry denying traffic from source IP 192.168.0.1)
ITroute-Router(config)# access-list 20 remark New-ACL-for-Sales-User (Configures
remark for ACL 20, like descriptions makes working with ACLs easier)
ITroute-Router(config)# access-list 120 permit ip any host 1.1.1.1 (Configures
extended ACL entry permitting traffic from any source to IP 1.1.1.1)
ITroute-Router(config)# access-list 120 deny tcp any host 1.1.1.1 eq 23 (Configures
extended ACL entry denying traffic from any source to telnet IP 1.1.1.1)
ITroute-Router(config)# ip access-list standard HR-ACL (Configures standard named
ACL)
ITroute-Router(config-std-nacl)# deny host 192.168.0.1 (Denies traffic from
source IP 192.168.0.1)
ITroute-Router(config)# interface serial 0
ITroute-Router(config-if)# ip access-group HR-ACL in (Applies HR-ACL inbound
on interface serial 0)
ITroute-Router(config)# line vty 0 15
ITroute-Router(config-line)# access-class 20 in (Applies ACL 20 inbound on
VTY lines)
Verifying Access Control List Configuration
ITroute-Router# show access-lists (Displays ACL entries and matches to the
entries)
ITroute-Router# show ip access-lists (Displays IP ACL entries and matches to
the entries)
ITroute-Router# show ip interface serial 0 (Displays whether ACL has been
applied to the interface serial 0)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
Network Address Translation Configuration
ITroute-Router(config)# interface serial 0
ITroute-Router(config-if)# ip nat inside (Configures serial 0 as inside
interface)
ITroute-Router(config)# interface ethernet 0
ITroute-Router(config-if)# ip nat outside (Configures ethernet 0 as outside
interface)
ITroute-Router(config)# ip nat inside source static 10.1.1.1 200.1.1.1 (Configures a
static NAT entry to translate 10.1.1.1 inside address to 200.1.1.1
outside address)
ITroute-Router(config)# ip nat pool ITroute-pool 171.1.1.1 171.1.1.15 netmask
255.255.255.240 (Configures NAT pool named ITroute-pool with 16 outside IP
addresses)
ITroute-Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255 (Configures an
ACL permitting 254 IP addresses from 192.168.1.1 to 192.168.1.254)
ITroute-Router(config)# ip nat inside source list 1 pool ITroute-pool (Configures a
dynamic NAT to translate ACL 1 inside addresses to ITroute-pool
outside addresses)
ITroute-Router(config)# ip nat inside source list 1 interface serial 0 (Configures PAT
and translates ACL 1 inside addresses to serial0 IP address using port
numbers)
Clearing, Verifying and Debugging Network
Address Translation
ITroute-Router# clear ip nat translation * (Clears all dynamic NAT entries)
ITroute-Router# show ip nat translation (Displays active translations)
ITroute-Router# show ip nat statistics (Displays NAT statistics)
ITroute-Router# debug ip nat (Turns on NAT debugging)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
Spanning Tree Protocol Configuration
ITroute-Switch(config)# spanning-tree vlan 100 root primary (Configures
the switch as the STP root switch for VAN 100)
ITroute-Switch(config)# spanning-tree
vlan 100 priority 4096 (Configures the STP priority to 4096 for VLAN
100)
ITroute-Switch(config)# interface fastethernet 0/24
ITroute-Switch(config-if)# spanning-tree cost 100 (Configures the STP
cost of interface Fastethernet 0/24 to 100)
Verifying Spanning Tree Protocol Configuration
ITroute-Switch# show spanning-tree (Displays detailed information of
STP)
ITroute-Switch# show spanning-tree interface fastethernet
0/24 (Displays detailed information of STP related to interface
Fastethernet 0/24)
ITroute-Switch# show spanning-tree vlan 100 (Displays detailed
information of STP related to VLAN 100)
ITroute-Switch# debug spanning-tree events (Debugs STP)
Leased Line Configuration using HDLC and PPP
ITroute-Router(config)# interface serial 0
ITroute-Router(config-if)# encapsulation hdlc (Configures hdlc as serial 0
encapsulation, default encapsulation on serial interfaces)
ITroute-Router(config)# interface serial 0
ITroute-Router(config-if)# encapsulation ppp (Configures ppp as serial 0
encapsulation)
ITroute-Router(config-if)# username remote-routers-hostname password same-on-both-
routers (Configured on both ends of leased line, username must be remote
router’s hostname and password must be same on both routers)
ITroute-Router(config-if)# ppp authentication chap (Configures CHAP
authentication protocol)
Verifying and Debugging Leased Line
Configuration
ITroute-Router# show interface serial 0 (Displays serial 0 encapsulation)
ITroute-Router# debug ppp authentication (Turns on PPP authentication
debugging)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au
IPv6 Address Configuration
ITroute-Router(config)# ipv6 unicast-routing (Turns on IPv6 support on
the router)
ITroute-Router(config)# interface fastethernet 0
ITroute-Router(config-if)# ipv6 address 2002:1111:AAAA:1::/64 eui-
64 (Configures IPv6 address using Extended Unique Identifier, the IPv6
Address contains the MAC address of the interface fastethernet 0. The
complete IP address may be 2002:1111:AAAA:1:213:19FF:FE7B:5004)
ITroute-Router(config-if)# ipv6
address 2002:2222:BBBB:2::1/64 (Configures IPv6 address. The complete
IP address is 2002:2222:BBBB:2::1)
Verifying IPv6 Address Configuration
ITroute-Router(config)# show ipv6 interfaces (Displays detailed IPv6
statistics of all interfaces)
ITroute-Router# show ipv6 interface fastethernet 0 (Displays detailed
IPv6 statistics of fastethernet 0 interface)
ITroute-Router# show ipv6 interface brief (Displays IPv6 details of
all interfaces briefly)
ITRoute Training & Certification
Suite 1, Level 4, 491 Kent Street, Sydney, NSW 2000
Phone: 02 92627088 Mobile: 0406 825 808 Email: info@itroute.com.au Web: www.itroute.com.au