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