You are on page 1of 15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.

HCM

BI THC HNH S 5
H tn sinh vin: .......................................................
Nhm: ..............................MSSV: ............................

1 Mc tiu

Cu hnh VLAN c bn.


Gi lp mng cc b dng VLAN.

2 Cu hnh VLAN c bn
+ Khi trin khai VLAN trong mt h thng mng cc b, ngi qun tr c th thit k VLAN
theo hai cch thc:
* Thit k VLAN theo dng end-to-end: cn gi l campus-wide.
Trong kiu chia VLAN ny, VLAN s tri rng trn ton campus. Mt thnh vin ca VLAN
di chuyn trong mng, thuc tnh l thnh vin ca VLAN khng thay i. iu ny c
ngha l, mi VLAN phi sn c tng switch, c bit l nhng switch nm layer access
trong m hnh 3-layer: core-distribution-access.
Nh vy, trong end-to-end VLAN, cc ngi dng s c nhm vo thnh nhng nhm da
theo chc nng, theo nhm d n hoc theo cch m nhng ngi dng s dng ti nguyn
mng.
*Chia VLAN dng cc b:
VLAN c gii hn trong mt switch hoc mt khu vc a l hp (trong mt wiring closet).
Ly do dng dng VLAN ny l cc VLAN dng end-to-end tr nn kh duy tr. Cc ngi
dng thng xuyn yu cu nhiu ti nguyn khc nhau. Cc ti nguyn ny thng nm trong
nhu VLAN khc nhau.
Thc hi n
1.Tao c s d li u VLAN
Mi VLAN c m t s phn bi t l vlan-id, c th t 1 n 1001. to c s d li u VLAN
(VLAN database) thc hi n cc bc nh sau:
Vo mode cu hnh cho VLAN database:
Switch#vlan database
To mi VLAN bng cu l n h vlan vlan-id [name name]. Nu khng t tn cho VLAN th
tn s c ly m c nh
Switch(vlan)# vlan 20 name marketing
C p nh t d li u VLAN vo c s d liu VLAN, v thot v priviledge mode.

Trang 1/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

Switch(vlan)# exit
Kim tra cu hnh VLAN bng l nh show vlan
Switch# vlan database
Switch(vlan)# vlan 20 name marketing
VLAN 20 added:
Name: marketing
Switch(vlan)# exit
APPLY completed.
Exiting....
Switch# show vlan name marketing
VLAN Name Status Ports
---- -------------------------------- ----------------------------20 marketing active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- ----------20 enet 100003 1500 - - - - 0 0
Vic to ra cc VLAN khc s c thc hi n tng t.
2.Gan cac port cho VLAN tng ng
Trc tin cn cu hnh tt c cc port l access ports. Cc port trn switch 2950 c th 1
trong 3 ch : trunk port, multi-VLAN port v access port. Trunk port v multi-VLAN port
c dng ni vi switch khc (ho c thit b khc c to VLAN trunking). Do kt ni cc
workstation vi cc port ny nn cn phi cu hnh tt c cc port ny ch access port.
Switch(config)#interface fa0/1
Switch(config-if)#switchport mode access
Gn cc port vo VLAN theo yu cu bng cch s dng l nh switchport access vlan n (n l s
hi u VLAN)
Switch(config)#interface fa0/4
Switch(config-if)#switchport access
Switch(config)#interface fa0/5
Switch(config-if)#switchport access
Switch(config)#interface fa0/6
Switch(config-if)#switchport access
Switch(config)#interface fa0/7
Switch(config-if)#switchport access
Switch(config)#interface fa0/8

Trang 2/15

vlan 10
vlan 10
vlan 10
vlan 20

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

Switch(config-if)#switchport access
Switch(config)#interface fa0/9
Switch(config-if)#switchport access
Switch(config)#interface fa0/10
Switch(config-if)#switchport access
Switch(config)#interface fa0/11
Switch(config-if)#switchport access
Switch(config)#interface fa0/12
Switch(config-if)#switchport access

