CCNA Routing Protocol Commands
IP ROUTING
#sh ip route // To view IP routing tables created on a Cisco router.
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.
Syntax:
(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.2
(config)#no ip route 192.168.30.0 255.255.255.0 192.168.20.2 //To remove a static route
// Please note the ‘no’ which is the word used in routers to negate any command
Default Routing
Used on stub networks only to send packets with remote destination network not in the routing table to the next hop router.
Syntax:
(config)#ip route 0.0.0.0 0.0.0.0 192.168.40.1
RIP (Routing Information Protocol)
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
Syntax 1:
(config)#router rip
(config-router)#192.168.10.0
(config-router)#192.168.20.0
(config-router)#exit
Verifying RIP
1.Sh ip route
2.debug ip
Syntax 2:
(config)#router rip
(config-router)#network 192.168.10.0
(config-router)#passive-interface serial 0/0 //In this case we have used the interface address rather a IP address
EIGRP
Proprietary of CISCO
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 networks of a router interfaces with autonomous system number of 20 and 192.168.30.0 be non-directly connected
Syntax 1:
#router eigrp 20
(config-router)#network 192.168.10.0
(config-router)#network 192.168.20.0
(config-router)#^z
Syntax 2:
(config)#router eigrp 20
(config-router)#passive-interface serial 0/0
To enable EIGRP on discontiguos networks(two different subnetworks of classfull network connected by another different classful subnetwork)
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
(config)#router eigrp 100
(config-router)#network 172.16.0.0
(config-router)#network 10.0.0.0
(config-router)#no auto-summary
HINT:
The no auto-summary command should be enabled in routers that encloses such networks.
Verifying EIGRP
1. sh ip route //Shows entire routing table
2. sh ip route eigrp //Shows only EIGRP entries in the routing table
3. ip eigrp neighbours // Shows all EIGRP neighbours
4. ip eigrp topology // Shows entries in the EIGRP topology table
OSPF
A link-state routing protocol
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
(config)#router ospf 1
(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.
Example– Let the loopback iinterface be configured on interface with ip 172.16.10.1
(config)#int loopback 0
(config-if)#ip address 172.16.10.1 255.255.255.0
(config-if)#no shut
(config-if)#^z
Verifying OSPF Configuration
1. sh ip ospf // Used to display all OSPF information
2. sh ip ospf database // indicates the number of links and neighboring router ID
3. sh ip ospf interface //Displays all OSPF interface related info
4. sh ip ospf neighbour // Summarizes OSPF info about neighbours
5. sh ip protocols // Overview of all present running protocols
Verifying Loopback and RID
1. sh running-config // To verify loopback address
2. sh ip ospf database // Verifies the new RID of each router
3. sh ip ospf interface // Verifies the new RID of each router
IMPORTANT COMMANDS
Checking the Current Configuration Register Values
show version or show ver
Changing Configuration Register
(config)#config-register 0x101 (d default is 0x2102)
Recovering Passwords in Router
1. Interrupt the Router Boot Sequence
ctrl+Break key (windows wont perform break key, only 95/98)
2. Changing the configuration register
for 2600 series router
rammon>confreg 0x2142
for 2500
type 0 after a break and enter the command o/r 0x2142
3. Reloading the Router and Entering Privilged mode
for 2600-type reset
for 2500-type I
4. Viewing and changing the configuration
copy run start
5. Resetting the configuration Register and Reloading the Router
config t
config-register 0x2102
copy run start-to save
Backing up and restoring the Cisco ios
1. verifying flash memory-Ensuring flash memory has enough room
router#sh flash
2. Backing-up the ciso ios
first verify server connectivity by- Router#ping 192.168.0.120 then;
(config-router)#copy flash tftp
3. Restoring or upgrading the cisco router ios
router#copy tftp flash
Backing up and Restoring the Cisco configuration
1.Backing up the cisco router configuration
copy runing config tftp
2. verifying the current configuration
sh run
3. copying the current cofiguration to NVRAM
copy run start
4. copying the current configuration to a TFTP server
copy run TFTP
5. Restoring the Cisco Router Configuration
copy TFTP run
6. Erasing the configuration
erase startup-config
Getting CDP timers and Holdtime information
Router#config t
Router(config)#cdp timer 90
Router(config)#cdp holdtime 240
Router(config)#^z
To turn-off CDP Completely
Router(config)#no cdp run
Using DNS to resolve names
#config t
(config)#ip domain-lookup (usually turned on by default)
(config)#ip name-server 192.168.0.70 (ip of an assumed DNS set)
(config)#ip domain-name india-router.com (Appends the domain name to a host)
(config)#^z