Hi all!
Is it possible to assign different ospf cost to different types of tunnels dynamic without creating bindings? For example, at l2tp cost 10, openvpn cost 20, pptp cost 30
This is actually quite simple to do, it works with PPPoE, PPTP, SSTP, L2TP and OVPN.Hi all!
Is it possible to assign different ospf cost to different types of tunnels dynamic without creating bindings? For example, at l2tp cost 10, openvpn cost 20, pptp cost 30
/ppp profile
add name=clients-ospf-cost100 local-address=10.10.10.1 on-down="/routing ospf interface remove [find interface=\$interface]" on-up=\
"/routing ospf interface add interface=\$interface cost=100" remote-address=10.10.10.2
/routing ospf interface add interface=$interface cost=100
/routing ospf interface remove [find interface=$interface]
/routing ospf network add network=10.10.10.0/24 area=backbone
/routing ospf interface remove [find interface ~ "/*F.*"]
/routing ospf interface remove [find interface=$interface]
:log info "Interface to remove: $interface"
:log info "Interface ID: $[/routing ospf interface find interface=$interface]"
12:48:39 script,info Interface to remove: *f00135
12:48:39 script,info Interface ID: *14;Interface ID: *15;Interface ID: *16;Interface ID: *1019E238
I'm definitely out of my comfort zone here. But is not that * kind of ALL to regular expressions in find?For what reasons command "find interface=$interface" returns all interfaces? What's wrong?Code: Select all12:48:39 script,info Interface to remove: *f00135 12:48:39 script,info Interface ID: *14;Interface ID: *15;Interface ID: *16;Interface ID: *1019E238
My board is RB1100AHx2 and version is 6.40.3.
/routing ospf interface add interface=$interface cost=100 comment=$interface
:local i
:set i $interface
/routing ospf interface remove [find comment=$i]