vlan 20
vlan 20
vlan 30
vlan 30
vlan 30

M c nh cc port c gn vo VLAN 1.
3. Cu hnh VLAN trunking
M hnh lab

Thc hi n
Cu hnh trn Switch DL1 lm VTP Server
1. t hostname, mt khu v cu hnh cng vlan trn DL1:
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname DL1
DL1(config)#enable password cisco
DL1(config)#line vty 0 15
DL1(config-line)#password cisco
DL1(config-line)#login
DL1(config-line)#exit
DL1(config)#int vlan 1
DL1(config-if)#ip address 192.168.1.3 255.255.255.0
DL1(config-if)#end
DL1#

Trang 3/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

2. Thit l p VTP domain l VNPRO, VTP mode l SERVER, to ra cc VLAN 10 (SALES),


20 (ACCOUNTING), 30 (ENGINEERING)
DL1#vlan database
Thit l
p ch
VTP server modeDL1(vlan)#vtp server
DL1(vlan)#vtp domain VNPRO
t switch DL1 vao domain VNPRO
Tao VLAN 10 va
t tn la SALESDL1(vlan)#vlan 10 name SALES
VLAN 10 added:
Name: SALES
DL1(vlan)#vlan 20 name ACCOUNTING
VLAN 20 added:
Name: ACCOUNTING
DL1(vlan)#vlan 30 name ENGINEERING
VLAN 30 added:
Name: ENGINEERING
Lu cp hinh vao file vlan.datDL1(vlan)#apply
APPLY completed.
DL1(vlan)#exit
APPLY completed.
Exiting....
DL1#
+ M t switch chi thu c 1 VTP domain
M c nh switch ch VTP server mode
3. Kch hot trunking trn cng Fa0/1 v cho phep tt c cc VLAN qua trunk:
DL1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
DL1(config)#int f0/1
DL1(config-if)#switchport mode trunk
ong goi kiu isl (ho
c dot1q) i qua ng
trunkDL1(config-if)#switchport trunk encapsulation isl
Cho phep tt ca cac VLAN qua trunkDL1(config-if)#switchport
trunk allowed vlan all
DL1(config-if)#exit
DL1(config)#
+ Gi s ta chi mun cho phep cc VLAN 10, 20, 30 ta dng l nh:
DL1(config-if)#switchport trunk allowed vlan 10
DL1(config-if)#switchport trunk allowed vlan 20
DL1(config-if)#switchport trunk allowed vlan 30
4. Gn cc port vo VLAN tng ng
DL1(config)#int f0/4
Cu hinh cng access modeDL1(config-if)#switchport mode

Trang 4/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

access
cu hinh cng vao vlan 10DL1(config-if)#switchport access
vlan 10
! Mi access port chi phuc vu cho m
t VLAN
DL1(config-if)#int f0/5
DL1(config-if)#switchport mode access
DL1(config-if)#switchport access vlan 10
DL1(config-if)#int f0/6
DL1(config-if)#switchport mode access
DL1(config-if)#switchport access vlan 10
DL1(config)#int f0/7
DL1(config-if)#switchport
DL1(config-if)#switchport
DL1(config-if)#int f0/8
DL1(config-if)#switchport
DL1(config-if)#switchport
DL1(config-if)#int f0/9
DL1(config-if)#switchport
DL1(config-if)#switchport
DL1(config)#int f0/10
DL1(config-if)#switchport
DL1(config-if)#switchport
DL1(config-if)#int f0/11
DL1(config-if)#switchport
DL1(config-if)#switchport
DL1(config-if)#int f0/12
DL1(config-if)#switchport
DL1(config-if)#switchport

mode access
access vlan 20
mode access
access vlan 20
mode access
access vlan 20
mode access
access vlan 30
mode access
access vlan 30
mode access
access vlan 30

5. Xem cu hnh va thc hi n


