华为ENSP:VTP与VLAN集中管理

任务需求

公司的财务处、人事处、行政处、总经办分别在不同的楼层,现四个部门的同事需要共享资料,如何利用VLAN技术实现?

在核心交换机SWA创建VLAN10、VLAN20、VLAN30、VLAN40。

交换机启用gvrp。

接入层交换机学习到SWA的vlan。

所有VLAN间可以进行通信。

拓扑图

代码

(1)LSW1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vlan batch 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.10.1 24
[Huawei-Vlanif10]quit
[Huawei]int vlan 20
[Huawei-Vlanif20]ip add 192.168.20.1 24
[Huawei-Vlanif20]quit
[Huawei]int vlan 30
[Huawei-Vlanif30]ip add 192.168.30.1 24
[Huawei-Vlanif30]quit
[Huawei]int vlan 40
[Huawei-Vlanif40]ip add 192.168.40.1 24
[Huawei-Vlanif40]quit
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk 
[Huawei-GigabitEthernet0/0/1]port trunk all vlan 10 20 30 40
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk 
[Huawei-GigabitEthernet0/0/2]port trunk all vlan 10 20 30 40
[Huawei-GigabitEthernet0/0/2]quit
[Huawei]gvrp 
[Huawei]user-interface console 0
[Huawei]user-interface vty 0 4

(2)LSW2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vlan ba 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk 
[Huawei-Ethernet0/0/1]port trunk all vlan 10 20 30 40
[Huawei-Ethernet0/0/1]quit
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access 	
[Huawei-Ethernet0/0/2]port default vlan 10
[Huawei-Ethernet0/0/2]quit
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access 
[Huawei-Ethernet0/0/3]port default vlan 20
[Huawei-Ethernet0/0/3]quit
[Huawei]gvrp
[Huawei]user-interface con 0
[Huawei]user-interface vty 0 4

(3)LSW3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vlan ba 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk 
[Huawei-Ethernet0/0/1]port trunk all vlan 10 20 30 40
[Huawei-Ethernet0/0/1]quit
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access 
[Huawei-Ethernet0/0/2]port default vlan 30
[Huawei-Ethernet0/0/2]quit
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access 
[Huawei-Ethernet0/0/3]port default vlan 40
[Huawei-Ethernet0/0/3]quit
[Huawei]gvrp
[Huawei]user-interface con 0
[Huawei]user-interface vty 0 4

测试

PC1与PC2、PC3、PC4通信情况

PC>ping 192.168.20.5

Ping 192.168.20.5: 32 data bytes, Press Ctrl_C to break
From 192.168.20.5: bytes=32 seq=1 ttl=127 time=140 ms
From 192.168.20.5: bytes=32 seq=2 ttl=127 time=94 ms
From 192.168.20.5: bytes=32 seq=3 ttl=127 time=93 ms
From 192.168.20.5: bytes=32 seq=4 ttl=127 time=79 ms
From 192.168.20.5: bytes=32 seq=5 ttl=127 time=94 ms

--- 192.168.20.5 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 79/100/140 ms

PC>ping 192.168.30.5

Ping 192.168.30.5: 32 data bytes, Press Ctrl_C to break
From 192.168.30.5: bytes=32 seq=1 ttl=127 time=125 ms
From 192.168.30.5: bytes=32 seq=2 ttl=127 time=94 ms
From 192.168.30.5: bytes=32 seq=3 ttl=127 time=94 ms
From 192.168.30.5: bytes=32 seq=4 ttl=127 time=109 ms
From 192.168.30.5: bytes=32 seq=5 ttl=127 time=110 ms

--- 192.168.30.5 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 94/106/125 ms

PC>ping 192.168.40.5

Ping 192.168.40.5: 32 data bytes, Press Ctrl_C to break
From 192.168.40.5: bytes=32 seq=1 ttl=127 time=125 ms
From 192.168.40.5: bytes=32 seq=2 ttl=127 time=125 ms
From 192.168.40.5: bytes=32 seq=3 ttl=127 time=141 ms
From 192.168.40.5: bytes=32 seq=4 ttl=127 time=109 ms
From 192.168.40.5: bytes=32 seq=5 ttl=127 time=94 ms

--- 192.168.40.5 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 94/118/141 ms

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Lethehong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值