Community discussions

MikroTik App
 
tbuyvoets
just joined
Topic Author
Posts: 10
Joined: Wed Oct 06, 2021 12:59 pm

Match interface starting with.

Tue Nov 02, 2021 12:17 pm

I want to script adding interfaces to an vrf. Each time I want to add an interface to a vrf I have to repeat every interface already in there.

For example:
If vrf is:
 1   routing-mark=Customers interfaces=ether1,pppoe-cust3
And wan't to add interfaces pppoe-cust1 and interface pppoe-cust2, I have to set
ip route vrf set interfaces=ether1,pppoe-cust3,pppoe-cust1,pppoe-cust2 1
Instead of repeating each interface already set for vrf, Can i do someting like?:
ip route vrf set interfaces=ether1,pppoe-* 1

So matching each interface starting with value "pppoe- "
How can this be accomplished in routeros scripting?

Who is online

Users browsing this forum: Bing [Bot], jerryuser, Pea, reinerotto and 28 guests