华为ENSP-实验拓扑** 附件**:—>三层交换机互联-路由设置.zip
    次种方式互联是否需要添加路由取决于pc6.100的网关设置
    网关:6.254,sw2需要添加路由
    网关:6.253,则不需要添加路由
    可根据tracert 172.16.1.100看出(有截图)
    image.png

    1. sw1 sw2 不加路由:1.100-6.253 v
    2. 1.100-6.254 x
    3. 6.100-6.253 v
    4. 6.100-1.254 x
    5. sw2 路由 172.16.1.0/24 172.16.6.253(对段IP
    6. 或者 0.0.0.0/0 172.16.6.253
    7. 1.100-6.253 v
    8. 1.100-6.254 v
    9. 6.100-6.253 v
    10. 6.100-1.254 v
    1. [sw1]dis ip routing-table
    2. Destination/Mask Proto Pre Cost Flags NextHop Interface
    3. 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
    4. 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
    5. 172.16.1.0/24 Direct 0 0 D 172.16.1.254 Vlanif10
    6. 172.16.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
    7. 172.16.6.0/24 Direct 0 0 D 172.16.6.253 Vlanif60
    8. 172.16.6.253/32 Direct 0 0 D 127.0.0.1 Vlanif60
    9. [[sw1]
    10. ················································································
    11. [sw2]dis ip routing-table
    12. Destination/Mask Proto Pre Cost Flags NextHop Interface
    13. 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
    14. 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
    15. 172.16.1.0/24 Static 60 0 RD 172.16.6.253 Vlanif60
    16. 172.16.6.0/24 Direct 0 0 D 172.16.6.254 Vlanif60
    17. 172.16.6.254/32 Direct 0 0 D 127.0.0.1 Vlanif60
    18. [sw2]
    19. ················································································
    20. pc2 网关:172.16.6.254 需要路由
    21. PC2>tracert 172.16.1.100
    22. traceroute to 172.16.1.100, 8 hops max
    23. (ICMP), press Ctrl+C to stop
    24. 1 172.16.6.254 31 ms 16 ms 31 ms
    25. 2 172.16.6.253 31 ms 47 ms 47 ms
    26. 3 172.16.1.100 62 ms 63 ms 78 ms
    27. PC2>
    28. ················································································
    29. pc2 网关:172.16.6.253 不需要路由
    30. PC2>tracert 172.16.1.100
    31. traceroute to 172.16.1.100, 8 hops max
    32. (ICMP), press Ctrl+C to stop
    33. 1 172.16.6.253 31 ms 47 ms 47 ms
    34. 2 172.16.1.100 94 ms 62 ms 63 ms
    35. PC2>