华为ENSP-实验拓扑** 附件:**—>三层交换机互联-路由设置.zip
    次种方式互联需要添加路由
    否则172.16.1.0/24和172.16.6.0/24
    网段之间无法通信
    image.png

    1. sw1 sw2 不加路由:1.100-1.1.1.2 x
    2. 1.100-6.100 x
    3. 6.100-1.1.1.1 x
    4. 6.100-1.100 x
    5. sw1 路由 172.16.6.0/24 1.1.1.2(对段IP
    6. sw2 路由 172.16.1.0/24 1.1.1.1(对段IP
    7. 或者 默认路由0.0.0.0/0 也可以
    8. 1.100-1.1.1.2 v
    9. 1.100-6.100 v
    10. 6.100-1.1.1.1 v
    11. 6.100-1.100 v
    1. <sw3>dis ip routing-table
    2. Destination/Mask Proto Pre Cost Flags NextHop Interface
    3. 1.1.1.0/30 Direct 0 0 D 1.1.1.1 Vlanif100
    4. 1.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif100
    5. 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
    6. 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
    7. 172.16.1.0/24 Direct 0 0 D 172.16.1.254 Vlanif10
    8. 172.16.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
    9. 172.16.6.0/24 Static 60 0 RD 1.1.1.2 Vlanif100
    10. <sw3>
    11. ················································································
    12. <sw4>dis ip routing-table
    13. Destination/Mask Proto Pre Cost Flags NextHop Interface
    14. 1.1.1.0/30 Direct 0 0 D 1.1.1.2 Vlanif100
    15. 1.1.1.2/32 Direct 0 0 D 127.0.0.1 Vlanif100
    16. 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
    17. 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
    18. 172.16.1.0/24 Static 60 0 RD 1.1.1.1 Vlanif100
    19. 172.16.6.0/24 Direct 0 0 D 172.16.6.254 Vlanif60
    20. 172.16.6.254/32 Direct 0 0 D 127.0.0.1 Vlanif60
    21. <sw4>
    22. ················································································
    23. PC3>tracert 172.16.6.100
    24. traceroute to 172.16.6.100, 8 hops max
    25. (ICMP), press Ctrl+C to stop
    26. 1 172.16.1.254 31 ms 16 ms 16 ms
    27. 2 1.1.1.2 46 ms 47 ms 47 ms
    28. 3 172.16.6.100 63 ms 47 ms 62 ms
    29. PC3>
    30. ················································································
    31. PC4>tracert 172.16.1.100
    32. traceroute to 172.16.1.100, 8 hops max
    33. (ICMP), press Ctrl+C to stop
    34. 1 172.16.6.254 31 ms 16 ms 15 ms
    35. 2 1.1.1.1 47 ms 47 ms 47 ms
    36. 3 172.16.1.100 78 ms 62 ms 79 ms
    37. PC4>