DL1#sh vlan brief
VLAN Name Status Ports
---- -------------------------------- -------------------------------------1 default active Fa0/2, Fa0/3, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gi0/1, Gi0/2
10 SALES active Fa0/4, Fa0/5, Fa0/6
20 ACCOUNTING active Fa0/7, Fa0/8, Fa0/9
30 ENGINEERING active Fa0/10, Fa0/11, Fa0/12
1002 fddi-default act/unsup
1003 token-ring-default act/unsup

Trang 5/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

1004 fddinet-default act/unsup


1005 trnet-default act/unsup
DL1#
Cu hnh trn Switch AL1 lm VTP Client
1. t hostname, mt khu v cu hnh management vlan trn DL1:
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname AL1
AL1(config)#enable mt khu cisco
AL1(config)#line vty 0 15
AL1(config-line)#mt khu cisco
AL1(config-line)#login
AL1(config-line)#exit
AL1(config)#int vlan 1
AL1(config-if)#ip address 192.168.1.2 255.255.255.0
AL1(config-if)#end
AL1#
2. Thit l p VTP domain l VNPRO, VTP mode l CLIENT
AL1#vlan database
AL1(vlan)#vtp client
AL1(vlan)#vtp domain VNPRO
AL1(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
AL1#
3. Kch hot trunking trn cng Fa0/1 v cho phep tt c cc VLAN qua trunk:
AL1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
AL1(config)#int f0/1
AL1(config-if)#switchport mode trunk
ong goi kiu isl (ho
c dot1q) i qua ng
trunkAL1(config-if)#switchport trunk encapsulation isl
Cho phep tt ca cac VLAN qua trunkAL1(config-if)#switchport
trunk allowed vlan all
AL1(config-if)#exit
AL1(config)#
4. Ap t cc port chi nh vo VLAN tng ng
AL1(config)#int f0/4
Trang 6/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/5
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/6
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config)#int f0/7
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/8
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/9
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config)#int f0/10
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/11
AL1(config-if)#switchport
AL1(config-if)#switchport
AL1(config-if)#int f0/12
AL1(config-if)#switchport
AL1(config-if)#switchport

mode access
access vlan 10
mode access
access vlan 10
mode access
access vlan 10
mode access
access vlan 20
mode access
access vlan 20
mode access
access vlan 20
mode access
access vlan 30
mode access
access vlan 30
mode access
access vlan 30

5. Xem cu hnh va thc hi n


AL1#sh vlan
VLAN Name Status Ports
---- -------------------------------- ----------------------------------1 default active Fa0/2, Fa0/3
10 SALES active Fa0/4, Fa0/5, Fa0/6
20 ACCOUNTING active Fa0/7, Fa0/8, Fa0/9
30 ENGINEERING active Fa0/10, Fa0/11, Fa0/12
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1
Trans2
---- ----- ---------- ----- ------ ------ -------- ----

Trang 7/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

-------- ------ -----1 enet 100001 1500 - - - - - 0 0


10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
30 enet 100030 1500 - - - - - 0 0
1002 fddi 101002 1500 - 0 - - - 0 0
1003 tr 101003 1500 - 0 - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
AL1#
Kim tra
1. Kim tra cng Fa0/1 a hot ng cha
AL1#show int f0/1
Cng a hoat
ngFastEthernet0/1 is up, line protocol is up
Hardware is Fast Ethernet, address is 00b0.64c9.cd41 (bia
00b0.64c9.cd41)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not set
Auto-duplex (Full), Auto Speed (100), 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
...
2. Kim tra cng Fa0/1 a kch hot trunking v ung kiu encapsulation cha
AL1#sh int f0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative mode: trunk
Cng F0/1 hoat
ng ch
trunk modeOperational Mode:
trunk
Administrative Trunking Encapsulation: isl
Kiu ong goi la islOperational Trunking Encapsulation: isl
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Cho phep tt ca cac VLAN qua kt ni trunkTrunking VLANs
Enabled: ALL
Cac VLAN hi
n hanh ang hoat
ngTrunking VLANs Active:
1,10,20,30
Pruning VLANs Enabled: 2-1001
Priority for untagged frames: 0

