三层交换机不同网段vlan透传

三层交换机不同网段vlan透传_第1张图片
配置过程:
交换机1:
[Huawei]vlan batch 10 20
[Huawei-vlan20]q
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 192.168.1.1 24
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 20
[Huawei-GigabitEthernet0/0/2]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]port trunk pvid vlan 10
[Huawei-GigabitEthernet0/0/1]int g 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/3]port trunk pvid vlan 10
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 172.16.1.1 30
[Huawei]ip route-static 10.1.1.0 255.255.255.0 172.16.1.2
交换机2:
[Huawei]vlan batch 10 20
[Huawei-vlan20]q
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 10.1.1.1 24
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 20
[Huawei-GigabitEthernet0/0/2]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]port trunk pvid vlan 10
[Huawei-GigabitEthernet0/0/1]int g 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/3]port trunk pvid vlan 10
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 172.16.1.2 30
[Huawei]ip route-static 192.168.1.0 255.255.255.0 172.16.1.1
测试结果:
三层交换机不同网段vlan透传_第2张图片

你可能感兴趣的:(三层交换机不同网段vlan透传)