华为路由vlan划分透传和回城路由配置

整整一个星期才整明白,刚开始是路由器ip地址配置在

interface Ethernet0/0/0这个接口能配置但不能用
,死在了回城路由上,pc1 ping pc2就是不同,很疑惑,请教了大神,原来没有回城路由,第一次听说这个词。记录一下

 

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.10.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.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.10.0 255.255.255.0 192.168.30.1
ip route-static 192.168.20.0 255.255.255.0 192.168.30.1

 查看路由表


display routing-table

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Static 60 0 RD 192.168.30.1 GigabitEthernet0/0/1
192.168.20.0/24 Static 60 0 RD 192.168.30.1 GigabitEthernet0/0/1
192.168.30.0/24 Direct 0 0 D 192.168.30.2 GigabitEthernet0/0/1
192.168.30.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

猜你喜欢

转载自www.cnblogs.com/caidachun-didi/p/11717610.html