Configuring the Hybrid Port Experimental Operation



1. Experimental operation

   Host A is put into VLAN2

   Host B is put into VLAN3

   Server into VLAN100

2. The purpose of the experiment

   Make host A unable to communicate with host B

   Host A can communicate with the server

   Host B can communicate with the server

3. Operation steps

SW1

<Huawei>sys

[Huawei]sysname SW1

[SW1]vlan 2

[SW1-vlan2]q

[SW1]vlan 3

[SW1-vlan3]q

[SW1]interface Ethernet 0/0/1

[SW1-Ethernet0/0/1]port link-type hybrid

[SW1-Ethernet0/0/1]port hybrid pvid vlan 2

[SW1-Ethernet0/0/1]q

[SW1]interface Ethernet0/0/2

[SW1-Ethernet0/0/2]port link-type hybrid

[SW1-Ethernet0/0/2]port hybrid pvid vlan 3

[SW1-Ethernet0/0/2]q

[SW1]interface Ethernet0/0/3

[SW1-Ethernet0/0/3]port link-type hybrid

[SW1-Ethernet0/0/3]port hybrid tagged vlan 2 3 100

[SW1-Ethernet0/0/3]dis this

[SW1-Ethernet0/0/3]q

[SW1]interface Ethernet0/0/1

[SW1-Ethernet0/0/1]port hybrid untagged vlan 2 100

[SW1]interface Ethernet0/0/2

[SW1-Ethernet0/0/2]port hybrid untagged vlan 3 100

[SW1-Ethernet0/0/2]q

[SW1]vlan 100

[SW1-vlan100]q

 

 

SW2

<Huawei>sys

[Huawei]sysname SW2

[SW2]vlan 100

[SW2-vlan100]q

[SW2]interface Ethernet0/0/1

[SW2-Ethernet0/0/1]port link-type hybrid

[SW2-Ethernet0/0/1]port hybrid pvid vlan 100

[SW2-Ethernet0/0/1]q

[SW2]interface Ethernet0/0/2

[SW2-Ethernet0/0/2]port link-type hybrid

[SW2-Ethernet0/0/2]port hybrid tagged vlan 2 3 100

[SW2-Ethernet0/0/2]dis this

[SW2-Ethernet0/0/2]q

[SW2]interface Ethernet0/0/1

[SW2-Ethernet0/0/1]port hybrid  untagged

[SW2-Ethernet0/0/1]port hybrid untagged vlan 2 3 100

[SW2-Ethernet0/0/1]q

[SW2]vlan 2

[SW2-vlan2]q

[SW2]vlan 3

[SW2-vlan3]q

 

 

PC配置IP

PC1:10.1.10.1 255.255.255.0

PC2:10.1.10.2 255.255.255.0

PC3:10.1.10.5 255.255.255.0

 

 

测试:

PCA ping PCB ping不同

PC>ping 10.1.10.2

 

Ping 10.1.10.2: 32 data bytes, Press Ctrl_C to break

From 10.1.10.1: Destination host unreachable

From 10.1.10.1: Destination host unreachable

From 10.1.10.1: Destination host unreachable

From 10.1.10.1: Destination host unreachable

From 10.1.10.1: Destination host unreachable

 

--- 10.1.10.2 ping statistics ---

  5 packet(s) transmitted

  0 packet(s) received

  100.00% packet loss

  

PCA ping 服务器能ping

PC>ping 10.1.10.5

 

Ping 10.1.10.5: 32 data bytes, Press Ctrl_C to break

From 10.1.10.5: bytes=32 seq=1 ttl=128 time=47 ms

From 10.1.10.5: bytes=32 seq=2 ttl=128 time=47 ms

From 10.1.10.5: bytes=32 seq=3 ttl=128 time=47 ms

From 10.1.10.5: bytes=32 seq=4 ttl=128 time=46 ms

From 10.1.10.5: bytes=32 seq=5 ttl=128 time=47 ms

 

--- 10.1.10.5 ping statistics ---

  5 packet(s) transmitted

  5 packet(s) received

  0.00% packet loss

  round-trip min/avg/max = 46/46/47 ms

 

PCBping服务器能ping

PC>ping 10.1.10.5

 

Ping 10.1.10.5: 32 data bytes, Press Ctrl_C to break

From 10.1.10.5: bytes=32 seq=1 ttl=128 time=32 ms

From 10.1.10.5: bytes=32 seq=2 ttl=128 time=63 ms

From 10.1.10.5: bytes=32 seq=3 ttl=128 time=62 ms

From 10.1.10.5: bytes=32 seq=4 ttl=128 time=47 ms

From 10.1.10.5: bytes=32 seq=5 ttl=128 time=31 ms

 

--- 10.1.10.5 ping statistics ---

  5 packet(s) transmitted

  5 packet(s) received

  0.00% packet loss

  round-trip min/avg/max = 31/47/63 ms

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324483142&siteId=291194637