I have a failover system based on pinging with specific routing-marks to check the status of multiple WAN interfaces.
Everything is handled with a custom script, no netwatch or whatever.
This works fine in rOS6 but I'm trying to redesign to conform with changes in rOS7.
As ping command does not support routing-table option, I've setup VRF for each WAN, without adding any interface.
Related configuration :
Code: Select all
/ip vrf
add interfaces=none name=testing-ether3
add interfaces=none name=testing-ether2
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.20.254 routing-table=testing-ether2
add dst-address=0.0.0.0/0 gateway=192.168.21.254 routing-table=testing-ether3
add distance=1 dst-address=0.0.0.0/0 gateway=192.168.20.254
add distance=2 dst-address=0.0.0.0/0 gateway=192.168.21.254
This "works".
The issue is that it stops working randomly and will not work unless I ping out of the main routing table.
example :
Code: Select all
[admin@sini7] > ping count=4 8.8.8.8 vrf=testing-ether2
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%
[admin@sini7] > ping count=4 8.8.8.8 vrf=testing-ether3
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%
[admin@sini7] > ping count=4 8.8.8.8
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 43ms173us
1 8.8.8.8 56 55 43ms28us
2 8.8.8.8 56 55 43ms171us
3 8.8.8.8 56 55 43ms371us
sent=4 received=4 packet-loss=0% min-rtt=43ms28us avg-rtt=43ms185us max-rtt=43ms371us
[admin@sini7] > ping count=4 8.8.8.8 vrf=testing-ether2
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 42ms916us
1 8.8.8.8 56 55 43ms205us
2 8.8.8.8 56 55 43ms46us
3 8.8.8.8 56 55 43ms726us
sent=4 received=4 packet-loss=0% min-rtt=42ms916us avg-rtt=43ms223us max-rtt=43ms726us
[admin@sini7] > ping count=4 8.8.8.8 vrf=testing-ether3
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 43ms288us
1 8.8.8.8 56 55 44ms400us
2 8.8.8.8 56 55 43ms599us
3 8.8.8.8 56 55 42ms993us
sent=4 received=4 packet-loss=0% min-rtt=42ms993us avg-rtt=43ms570us max-rtt=44ms400us
example and attached pcap file
Code: Select all
[admin@sini7] > do { tool sniffer start ip-address=8.8.8.8
{... ping count=4 8.8.8.8 vrf=testing-ether2
{... ping count=4 8.8.8.8 vrf=testing-ether3
{... ping count=4 8.8.8.8
{... ping count=4 8.8.8.8 vrf=testing-ether2
{... ping count=4 8.8.8.8 vrf=testing-ether3
{... delay 20s
{... ping count=4 8.8.8.8 vrf=testing-ether2
{... ping count=4 8.8.8.8 vrf=testing-ether3
{... tool sniffer stop
{... tool sniffer save file=test.pcap
{... }
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 43ms57us
1 8.8.8.8 56 55 42ms751us
2 8.8.8.8 56 55 42ms621us
3 8.8.8.8 56 55 43ms370us
sent=4 received=4 packet-loss=0% min-rtt=42ms621us avg-rtt=42ms949us max-rtt=43ms370us
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 43ms117us
1 8.8.8.8 56 55 42ms120us
2 8.8.8.8 56 55 43ms64us
3 8.8.8.8 56 55 43ms616us
sent=4 received=4 packet-loss=0% min-rtt=42ms120us avg-rtt=42ms979us max-rtt=43ms616us
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 42ms984us
1 8.8.8.8 56 55 42ms933us
2 8.8.8.8 56 55 42ms746us
3 8.8.8.8 56 55 42ms630us
sent=4 received=4 packet-loss=0% min-rtt=42ms630us avg-rtt=42ms823us max-rtt=42ms984us
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
3 8.8.8.8 timeout
sent=4 received=0 packet-loss=100%