Basic Commands
Basic Commands
Basic Commands
User mode:
Router>enable .Enter Enable mode
Router#configure terminal .Enter global config mode
Router(config)#
• To rename a router use command:
Router(config)#hostname newroutername
• Password configuration:
- Console password
Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password password
- Vty password
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password password
- Enable password
Router(config)#enable password password
- Secret password (secret password more priority than enable password. Secret password is
encryption regardless of you are enter the service password-encyption command or not)
Router(config)#enable secret password
- Password encyption
Router(config)#service password-encryption
- A login banner is a message that is displayed at login
Router(config)#banner motd # content of the message # (# begin and finish an message)
- Defines a static hostname-IP mapping
Router(config)#ip host hostname [tcp-port number] address1 [address2…address8]
(up to 08 address)
- Defines one or more DNS servers
Router(config)#ip name-server server-addr1 [server-addr2…server-addr6]
(up to 06 servers)
- DNS Enable by default on cisco Router to Disables the use of DNS on a cisco router use
command:
Router(config)#no ip domain-lookup
• Configure interface ( type includes ethernet, fastethernet, tokenring, serial and other)
Router(config)#interface type port
Router(config)#interface type module/port
Router(config-if)#ip address ip_address subnet_mark (assign ip address for interface)
Router(config-if)#no shutdown (turn on an interface)
(To turn off an interface use command: Router(config-if)#shutdown)
On serial interface in lab you must consider DCE interface and provide clocking (to check an
interface you can use the command: Router#show controllers serial port)
Router(config-if)# clock rate speed (speed=56000, 64000 … <=bandwidth )
Router(config-if)#encapsulation encap_type (On Cisco router, HDLC is the default
encapsulation on serial interface)
Router(config-if)#description description string ( configure descirption for an interface to
notify)
- To creat a loopback interface:
Router(config)#interface loopback loopback_interface_number
Router(config-if)#ip address ip_address subnet_mark
• Show commands
• show interfaces – Displays all the statistics for all the interfaces on the router or show
interfaces serial 0/1
-1-
-3-