You are on page 1of 5

n

1. Cấu hình VTP


SWL3:
CoreSW(config)#vtp domain thai
Changing VTP domain name from server to thai
*Oct 18 12:59:24.248: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name
changed to thai.
CoreSW(config)#vtp password 123
Password already set to 123
CoreSW(config)#vtp mode server
Device mode already VTP Server for VLANS.
SWL2:
AccessSW1(config)#vtp domain thai
Changing VTP domain name from NULL to thai
*Oct 18 13:01:42.690: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name
changed to thai.
AccessSW1(config)#vtp password 123
Setting device VTP password to 123
AccessSW1(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
////////////
AccessSw2(config)#vtp domain thai
Changing VTP domain name from NULL to thai
*Oct 18 13:03:10.695: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name
changed to thai.
AccessSw2(config)#vtp password 123
Setting device VTP password to 123
AccessSw2(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
2. Cấu hình trunking
SWL3:
CoreSW(config)#int range e0/0-1
CoreSW(config-if-range)#sw trunk encapsulation dot1q
CoreSW(config-if-range)#sw mode trunk
SWL2:
AccessSW1(config)#int range e0/0-1
AccessSW1(config-if-range)#sw trunk encapsulation dot1q
AccessSW1(config-if-range)#sw mode trunk
/////
AccessSw2(config)#int range e0/0-1
AccessSw2(config-if-range)#sw trunk encapsulation dot1q
AccessSw2(config-if-range)#sw mode trunk
3. Cấu hình chia vlan
SWL3:
CoreSW(config)#vlan 100
CoreSW(config-vlan)#name IT
CoreSW(config-vlan)#vlan 200
CoreSW(config-vlan)#name KT
CoreSW(config-vlan)#vlan 300
CoreSW(config-vlan)#name SP

4. Cấu hình gán port cho vlan


SWL3:
CoreSW(config)#int vlan 100
CoreSW(config-if)#ip add 10.1.100.1 255.255.255.0
CoreSW(config-if)#no shut
CoreSW(config-if)#int vlan 200
CoreSW(config-if)#ip add 10.1.200.1 255.255.255.0
CoreSW(config-if)#no shut
CoreSW(config-if)#int vlan 300
CoreSW(config-if)#ip add 10.1.30.1 255.255.255.0
CoreSW(config-if)#no shut
CoreSW(config-if)#exit
CoreSW(config)#int e0/2
CoreSW(config-if)#sw mode access
CoreSW(config-if)#sw access vlan 100
CoreSW(config-if)#int e0/3
CoreSW(config-if)#sw mode access
CoreSW(config-if)#sw access vlan 200
CoreSW(config-if)#int e1/0
CoreSW(config-if)#sw mode access
CoreSW(config-if)#sw access vlan 300
CoreSW(config-if)#ip routing
SWL2:
AccessSW1(config)#int e0/2
AccessSW1(config-if)#sw mode access
AccessSW1(config-if)#sw access vlan 100
AccessSW1(config-if)#int e0/3
AccessSW1(config-if)#sw access vlan 200
AccessSW1(config-if)#sw mode access
AccessSW1(config-if)#int e1/0
AccessSW1(config-if)#sw mode access
AccessSW1(config-if)#sw access vlan 300
AccessSW1(config-if)#
///////////////////
AccessSw2(config)#int e0/2
AccessSw2(config-if)#sw mode access
AccessSw2(config-if)#sw access vlan 100
AccessSw2(config-if)#int e0/3
AccessSw2(config-if)#sw mode access
AccessSw2(config-if)#sw access vlan 200
AccessSw2(config-if)#int e1/0
AccessSw2(config-if)#sw mode access
AccessSw2(config-if)#sw access vlan 300
5. PC
PC1 : 10.1.100.12 255.255.255.0 gateway 10.1.100.1
PC2 : 10.1.200.12 255.255.255.0 gateway 10.1.200.1
PC3 : 10.1.30.12 255.255.255.0 gateway 10.1.30.1
PC4 : 10.1.100.13 255.255.255.0 gateway 10.1.100.1
PC5 : 10.1.200.13 255.255.255.0 gateway 10.1.200.1
PC6 : 10.1.30.13 255.255.255.0 gateway 10.1.30.1
PC7 : 10.1.100.20 255.255.255.0 gateway 10.1.100.254
PC8 : 10.1.200.20 255.255.255.0 gateway 10.1.200.254
PC9 : 10.1.30.20 255.255.255.0 gateway 10.1.30.254
6. Cấu hình STP
CoreSW(config)#spanning-tree vlan 100 root primary
AccessSW1(config)#spanning-tree vlan 200 root primary
AccessSw2(config)#spanning-tree vlan 300 root primary
Cấu hình SW2 làm Secondary cho VLAN 10, SW3 bị khóa cổng e0/1.
AccessSW1(config)#spanning-tree vlan 10 root secondary
AccessSw2(config)#int e0/1
AccessSw2(config-if)#spanning-tree vlan 10 cost 300

You might also like