Professional Documents
Culture Documents
Chuong2 Dinh Nghia Vlan
Chuong2 Dinh Nghia Vlan
Chuong2 Dinh Nghia Vlan
Chng 2 -
NH NGHA VLANs
Bi 2.1 Cu hnh VLANs v trunks cho switch layer2 v switch layer 3 2.1.1 S lun l
2.1.2 Tn thit b
Switch 3560 Switch 2950 PC1 PC2
Bng a ch VLAN 10
Fa0/2 Fa0/9 Fa0/2 Fa0/8 -
a ch IP
192.168.2.10/24 192.168.2.11/24 192.168.1.10/24 192.168.1.11/24
VLAN 20
Fa0/10 Fa0/16 Fa0/9 Fa0/14 -
VLAN 30
Fa0/17 Fa0/24 Fa0/15 Fa0/24 -
2.1.3
Mc tiu ca bi thc hnh Cu hnh VLAN 99, VLAN 10, VLAN 20 v VLAN 30 trn cc switch. Cu hnh ng trunk gia cc switch trn cc cng Fa0/1. Dng lnh ping kim tra kt ni gia 2 pc khi kt ni vi switch trn cc VLAN 10, 20 v 30 Kim tra v xem xt hot ng ca thit b c cu hnh
2.1.4
22
Bc 2: dng my tnh kt ni n cng console ca thit b v s dng phn mm Hyper terminal hoc SecureCRT kt ni n thit b qua cng console 0 Bc 3: thc hin vic cu hnh c bn cho thit b nh cc bi thc hnh trc theo yu cu. Cu hnh c bn cho SW2950 Switch(config)#hostname SW2950 SW2950(config)#enable password cisco SW2950(config)#no ip domain-lookup SW2950(config)#banner motd ^CSwitch 2950^C SW2950(config)#line console 0 SW2950(config-line)# logging synchronous SW2950(config-line)# password cisco SW2950(config-line)# login SW2950(config)#line vty 0 4 SW2950(config-line)# password cisco SW2950(config-line)# login Cu hnh c bn cho SW3560 Switch(config)#hostname SW3560 SW3560(config)#enable password cisco SW3560(config)#no ip domain-lookup SW3560(config)#banner motd ^CSwitch 3560^C SW3560(config)#line console 0 SW3560(config-line)# logging synchronous SW3560(config-line)# password cisco SW3560(config-line)# login SW3560(config)#line vty 0 4 SW3560(config-line)# password cisco SW3560(config-line)# login Bc 4: cu hnh VLAN cho cc switch Cu hnh VLAN cho SW2950
23
Cu hnh VLAN cho SW3560 SW3560(config)#vlan 10 SW3560(config-vlan)#name VLAN10 SW3560(config-vlan)#exit SW3560(config)#vlan 20 SW3560(config-vlan)#name VLAN20 SW3560(config-vlan)#exit SW3560(config)#vlan 30 SW3560(config-vlan)#name VLAN30 SW3560(config-vlan)#exit
24
Bc 5: cu hnh interface trunk cho cc switch interface Fa0/1. Cu hnh interface trunk cho SW2950 SW2950(config)# interface fastEthernet0/1 SW2950(config-if)# switchport mode trunk
Cuhnh interface trunk cho SW3950 SW3560(config)#interface fastEthernet 0/1 SW3560(config-if-range)#switchport trunk encapsulation dot1Q SW3560(config-if-range)#switchport mode trunk
25
Bc 6: thc hin kim tra cu hnh v hot ng ca cc thit b v PC. Bc 7: Xa cu hnh, khi ng li thit b, hon tr li thit b v hon tt bi lab. Trn SW2950 SW2950#dir flash: Directory of flash:/ SW2950#dir flash: Directory of flash:/ 2 -rwx 3706496 Mar 01 1993 00:20:41 +00:00 c2950_cpryto.bin 13 -rwx 616 Mar 01 1993 03:10:29 +00:00 vlan.dat 17 -rwx 1150 Mar 01 1993 03:10:31 +00:00 config.text 7741440 bytes total (4031488 bytes free) SW2950#delete config.text Delete filename [config.text]? Delete flash:config.text? [confirm] SW2950#delete vlan.dat Delete filename [vlan.dat]? Delete flash:vlan.dat? [confirm] SW2950#reload Proceed with reload? [confirm] TrnSW3560 SW3560#dir flash: Directory of flash:/
26
192
704 Mar 1 1993 01:24:35 +00:00 vlan.dat 1413 Mar 1 1993 00:14:04 +00:00 config.text 5 Mar 1 1993 00:14:04 +00:00 private-config.text
32514048 bytes total (23435776 bytes free) SW3560#delete config.text Delete filename [config.text]? Delete flash:config.text? [confirm] SW3560#delete vlan.dat Delete filename [vlan.dat]? Delete flash:vlan.dat? [confirm] SW3560#reload Proceed with reload? [confirm]
27
Bi 2.2 Cu hnh Trunks s dng ISL v VLANs trn switch layer 3 2.2.1 S lun l
2.2.2
Mc tiu ca bi thc hnh Cu hnh VLAN 10, VLAN 20 v VLAN 30 trn cc switch. Cu hnh ng trunk gia cc switch trn cc cng Fa0/1 s dng ISL protocol. Dng lnh ping kim tra kt ni gia 2 pc khi kt ni vi switch trn cc VLAN 10, 20 v 30 Kim tra v xem xt hot ng ca thit b c cu hnh
2.2.3
Hng dn cu hnh v hnh v minh ha Bc 1: kt ni cc thit b theo s lun l Bc 2: dng my tnh kt ni n cng console ca thit b v s dng phn mm Hyper terminal hoc SecureCRT kt ni n thit b qua cng console 0 Bc 3: thc hin vic cu hnh c bn cho thit b nh cc bi thc hnh trc theo yu cu.
Cu hnh c bn cho SW1_3560 Switch(config)#hostname SW1_3560 SW1_3560 (config)#enable password cisco SW1_3560 (config)#no ip domain-lookup SW1_3560 (config)#banner motd ^CSwitch 3560 01^C SW1_3560 (config)#line console 0 SW1_3560 (config-line)# logging synchronous SW1_3560 (config-line)# password cisco
28
SW1_3560 (config-line)# login SW1_3560 (config)#line vty 0 4 SW1_3560 (config-line)# password cisco SW1_3560 (config-line)# login Cu hnh c bn cho SW2_3560 Switch(config)#hostname SW2_3560 SW2_3560 (config)#enable password cisco SW2_3560 (config)#no ip domain-lookup SW2_3560 (config)#banner motd ^CSwitch 3560_02^C SW2_3560 (config)#line console 0 SW2_3560 (config-line)# logging synchronous SW2_3560 (config-line)# password cisco SW2_3560 (config-line)# login SW2_3560 (config)#line vty 0 4 SW2_3560 (config-line)# password cisco SW2_3560 (config-line)# login Bc 4: cu hnh VLAN cho cc switch theo yu cu trn. Cu hnh VLAN cho SW1_3560 SW1_3560(config)#vlan 10 SW1_3560 (config-vlan)#name VLAN10 SW1_3560 (config-vlan)#exit SW1_3560 (config)#vlan 20 SW1_3560 (config-vlan)#name VLAN20 SW1_3560 (config-vlan)#exit SW1_3560 (config)#vlan 30 SW1_3560 (config-vlan)#name VLAN30 SW1_3560 (config-vlan)#exit
29
Cu hnh VLAN cho SW2_3560 SW2_3560 (config)#vlan 10 SW2_3560 (config-vlan)#name VLAN10 SW2_3560 (config-vlan)#exit SW2_3560 (config)#vlan 20 SW2_3560 (config-vlan)#name VLAN20 SW2_3560 (config-vlan)#exit SW2_3560 (config)#vlan 30 SW2_3560 (config-vlan)#name VLAN30 SW2_3560 (config-vlan)#exit
30
Bc 5: cu hnh interface trunk cho cc switch interface Fa0/1 s dng ISL protocol Cu hnh Interface trunk cho SW1_3560 SW1_3560(config)#interface fastEthernet 0/1 SW1_3560(config-if-range)#switchport trunk encapsulation isl SW1_3560(config-if-range)#switchport mode trunk
31
SW2_3560(config)#interface fastEthernet 0/1 SW2_3560(config-if-range)#switchport trunk encapsulation isl SW2_3560(config-if-range)#switchport mode trunk
Bc 6: thc hin kim tra cu hnh v hot ng ca cc thit b v PC. Bc 7: Xa cu hnh, khi ng li thit b, hon tr li thit b v hon tt bi lab.
32
Bi 2.3 Cu hnh VTP, Trunks v VLANs trn switch layer 2 v layer 3 2.3.1 S lun l
2.3.2
Mc tiu ca bi thc hnh Cu hnh Trunk, VTP s dng 820.1Q v ISL v VLAN cho cc switch theo m hnh lun l
2.3.3
Cu hnh c bn cho SW1_3560 Switch(config)#hostname SW1_3560 SW1_3560(config)#enable password cisco SW1_3560(config)#no ip domain-lookup SW1_3560(config)#banner motd ^CSwitch 3560_01^C SW1_3560(config)#line console 0 SW1_3560(config-line)# logging synchronous SW1_3560(config-line)# password cisco SW1_3560(config-line)# login SW1_3560(config)#line vty 0 4 SW1_3560(config-line)# password cisco SW1_3560(config-line)# login
33
Cu hnh c bn cho SW2_3560 Switch(config)#hostname SW2_3560 SW2_3560 (config)#enable password cisco SW2_3560 (config)#no ip domain-lookup SW2_3560 (config)#banner motd ^CSwitch 3560_02^C SW2_3560 (config)#line console 0 SW2_3560 (config-line)# logging synchronous SW2_3560 (config-line)# password cisco SW2_3560 (config-line)# login SW2_3560 (config)#line vty 0 4 SW2_3560 (config-line)# password cisco SW2_3560 (config-line)# login Cu hnh c bn cho SW1_2950 Switch(config)#hostname SW1_2950 SW1_2950 (config)#enable password cisco SW1_2950 (config)#no ip domain-lookup SW1_2950 (config)#banner motd ^CSwitch1_2950_01^C SW1_2950 (config)#line console 0 SW1_2950 (config-line)# logging synchronous SW1_2950 (config-line)# password cisco SW1_2950 (config-line)# login SW1_2950 (config)#line vty 0 4 SW1_2950 (config-line)# password cisco SW1_2950 (config-line)# login Cu hnh c bn cho SW2_2950 Switch(config)#hostname SW2_2950 SW2_2950 (config)#enable password cisco SW2_2950 (config)#no ip domain-lookup SW2_2950 (config)#banner motd ^CSwitch 2950_02^C SW2_2950 (config)#line console 0 SW2_2950 (config-line)# logging synchronous SW2_2950 (config-line)# password cisco SW2_2950 (config-line)# login SW2_2950 (config)#line vty 0 4 SW2_2950 (config-line)# password cisco SW2_2950 (config-line)# login
34
Bc 2: cu hnh trunk 802.1Q gia cc switch 2950 v gia cc switch 2950 v 3560. Cu hnh Trunk 802.1Q trn SW1_3560 SW1_3560(config)#interface fastEthernet 0/2 SW1_3560(config-if)#switchport trunk encapsulation dot1q SW1_3560(config-if)#switchport mode trunk Cu hnh Trunk 802.1Q trn SW2_3560 SW2_3560(config)#interface gigabitEthernet 0/2 SW2_3560(config-if)#switchport trunk encapsulation dot1q SW2_3560(config-if)#switchport mode trunk Cu hnh Trunk 802.1Q trn SW1_2950 SW1_2950(config)#interface range fastEthernet 0/1 - 2 SW1_2950(config-if-range)#switchport mode trunk Cu hnh Trunk 802.1Q trn SW2_2950 SW2_2950(config)#interface range fastEthernet 0/1 - 2 SW2_2950(config-if-range)#switchport mode trunk Bc 3: Cu hnh trunk ISL gia cc switch 3560 Cu hnh Trunk ISL trn SW1_3560 SW1_3560(config)#interface fastEthernet 0/1 SW1_3560 (config-if-range)#switchport trunk encapsulation isl SW1_3560config-if-range)#switchport mode trunk Cu hnh Trunk ISL trn SW2_3560 SW2_3560(config)#interface fastEthernet 0/1 SW2_3560 (config-if-range)#switchport trunk encapsulation isl SW2_3560 (config-if-range)#switchport mode trunk
35
Bc 4: cu hnh cc Switch 3560 l VTP Server, cc switch 2950 l VTP client vi domain tn l Cisco. Cu hnh VTP trn SW1_3560 SW1_3560 (config)#vtp mode server Setting device to VTP SERVER mode SW1_3560 (config)#vtp domain pronet.edu.vn Changing VTP domain name from NULL to pronet.edu.vn SW1_3560 (config)#vtp password cisco Setting device VLAN database password to cisco SW1_3560 (config)#vtp version 2 Cu hnh VTP trn SW2_3560 SW2_3560 (config)#vtp mode server Setting device to VTP SERVER mode SW2_3560 (config)#vtp password cisco Setting device VLAN database password to cisco
36
Cu hnh VTP trn SW1_2950 SW1_2950 (config)#vtp mode client Setting device to VTP CLIENT mode. SW1_2950 (config)#vtp password cisco Setting device VLAN database password to cisco Cu hnh VTP trn SW2_2950 SW2_2950 (config)#vtp mode client Setting device to VTP CLIENT mode. SW2_2950 (config)#vtp password cisco Setting device VLAN database password to cisco Bc 5: Cu hnh VLAN 10, 20, 30 cho cc switch trn switch VTP server v cu hnh cc port trn switch thuc v VLAN 10, 20 v 30. Cu hnh VLAN trn SW1_3560 SW1_3560 (config)#vlan 10 SW1_3560 (config-vlan)#name VLAN10 SW1_3560 (config-vlan)#exit SW1_3560 (config)#vlan 20 SW1_3560 (config-vlan)#name VLAN20 SW1_3560 (config-vlan)#exit SW1_3560 (config)#vlan 30 SW1_3560 (config-vlan)#name VLAN30 SW1_3560 (config-vlan)#exit
37
38
Cu hnh port switch trn SW2_2950 SW2_2950(config)#interface fastEthernet 0/18 SW2_2950(config-if)#switchport mode access SW2_2950(config-if)#switchport access vlan 10
39
Bc 6: t i ch IP cho PC1 v PC2 tng ng l 192.168.1.10/24 v 192.168.1.11/24. Kim tra kt ni gia cc PC khi cm cc PC vo cc VLAN 10, 20 v 30. Bc 7: Dng lnh show cn thit kim tra cu hnh v hot ng ca thit b. Bc 8: Xa cu hnh, khi ng li thit b, hon tr li thit b v hon tt bi lab.
40