Trang 8/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

Override vlan tag priority: FALSE


Voice VLAN: none
Appliance trust: none
AL1#
3. Kim tra revision number trn client c ng b vi server cha
AL1#sh vtp status
VTP Version : 2
Configuration Revision s revision number: 2
Maximum VLANs supported locally : 68
Number of existing VLANs : 8
VTP Operating Mode Switch hoat
ng ch
client: Client
VTP Domain Name Switch thu
c domain VNPRO: VNPRO
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xDC 0x45 0xB2 0xD9 0x5B 0x7A 0x50 0x19
Configuration last modified by 192.168.1.2 at 3-1-93 01:54:06
AL1#
DL1#sh vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 1005
Number of existing VLANs : 8
VTP Operating Mode : Server
VTP Domain Name : VNPRO
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xDC 0x45 0xB2 0xD9 0x5B 0x7A 0x50 0x19
Configuration last modified by 192.168.1.2 at 3-1-93 01:54:06
Local updater ID is 192.168.1.2 on interface Vl1 (lowest
numbered VLAN interface
found)
DL1#
+ Revision number l m t trong nhng thng s quan trng ca VTP. Mi khi VTP server thay
i VLAN database th s tng gi tr revision ln 1 v thc hi n qung co VLAN database
ny. Cc thit b c s revision nho hn phi chp nh n VLAN database c s revision ln
hn.
Nu VTP server xo bo tt c cc VLAN & c s revision cao nht th cc thit b khc cung s
b xo VLAN.

Trang 9/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

4. Kim tra s ln gi v nh n thng tin trunking


DL1#sh vtp counters
VTP statistics:
Summary advertisements received : 18
Subset advertisements received : 5
Request advertisements received : 1
Summary advertisements transmitted : 12
Subset advertisements transmitted : 2
Request advertisements transmitted : 0
Number of config revision errors : 0
Number of config digest errors : 0
Number of V1 summary errors : 0
VTP pruning statistics:
Trunk Join Transmitted Join Received Summary advts received
from
non-pruning-capable device
---------------- ---------------- -----------------------------------------Fa0/1 0 0 0
DL1#
AL1#sh vtp counters
VTP statistics:
Summary advertisements received : 13
Subset advertisements received : 2
Request advertisements received : 0
Summary advertisements transmitted : 20
Subset advertisements transmitted : 6
Request advertisements transmitted : 1
Number of config revision errors : 0
Number of config digest errors : 0
Number of V1 summary errors : 0
VTP pruning statistics:
Trunk Join Transmitted Join Received Summary advts received
from
non-pruning-capable device
---------------- ---------------- -----------------------------------------Fa0/1 1 0 0
AL1#

Trang 10/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

3 Cu hnh lin mng cc b dng VLAN


M hnh Lab

C ba 2950 switch c dng trong bi lab. Chung ta s cu hnh VLAN trn cc switch 2950
v dng 2600A router din t vic nh tuyn.Chung ta s to ba VLAN trn cc switch
2950A, 2950B, and 2950C. Chung ta s dng subnet 192.168.100.0/24.
1. Cu hnh Router 2600
Router>enable
Router#config t
Router(config)#hostname 2600A
2600A(config)#enable secret todd
2600A(config)#line console 0
2600A(config-line)# password todd
2600A(config-line)#login
2600A(config-line)#line aux 0
2600A(config-line)#password todd
2600A(config-line)#login
2600A(config-line)#line vty 0 4
2600A(config-line)#password todd
2600A(config-line)#login
2600A(config-line)#interface fastethernet 0/0
2600A(config-if)#ip address 192.168.100.1 255.255.255.0
2600A(config-if)#description connection to LAN 100
2600A(config-if)#no shutdown
2600A(config-if)#exit

Trang 11/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM


2600A(config)#banner motd #
This is the 2600A router
#
2600A(config)#exit
2600A#write
2600A#

