Trying to achieve a WAN interface switch after the interface reached a certain amount of traffic. I am using two SAT connections and I want to use the first one for the first x GB within a week or day and then switch to the second WAN/SAT connection and then switch back at a certain time when the counter for the first connection starts again from zero.
Was reading about Traffic Accounting and Traffic Flow, but do not really see that this would do the trick.
Best would be if a RADIUS accounting packet would sent every x minutes for a particular WAN interface… but I do not know if and how that could work.
‘/interface print stats’ contains the information I would need to collect in a database (or somewhere).
NAME BYTES PACKETS DROPS ERRORS
6 R ether9-WAN1 144367491676/15218169986 130652202/100225132 0/0 0/0
But after getting the information, how can I reset the counter?
Another scenario could be that I use a script and extract the Tx/Rx Bytes and send it to a server using fetch.
The server will then check if the bytes are increasing. If the bytes are lower (after e.g. a reboot) the last byte count and the new byte count will be added … or so …
Once the interface switch condition reached, I would need to remotely switch the WAN interfaces.
Anybody with some hints/ideas on this?
Input appreciated!
Or do I really have to buy another box which would take care of this?
Thanks!