Mark, using your example, I did some work.
Here in attachment is Mikrotik script that loads and parses encap.txt file, and then creates IPIP interfaces and routes according to this file.
If attachment does not go through, source is available at http://wireless.uzice.net/ampr/mikrotik-ampr-update.txt
This is work in progress. There are some stuff to add but basically it works. It can:
- download encap.txt from remote site (i've put example encap.txt available for download so script can be tested)
- parses encap.txt
- creates IPIP interfaces according to encap.txt
- sets static routes according to ecnap.txt
- it handles duplicate or obsolete interfaces and routes
- there are options for setting parameters to be applied to both interfaces and routes on their creation so user can customize them fully.
I tested syntax of created interfaces and routes but not if routing actually works as I still do not have working environment to do so. I expect anyne who already has Mikrotik used for ampr routing can review and see if all is done right, or maybe test on his router.
Pay attention: example enc.txt does not contain full 44/8 network info, just few routes for testing puprose.
This is not exactly what I meant to accomplish but is good enough as an example.
Pedja YT9TP