2. Cu hnh Switch 2950A


Switch>enable
Switch#config t
Switch(config)#hostname 2950A
2950A(config)#enable password todd
2950A(config)#enable secret routersim
2905A(config)#line console 0
2950A(config-line)#password console
2950A(config-line)#login
2950A(config-line)#line vty 0 15
2950A(config-line)#password todd
2950A(config-line)#login
2950A(config-line)#exit
2950A(config)#ip default-gateway 192.168.100.1
2950A(config)#interface VLAN 1
2950A(config-if)#ip address 192.168.100.2 255.255.255.0
2950A(config-if)#interface fastethernet 0/10
2950A(config-if)#description Trunk Link to 2600A
2950A(config-if)#switchport mode trunk
2950A(config-if)#speed 100
2950A(config-if)#duplex full
2950A(config-if)#interface fastethernet 0/11
2950A(config-if)#description Link to 2950B
2950A(config-if)#switchport mode trunk
2950A(config-if)#speed 100
2950A(config-if)#duplex full
2950A(config-if)#interface fastethernet 0/12
2950A(config-if)#description Trunk Link to 2950C
2950A(config-if)#switchport mode trunk
2950A(config-if)#speed 100
2950A(config-if)#duplex full
2950A(config-if)#exit
2950A(config)#exit
2950A#ping 192.168.100.1

3. Tao VTP domain l routersim v xt 2950A switch l VTP server


2950A#config t
2950A(config)#vtp domain routersim
2950A(config)#vtp mode server

4. Cu hnh Switch 2950B

Switch>enable
Switch#config t
Switch(config)#hostname 2950B
2950B(config)#enable password todd
2950B(config)#enable secret routersim

Trang 12/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM


2950B(config)#line console 0
2950B(config-line)#password console
2950B(config-line)#login
2950B(config-line)#line vty 0 15
2950B(config-line)#password todd
2950B(config-line)#login
2950B(config-line)#exit
2950B(config)#ip default-gateway 192.168.100.1
2950B(config)#interface vlan1
2950B(config-if)#ip address 192.168.100.3 255.255.255.0
2950B(config-if)#interface fastethernet 0/11
2950B(config-if)#description Trunk Link to 2950A
2950B(config-if)#switchport mode trunk
2950B(config-if)#speed 100
2950B(config-if)#duplex full
2950B(config-if)#interface fastethernet 0/12
2950B(config-if)#description Trunk Link to 2950C
2950B(config-if)#switchport mode trunk
2950B(config-if)#speed 100
2950B(config-if)#duplex full
2950B(config-if)#exit
2950B(config)#exit
2950B#ping 192.168.100.1

5. Cu hnh 2950B switch l thnh vin ca VTP domain routersim


2950B#config t
2950B(config)#vtp domain routersim
2950B(config)#vtp mode client

6. Cu hnh Switch 2950C


Switch>enable
Switch#config t
Switch(config)#hostname 2950C
2950C(config)#enable password todd
2950C(config)#enable secret routersim
2950C(config)#line console 0
2950C(config-line)#password console
2950C(config-line)#login
2950C(config-line)#line vty 0 15
2950C(config-line)#password todd
2950C(config-line)#login
2950C(config-line)#exit
2950C(config)#ip default-gateway 192.168.100.1
2950C(config)#interface vlan1
2950C(config-if)#ip address 192.168.100.4 255.255.255.0
2950C(config-if)#interface fastethernet 0/11
2950C(config-if)#description Trunk Link to 2950B
2950C(config-if)#switchport mode trunk
2950C(config-if)#speed 100
2950C(config-if)#duplex full
2950C(config-if)#interface fastethernet 0/12
2950C(config-if)#description Trunk Link to 2950A
2950C(config-if)#switchport mode trunk
2950C(config-if)#speed 100
2950C(config-if)#duplex full
2950C(config-if)#exit

Trang 13/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM


