用(三层交换技术实现不同vlan间的通信
网络拓扑与解题思路如下:
配置步骤:
1.配置PC端信息(IP,掩码,网关)
2.交换机配置(华为的S5700交换机为例)
2.1,划分vlan添加端口
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys S1
[S1]undo in e
Info: Information center is disabled.
[S1]vlan b 10 20
Info: This operation may take a few seconds. Please wait for a moment…done.
[S1]int g0/0/1
[S1-GigabitEthernet0/0/1]p l a
[S1-GigabitEthernet0/0/1]p d v 10
[S1-GigabitEthernet0/0/1]int g0/0/2
[S1-GigabitEthernet0/0/2]p l a
[S1-GigabitEthernet0/0/2]p d v 20
[S1-GigabitEthernet0/0/2]q
2.2 分别给vlan配置虚拟网关
[S1]int vlanif 10
[S1-Vlanif10]ip add 192.168.1.1 24
[S1-Vlanif10]int vlanif 20
[S1-Vlanif20]ip add 192.168.2.1 24
[S1-Vlanif20]
3.测试网络连通性
小结:在三层设备上配置vlan对应的虚拟网关,就能够实现不同vlan间的通信。