配置Hybrid端口实验操作



1、实验操作

   主机A放入VLAN2

   主机B放入VLAN3

   服务器放入VLAN100

2、实验目的

   使主机A不能和主机B通信

   主机A能和服务器通信

   主机B能和服务器通信

3、操作步骤

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

 

 

 

猜你喜欢

转载自blog.csdn.net/lihao111333/article/details/79924710

相关文章