2950C(config)#exit
2950C#ping 192.168.100.1

7. Cu hnh 2950C switch l thnh vin ca VTP domain routersim


2950C#config t
2950C(config)#vtp domain routersim
2950C(config)#vtp mode client

8. Tao 3 VLANs trn 2950A switch l Sales, Marketing, Finance


2950A#vlan database
2950A(vlan)#vlan 2 name Sales
2950A(vlan)#vlan 3 name Marketing
2950A(vlan)#vlan 4 name Finance

9. Xem thng tin VLAN trn Switch 2950B, 2950C


2950B#show vlan
2950C#show vlan

10. Tao port f0/1 trn cac Switch l thnh vin ca VLAN 2
2950A#config t
2950A(config)#interface fastethernet 0/1
2950A(config-if)#switchport access vlan 2
2950A(config-if)#switchport mode access
2950B#config t
2950B(config)#interface fastethernet 0/1
2950B(config-if)#switchport access vlan 2
2950B(config-if)#switchport mode access
2950C#config t
2950C(config)#interface fastethernet 0/1
2950C(config-if)#switchport access vlan 2
2950C(config-if)#switchport mode access

11. HostA, HostD v HostG s thuc VLAN 2 (Sales), l mt vng a chi mng con ca
192.168.100.0/24. HostA l 192.168.100.5, HostD l 192.168.100.8 v HostG l
192.168.100.11. Default gateway l 192.168.100.1.
12. Kim tra vic cu hnh ung cc VLAN bng cch ping t HostA n HostD V HostA n
HostG.
13. HostB, HostE v HostH s thuc VLAN 3 (Marketing), l mt vng a chi mng con ca
192.168.100.0/24. HostB l 192.168.100.6, HostE l 192.168.100.9 v HostH l
192.168.100.12. Default gateway l 192.168.100.1.
14. Cu hnh port f0/2 trn 2950A switch l thnh vin ca VLAN 3.
2950A#config t
2950A(config)#interface fastethernet 0/2
2950A(config-if)#switchport access vlan 3
2950A(config-if)#switchport mode access

Trang 14/15

Khoa Khoa Hc v K Thut My Tnh i Hc Bch Khoa Tp.HCM

Cu hnh port f0/2 trn 2950B switch l thnh vin ca VLAN 3.


2950B#config t
2950B(config)#interface fastethernet 0/2
2950B(config-if)#switchport access vlan 3
2950B(config-if)#switchport mode access

Cu hnh port f0/2 trn 2950C switch l thnh vin ca VLAN 3.


2950C#config t
2950C(config)#interface fastethernet 0/2
2950C(config-if)#switchport access vlan 3
2950C(config-if)#switchport mode access

15. Kim tra vic cu hnh ung cc VLAN bng cch ping t HostB n HostE V HostB n
HostH.
16. HostC, HostF v HostI s thuc VLAN 3 (Finance), l mt vng a chi mng con ca
192.168.100.0/24. HostC l 192.168.100.7, HostF l 192.168.100.10 v HostI l
192.168.100.13. Default gateway l 192.168.100.1.
17. Cu hnh port f0/3 trn 2950A switch l thnh vin ca VLAN 4.
2950A#config t
2950A(config)#interface fastethernet 0/3
2950A(config-if)#switchport access vlan 4
2950A(config-if)#switchport mode access

Cu hnh port f0/3 trn 2950B switch l thnh vin ca VLAN 4.


2950B#config t
2950B(config)#interface fastethernet 0/3
2950B(config-if)#switchport access vlan 4
2950B(config-if)#switchport mode access

Cu hnh port f0/3 trn 2950C switch l thnh vin ca VLAN 4.


2950C#config t
2950C(config)#interface fastethernet 0/3
2950C(config-if)#switchport access vlan 4
2950C(config-if)#switchport mode access

18. Kim tra vic cu hnh ung cc VLAN bng cch ping t HostC n HostF V HostC n
HostI.
-HT-

Trang 15/15

You might also like