Community discussions

MikroTik App
 
joenuts

Force traffic out a specific interface

Sat Jan 22, 2005 5:15 am

I have ether1, ether2, and ether3. they all sit on the same network, lets say 10.0.0.1, 10.0.0.2, and 10.0.0.3, respectively.
The default gateway is 10.0.0.254, which it defaults to sending the traffic out ether1.
I would like for traffic destined for 192.168.2.0/24 to go out of ether2, and traffic destined for 192.168.3.0/24 to go out of ether3.
Is this possible?
I read about marking the routes, but you can only manipulate the next hop, not the interface the traffic goes out on.
Any ideas?
Thanks
 
wjw
Frequent Visitor
Frequent Visitor
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Re: Force traffic out a specific interface

Sat Jan 22, 2005 6:06 am

I have ether1, ether2, and ether3. they all sit on the same network, lets say 10.0.0.1, 10.0.0.2, and 10.0.0.3, respectively.
The default gateway is 10.0.0.254, which it defaults to sending the traffic out ether1.
I would like for traffic destined for 192.168.2.0/24 to go out of ether2, and traffic destined for 192.168.3.0/24 to go out of ether3.
Is this possible?
I read about marking the routes, but you can only manipulate the next hop, not the interface the traffic goes out on.
Any ideas?
Thanks
Why not just do:

Eth0 - 10.0.0.1

Eth1 192.168.2.x

eth2 - 192.168.3.0

?????
 
User avatar
mag
Member
Member
Posts: 378
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

Re: Force traffic out a specific interface

Sat Jan 22, 2005 10:11 am

setting the preferred source in the routing table will do it.
 
User avatar
[ASM]
Member Candidate
Member Candidate
Posts: 285
Joined: Sun Jun 06, 2004 12:59 am
Location: Sofia, Bulgaria
Contact:

Sat Jan 22, 2005 11:49 pm

Will you NAT the 192.168.xxx.0/24 nets?
 
User avatar
YazzY
Member Candidate
Member Candidate
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Mon Jan 24, 2005 6:55 am

This is what I do on my firewall to redirect all the traffic out from 192.168.64.4 through 2.3.226.2
The rest of the traffic from 192.168.64.0/24 goes out 2.3.226.1 on the WAN interface:

0 ;;; NAT traffic out from LAN's IP of mx1.wrs.no to 2.3.226.2 for correct reverse DNS.
src-address=192.168.64.4/32 out-interface=WAN action=nat to-src-address=2.3.226.2

1 ;;; NAT outgoing traffic from 192.168.64.0/24 - LAN
src-address=192.168.64.0/24 out-interface=WAN action=masquerade

Who is online

Users browsing this forum: Bing [Bot], cinatus, Google [Bot], halacs and 53 guests