Multipath support is compiled into both the routing engine and the
kernel for VC4. So for example let start
with the following:

Lets assume on router RT1 we have ISP-A (172.16.117.128) out interface
eth0 and ISP-B (192.168.74.128) out eth1. So add a default route to
each ISP:
| Code: |
| admin@RT1:~$ configure admin@RT1# set protocols static route 0.0.0.0/0 next-hop 172.16.117.128 admin@RT1# set protocols static route 0.0.0.0/0 next-hop 192.168.74.128 admin@RT1# commit |
Now in the routing table we have:
| Code: |
| admin@RT1:~$ show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - ISIS, B - BGP, > - selected route, * - FIB route S>* 0.0.0.0/0 [1/0] via 172.16.117.128, eth0
|
Next we'll ping host-C (192.168.249.150) from host-A and host-B.
Host-C is reachable from both ISP-A and ISP-B, so we don't know which
default route RT1 will use, but we can use the "show ip route cache"
command to see:
| Code: |
| admin@RT1:~$ show ip route cache 192.168.249.150 192.168.249.150 from 172.16.139.225 via 192.168.74.128 dev eth1 src 172.16.139.200 cache <src-direct> users 1 used 381 age 0sec mtu 1500 advmss 1460 hoplimit 64 iif eth2 192.168.249.150 from 172.16.139.160 via 172.16.117.128 dev eth0 src 172.16.139.200 cache <src-direct> users 1 used 381 age 0sec mtu 1500 advmss 1460 hoplimit 64 iif eth2 |
As we can see host-A (172.16.139.225) went out eth1 while host-B
(172.16.139.160) went out eth0. We can also see that each path was used
381 times (I started the pings then did a "clear ip route cache").
The tos value is also used in determining which path is taken. For
example from host-A I changed the ping to "ping -Q 0x18
192.168.249.150" and in the route cache we see the ping with tos 0x18
went out eth0:
| Code: |
| admin@RT1:~$ show ip route cache 192.168.249.150 192.168.249.150 from 172.16.139.160 via 172.16.117.128 dev eth0 src 172.16.139.200 cache <src-direct> users 1 used 6 age 0sec mtu 1500 advmss 1460 hoplimit 64 iif eth2 192.168.249.150 from 172.16.139.225 via 192.168.74.128 dev eth1 src 172.16.139.200 cache <src-direct> users 1 used 19 age 0sec mtu 1500 advmss 1460 hoplimit 64 iif eth2 192.168.249.150 from 172.16.139.225 tos 0x18 via 172.16.117.128 dev eth0 src 172.16.139.200 cache <src-direct> users 1 used 2 age 44sec mtu 1500 advmss 1460 hoplimit 64 iif eth2 |