Router Commands
Router Commands
Password
Set the enable secret password [to enter privileged mode] Router(config)#enable secret Rimmer
Set the enable password Router(config)#enable Rimmer
Set the password for Telnet Router(config)#line vty 0 4 ;0 4 specifies num of telnet sessions
Router(config-line)# login
Router(config-line)# password Holly
Set the console port password Router(config)#line con 0
Router(config-line)# login
Router(config-line)# password Holly
Set the auxiliary password Router(config)#line aux 0
Router(config-line)# login
Router(config-line)# password Holly
Passwords can be encrypted Routerconfig)# service password-encryption
To de-encrypt the passwords Routerconfig)# no service password-encryption
Router Identification
Message of the day Router(config)# banner motd # You are in… #
Give the router a hostname Router(config)#hostname RouterC
Configuring a Serial Interface
Is it DCE or DTE? Router# show controller serial 1
Enter sub interface mode Router(config)# interface serial 1
Set clock rate on DCE Router(config-if)# clock rate 64000 [or clockrate 64000]
Set the bandwidth Router(config-if)# bandwidth 64
Enable the interface Router(config-if)# no shutdown
Check interface status Router# show interface serial 1
Router# show ip interface brief
TCP/IP
Disable IP routing on a router (enabled by default) Router(config)#no ip routing
Put an IP address on an interface Router(config)#interface serial 0
Router(config-if)# ip address 172.16.1.3 255.255.0.0
Router(config-if )#exit
Router(config)#interface ethernet 0
Router(config-if)# ip address 208.10.10.3 255.255.255.0
Configure RIP Router(config)# router rip
Router(config-router)# network 157.2.0.0
Router(config-router)# network 177.2.0.0
Disable RIP routing Router(config)# no router rip
Configure IGRP Router(config)# router igrp 300
Router(config-router)# network 157.2.0.0
Router(config-router)# network 177.2.0.0
Disable IGRP routing Router(config)#no router igrp 300
View the IP routing table Router# show ip route
View RIP Debug Router# debug ip rip
View IGRP Debug Router# debug ip igrp events
Router# debug ip igrp transactions
Config-Reg
ROM Monitor Mode [prompt will be either: > or rommon>] Router(config)# Config-reg 0x0000
Boot from ROM and enter RXBOOT mode Router(config)# Config-reg 0x0001
[prompt will be: Router_Name(boot)> ]
Boot from ROM & check NVRAM for startup [boot] commands Router(config)# Config-reg 0x0002 [through to 0x000F]
RXBOOT (diagnostics mode, use ‘b’ to continue boot) Router(config)# Config-reg 0x2000
Boot from ROM, use NVRAM (upgrade flash in run-from-flash ) Router(config)# Config-reg 0x2101
Boot from ROM, skip NVRAM (disaster recovery) Router(config)# Config-reg 0x2141
Boot from FLASH, use NVRAM (normal operation) Router(config)# Config-reg 0x2102
Boot from FLASH, skip NVRAM (password recovery) Router(config)# Config-reg 0x2142
Access-Lists
<1-99> IP standard access list
<100-199> IP extended access-list
<200-299> Protocol type-code access list
View all access lists on the router and list each line of the list Router# show access-lists
View i p access lists only Router# show ip access-lists