Community discussions

MikroTik App
 
yudigadget
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Mar 23, 2007 1:09 pm

How to route some IP address to other internet gateway

Tue Jul 22, 2008 1:30 pm

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
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1686
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

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

Wed Jul 23, 2008 1:46 am

Hi,

I think you can make it with mangle.
 
yudigadget
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Mar 23, 2007 1:09 pm

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

Wed Jul 23, 2008 5:23 am

do you have any example of it mate?
it will help me a lot... thanks!

:)
 
raktim
Member Candidate
Member Candidate
Posts: 184
Joined: Fri Jun 15, 2007 7:22 am

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

Wed Jul 23, 2008 6:47 am

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