华为华为路由器vlan划分透传和回城路由配置
S1配置#
sysname s1
#
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
S2配置
#
sysname Huawei
#
vlan batch 10 20 30
interface Vlanif10
ip address 192.168.100.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.200.1 255.255.255.0
#
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
R1路由器
#
sysname Huawei
interface GigabitEthernet0/0/1
ip address 192.168.30.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 192.168.100.0 255.255.255.0 192.168.30.1
ip route-static 192.168.200.0 255.255.255.0 192.168.30.1
查看路由表
页:
[1]