华为三层交换机与路由器连接排错

今天用模拟器做实验的时候出现的问题,捣鼓了几个小时,实在不知所以。
S5700:
#

interface Vlanif1

#

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 Vlanif100

ip address 192.168.100.1 255.255.255.0
#

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/10

port link-type access

port default vlan 100
#
ip route-static 0.0.0.0 0.0.0.0 172.18.1.1

AR2200:

#

interface GigabitEthernet0/0/0

ip address 172.18.1.1 255.255.255.0
#

ip route-static 192.168.100.0 255.255.255.0 192.168.100.1
ip route-static 192.168.10.0 255.255.255.0 192.168.100.1
ip route-static 192.168.20.0 255.255.255.0 192.168.100.1

然后现在两边都PING不通对方,按道理三层交换机不是不用做trunk的么?我加了默认路由不知道为什么就是不转发,无语了。

你的交换机是用哪个口与路由器连接呢?用的口对应的vlan 接口ip要与路由器接口ip在同网段。
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答