Page 1 of 1

How to route some IP address to other internet gateway

Posted: Tue Jul 22, 2008 1:30 pm
by yudigadget
I have 2 interface:
1. Internet Gateway: 192.168.1.1 (ADSL Modem/Router) with MikroTik IP Address: 192.168.1.1
2. dynamic public IP from Dial-Up 56k external (serial port) and the internet gateway for example: 203.11.12.13

Local Interface with IP Address: 172.16.0.1-172.16.0.20

How to route internet access for 172.16.0.1-172.16.0.10 to 203.11.12.13 ??
while others to 192.168.1.1

please help me,
thank you...

yudi

Re: How to route some IP address to other internet gateway

Posted: Wed Jul 23, 2008 1:46 am
by Ibersystems
Hi,

I think you can make it with mangle.

Re: How to route some IP address to other internet gateway

Posted: Wed Jul 23, 2008 5:23 am
by yudigadget
do you have any example of it mate?
it will help me a lot... thanks!

:)

Re: How to route some IP address to other internet gateway

Posted: Wed Jul 23, 2008 6:47 am
by raktim
u have to do policy routing,

//mangle,

/chain=pre-routing src-address "ur lan address block" Action=mark routing, New routing mark "test" pass through=yes

//routing,

/ip route rules then add src-address "ur lan address block" routing mark= "test" action=lookup table="test"
/ip route add dst-address="ur lan address block" gateway= "ur chosen gateway" mark="test"



thnxs,
raktim