CCNA Routing & Switching Commands: Page 1 of 16
CCNA Routing & Switching Commands: Page 1 of 16
IP ROUTING
Static Routing- Routers are manually configured for networks that are not directly connected,
to be able to route to all networks via the next -hop interface.
Example- Let 192.168.30.0/24 be the IP of a network not directly connected Let 192.168.20.2 be
the next hop interface
(config)#ip route 192.168.30.0 255.255.255.0 192.168.20.2
Default Routing- Used on stub networks only to send packets with remote destination network
not in the routing table to the next hop router
Assume IP 192.168.40.1 is not in routing table
Page 1 of 16
CCNA All Commands
RIP-A distance vector routing protocol that passes complete routing table contents to
neighbouring routers
Example- Let 192.168.10.0 & 192.168.20.0 be directly connected networks of a router interfaces
and 192.168.30.0 be non-directly connected
first delete all static routes
(config)#no ip route 192.168.30.0 255.255.255.0 192.168.20.2
(config)#router rip
(config-router)#192.168.10.0
(config-router)#192.168.20.0
(config-router)#^z
Verifying RIP
1.Sh ip route
2.debug ip
Holding Down RIP Propagation-To stop RIP update sending but allow its receipt -say for s0/0
with ip 192.168.10.0
(config)#router rip
(config-router)#network 192.168.10.0
(config-router)#passive-interface serial 0/0
Page 2 of 16
CCNA All Commands
Example- Let 192.168.10.0 & 192.168.20.0 be directly connected networks of a router interfaces
with autonomous system number of 10 and 192.168.30.0 be non -directly connected
#router igrp 10
(config-router)#network 192.168.10.0
(config-router)#network 192.168.20.0
(config-router)#^z
Verifying IGRP
sh ip route
Page 3 of 16
CCNA All Commands
EIGRP-Uses classless routing which is subnet mask information sent with routing protocol
updates.
Example- Let 192.168.10.0 & 192.168.20.0 be directly connected ne tworks of a router interfaces
with autonomous system number of 20 and 192.168.30.0 be non -directly connected
1. #router eigrp 20
2. (config-router)#network 192.168.10.0
3. (config-router)#network 192.168.20.0
4. (config-router)#^z
Example- Let 172.16.0.0 & 10.0.0.0 be directly connected to a router to another remote
subnetwork of 192.168.10.0, then to enable EIGRP, we use
1. (config)#router eigrp 100
2. (config-router)#network 172.16.0.0
3. (config-router)#network 10.0.0.0
4. (config-router)#no auto-summary
N.B-The no auto-summary command sholuld be enabled in routers that encloses such networks.
Verifying EIGRP
sh ip route- Shows entire routing table
sh ip route eigrp- Shows only EIGRP entries in the routing table
ip eigrp neighbours- Shows all EIGRP neighbours
ip eigrp topology- Shows entries in the EIGRP topology table
Page 4 of 16
CCNA All Commands
Example- Let 10.0.0.0 be the network directly connected to the router upon which OSPF is to be
enabled; with ospf ID of 1 and area o
1. (config)#router ospf 1
2. (config-router)#network 10.0.0.0 0.255.255.255 area0
Loopback Interface- They are configured to be used as the routers RID to advertise the routes
and elect DR and BDR.
Page 5 of 16
CCNA All Commands
Page 6 of 16
CCNA All Commands
Page 7 of 16
CCNA All Commands
Verify with
sh vlan
Page 8 of 16
CCNA All Commands
Page 9 of 16
CCNA All Commands
Verify with
sh vtp status
Page 10 of 16
CCNA All Commands
Recovering Passwords
Interrupt the Router Boot Sequene
ctrl+Break key (windows wont perform break key, only 95/98)
Reloading the Router and Entering Privilged mode - for 2600 - type reset
Page 11 of 16
CCNA All Commands
Page 12 of 16
CCNA All Commands
Page 13 of 16
CCNA All Commands
Using Telnet
kenn2509#telnet 172.16.10.2
Page 14 of 16
CCNA All Commands
Resolving Hostname
kenn2509#config t
kenn2509(config)#ip host 2501B 172.16.10.2
kenn2509(config)#ip host 1900switch 192.168.0.148
kenn2509(config)#^z
Page 15 of 16
CCNA All Commands
Access Lists
Creating a Standard Access Lists (1 -99 or 1,300-1,999)
(config)#access-list 10 deny 172.16.30.2 (using the ip as a test)
Page 16 of 16