查看转发表 run show route forwarding-table | find r1//find命令就像此刻里面的begin,指从r1开始显示
Destination Type RtRef Next hop Type Index NhRef Netif
10.0.0.2/32 user 0 10.0.4.6 ucst 781 5 em1.12
10.0.0.3/32 user 0 10.0.4.13 ucst 782 5 em1.13
10.0.4.6 ucst 781 5 em1.12
10.0.4.13 ucst 782 5 em1.13
10.0.2.4/30 user 0 10.0.4.13 ucst 782 5 em1.13
10.0.4.4/30 intf 0 rslv 717 1 em1.12
10.0.4.4/32 dest 0 10.0.4.4 recv 714 1 em1.12
10.0.4.6/32 dest 0 0:c:29:ef:61:93 ucst 781 5 em1.12
10.0.4.7/32 dest 0 10.0.4.7 bcst 516 1 em1.12
10.0.4.8/30 user 0 10.0.4.6 ucst 781 5 em1.12
10.0.4.12/30 intf 0 rslv 721 1 em1.13
10.0.4.12/32 dest 0 10.0.4.12 recv 719 1 em1.13
10.0.4.13/32 dest 0 0:c:29:ef:61:9d ucst 782 5 em1.13
10.0.4.15/32 dest 0 10.0.4.15 bcst 718 1 em1.13
再看一下应用负载均衡之前的转发表 run show route forwarding-table | find r1
Logical system: r1
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 555 1
0.0.0.0/32 perm 0 dscd 553 1
10.0.0.1/32 intf 0 10.0.0.1 locl 780 1
10.0.0.2/32 user 0 10.0.4.6 ucst 775 4 em1.12
10.0.0.3/32 user 0 10.0.4.13 ucst 784 5 em1.13
10.0.0.4/32 user 0 10.0.4.13 ucst 784 5 em1.13
//可以看到负载均衡之前转发表里r1到10.0.0.4/32的路径只有一条
10.0.2.4/30 user 0 10.0.4.13 ucst 784 5 em1.13
10.0.4.4/30 intf 0 rslv 717 1 em1.12
10.0.4.4/32 dest 0 10.0.4.4 recv 714 1 em1.12
10.0.4.5/32 intf 0 10.0.4.5 locl 715 2
10.0.4.5/32 dest 0 10.0.4.5 locl 715 2
10.0.4.6/32 dest 0 0:c:29:ef:61:93 ucst 775 4 em1.12
10.0.4.7/32 dest 0 10.0.4.7 bcst 516 1 em1.12
10.0.4.8/30 user 0 10.0.4.6 ucst 775 4 em1.12
10.0.4.12/30 intf 0 rslv 722 1 em1.13
10.0.4.12/32 dest 0 10.0.4.12 recv 720 1 em1.13
10.0.4.13/32 dest 0 0:c:29:ef:61:9d ucst 784 5 em1.13
10.0.4.14/32 intf 0 10.0.4.14 locl 721 2
10.0.4.14/32 dest 0 10.0.4.14 locl 721 2
10.0.4.15/32 dest 0 10.0.4.15 bcst 719 1 em1.13
224.0.0.0/4 perm 0 mdsc 554 1
224.0.0.1/32 perm 0 224.0.0.1 mcst 550 3
224.0.0.9/32 user 1 224.0.0.9 mcst 550 3
255.255.255.255/32 perm 0 bcst 551 1
下面我们通过traceroute来看一下从r1的回环口到r4的回环口的路径是怎么走的?
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.13 (10.0.4.13) 1.617 ms 0.916 ms 10.0.4.6 (10.0.4.6) 1.007 ms
2 10.0.0.4 (10.0.0.4) 2.263 ms 1.925 ms 2.547 ms
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.6 (10.0.4.6) 1.761 ms 10.0.4.13 (10.0.4.13) 1.355 ms 0.914 ms
2 10.0.0.4 (10.0.0.4) 6.277 ms 2.619 ms 1.937 ms
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.13 (10.0.4.13) 1.579 ms 10.0.4.6 (10.0.4.6) 1.706 ms 1.265 ms
2 10.0.0.4 (10.0.0.4) 2.574 ms 2.916 ms 1.993 ms
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.6 (10.0.4.6) 1.517 ms 10.0.4.13 (10.0.4.13) 0.785 ms 1.212 ms
2 10.0.0.4 (10.0.0.4) 2.068 ms 1.941 ms 2.237 ms
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.6 (10.0.4.6) 1.588 ms 0.769 ms 10.0.4.13 (10.0.4.13) 1.039 ms
2 10.0.0.4 (10.0.0.4) 0.847 ms 0.806 ms 0.781 ms
olive> traceroute 10.0.0.4 logical-system r1 source 10.0.0.1
traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 hops max, 40 byte packets
1 10.0.4.13 (10.0.4.13) 1.179 ms 1.592 ms 10.0.4.6 (10.0.4.6) 1.108 ms
2 10.0.0.4 (10.0.0.4) 2.302 ms 1.959 ms 1.946 ms
从上面结果我们可以看到r1到r4的每个包都是交替通过10.0.4.13和10.0.4.6两个路径转发的。