Community discussions

MUM Europe 2020
 
jalokim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Dec 07, 2006 1:39 pm
Location: PL, Tychy
Contact:

2xISP -> one for www other for rest - problems with routing

Sat Oct 27, 2007 9:33 pm

Hi,

I would like to connect 2nd isp (first is working at the time) to my Mikrotik Router (2.9.48).

I'm doing this in this way (ofc IP is assigned to ehternet card):
ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-routing new-routing-mark=GTSwww
ip route add gateway=xxx.xxx.xx.xx routing-mark=GTSwww
And I cannot force this rule
dst-address=0.0.0.0/0 routing-mark=GTSwww action=lookup table=GTSwww
There is no action and table "command"....and I'm reciving:
Invalid route configuration: No gateway
Could you help me ?
 
User avatar
jwcn
Forum Guru
Forum Guru
Posts: 1501
Joined: Sun Aug 27, 2006 6:49 am
Location: Maryland, USA
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Sun Oct 28, 2007 2:26 am

Where are you inputting:

dst-address=0.0.0.0/0 routing-mark=GTSwww action=lookup table=GTSwww
 
jalokim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Dec 07, 2006 1:39 pm
Location: PL, Tychy
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Sun Oct 28, 2007 7:48 am

Where are you inputting:

dst-address=0.0.0.0/0 routing-mark=GTSwww action=lookup table=GTSwww
ip route add dst-address=0.0.0.0/0 routing-mark=GTSwww

and I cannot apply action and table....

MJ
 
User avatar
jwcn
Forum Guru
Forum Guru
Posts: 1501
Joined: Sun Aug 27, 2006 6:49 am
Location: Maryland, USA
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Sun Oct 28, 2007 5:21 pm

ip route dst-address=0.0.0.0 gateway=xxx.xxx.xxx.xxx routing-mark=GTSwww
 
jalokim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Dec 07, 2006 1:39 pm
Location: PL, Tychy
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Sun Oct 28, 2007 9:10 pm

ip route dst-address=0.0.0.0 gateway=xxx.xxx.xxx.xxx routing-mark=GTSwww
Hm.... so it's should look like this:
ip address add addres=xxx.xxx.xx.xx .....

ip firewall mangle mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-routing new-routing-mark=markName

ip route add dst-address=0.0.0.0/0 gateway=xxx.xxx.xx.xx routing-mark=markName
After adding last entry www stop working :/
What is the reason?
 
jalokim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Dec 07, 2006 1:39 pm
Location: PL, Tychy
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Mon Oct 29, 2007 1:28 am

What is the reason?
I think that I have found problem - but not the solution ;)

After adding ip address i do not have access to it outside the network (even ping is not working). But what is funny - the same config works fine on other router (also on MT). I even switched network card - still this same situation. What da f.... ?:)

MJ
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: 2xISP -> one for www other for rest - problems with routing

Mon Oct 29, 2007 3:28 pm

do you nat your network, is it set up correctly for both gateways (interfaces)
 
jalokim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Dec 07, 2006 1:39 pm
Location: PL, Tychy
Contact:

Re: 2xISP -> one for www other for rest - problems with routing

Mon Oct 29, 2007 7:35 pm

do you nat your network, is it set up correctly for both gateways (interfaces)
Janisk this was a good hint - i did not set nat for 2nd gw.

But, it is still not working.

Now my nat is like that:
chain=srcnat action=src-nat to-addresses=xxx.xx.xxx.xx to-ports=0-65535 out-interface=ext0 src-address=192.168.0.0/24 icmp-options=0:0
How should look nat for 2nd gw? Only routing-mark or with address class?
MJ
 
User avatar
tgrand
Long time Member
Long time Member
Posts: 671
Joined: Mon Aug 21, 2006 2:57 am
Location: Winnipeg, Manitoba, Canada

Re: 2xISP -> one for www other for rest - problems with routing

Tue Nov 06, 2007 2:31 pm

GW1:
/ip firewall nat add chain=srcnat out-interface=ext0 action=masquerade

GW2:
/ip firewall nat add chain=srcnat out-interface=ext1 action=masquerade

These are NAT rules.

Who is online

Users browsing this forum: MSN [Bot] and 55 guests