华为三层交换机实现vlan间路由
交换机:带三层模块如s3700,s5700的交换机等
[s1]vlan batch 2 5
[s1]interface vlanif 1
[s1-Vlanif1]ip add 192.168.1.1 24
[s1-Vlanif1]q
[s1]int Vlanif 2
[s1-Vlanif2]ip add 192.168.2.1 24
[s1-Vlanif2]q
[s1]int vlanif 5
[s1-Vlanif5]ip add 192.168.5.1 24
[s1-Vlanif5]
[s1-Vlanif5]q
[s1]int g0/0/1
[s1-GigabitEthernet0/0/1]port link-type access
[s1-GigabitEthernet0/0/1]port default vlan 1
[s1-GigabitEthernet0/0/1]int g0/0/2
[s1-GigabitEthernet0/0/2]port link-type access
[s1-GigabitEthernet0/0/2]port default vlan 2
[s1-GigabitEthernet0/0/2]int g0/0/3
[s1-GigabitEthernet0/0/3]port link-type access
[s1-GigabitEthernet0/0/3]port default vlan 5