2017-10-25 12:27
ចង់ប្តូរការងារ ឬ កំពុងស្វែងរកការងារ ផ្វើសារឥឡូវនេះ
This lab is talking about how to arrange connection between each PC within the same Vlan but different Switches. Refer Lab scenario:
Material:
There are 4 PC (PC-A, PC-B, PC-C and PC-D) and 2 Switches.
Lab Topology:
Lab Requirement:
1. Assign IP on earch PC
2. PC-A can ping PC-C
3. PC-B can ping PC-D
Activities (Configuration Part):
1. Assign IP on earch PC
Configure IP on each PC (PC-A: 192.168.1.1/24, PC-B: 192.168.2.1/24, PC-C: 192.168.1.1/24 and PC-D: 192.168.2.2/24).
For example: for PC-A
2. PC-A can ping PC-C
After assigning IP for each PC, we need to make some change on Switch as below:
###Create Vlan 10 and flow vlan on the correct interface###
Sw-A#configure terminal
Sw-A(confi)#vlan 10
Sw-A(confi-vlan)#name Student
Sw-A(config)#interface fastEthernet 0/2
Sw-A(config-if)#description ***TO PC-A***
Sw-A(config-if)#switchport access vlan 10
Sw-A#configure terminal
Sw-A(confi)#vlan 20
Sw-A(confi-vlan)#name Teacher
Sw-A(config)#interface fastEthernet 0/3
Sw-A(config-if)#description ***TO PC-B***
Sw-A(config-if)#switchport access vlan 20
###Connection between Sw-A and Sw-B###
Note: for connection between Sw-A and Sw-B, we need to make port between Sw-A and Sw-B as Trunk and Allow all vlan (which need to allow connection), for this case, we allow Vlan 10 and Vlan 20.
Sw-A(confgi-if)#interface FastEthernet0/1
Sw-A(confgi-if)#description ***Sw-A to Sw-B****
Sw-A(confgi-if)#switchport mode trunk
Sw-A(confgi-if)#switchport trunk allowed vlan 10,20
Sw-B(confgi-if)#interface FastEthernet0/1
Sw-B(confgi-if)#description ***Sw-B to Sw-A****
Sw-B(confgi-if)#switchport mode trunk
Sw-B(confgi-if)#switchport trunk allowed vlan 10,20
3. PC-B can ping PC-D
###Create Vlan 10 and flow vlan on the correct interface###
Sw-B#configure terminal
Sw-B(confi)#vlan 10
Sw-B(confi-vlan)#name Student
Sw-B(config)#interface fastEthernet 0/2
Sw-B(config-if)#description ***TO PC-C***
Sw-B(config-if)#switchport access vlan 10
Sw-B#configure terminal
Sw-B(confi)#vlan 20
Sw-B(confi-vlan)#name Teacher
Sw-B(config)#interface fastEthernet 0/3
Sw-B(config-if)#description ***TO PC-D***
Sw-B(config-if)#switchport access vlan 20
Testing Result: