I think we need to provide this information in a normalized manner, and have scripts for various router implementations:
Common -> JNOS Common -> Cisco Common -> MikroTik Common -> IPTables
Etc.
The current parsing is a pain.
Something in JSON on XML would be nice, or at least fixed length records, using CIDR and gating hosts.
e.g.
{ gateway: 192.231.186.124, transport : {method: BGP}, subnets : [{net:44.24.10.0,mask:24},{net:44.24.100.12,mask:32}]}
BGP routes shouldn't need any special rules
{ gateway: 192.231.186.124, transport : {method: tunnel, protocols: [ipip,l2tp]}, subnets : [{net:44.24.10.0,mask:24},{net:44.24.100.12,mask:32}]}
On an IPIP tunnel:
[admin@MikroTik] interface ipip> add local-address: x.x.x.x remote-address: 192.231.186.124 [admin@MikroTik] interface ipip> print Flags: X - disabled, R - running # NAME MTU LOCAL-ADDRESS REMOTE-ADDRESS 0 X ipip1 1480 x.x.x.x 192.231.186.124
[admin@MikroTik] interface ipip> en 0 [admin@MikroTik] interface ipip> /ip address add address=44.24.10.0/24 interface=ipip1 [admin@MikroTik] interface ipip> /ip address add address=44.24.100.12/32 interface=ipip1
Given the above JSON object [pseudo-Javascript Code to generate MikroTik].
document.write('/interface ipip add local-address: x.x.x.x remote-address: ' . gateway); document.write('/interface ipip en 0'); document.write('/interface ipip address add address=' . subnets[0].net . '/' . subnets[0].mask . ' interface=ipip1'); document.write('/interface ipip address add address=' . subnets[1].net . '/' . subnets[1].mask . ' interface=ipip1');
------------------------------ John D. Hays K7VE PO Box 1223, Edmonds, WA 98020-1223 http://k7ve.org/blog http://twitter.com/#!/john_hays http://www.facebook.com/john.d.hays
On Mon, Jun 17, 2013 at 11:26 AM, C.J. Adams-Collier
KF7BMP cjac@colliertech.org wrote:
(Please trim inclusions from previous messages) _______________________________________________ On Mon, 2013-06-17 at 13:54 -0400, Jason R Begley wrote:
Let me know if you are interested in a script to convert the encap.txt into a loadable config.
Oh, yes, please!
http://phx0.colliertech.org/~cjac/tmp/IMG_20130617_112301.jpg
44Net mailing list 44Net@hamradio.ucsd.edu http://hamradio.ucsd.edu/mailman/listinfo/44net http://www.ampr.org/donate.html