Community discussions

MikroTik App
 
infidel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Mark packets by interface IP

Tue Nov 12, 2013 3:49 pm

Hi,

I am trying to add 2 ip addresses on the lan interface and route packages based on the ip address. In effect i would like to be able to change the gateway on a client pc and route packages through a different wan connection. The ip addresses must be sequential e.g. 192.168.0.100 & 192.168.0.101.
Anyone know how i can mark the packages based on the gateway ip?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Mark packets by interface IP

Tue Nov 12, 2013 6:07 pm

Why not mark for routing based off of just the src-ip address? Easier to control and setup. I don't think there is a way you can mark routing like you are asking for.
 
infidel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Re: Mark packets by interface IP

Tue Nov 12, 2013 6:44 pm

Because i want to select the route from the client (by changing the gateway)
 
infidel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Re: Mark packets by interface IP

Tue Nov 12, 2013 6:57 pm

Could i use vlans perhaps? (just a thought)

Or even better create virtual interfaces
http://wiki.mikrotik.com/wiki/Manual:In ... l-ethernet
Last edited by infidel on Tue Nov 12, 2013 7:03 pm, edited 1 time in total.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Mark packets by interface IP

Tue Nov 12, 2013 7:02 pm

That would give you multiple routed interfaces, and would require completely reassigning the IP address of the computer. From your description you wanted everything on the same subnet. You could run multiple subnets and do it based off of the src-address of the client. For example 192.168.0.0/24 would go out one link and 192.168.1.0/24 would go out the secondary.
 
infidel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Re: Mark packets by interface IP

Tue Nov 12, 2013 7:04 pm

No, i need them on the same subnet.
 
leonset
Member Candidate
Member Candidate
Posts: 256
Joined: Wed Apr 01, 2009 9:09 pm

Re: Mark packets by interface IP

Wed Nov 13, 2013 10:04 am

One thing that comes to my mind is to create an VRRP interface, put there the second IP, and route mark traffic depending on the incoming interface... I'm not sure that it would work, but you may give it a try and let us know.

Other option (if your hardware supports it) could be to create a Metarouter inside your routerboard and you'll have 2 routers in the same hardware.
 
infidel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Re: Mark packets by interface IP

Wed Nov 13, 2013 3:17 pm

Thanx, i will try it and get back.

Who is online

Users browsing this forum: No registered users and 21 guests