华为ENSP-实验拓扑** 附件:**—>三层交换机互联-路由设置.zip
次种方式互联需要添加路由
否则172.16.1.0/24和172.16.6.0/24
网段之间无法通信
sw1 sw2 不加路由:1.100-1.1.1.2 x
1.100-6.100 x
6.100-1.1.1.1 x
6.100-1.100 x
sw1 路由 172.16.6.0/24 1.1.1.2(对段IP)
sw2 路由 172.16.1.0/24 1.1.1.1(对段IP)
或者 默认路由0.0.0.0/0 也可以
1.100-1.1.1.2 v
1.100-6.100 v
6.100-1.1.1.1 v
6.100-1.100 v
<sw3>dis ip routing-table
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.1 Vlanif100
1.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif100
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
172.16.1.0/24 Direct 0 0 D 172.16.1.254 Vlanif10
172.16.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
172.16.6.0/24 Static 60 0 RD 1.1.1.2 Vlanif100
<sw3>
················································································
<sw4>dis ip routing-table
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.2 Vlanif100
1.1.1.2/32 Direct 0 0 D 127.0.0.1 Vlanif100
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
172.16.1.0/24 Static 60 0 RD 1.1.1.1 Vlanif100
172.16.6.0/24 Direct 0 0 D 172.16.6.254 Vlanif60
172.16.6.254/32 Direct 0 0 D 127.0.0.1 Vlanif60
<sw4>
················································································
PC3>tracert 172.16.6.100
traceroute to 172.16.6.100, 8 hops max
(ICMP), press Ctrl+C to stop
1 172.16.1.254 31 ms 16 ms 16 ms
2 1.1.1.2 46 ms 47 ms 47 ms
3 172.16.6.100 63 ms 47 ms 62 ms
PC3>
················································································
PC4>tracert 172.16.1.100
traceroute to 172.16.1.100, 8 hops max
(ICMP), press Ctrl+C to stop
1 172.16.6.254 31 ms 16 ms 15 ms
2 1.1.1.1 47 ms 47 ms 47 ms
3 172.16.1.100 78 ms 62 ms 79 ms
PC4>