Enter privilege EXEC mode
switch>enable
router>enable
Enter config mode
switch#configure terminal
router#configure terminal
set up a encrypted password for entering privilege EXEC mode
switch(config)#enable secret [PASSWORD]
router(config)#enable secret [PASSWORD]
set up a unencrypted password for entering privilege EXEC mode
switch(config)#enable password [PASSWORD]
router(config)#enable password [PASSWORD]
set up a password for console line
switch(config)#line console 0
switch(config-line)#password PASSWORD
switch(config-line)#login
router(config)# [SMAE WITH SWITCH]
set up a password for telnet or SSH
switch(config)#line vty 0 15
switch(config-line)#password [PASSWORD]
switch(config-line)#login
router(config)# [SMAE WITH SWITCH]
encrypt all the plain passwords
switch(config)#service password-encryption
router(config)#service password-encryption
set up the name of the router or switch
switch(config)#hostname [NAME]
router(config)#hostanme [NAME]
set up a banner when enter the system
switch(config)#banner motd [MESSAGE]
router(config)#banner motd [MESSAGE]
set up ip address for switch for remote control
switch(config)#interface vlan 1
switch(config-if)#ip address [IP ADDRESS] [SUBNET MASK]
switch(config-if)#no shutdown
set up default gateway (IP address of router’s interface that located in the same local network with switch)
switch(config)#ip default-gateway [IP ADDRESS]
set up the ip address of interface of router
router(config)#interface [specific interface name]
router(config-if)#ip address [IP ADDRESS] [SUBNET MASK]
router(config-if)#no shutdown
show the basic information about the interfaces including ip addresses and status
switch#show ip interface brief
router#show ip interface brief
show arp table
switch#show arp
show MAC table
switch#show mac address-table