Вы находитесь на странице: 1из 17

CU HNH C BN CHO Router

This File - Cu hnh c bn cho Router:


https://goo.gl/QsfrRZ
Cho s mng nh sau:

Click vo Laptop0 => Chn th Desktop => Click Terminal


Click OK vo cu hnh Router.
Phn 1: Cc Mode hot ng ca Router
Khi mi khi ng Router v cha cu hnh th s thy
--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]:


=> Nh ti bc ny g: NO

Vo User Mode (Ch xem cc cu hnh c bn trn Router) => Du nhc


i lnh => Router>
User Mode => Vo Privilege Mode th g Enable
Quay li User Mode th g Exit

User Mode ==> Privilege Mode ==> Global Configuration ==>


Line/VLAN/VTY/Interface/...

T Privilege Mode ===> Global Configuration th g lnh sau:


configure terminal
Router> enable
Router# <= Privilege
Router# configure terminal
Router(config)# <= Global Configuration
----------------------------

Lu :
1) Phm tr gip l phm hi chm (?)
VD: Router# con?
2) Phm Tab gip hon thnh cu lnh
VD: Router> en<Tab>
Lm th no dng k t ? t Password?
3) Cho php g tt

Phn 2: Cu hnh
1) t tn cho thit b
Router(config)# hostname R1_DTU
R1_DTU(config)#

2) Cu hnh password
R1_DTU(config)# enable password dtu1
=> Dng clear text

R1_DTU(config)# enable secret dtu2

=> c m ha (MD5)

Lu : Nu tn ti c 2 loi password trn h thit b s u tin


password secret. 2 loi password trn dng bo v vic chuyn t
User mode vo Privilege mode.
Router>enable => Pasword??? => Router#
(Trang 12-13, file LAB CCNA TTG v1.pdf)

3) Cu hnh cho Interfaces


3.1) Interface ethernet/fastethernet
R1_DTU(config)# interface f0/0
(R# show ip interface brief)
R1_DTU(config-if)# no shutdown
R1_DTU(config-if)# ip address 10.1.1.1 255.0.0.0
R1_DTU(config-if)# exit
R1_DTU(config)#

3.2) Interface serial (Gn thm Card Wic-2T c cng Serial)


R1_DTU(config)# interface s0/1/0
(R# show ip interface brief)
R1_DTU(config-if)# no shutdown
R1_DTU(config-if)# ip address 10.1.1.1 255.0.0.0
R1_DTU(config-if)# exit
R1_DTU(config)#
Lu : Nu Interface m chng ta ang cu hnh ng vai tr l DCE
th s cu hnh thm lnh sau
R1_DTU(config-if)# clock rate 72000

4) Cu hnh bo v cc cng Management


4.1) Cu hnh bo v cng line vty (Cho php telnet/ssh)
R1_DTU(config)# line vty 0 4
R1_DTU(config-line)# password dtu3
R1_DTU(config-line)# login
R1_DTU(config-line)# exit
R1_DTU(config)#
4.2) Cu hnh bo v cng line console
R1_DTU(config)# line console 0
R1_DTU(config-line)# password dtu3
R1_DTU(config-line)# login
R1_DTU(config-line)# exit
R1_DTU(config)#

5) Lu cu hnh
RAM - Cha cu hnh ang chy (running-config)
NVRAM - Cha c.hnh lu (startup-config)
Khi khi ng th router s np cu hnh t NVRAM ln RAM. V vy
khi tt phi lu c.hnh t RAM xung NVRAM.
R# copy running-config startup-config
Hoc:
R# write

6) Kim tra cc cu hnh ang chy


R# show running-config //Xem cu hnh ang chy
R# show ip interface brief //Xem t
hng tin cc Interface trn
Router
R# show ip route //Xem bng nh tuyn
R# show cdp neighbors // Xem lng ging

7) Xa cu hnh & khi ng li


R# erase startup-config //Xa cu hnh Startup
R# reload //Khi ng li
Lu : hy lnh va g th ch cn thm ch no vo u cu lnh
VD:
R(config)# int e0/0
R(config-if)# ip address 11.1.1.1 255.0.0.0
R(config-if)#
R(config-if)# no ip address 11.1.1.1 255.0.0.0
Cu hnh IP cho Laptop1:

Chn th Desktop => Chn IP Configuration


Nhp IP l 10.2.2.2
Subnet mask l 255.0.0.0
Click vo du X bn gc phi quay v th Desktop
Chn Command Prompt
ping 10.1.1.1
Xem kt qu.
Lab: Cu hnh Telnet

Ni Laptop & ROuter ng cc cng nh s .


Bc 1: Cu hnh IP cho Laptop
Bc 2: Cu hnh IP cho Interface f0/0
--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: n

Press RETURN to get started!

Router>
Router>en
Router#conf t

Router(config)#interface f0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 10.1.1.1 255.0.0.0
Router(config-if)#exit
Router(config)#
Bc 3: Kim tra kt ni
Router#ping 10.2.2.2

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

Router#

Hoc ng t Laptop ping qua ROuter

Bc 4: Cu hnh trn ROuter cho php Telnet


Router(config)#
Router(config)#line vty 0 4
Router(config-line)#password dtu
Router(config-line)#login
Router(config-line)#exit
Router(config)#

Bc 5: ng ti Laptop, thc hin Telnet ti ROuter (pasword=dtu)

Bc 6: Sau khi ng Telnet thnh cng, th thc hin chuyn qua mode Privilege
bng lnh Enable
S gp li nh hnh trn => L do li: Cha t mt khu enable password hoc enable
secret
Vo li Router & t mt khu:
Router(config)#enable password 123

Sau Vo li Laptop (ang telnet Router) g lnh enable & nhp password=123
Bc 7: Lu cu hnh
Bc 8: Lu file Lab o trn Packet Tracer

Вам также может понравиться