Professional Documents
Culture Documents
Thanh PDF
Thanh PDF
Cu Hnh Switch C Bn
I.
- Cc cu lnh tr gip
- Cc cu lnh kim tra
- Cu hnh tn switch
- Cu hnh password
- Cu hnh a ch IP v default gateway
- Lab cu hnh switch c bn
1. Cc lnh tr gip:
Switch> ?
Switch> enable
Switch#
Switch# disable
Switch> exit
Cu hnh Hostname
TiliuthchnhCCNA
2960Switch(config)#line console 0
2960Switch(config-line)#login
2960Switch(config-line)#password cisco
2960Switch(config-line)#exit
2960Switch(config-line)#line vty 0 4
2960Switch(config-line)#login
2960Switch(config-line)#password cisco
2960Switch(config-line)#exit
2960Switch(config-if)# ip address
172.16.10.2 255.255.0.0
2960Switch(config)#ip default-gateway
172.16.10.1
TiliuthchnhCCNA
II.
Yu cu :
-S dng Packet Tracer kt ni m hnh nh trn
-Xa ton b cu hnh hin ti ca Swicth
-Cc lnh xem thng tin
-Cu hnh hostname, a ch IP
-Cc loi mt khu
-Tc v duplex
-Tnh nng PortSecurity
TiliuthchnhCCNA
Switch#show running-config
-
Switch#show version
-
Ni dung b nh Flash
Switch#show flash:
Hoc
Switch#dir flash:
Switch#dir flash:
6 drwx 4480 Mar 1 1993 00:04:42 +00:00 html
618 -rwx 4671175 Mar 1 1993 00:06:06 +00:00 c2960-lanbase-mz.122-25.SEE3.bin
32514048 bytes total (24804864 bytes free)
-
TiliuthchnhCCNA
Switch#show startup-configure
startup-config is not present
-
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#exit
S1#copy running-config startup-config
Destination filename [startup-config]? (enter)
Building configuration...
[OK]
S1#show startup-config
Using 1170 out of 65536 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname S1
!
<output omitted>
3. Cc loi mt khu :
-
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
-
S1(config)#line vty 0 4
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
-
TiliuthchnhCCNA
TiliuthchnhCCNA
Cu hnh a ch IP cho PC1 vi thng tin trn bi lab, trn PC vo Desktop -> IP
Configuration
IP: 172.17.99.21
SM: 255.255.0.0
Gw: 172.17.99.1 hin ti cha c trong bi lab ny
- Kim tra kt ni t PC n Switch :
PC vo Desktop -> Command prompt -> ping 172.17.99.11
-
S1#configure terminal
S1(config)#interface fastethernet 0/18
S1(config-if)#speed 100
S1(config-if)#duplex auto
S1(config-if)#end
-
Lu cu hnh
configuration...
TiliuthchnhCCNA
S1#show mac-address-table
6. Cu hnh tnh nng Port Security :
-
Tnh nng Port Security c th gip ta qun l vic truy cp vo tng cng ca
Switch gm: PC c MAC no c lt ni n cng, tng s MAC c kt ni
Cc bc cu hnh nh sau
TiliuthchnhCCNA
Cu Hnh Router C Bn
I.
Gii thiu :
Bo mt l mt yu t rt quan trng trong network,v th n rt c quan tm v s dng
mt khu l mt trong nhng cch bo mt rt hiu qu.S dng mt khu trong router c th
gip ta trnh c nhng s tn cng router qua nhng phin Telnet hay nhng s truy cp trc
tip vo router thay i cu hnh m ta khng mong mun t ngi la.
II.
Mc ch :
Ci t c mt khu cho router, khi ng nhp vo, router phi kim tra cc loi mt khu
cn thit.
III.
M t bi lab v hnh :
Cc cp bo mt ca mt khu :
Cp bo mt ca mt khu da vo cp ch m ho ca mt khu .cc cp m ha
ca mt khu:
Cp 5 : m ha theo thut ton MD5, y l loi m ha 1 chiu,khng th gii m
c(cp ny c dng m ho mc nh cho mt khu enable secret gn cho router)
Cp 7 : m ha theo thut ton MD7, y l loi m ha 2 chiu,c th gii m
c(cp ny c dng m ha cho cc loi password khc khi cn nh: enable
password,line vty,line console)
Cp 0 : y l cp khng m ha.
V.
Qui tc t mt khu :
Mt khu truy nhp phn bit ch hoa,ch thng,khng qu 25 k t bao gm cc k
s,khong trng nhng khng c s dng khong trng cho k t u tin.
Router(config)#enable password vsic-vsic-vsic-vsic-vsic-vsic-vsic
% Overly long Password truncated after 25 characters mt khu c t vi 26 k
t khng c chp nhn
TiliuthchnhCCNA
VI.
VII.
Mt khu l ttg
Mt khu l cisco
TiliuthchnhCCNA
m ng Line Console
cng Console th 0
Router(config-line)#password cert
Router(config-line)#login
password l cert
m ch ci t password
Router(config-line)#exit
Mt khu cho cng aux:
Router(config)#line aux 0
S 0 ch s th t cng aux c dng
Router(config-line)#password router
password l router
Router(config-line)#login
Router(config-line)#exit
Sau khi t xong mt khu,ta thot ra ngoi ch Privileged mode, dng lnh Show runningconfig xem li nhng password cu hnh :
Router#show running-config
Building configuration...
Current configuration : 550 bytes
version 12.1
TiliuthchnhCCNA
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
password ci t ch khng m ha
hostname Router
password secret c
m ha mc nh cp 5
enable password cisco
!
line con 0
password cert
login
line aux 0
password router
login
line vty 0 4
password class
login
!
End
Dng lnh Show running-config ta s thy c cc password cu hnh, nu mun m ha
tt c cc password ta dng lnh Service password-encryption trong mode config.
Router(config)#service password-encryption
Router(config)#exit
TiliuthchnhCCNA
password c m ha cp 7
line con 0
password 7 15110E1E10
password c m ha cp 7
login
line aux 0
password 7 071D2E595A0C0B password c m ha cp 7
login
line vty 0 4
password 7 060503205F5D
password c m ha cp 7
login
!
End
Ch : Ta khng th dng lnh no service password-encryption b ch m ha cho mt
khu,ta ch c th b ch m ha khi gn li mt khu khc
Sau khi t mt khu xong, khi ng nhp vo Router li, mt khu s c kim tra:
Router con0 is now available
Press RETURN to get started.
User Access Verification
Password:cert
Router>ena
Password:ttg
nhn enter
mt khu line console s c kim tra
khai bo mt khu console l : cert
enable d vo mode Privileged
TiliuthchnhCCNA
Router#
Cc loi mt khu khc nh Line Vty ,Line aux s c kim tra khi s dng n chc nng
VIII.