Community discussions

MikroTik App
 
Chipi
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Nov 24, 2005 12:02 am

Multiple WAN, cannot use second WAN from outside

Mon Aug 29, 2011 10:31 pm

I have two RBs with 3 WANs each. For example RB1 and RB2 :

RB1 Wan´s :

1A(eth1) / 1B(eth2) / 1C(eth3)

RB2 Wan´s :

2A(eth1) / 2B(eth2) / 2C(eth3)

In both RBs the same configuration of IP/ROUTES (1A and 2A are the default gateways), B and C are for ROUTING-MARK traffic (Working Well), and at the same time are configured as DEFAULT GATEWAY with a GREAT COST/DISTANCE.

The problem : If I want to access with winbox via WAN B or C, the RBs receive the INPUT PACKETS in the correct INTERFACE (Eth2 or Eth3), but I saw that it send the OUTPUT PACKETS with the WAN A Interface (Eth1)

I have an old version of OS (3.30), but I not sure that the problem is the version....

Best Regards
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Multiple WAN, cannot use second WAN from outside

Tue Aug 30, 2011 4:30 pm

Look up policy based routing. Basically you need to define rules that watch for connections coming into the router on a specific interface and mark those connections and packets for routing so it knows what route to use when sending the reply back. Without those rules, it falls through to the main routing table and becomes an invalid connection to you.
 
Chipi
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Nov 24, 2005 12:02 am

Re: Multiple WAN, cannot use second WAN from outside

Tue Aug 30, 2011 8:08 pm

I have to mark the connection and packets with INPUT CHAIN ?

I have to mark route for OUTPUT CHAIN ?

I can see the packets entering in ETH2, but the answer returns from ETH1 (Default Gateway)

Best Regards
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Multiple WAN, cannot use second WAN from outside

Tue Aug 30, 2011 8:42 pm

Yes those are the chains you want to mark them on. Don't forget to add in a route in your routing table that uses that mark as well.
 
CCDKP
Member Candidate
Member Candidate
Posts: 170
Joined: Fri Jan 28, 2011 11:24 pm
Location: Midwest, United States

Re: Multiple WAN, cannot use second WAN from outside

Tue Aug 30, 2011 9:41 pm

Butch Evans has a blog entry that helped me fix this issue:
http://blog.butchevans.com/2008/09/mikr ... n-example/

Specifically the part about the routing rules.
The long and short of it is:
/ip route rule
add dst-address=<LAN Network(s)> action=lookup table=main
add dst-address=<WAN1 Local Network> action=lookup table=main
add dst-address=<WAN2 Local Network> action=lookup table=main
add src-address=<WAN1 Interface IP> action=lookup table=<WAN1 Routing Mark>
add src-address=<WAN1 Interface IP> action=lookup table=<WAN2 Routing Mark>
add routing-mark=<WAN1 Routing Mark> action=lookup table=<WAN1 Routing Mark>
add routing-mark=<WAN2 Routing Mark> action=lookup table=<WAN2 Routing Mark>
This rule forces traffic with a source IP of WAN1 to go back out WAN1.
 
Chipi
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Nov 24, 2005 12:02 am

Re: Multiple WAN, cannot use second WAN from outside

Wed Aug 31, 2011 5:21 am

Dear CCDKP,

MANY THANKS !!! It´s running very well with your suggestions !!!

Regards

Who is online

Users browsing this forum: Bing [Bot] and 79 guests