Você está na página 1de 18

Basic configuration

Router> enable Router# Router# disable Router> Router> ? Router# ?

Router#show version Router>show version Router# show running-config Router# show startup-config Router#show flash: Router# dir nvram:

Router#configure terminal Router#conf t

1.Hostname

Router#hostname R1 R1# no hostname Router#

2.Interface
R1(config)#interface fastEthernet 0/0 R1(config)#int f0/0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#description To R2 R1(config-if)#exit | end | Ctrl+Z R1#show run R1#show ip interface brief //xem thng tin tm t t R1#show interface [f0/0|f0/1 ] // xem thng tin chi ti t R1(config)#do show ip interface brief R1(config)#do show interface [f0/0|f0/1 ] R1# ping 192.168.1.2 R1(config)# do ping 192.168.1.2

2.Interface
interface Serial0/0/0 description Connect to R4 ip address 1.1.1.1 255.255.255.0 clock rate 128000 no shutdown exit

2.Interface
interface Loopback0 description To Internet ip address 10.0.0.2 255.255.255.0

3.The static default route


R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0 R1#show ip route //xem b ng nh tuy n R1#ping 172.16.1.3 R1#traceroute 172.16.1.3

3. Banner MOTD
banner motd # This is a security system !!! #

4.1 console password

(config)# line con 0 password cisco login Router#exit

4.2. Enable password


R1(config)#enable password class //clear text R1(config)#enable secret ccna // encrypted by MD5 R1#show running-config R1#disable R1>enable

4.3.VTY password (for Telnet service)


R2(config)#line vty 0 4 password cisco login R1# 192.168.1.2 R1#telnet 192.168.1.2 R1#connect 192.168.1.2 R2# exit //ng t phin Telnet, v R1 R2# Ctrl+Shift+6 //t m th i quay v R1, n u Enter th l i chuy n n R2

R2(config)#service password-encryption //m ha t t c cc password d ng clear text b ng thu t ton m c 7 (y u) c a Cisco. Crack b ng GetPass.

5. Backup configuration files


5.1. Save into the NVRAM R2#copy running-config startup-config R2#copy run sta R2#write R2#wr

R2#show startup-config R2# dir nvram:

5. Backup configuration files


5.2. Backup into a TFTP server (172.16.1.254) R2#ping 172.16.1.254 R2#copy running-config tftp: Address or name of remote host []? 172.16.1.254 Destination filename [R2-confg]? R2#copy startup-config tftp: Address or name of remote host []? 172.16.1.254 Destination filename [R2-confg]?

Restore a configuration file from a TFTP server Router-X#copy tftp: running-config Address or name of remote host []? 172.16.1.254 Source filename []? R2-confg R2#

6. Removing All Configurations


R2#erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram R3#reload

Você também pode gostar