当前位置:网站首页>VLAN and trunk experiments

VLAN and trunk experiments

2020-12-08 13:17:05 osc_ fge5j3lp

Vlan and and Trunk experiment

Vlan  and   and  Trunk  experiment

The topology
Vlan  and   and  Trunk  experiment
chart 1-1

notes : If there is no special instruction , Description of the R1 or SW1 The number at the end of the device name in the corresponding topology is 1 The equipment R2 or SW2 The number at the end of the device name in the corresponding topology is 2 The equipment , In this way

The experimental requirements

As shown in the figure PC To configure IP Address
SW1 and SW2 Create... Respectively vlan10 and vlan20, requirement PC3 and PC5 Belong to vlan10,PC4 and PV6 Belong to On vlan20
SW1 and SW2 The connected interface is configured as trunk type , allow vlan10 and vlan20 adopt
The test results , same vlan Of PC Can communicate with each other , Different vlan Of PC Can't communicate with each other


Experimental solution

1 、PC To configure IP The address command is omitted The address command is omitted 2 、SW1 and and SW2 Create... Respectively vlan10 and and vlan20

step 1 : stay SW1 To create a vlan10 and vlan20


[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]

step 2 : stay SW2 To create a vlan10 and vlan20


[SW2]vlan 10
[SW2-vlan10]vlan 20
[SW2-vlan20]

SW1 and and SW2 All the g1/0/1 Interface join vlan10 ,g1/0/2 Interface join vlan20

step 1 :*** stay SW1 Upper handle g1/0/1 Interface to vlan10 , hold g1/0/2 Interface to vlan20


[SW1]vlan 10
[SW1-vlan10]port g1/0/1
[SW1-vlan10]vlan 20
[SW1-vlan20]port g1/0/2

step 2 : stay SW2 Upper handle g1/0/1 Interface to vlan10 , hold g1/0/2 Interface to vlan20


[SW2]vlan 10
[SW2-vlan10]port g1/0/1
[SW2-vlan10]vlan 20
[SW2-vlan20]port g1/0/2

SW1 and and SW2 Of Of g1/0/3 Interfaces are configured to trunk , allow vlan10 and and vlan20 adopt

step 1 : stay SW1 Upper handle g1/0/3 The interface is configured as Trunk type , And allow vlan10 and vlan20 adopt


[SW1]interface g1/0/3
[SW1-GigabitEthernet1/0/3]port link-type trunk
[SW1-GigabitEthernet1/0/3]port trunk permit vlan 10 20

step 2 : stay SW2 Upper handle g1/0/3 The interface is configured as Trunk type , And allow vlan10 and vlan20 adopt

[SW2]interface g1/0/3
[SW2-GigabitEthernet1/0/3]port link-type trunk
[SW2-GigabitEthernet1/0/3]port trunk permit vlan 10 20

test result

As shown below ,PC3 Sure PING through through PC5 , But not PING through through PC4 and and PC6

step 1 : stay PC3 On PingPC4 , Find that you can't Ping through


<H3C>ping 192.168.1.2
Ping 192.168.1.2 (192.168.1.2): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

step 2 : stay PC3 On PingPC5 , Discovery can Ping through


<H3C>ping 192.168.1.3
Ping 127.0.0.1 (127.0.0.1): 56 data bytes, press CTRL_C to break
56 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.000 ms
56 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.000 ms
56 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=0.000 ms

step 3 : stay PC3 On PingPC6 , Find that you can't Ping through


<H3C>ping 192.168.1.4
Ping 192.168.1.4 (192.168.1.4): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

版权声明
本文为[osc_ fge5j3lp]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201208131642097o.html