Community discussions

MikroTik App
 
Romell
newbie
Topic Author
Posts: 42
Joined: Fri Aug 28, 2020 4:21 pm

Policy based routing issue on Mikrotik !!

Sun Jul 17, 2022 6:35 pm

Hello,

I was using Cisco router to configure SBR = Source based routing

Now I'm trying to move to Mikrotik devices and I'm trying to do that same with no result

On Cisco it's to easy create an access list then add this access list to SBR and then assign it to the interface with next hop

so If I receive a packet from Source A send it to next hop B


I tried on Mikrotik and I couldn't make it !! I don't why


Can anyone help me in this issue ? IF I receive a packet from 3.3.3.0/24 then go to 192.168.50.1 and 192.168.50.1 is a GRE tunnel IP address and that will be the next hop ?



Best Regards
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 276
Joined: Mon Mar 15, 2021 9:10 pm

Re: Policy based routing issue on Mikrotik !!

Mon Jul 18, 2022 2:24 am

Hey,

If you are in ROS v6 you can do this on IP -> ROUTES -> RULES in v7 goto Routing -> Rules
 
Romell
newbie
Topic Author
Posts: 42
Joined: Fri Aug 28, 2020 4:21 pm

Re: Policy based routing issue on Mikrotik !!

Wed Jul 20, 2022 2:02 pm

Hey,

If you are in ROS v6 you can do this on IP -> ROUTES -> RULES in v7 goto Routing -> Rules
Thanks a lot for the answer, so I don't have to configure NAT to have SBR ?

Best Regards
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 276
Joined: Mon Mar 15, 2021 9:10 pm

Re: Policy based routing issue on Mikrotik !!

Wed Jul 20, 2022 3:05 pm

it depends on your configuration if you don't want fully routed solution you can NAT/masquerade any subnet of your choice
 
Romell
newbie
Topic Author
Posts: 42
Joined: Fri Aug 28, 2020 4:21 pm

Re: Policy based routing issue on Mikrotik !!

Thu Jul 21, 2022 3:18 pm

it depends on your configuration if you don't want fully routed solution you can NAT/masquerade any subnet of your choice
The last question so I need to create Routing Mark and new Tables ?

the Action will be Lookup ?
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Policy based routing issue on Mikrotik !!

Thu Jul 21, 2022 3:20 pm

If you use lookup, in case that Gateway is not reachable it will fall back to the Main Routing Table, whatever that may be.
If you use lookup-only-in-table, if the Gateway is not reachable, you won't be routed at all to any other Gateway, including the Main.
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 276
Joined: Mon Mar 15, 2021 9:10 pm

Re: Policy based routing issue on Mikrotik !!

Thu Jul 21, 2022 4:12 pm

To answer your question yes, and this is the syntax on top of my head please use mikrotik tab completion feature to fill in the gaps but the geist is this please see below

# gateway = gre1 interface or ip address
/ip route add dst-address=0.0.0.0/0 routing-mark=tun1 gateway=gre1
/ip route rule add src-address=src_subnet dst-address=dst_subnet action=lookup table=tun1

Who is online

Users browsing this forum: No registered users and 13 guests