Community discussions

MikroTik App
 
amin1356
just joined
Topic Author
Posts: 9
Joined: Wed May 06, 2015 5:52 pm

Mark Routing & IP Route in v7.0beta8

Mon Jun 15, 2020 11:37 pm

Hi,
Does anyone know the following MikroTik v6 configurations equivalent in v7.0beta8:

/ip firewall mangle
add action=mark-routing chain=prerouting dst-address-list=!IR \
new-routing-mark=VPN passthrough=yes src-address=30.30.0.0/16
/ip route
add distance=1 gateway="pptp-out" routing-mark=VPN
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mark Routing & IP Route in v7.0beta8

Tue Jun 16, 2020 11:04 am

 
pe1chl
Forum Guru
Forum Guru
Posts: 10240
Joined: Mon Jun 08, 2015 12:09 pm

Re: Mark Routing & IP Route in v7.0beta8

Tue Jun 16, 2020 12:27 pm

In that article it says "Instead of routing rules, you could use mangle to mark packets with routing-mark, the same way as it was in ROSv6."
Can you add some example for that in the docs?
Is the routing-mark the same as a table name in v8? i.e. when you use a routing-mark, do you first add the new table using the new commands shown in the docs?
Or do you need to match the routing-mark in a routing rule and map it to a lookup action in some table?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mark Routing & IP Route in v7.0beta8

Tue Jun 16, 2020 12:52 pm

@pe1chl
In that example replace this:
/routing rule add dst-address=8.8.8.8 action=lookup-only-in-table table=myTable
with this (the same rule as you would use in ROSv6):
/ip firewall mangle add chain=prerouting dst-address=8.8.8.8 action=mark-routing new-routing-mark=myTable
As stated in the manual, table MUST be always added before trying to use it
 
pe1chl
Forum Guru
Forum Guru
Posts: 10240
Joined: Mon Jun 08, 2015 12:09 pm

Re: Mark Routing & IP Route in v7.0beta8

Tue Jun 16, 2020 1:16 pm

Ok so that is not the same as in v6... best to just include the route marking syntax in the manual as well.
It has never been completely clear to me if route marking in mangle rules is completely the same as matching in ip rules and I often
have rules like this in my ip route rule list (amongst matches with IP src-address):

add routing-mark=Eurofiber table=Eurofiber

just to be sure....

Who is online

Users browsing this forum: No registered users and 60 guests