CCNA Exploration 2 IOS Commands
IOS Commands
Last update: 3/7/8
Refs: L – Labs
All others are Exploration 2 v4 curriculum material TI references.
R> enable Enter privileged EXEC mode
R# disable Return to user EXEC mode
R# exit Back up one level and eventually log off.
R(config)# exit
R(config)# Ctrl-z Return to Privileged EXEC mode from global
R(config)# end config mode.
L1.5.1 R1(config)#no ip domain-lookup Disable domain name lookup.
2.2.2 line console 0 Keep unsolicited output separate from your
logging synchronous input.
L2.8.1 exec-timout 0 0 Prevent sessions from timing out.
Basic Configuration
1.2.2 Router> User Exec mode
Router>enable Change to Privileged or Enable EXEC mode
Router#config terminal Change to global configuration mode
1.2.2 Router(config)#hostname R1 Configure hostname
1.2.2 R1(config)# enable secret class Configure passwords and banner
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)# banner motd &
******************************************
WARNING!! Unauthorized Access Prohibited!!
******************************************
&
1.2.2 R1(config)# int S0/0 Serial interface configuration.
2.2.4 R1(config-if)# ip address 192.168.2.1 255.255.255.0 Include clock rate only if this is a DCE interface.
R1(config-if)# description text
R1(config-if)# no shutdown
R1(config-if)# clock rate 64000 Set clock rate for the DCE only
1.2.2 R1(config)# int Fa0/0 Fast Ethernet configuration
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# description text
R1(config-if)# no shutdown
1.2.2 R1# copy run start Backup running-config to startup-config
(NVRAM).
L 1.5.1 R1# erase start Erase configuration and re-boot the router.
R1# reload
2.3.1 show ip route Show the routing table
2.2.1 show int Show full information about each interface
show int fa0/0
2.2.1 show ip int brief Show the status of all interfaces on the router.
2.2.1 show run Show the running configuration
show start Show startup configuration (in NVRAM)
2.2.5 show controllers serial 0/0 Determine if DTE or DCE cable is connected,
and if clock rate set.
2.3.1 debug ip routing Display when routes are added, modified or
L2.8.1 undebug ip routing deleted from the routing table.
Mel Ralph, Expl2 IOS cmds.doc, 03/07/2008 Page 1
CCNA Exploration 2 IOS Commands
2.3.1 debug all Turn on/off all debugging.
undebug all
2.3.3 show cdp neighbors Show CDP information
show cdp neighbors detail Includes IP address of neighbor.
2.3.4 R(config)# no cdp run Disable CDP globally
2.3.4 R(config-if)# no cdp enable Disable CDP just on an interface.
2.4.1 R(config)# ip route network-address subnet-mask Configuring a static route
{ip-address | exit-interface }
2.4.2 ip route 172.16.1.0 255.255.255.0 172.16.2.2 Examples: recommended for LAN interface.
ip route 172.16.1.0 255.255.255.0 s0/0 Recommended for WAN interface
2.5.4 ip route 192.168.2.0 255.255.255.0 fa0/1 172.16.2.2 Recommended for Ethernet (uses both exit
interface and next-hop)
2.6.2 ip route 0.0.0.0 0.0.0.0 Default static route. "quad-zero" route.
[exit-interface | ip-address ]
ip route 0.0.0.0 0.0.0.0 s0/0 Example
RIPv1
5.22 router rip Enable RIP
network <classful-network>
passive-interface <interface> Prevent RIP updates on <interface>
default-information originate Propagate a default route using RIP
3.4.1 show ip rip database
3.4.2 show ip protocols Display info about configured routing protocols
3.4.3 show ip route [ip_address]
RIPv2
7.2.1 router rip Configure RIPv2
version 2
7.2.3 no auto-summary Switch of automatic summarization
8.3.1 ip classless Routing behaviour.
no ip classless
EIGRP
9.2.2 R(config)# router eigrp AS Configure EIGRP
9.2.4 R(config-router)# Specify which interfaces will run EIGRP and
network network-address [wildcard-mask] which networks will be advertised
9.3.1 R(config-router)# metric weights tos k1 k2 k3 k4 k5
9.3.3 R(config-if)# bandwidth kilobits
9.5.5 R(config-if)# ip bandwidth-percent eigrp as percent
9.5.5 R(config-if)# ip hello-interval eigrp as seconds
R(config-if)# ip hold-time eigrp as seconds
9.5.3 R(config-if)# ip summary-address eigrp as Manually summarize roots.
network-address subnet-mask
9.5.4 ip route 0.0.0.0 0.0.0.0 lo1 Propagate a default route using EIGRP.
router eigrp
redistribute static
int s0/0 Example
bandwidth 64
ip bandwidth-percent eigrp 1 50
ip hello-interval eigrp 1 60
ip hold-time eigrp 1 180
9.2.5 show ip eigrp neighbors Verify adjacencies.
9.3.1 show ip protocols Verify the K values and other EIGRP details.
9.3.2 show interface Examine the actual values used for bandwidth,
delay, reliability, and load.
9.4.4 show ip eigrp topology
show ip eigrp topology [network]
show ip eigrp topology [all-links]
9.4.6 debug eigrp fsm
Mel Ralph, Expl2 IOS cmds.doc, 03/07/2008 Page 2
CCNA Exploration 2 IOS Commands
OSPF
11.2.2 R1(config)# router ospf process-id Enable OSPF on router.
11.2.3 R(config-router)# network net-addr wildcard-mask Specify which interfaces will run OSPF and
area area-id which networks will be advertised.
11.2.4 R(config-router)# router-id ip-address Set the Router ID.
11.3.2 R(config-if)# bandwidth kbps Use on serial interfaces for accurate cost calc.
R(config-if)# ip ospf cost number Alternatively, set the cost directly
11.5.1 ip route 0.0.0.0 0.0.0.0 interface Redistributing a default route with OSPF.
router ospf 1
default-information originate
11.5.2 R1(config-router)# Default is 100 (Fa)
auto-cost reference-bandwidth { 1-4294967 Mbps }
11.4.3 R(config-if)# ip ospf priority {0 - 255} Set DR/BDR election priority. Default is 1.
11.5.2 R(config-if)# ip ospf hello-interval seconds Default is 10 secs and 40 secs.
R(config-if)# ip ospf dead-interval seconds
11.2.4 clear ip ospf process Restart OSPF process.
11.2.4 show ip protocols Verify OSPF details.
show ip ospf
show ip ospf interface
11.2.5 show ip ospf neighbor Verify adjacencies.
L11.6.1 interface Serial0/0 Example:
bandwidth 64 Partial config for Lab 11.6.1 Senario A, R1
ip address 192.168.10.1 255.255.255.252
ip ospf hello-interval 5
ip ospf dead-interval 20
clock rate 64000
!
interface Serial0/1
bandwidth 64
ip address 192.168.10.5 255.255.255.252
!
interface Loopback1
description To ISP
ip address 172.30.1.1 255.255.255.252
!
router ospf 1
router-id 10.4.4.4
network 172.16.1.16 0.0.0.15 area 0
network 192.168.10.0 0.0.0.3 area 0
network 192.168.10.4 0.0.0.3 area 0
auto-cost reference-bandwidth 10000
default-information originate
!
ip route 0.0.0.0 0.0.0.0 Loopback1
!
end
IOS Editing Functions
Ctrl-A Move to the start of line
Ctrl-E Move to end of line
Ctrl-B (or left-arrow) Back one letter
Ctrl-F (or right-arrow) Forward on letter
Esc-B Back one word
Mel Ralph, Expl2 IOS cmds.doc, 03/07/2008 Page 3
CCNA Exploration 2 IOS Commands
Esc-F Forward one word
Default Administrative Distance
Rt T Route Source Default Admin
Desc Distance
C Connected interface 0
S Static route 1
EIGRP summary route 5
External BGP 20
D Internal EIGRP 90
IGRP 100 No longer supported as of IOS 12.3
O OSPF 110
O E1 OSPF external type 1 110 Metric is updated
O E2 OSPF external type 2 110 Metric is not updated (default)
i IS-IS 115
R RIPv1, RIPv2 120
EGP 140
D EX External EIGRP 170
Internal BGP 200
Unknown 255
Configuration register settings:
0x2102 factory setting
0x2142 boot without loading configuration (password recovery).
0x2100 boot into ROM monitor
0x2101 boot IOS from Flash (without checking for boot system commands)
0x2102 – 0x210f boot IOS from Flash (checks for boot system commands first)
0x2101 boot ROM IOS (assuming IOS not in Flash)
Ctrl-break During boot sequence, boot into ROM monitor
Rommon 1> confreg 0x2102 Set configuration register
Rommon 2> reset Reboot
Escape sequence keys:
Ctrl-c Exit Setup Mode. All interfaces will be shutdown.
Ctrl-Shift-6 Cancel trace output.
Ctrl-Shift-6, x Cancel extended ping or domain-name lookup.
Ctrl-Shift-6, x Suspend a Telnet session
Multicast Addresses
224.0.0.5 All OSPF routers. Hello packets. Packets from DRs to all other routers.
224.0.0.6 All OSPF DRs/BDRs. Packets to the DR/BDR.
224.0.0.9 All RIPv2 routers
224.0.0.10 All EIGRP routers
Mel Ralph, Expl2 IOS cmds.doc, 03/07/2008 Page 4