Professional Documents
Culture Documents
Ccna PDF
Ccna PDF
Mc lc
Phn I : Cisco IOS ............................................................................................................... 1
BI 1:t Mt Khu Truy Nhp Cho Router ................................................................ 2
BI 2: Cisco Discovery Protocol (CDP) .......................................................................... 7
BI 3: TELNET ............................................................................................................. 15
BI 4: KHI PHC MT KHU CHO CISCO ROUTER ........................................ 20
BI 5: RECOVERY PASSWORD CHO SWITCH 2950 ............................................. 24
BI 6: NP IOS IMAGE T TFTP SERVER CHO CISCO ROUTER CHY T
FLASH ............................................................................................................................ 26
BI 7: NP IOS IMAGE CHO 2 ROUTER CHY T FLASH ................................ 36
BI 8:NP IOS CHO SWITCH .................................................................................... 41
Phn 2 :LAN ....................................................................................................................... 46
BI 9: CU HNH VLAN TRN SWITCH 2950 ........................................................ 46
BI 10: CU HNH VLAN TRUNK ............................................................................. 56
BI 11:CU HNH VTP PASSWORD ........................................................................ 64
Phn 3 :Routing .................................................................................................................. 70
BI 12: NH TUYN TNH (Static route) ................................................................. 70
BI 13: RIP( ROUTING INFORMATION PROTOCOL) .......................................... 79
Bi 14:Cu Hnh IGRP Timer ....................................................................................... 90
BI 15:CU HNH IGRP LOAD BALANCING ........................................................ 96
BI 16: DISCONTIGOUS NETWORKS ................................................................... 103
BI 17: REDISTRIBUTE GIA RIP v IGRP .......................................................... 108
BI 18 :CU HNH OSPF C BN .......................................................................... 119
BI 19: CU HNH EIGRP ....................................................................................... 126
BI 20: CU HNH OSPF GIA WINDOWS SERVER 2003 V ROUTER ....... 128
Phn 4 : ACCESS LIST v NAT....................................................................................... 136
BI 21: STANDAR ACCESS LIST............................................................................. 136
BI 22: EXTENDED ACCESS LIST .......................................................................... 143
BI 23: TN CNG ROUTER BNG FLOOD ........................................................ 151
BI 24: CU HNH NAT STATIC ............................................................................. 154
BI 25:CU HNH NAT OVERLOAD ...................................................................... 158
Phn 5 : WAN ................................................................................................................... 164
BI 26: CU HNH PPP PAP V CHAP................................................................... 164
BI 27:CU HNH ISDN BASIC............................................................................. 171
BI 28: CU HNH ISDN DDR .................................................................................. 179
BI 29: CU HNH FRAME RELAY CN BN...................................................... 191
BI 30:CU HNH FRAME RELAY SUBINTERFACE .......................................... 199
Trang 1
CCNA
Trang 2
CCNA
Trang 3
CCNA
Router(config-line)#exit
Sau khi t xong mt khu,ta thot ra ngoi ch Privileged mode, dng lnh Show
running-config xem li nhng password cu hnh :
Router#show running-config
Building configuration...
Current configuration : 550 bytes
version 12.1
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
enable secret 5 $1$6bgK$prmkIPVMht7okiCQ5EQ2o password secret c
m ha mc nh cp 5
enable password cisco
!
line con 0
password cert password cho cng Console l cert
login
line aux 0
password router password cho cng aux l router
login
line vty 0 4
password class
password cho ng vty l 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
Dng lnh show running-config kim tra li:
Router#show run
Building configuration...
enable secret 5 $1$6bgK$prmkIPVMht7okiCQ5EQ2o/
enable password 7 094F471A1A0A
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
login
VSIC Education Corporation
password c m ha cp 7
Trang 4
CCNA
!
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
nhn enter
Password:cert
khai bo mt khu console l : cert
enable d vo mode Privileged
Router>ena
Password:vsic
V mt khu secret c hiu lc cao hn nn c kim tra
Router#
Cc loi mt khu khc nh Line Vty ,Line aux s c kim tra khi s dng n chc nng
Trang 5
CCNA
Trang 6
CCNA
2. Mc ch:
Bi thc hnh ny gip bn hiu r v giao thc CDP v cc thng s lin quan, nm
c chc nng ca cc lnh trong giao thc ny.
Ch : CDP ch cung cp thng tin ca thit b kt ni trc tip vi n, tri vi cc giao
thc nh tuyn. Giao thc nh tuyn c th cung cp thng tin ca cc mng xa, hay kt
ni gin tip qua nhiu router.
3. M t bi lab v hnh :
Trang 7
CCNA
Trang 8
CCNA
interface Serial0
ip address 192.168.1.1 255.255.255.0
clockrate 56000
!
interface Serial1
no ip address
shutdown
!
ip classless
no ip http server
!
line con 0
line aux 0
line vty 0 4
login
!
End
Router Vsic3 :
Current configuration : 858 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Vsic3
!
ip subnet-zero
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
ip address 192.168.2.2 255.255.255.0
clockrate 56000
!
ip classless
ip http server
!
line con 0
line aux 0
line vty 0 4
!
End
Trang 9
CCNA
a ch cng lin kt
loi thit b lin kt l Cisco
Router 2500
Interface: Serial0, Port ID (outgoing port): Serial0 lin kt qua cng Serial 0
Holdtime : 168 sec
thi gian gi gi tin l 168 sec
Version :
Cisco Internetwork Operating System Software
VSIC Education Corporation
Trang 10
CCNA
Trang 11
CCNA
tt ch cdp trn n
Nu mun bt li ch CDP trn interface no ta dng lnh CDP enable trn
interface .
VSIC1(config)#int s0
VSIC1(config-if)#cdp ena
VSIC1(config-if)#exit
Lnh Show CDP traffic : hin th b m CDP bao gm s lng gi packet gi,
nhn v b li.
VSIC1#show cdp traffic
CDP counters :
Total packets output: 128, Input: 115
Hdr syntax: 0, Chksum error: 0, Encaps failed: 9
No memory: 0, Invalid packet: 0, Fragmented: 0
CDP version 1 advertisements output: 0, Input: 0
CDP version 2 advertisements output: 128, Input: 115
Lnh Clear CDP couter : dng reset lai b m CDP.
Lnh No CDP run : tt hon ton ch CDP trn Router
VSIC1(config)#no cdp run
VSIC1(config)#^Z
VSIC1#show cdp
lnh show cdp khng hp l khi tt ch cdp
% CDP is not enabled
Lnh CDP run : dng m li ch CDP trn Router
VSIC1(config)#cdp run
VSIC1(config)#exit
VSIC1#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Lu : Giao thc CDP ch cho ta bit c thng tin ca nhng thit b c lin kt trc
tip.
Vsic3#show cdp neighbors detail
------------------------Device ID: VSIC1
Entry address(es):
IP address: 192.168.2.1
Platform: cisco 2500, Capabilities: Router
Interface: Serial1, Port ID (outgoing port): Serial1
Holdtime : 138 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JK8OS-L), Version 12.2(1d), RELEASE
SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Sun 03-Feb-02 22:01 by srani
advertisement version: 2
Trang 12
CCNA
Trang 13
CCNA
Trang 14
CCNA
BI 3: TELNET
1. Gii thiu :
Telnet l mt giao thc u cui o( Vitural terminal),l mt phn ca chng giao thc
TCP/IP.Giao thc ny cho php to kt ni vi mt thit b t xa v thng qua kt ni ny,
ngi s dng c th cu hnh thit b m mnh kt ni vo.
2. Mc ch :
Bi thc hnh ny gip bn hiu v thc hin c nhng cu hnh cn thit c th
thc hin cc phin Telnet t host vo Router hay t Router vo Router.
3. M t bi lab v hnh :
Trang 15
CCNA
!
end
Router vsic2
Building configuration...
Current configuration : 582 bytes
!
version 12.2
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname vsic2
!
interface Serial0
ip address 192.168.1.2 255.255.255.0
no fair-queue
!
end
Phi chn chn rng cc kt ni vt l thnh cng (kim tra bng lnh Ping)
Kim tra kt ni Telnet :
T Host ta th telnet vo Router Vsic1 :
C:\Documentsand settings\Administrator>Telnet 10.0.0.1
Password required, but none set i hi mt khu nhng khng c ci dt
Connection to host lost
Kt ni tht bi
T Router vsic1 ta kt ni Telnet vo Router Vsic2
vsic1#telnet 192.168.1.2
Trying 192.168.1.2 ... Open
Password required, but none set
[Connection to 192.168.1.2 closed by foreign host]
Thc hin Telnet khng thnh cng v chc nng Telnet i hi bn phi m ng
line Vty v ci t mt khu cho n.
t mt khu Vty cho Router Vsic1 :
vsic1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
vsic1(config)#line Vty 0 4
vsic1(config-line)#pass vsic1
vsic1(config-line)#login
vsic1(config-line)#exit
t mt khu Vty cho Router Vsic2 :
vsic2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
vsic2(config)#line vty 0 4
vsic2(config-line)#pass vsic2
vsic2(config-line)#login
vsic2(config-line)#exit
Lc ny thc hin Telnet : T Host bn thc hin Telnet vo Router Vsic1
VSIC Education Corporation
Trang 16
CCNA
Trang 17
CCNA
*
*
*
1 AUX 9600/9600
2 VTY
3 VTY
4 VTY
5 VTY
6 VTY
-
0
1
7
4
1
0
0
0
0
0
0
0
0/0
0/0
0/0
0/0
0/0
0/0
Du * biu th nhng line bn ang s dng Telnet,theo nh bng trn,bng ang s dng
3 dng line Telnet qua li gia 2 Router Vsic1 v Vsic2 qua cc port 2,3,4.
Ct Uses ch s ln bn s dng ng line .
Lu : Bn ch thc hin c vic Telnet qua li gia cc Router khng qu 10 ln
cng lc (v bn ch c 5 line Vty t 0 n 4)
vsic1#192.168.1.2
Trying 192.168.1.2 ...
% Connection refused by remote host
Router bo li khi bn thc hin phin Telnet th 11.
Bn cng c th thc hin Telnet cng lc gia cc thit b bng cch t mn hnh telnet,
bn nhn t hp phm: Ctrl-Shift-6 sau nhn phm X(s dng trn terminal nhn t hp
phm CTRL-SHIFT-6 sau nhn 2 ln X), lc ny bn s tr li mn hnh gc ban u v
bn c th tip tc thc hin cc phin Telnet vo cc thit b khc. tr v mn hnh Telnet
ban u bn n phm enter 2 ln
Thot khi cc phin Telnet : chng ta s dng lnh Exit hay lnh Disconnect
Ngt mt kt ni Telnet : chng ta s dng lnh clear line
5. Cu hnh s dng Dynagen(dnh cho Hc vin t thc hnh):
Chy file Dynamips Server, sau open file lab3telnet.net bng wordpad xem m
hnh kt ni gia cc router trong bi thc hnh.
# Simple lab
[localhost]
[[3640]]
image = \Program Files\Dynamips\images\C3640_IS_MZ122_3.BIN
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
ram=96
[[ROUTER VSIC1]]
model=3640
s1/0 = VSIC2 s1/0 (s dng s1/0 ca VSIC1 kt ni vi s1/0 VSIC2)
F0/0 = NIO_gen_eth:\Device\NPF_{3E56FAD7-7D96-4763-AD9E-6232CA66410B}
[[router VSIC2]]
model=3640
# No need to specify an adapter here, it is taken care of
VSIC Education Corporation
Trang 18
CCNA
Trang 19
CCNA
Trang 20
CCNA
Trang 21
CCNA
Trang 22
CCNA
Trang 23
CCNA
Ni cp console gia PC vi switch. Chng ta s tin hnh recovery password trn switch
2950 trong bi lab ny.
3. Thc hin :
kho st vic recovery password r rng hn ,chng ta s cu hnh tn v password
cho switch trc khi tin hnh recovery password cho switch
Chng ta cu hnh tn v password cho switch nh sau :
Switch#conf t
Switch(config)#host Vsic
Vsic(config)#enable password cisco
t password cho switch
Vsic(config)#enable secret Vsic
t secret password cho switch
Sau khi cu hnh xong chng ta lu vo NVRAM v xem li cu hnh trong NVRAM
trc khi tin hnh recovery password cho switch.
Vsic#copy run start
Destination filename [startup-config]?
Building configuration...
Vsic#show start
Vsic#sh start
Using 1186 out of 32768 bytes
version 12.1
hostname Vsic
enable secret 5 $1$s22D$vCe6IFIeKLhUPZqgm6QZ6/
enable password cisco
Chng ta tin hnh recovery password theo cch bc sau :
Bc 1 : tt ngun switch, sau gia nt MODE trn switch 2950 trong lc bt
ngun li. Khi mn hnh hin nhng thng bo sau, ta nh nt MODE ra.
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA2, RELEASE
SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sun 07-Nov-04 23:14 by antonino
(mt s thng bo c lc b)
flash_init
load_helper
Trang 24
CCNA
boot
Bc 2: Chng ta nhp flash_init bt u cu hnh cho cc file ca flash. Nhp cu
lnh dir flash: xem cc file c cha trong flash. Sau chng ta i tn file config.text
thnh config.bak (v cu hnh ca chng ta lu phn trc c switch cha trong file ny)
bng cu lnh sau : rename flash:config.text flash:config.bak Sau chng ta reload li
switch bng cu lnh boot
Bc 3 : Trong qu trnh khi ng switch s hi :
Continue with the configuration dialog? [yes/no] :
Chng ta nhp vo NO, b qua cu hnh ny. Sau khi khi ng xong chng ta vo
mode privileged.
Switch>en
Switch#
Sau chng ta chuyn tn file config.bak trong flash thnh config.text bng cch :
Switch#rename flash:config.bak flash:config.text
Ri cu hnh NVRam vo RAM bng cu lnh sau :
Switch#copy flash:config.text system:running-config
Bc 4 : g b tt c cc loi password
Vsic#conf t
Vsic(config)#no enable password
Vsic(config)#no enable secret
Bc 5 : copy cu hnh t RAM vo NVRam, ri reload switch li.
Vsic#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Vsic#reload
Trang 25
CCNA
Trang 26
CCNA
!
ip subnet-zero
no ip finger
!
interface Ethernet0
ip address 192.168.14.1 255.255.255.0
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
no ip address
shutdown
!
ip kerberos source-interface any
ip classless
ip http server
!
line con 0
transport input none
line aux 0
line vty 0 4
!
end
Bn thc hin lnh Ping m bo vic kt ni gia Router v TFTP server
vsic#ping 192.168.14.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.14.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
Dng lnh Show version xem phin bn IOS hin hnh:
vsic#show ver
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JK8OS-L), Version 12.2(1d), RELEASE
SOFTWARE (fc1)
Router ang s d ng IOS version 12.2(1d)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Sun 03-Feb-02 22:01 by srani
Image text-base: 0x0307EEE0, data-base: 0x00001000
ROM: System Bootstrap, Version 11.0(10c), SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c),
RELEASE SOFT
WARE (fc1)
VSIC Education Corporation
Trang 27
CCNA
Trang 28
CCNA
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16505800 bytes copied in 232.724 secs (71145 bytes/sec)
Qu trnh np thnh cng, file IOS image c lu vo chng trnh cha TFTP server
Bn thc hin xong vic np IOS t Flash vo TFTP server, sau y bn thc hin
li vic np mt IOS c sn t TFTP server vo li flash ca mt Router.
Cc bc thc hin: Bn cu hnh Router v Host nh trn.chy chng trnh
TFTP t PC.
Gi s bn c 2 file IOS c sn trong TFTP server
Trang 29
CCNA
Trang 30
CCNA
Tn file ch
Trang 31
CCNA
Lu : l trong c qu trnh copy flash t TFTP server vo Router hay t Router vo TFTP
server bn u phi chy chng trnh TFTP server trn PC.
4. Cu hnh s dng Dynagen( dnh cho SV t thc hnh)
Chy file Dynamips Server, sau open file lab6tftp1.net bng wordpad xem m
hnh kt ni gia cc router trong bi thc hnh.
Trang 32
CCNA
# Simple lab
[localhost]
[[3640]]
image = \Program Files\Dynamips\images\C3640_IS_MZ122_3.BIN
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
ram=96
[[ROUTER VSIC1]]
model=3640
F0/0 = NIO_gen_eth:\Device\NPF_{3E56FAD7-7D96-4763-AD9E-6232CA66410B}
# No need to specify an adapter here, it is taken care of
# by the interface specification under Router VSIC1
Ta ch dng F0/0 = NIO_gen_eth:\Device\NPF_{3E56FAD7-7D96-4763-AD9E6232CA66410B} trong file lab6tftp1.net. router c th kt ni vo c vi PC hin
hnh, chng ta cn thay i thng s y. Chy file network device list trn Desktop xc
nh card mng ca PC ni vo.
Trang 33
CCNA
Bt TFTP Server ti PC
Trang 34
CCNA
Copy file cbin t router ngc li PC.( ta i tn file thnh hao.bin khi b trng
file ti TFTP)
Trang 35
CCNA
Trang 36
CCNA
line aux 0
line vty 0 4
!
end
Vsic2#sh run
Building configuration...
Current configuration : 448 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Vsic2
!
ip subnet-zero
!
interface Ethernet0
no ip address
shutdown
!
interface Serial0
ip address 10.0.0.2 255.0.0.0
no fair-queue
!
interface Serial1
no ip address
shutdown
!
ip classless
ip http server
!
line con 0
line aux 0
line vty 0 4
!
end
Chng ta kim tra flash ca hai router :
Vsic1#sh flash
System flash directory:
File Length Name/status
1 8038440 /c2500-i-l.121-25.bin //T n File IOS Image//
[8038504 bytes used, 350104 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY) //8MB flash//
Trang 37
CCNA
Vsic2#sh flash
System flash directory:
File Length Name/status
1 8039140 c2500-i-l.121-26.bin
[8039204 bytes used, 8738012 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)
thc hin vic copy IOS image t Router Vsic1 sang Router Vsic2, bn phi m
ch TFTP server cho Router Vsic1.
Vsic1(config)#tftp-server flash:
Vsic1(config)#tftp-server flash:c2500-i-l.121-26.bin
Vsic1(config)#^Z
Bn thc hin vic Copy IOS t Router Vsic2
Vsic2#copy tftp flash:
**** NOTICE ****
Flash load helper v1.0
This process will accept the copy options and then terminate
the current system image to use the ROM based image for the copy.
Routing functionality will not be available during that time.
If you are logged in via telnet, this connection will terminate.
Users with console access can see the results of the copy operation.
---- ******** ---Proceed? [confirm]
Address or name of remote host []? 10.0.0.1
a ch Router Vsic1(Serial0)
Source filename []? c2500-i-l.121-26.bin
Tn file IOS image
Destination filename [c2500-i-l.121-26.bin]? Tn File ch trong Router Vsic2
Accessing tftp://10.0.0.1/c2500-i-l.121-26.bin...
Erase flash: before copying? [confirm]
Xc nhn vic copy
00:02:57: %SYS-5-RELOAD: Reload requested
%SYS-4-CONFIG_NEWER: Configurations from version 12.1 may not be correctly
understood.
%FLH: c2500-i-l.121-26.bin from 10.0.0.1 to flash ...
System flash directory:
File Length Name/status
1 8038440 /c2500-i-l.121-25.bin
[8038504 bytes used, 350104 available, 8388608 total]
Accessing file 'c2500-i-l.121-26.bin' on 10.0.0.1...
Loading c2500-i-l.121-26.bin from 10.0.0.1 (via Serial0): ! [OK]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased Qu trnh xo Flash
Loading c2500-i-l.121-26.bin from 10.0.0.1 (via Serial0):
Qu trnh np IOS
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Trang 38
CCNA
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 8039140/8388608 bytes]
Verifying checksum... OK (0x9693)
Flash copy took 0:22:28 [hh:mm:ss]
%FLH: Re-booting system after download
F3: 7915484+123624+619980 at 0x3000060
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong
Image text-base: 0x03042000, data-base: 0x00001000
cisco 2500 (68030) processor (revision N) with 6144K/2048K bytes of memory.
Processor board ID 17553463, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
1 Ethernet/IEEE 802.3 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read ONLY)
Press RETURN to get started!
Trang 39
CCNA
Trang 40
CCNA
Trang 41
CCNA
Trang 42
CCNA
Trang 43
CCNA
- network
- opaque
- opaque
- network
- network
- opaque
rw
ro
ro
rw
rw
ro
tftp:
xmodem:
ymodem:
rcp:
ftp:
cns:
vsic#
Trong s cc tp tin trn switch c lu li cn ch : System Image (tp tin IOS
nm trn vng nh flash), tp tin cu hnh lc startup nm trn NVRAM ca vng nh flash.
H iu hnh ca switch c load trn DRAM
Xem thng tin v cc tp tin h thng ca switch. bit c version hin ti ca
IOS g lnh sau:
vsic#show version
OS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA2, RELEASE
SOFTWARE
(fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
--output omitted-vsic#dir
Directory of flash:/
2 -rwx
109 Mar 01 1993 00:20:34 +00:00 info
4 drwx
3968 Mar 01 1993 00:23:20 +00:00 html
5 -rwx 3086328 Mar 01 1993 00:22:37 +00:00 c2950-i6q4l2-mz.121-22.EA2
.bin
338 -rwx
109 Mar 01 1993 00:23:56 +00:00 info.ver
340 -rwx
283 Jan 01 1970 00:00:48 +00:00 env_vars
7741440 bytes total (3173376 bytes free)
vsic#
BC 5 : Thc hin sao chp IOS image gia tftp server v switch.
a. Chp file IOS image t switch ln tftp server (upload)
b. Chp file IOS image t tftp server v li switch (download)
C php cn bn ca lnh chp tp tin ca switch: copy from source to dest.
bit thm chi tit ca lnh copy c th s dng help ca CLI nh cch sau:
vsic#copy ?
/erase
Erase destination file system.
/noverify
Disable automatic image verification after copy
bs:
Copy from bs: file system
cns:
Copy from cns: file system
flash:
Copy from flash: file system
ftp:
Copy from ftp: file system
null:
Copy from null: file system
nvram:
Copy from nvram: file system
rcp:
Copy from rcp: file system
Trang 44
CCNA
Trang 45
CCNA
Phn 2 :LAN
BI 9: CU HNH VLAN TRN SWITCH 2950
1. Gii thiu chung v VLAN:
Trc y, cc switch ch c chc nng ngn cch cc broadcast domain, cho nn c th
xem cc thit b c cm trn cng mt switch l mt LAN network. iu dn n hn
ch khng gian vt l ca 1 LAN ch c th trong 1 cn phng hoc cng lm l to nh.
Vi chc nng phn chia VLAN bn c th cp mt s port ca switch cho VLAN A, v cc
port khc cho VLAN B Mi VLAN l mt broadcast domain v 2 thit b trn 2 VLAN
khc nhau khng th lin lc c nu khng c thit b lp 3 kt ni 2 VLAN li vi nhau.
VLAN em li s thu li trong vic chia nhm lm vic v 1 VLAN c th nm nhiu
switch khc nhau, min l cc switch c kt ni vi nhau.
2. M t bi lab v hnh :
Trang 46
CCNA
Status Ports
-------- ------------------------------active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Trang 47
CCNA
1002
fddi-default
--output omitted
BC 3 :
Cc VLAN c th c to ra bng 1 trong 2 cch. Cch 1 l cp pht 1 port vo mt
vlan cha tn ti. Switch s t ng to vlan cho port c cp. Cch khc l to cc vlan
trc, sau mi cp pht port cho n sau.
2950 switch c lnh range cho php vic cu hnh nhiu port (lin tc, hoc khng lin
tc) cho 1 s chc nng no . Gi s nh bn phi cu hnh nhiu lnh ging nhau cho
nhiu port th c th dng t kha range cu hnh 1 ln cho nhiu port.
Theo mc nh, VLAN 1 c sn v c gi l management vlan, tt c cc port
nm sn trong VLAN 1. Do khng cn thit phi cp pht port cho vlan 1. Bn s dng
lnh range cp pht port 5 n 8 cho vlan 10 theo cch to vlan th nht. Sau , to
VLAN 20 theo cch th 2, cp pht 1 port s 9 cho vlan 20, ri cp pht port 10, 12 cho vlan
20 bn thy c lnh range c th s dng cho cc port khng lin tc.
vsic#configure terminal
vsic(config)#interface range fast 0/5 -8
vsic(config-if-range)#switchport access vlan 10
% Access VLAN does not exist. Creating vlan 10
vsic(config-if-range)#no shut
vsic(config-if-range)#^Z
G lnh show vlan xem vlan 10 va mi to ra c hin th c th trong output.
vsic#show vlan
VLAN Name
Status Ports
----------------------------------- -------- ------------------------------1
default
active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/9, Fa0/10, Fa0/11, Fa0/12
10
VLAN0010
active Fa0/5, Fa0/6, Fa0/7, Fa0/8
1002 fddi-default
act/unsup
--output omitted-To VLAN 20 theo cch 2, v cp pht port dng lnh range theo kiu khng lin tc.
vsic#vlan database
vsic(vlan)#vlan 20
VLAN 20 added:
Name: VLAN0020
vsic(vlan)#exit
APPLY completed.
Exiting....
vsic#configure terminal
vsic(config)#interface fast 0/9
vsic(config-if)#switchport access vlan 20
vsic(config-if)#exit
vsic(config)#interface range fast 0/9 - 12
vsic(config-if-range)#switchport access vlan 20
Trang 48
CCNA
vsic(config-if-range)#exit
vsic(config)#
Xem li cc cu hnh mi nhp vo bng lnh : show vlan
vsic#show vlan
VLAN Name
----------------------------1
default
10
VLAN0010
20
VLAN0020
1002 fddi-default
Status Ports
------- ------------------------------active Fa0/1, Fa0/2, Fa0/3, Fa0/4
active Fa0/5, Fa0/6, Fa0/7, Fa0/8
active Fa0/9, Fa0/10,Fa0/11,Fa0/12
act/unsup
--output omitted
vsic#vlan database
vsic(vlan)#vlan 20 name accounting
VLAN 20 modified:
Name: accounting
vsic(vlan)#exit
APPLY completed.
Exiting....
Xem tn ca vlan 20 by gi c i thnh accouting ch khng cn l tn mc
nh: VLAN0020 nh trc y.
vsic#show vlan
VLAN Name
Status
-------------------- -------1
default
active
10
VLAN0010
20
accounting
1002 fddi-default
active
active
act/unsup
Ports
-------------------------------------Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/11
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11Fa0/12
--output omitted-By gi bn i tn VLAN 10 thnh engineering nhng sau nhp vo lnh abort,
tn ca VLAN 10 vn khng thay i, v n khng c lu li. Lnh abort s hu tt c cu
hnh trong phin lm ng nhp vo vlan database hin hnh.
vsic#vlan database
vsic(vlan)#vlan 10 name engineering
VLAN 10 modified:
Name: enginerring
vsic(vlan)#abort
Aborting....
vsic#
vsic#show vlan
Trang 49
CCNA
VLAN Name
----------------------------------1
default
Status
--------active
10
VLAN0010
20
accounting
1002 fddi-default
active
active
act/unsup
Ports
------------------------------Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/11
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/12
--output omitted
BC 4 : Nhp vo a ch IP cho cc VLAN interface
vsic(config)#interface vlan 1
vsic(config-if)#ip address 192.168.1.1 255.255.255.0
vsic(config-if)#no shut
vsic(config-if)#interface vlan 10
vsic(config-if)#ip address 192.168.10.1 255.255.255.0
vsic(config-if)#no shut
vsic(config-if)#interface vlan 20
vsic(config-if)#ip address 192.168.20.1 255.255.255.0
vsic(config-if)#no shut
Kim tra li cc a ch IP nhp vo bng lnh sau:
vsic#show run
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
no ip route-cache
shutdown
!
interface Vlan10
ip address 192.168.10.1 255.255.255.0
no ip route-cache
shutdown
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
no ip route-cache
!
Lu : ch c mt vlan interface c php up vo bt c lc no. Chng hn interface vlan
20 ang up, nu bn g lnh no shut cho interface vlan 10 th interface vlan 20 t ng down.
BC 5 : kim tra hot ng ca cc VLAN , bn c th lm nh sau:
a) Cu hnh cho PC 1 a ch IP : 192.168.1.2 255.255.255.0. Dng cp thng ni card
mng ca PC1 vi port 1 ca switch. ng t PC 1 bn g lnh: ping 192.168.1.1. Lnh ping
phi thnh cng. Nu khng, bn phi kim tra li ton b cu hnh.
b) PC2 c cm vo port 5 ca SW, ta cu hnh a ch IP ca PC2 192.168.10.2. Ta s
dng lnh ping 192.168.10.1 xc nhn PC2 nm trong VLAN 10. Ta th s dng
VSIC Education Corporation
Trang 50
CCNA
PC1 ping PC2, ta thy s khng thnh cng, do 2 PC by gi khc vng broadcast v cc
vng ny khng c ni vi nhau. Tip theo ta cm PC1 vo port 6 ca Switch, ta s dng
lnh ping 192.168.10.2 nhng vn khng thy c PC2 do PC1 v PC2 khng thuc
chung 1 mng( 192.168.1.0 v 192.168.10.0). Ta sa a ch ca PC thnh 192.168.10.3(
chung mng vi PC2), lc ny ping s thnh cng.
4. T thc hnh bng Boson Netsim( dnh cho SV thc hnh thm nh)
Chy phn mm Boson Netsim v chn FileLoad NetmapChn file lab9vlan.top.
Sau khi open file ny chng ta ang thc hnh vi hnh nh sau:
Trang 51
CCNA
Mun cu hnh IP cho PC1,2,3 ta click v eStation v chn PC mnh mun cu hnh.
G lnh winipcfg cu hnh IP.
Trang 52
CCNA
Trang 53
CCNA
Trang 54
CCNA
PC1( 192.168.1.2) v PC2( 192.168.10.2) s khng ping thy nhau v khc Vlan.
Trang 55
CCNA
Trunk c hai loi ng gi l : dot1q v isl. Dot1q s dng cc frame tagging truyn d
liu ca vlan gia hai switch khc nhau. Cn ISL s ng gi ethernet frame bng cc gn vo
u fram gi tr VLAN ID.
2. M t bi lab v hnh :
Trang 56
CCNA
Trang 57
CCNA
Trang 58
CCNA
2
4
6
vlan2
vlan4
vlan6
active
active
active
VSIC2#sh vlan
VLAN Name
Status Ports
---- -------------------------------- --------- ------------------------------1 default
active Fa0/2, Fa0/3, Fa0/4, Fa0/5,
Fa0/6, Fa0/7, Fa0/8, Fa0/9,
Fa0/10, Fa0/11, Fa0/12, Fa0/13,
Fa0/14, Fa0/15, Fa0/16, Fa0/17,
Fa0/18, Fa0/19, Fa0/20, Fa0/21,
Fa0/22, Fa0/23, Fa0/24
2 vlan2
active
4 vlan4
active
6 vlan6
active
Nhn xt : cc vlan trn switch VSIC2 b mt thay vo l cc vlan ca VSIC1. Do
VSIC1 c s configuration revision ln hn nn p chng tt c vlan ca mnh ln switch
VSIC2.
Chng ta c th tng s configuration cho switch bng cch ra vo vlan datatbase v apply
nhiu ln. C mi ln chng ta vo vlan database apply mt ln th s configuration s tng
ln mt ln.
By gi chng ta s kho st nu hai switch khc VTP domain th s hot ng nh th no.
Chng ta cu hnh cho switch VSIC1 c VTP domain l VSIC, cn switch VSIC2 l VSIC1.
Do phn trn chng ta cu hnh cho switch VSIC1 thuc VTP domain VSIC v cc vlan
ca VSIC2 b mt nn by gi chng ta cu hnh VSIC2 thuc VTP domain VSIC1 v to
li cc vlan3, vlan5, vlan7 cho VSIC2. (lu chng ta nn tho cp ni hai port fa0/1 ca hai
switch trc khi thc hin)
VSIC2#vlan database
VSIC2(vlan)#no vlan 2
VSIC2(vlan)#no vlan 4
VSIC2(vlan)#no vlan 6
VSIC2(vlan)#vlan 3 name vlan3
VSIC2(vlan)#vlan 5 name vlan5
VSIC2(vlan)#vlan 7 name vlan7
VSIC2(vlan)#vtp domain name VSIC
VSIC2(vlan)#apply
By gi chng ta kim tra li s configuration revision ca hai switch v cc vlan ca chng.
VSIC1#sh vtp status
VTP Version
:2
Configuration Revision
:3
Maximum VLANs supported locally : 64
Number of existing VLANs
:8
VTP Operating Mode
: Server
VTP Domain Name
: VSIC
VSIC2#sh vtp status
VTP Version
:2
Trang 59
CCNA
Configuration Revision
:0
Maximum VLANs supported locally : 68
Number of existing VLANs
: 11
VTP Operating Mode
: Server
VTP Domain Name
: VSIC1
VSIC1#sh vlan
VLAN Name
Status Ports
---- -------------------------------- --------- ------------------------------1 default
active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
2 vlan2
active
4 vlan4
active
6 vlan6
active
VSIC2#sh vlan
VLAN Name
Status Ports
---- -------------------------------- --------- ------------------------------1 default
active Fa0/2, Fa0/3, Fa0/4, Fa0/5,
Fa0/6, Fa0/7, Fa0/8, Fa0/9,
Fa0/10, Fa0/11, Fa0/12, Fa0/13,
Fa0/14, Fa0/15, Fa0/16, Fa0/17,
Fa0/18, Fa0/19, Fa0/20, Fa0/21,
Fa0/22, Fa0/23, Fa0/24
3 vlan3
active
5 vlan5
active
7 vlan7
active
By gi chng ta ni cp hai port fa0/1 li. Kim tra li cc vlan chng ta s thy c l hai
switch khng trao thi thng tin vlan vi nhau (switch VSIC1 s khng p vlan ln switch
VSIC2).
VSIC1#sh vlan
VLAN Name
Status Ports
---- -------------------------------- --------- ------------------------------1 default
active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
2 vlan2
active
4 vlan4
active
6 vlan6
active
VSIC2#sh vlan
VLAN Name
Status Ports
---- -------------------------------- --------- ------------------------------1 default
active Fa0/2, Fa0/3, Fa0/4, Fa0/5,
Fa0/6, Fa0/7, Fa0/8, Fa0/9,
Fa0/10, Fa0/11, Fa0/12, Fa0/13,
Fa0/14, Fa0/15, Fa0/16, Fa0/17,
Trang 60
CCNA
Trang 61
CCNA
Click vo Load lab vo lab thc hnh. V view lab xem cu hnh chi tit
Trang 62
CCNA
Trang 63