User Tools

Site Tools


doc:howto:mwan3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:mwan3 [2016/10/04 03:47]
braian87b [Hardware]
doc:howto:mwan3 [2017/07/25 11:17] (current)
cmalcolm Added 'ip route show' command in section 'Verify the routing table'.
Line 135: Line 135:
     * A TP-LINK TL-WDR3600 router (ar71xx platform) ([[toh/​tp-link/​tl-wdr3600]]) using OpenWrt 12.09.     * A TP-LINK TL-WDR3600 router (ar71xx platform) ([[toh/​tp-link/​tl-wdr3600]]) using OpenWrt 12.09.
     * A TP-LINK TL-WDR4300 router (ar71xx platform) ([[toh/​tp-link/​tl-wdr4300]]) using OpenWrt 15.05.1.     * A TP-LINK TL-WDR4300 router (ar71xx platform) ([[toh/​tp-link/​tl-wdr4300]]) using OpenWrt 15.05.1.
 +    * A TP-LINK TL-WR842N router (ar71xx platform) ([[toh/​tp-link/​tl-wr842nd]]) using OpenWrt 15.05.1.
     * A openwrt 12.09 mips metarouter over a mikrotik r493g routeros 6.27 ([[inbox/​doc/​mikrotik_metarouter_openwrt]]).     * A openwrt 12.09 mips metarouter over a mikrotik r493g routeros 6.27 ([[inbox/​doc/​mikrotik_metarouter_openwrt]]).
     * A NetGear WNDR3800 router (ar71xx platform) ([[toh/​netgear/​wndr3800]]) using OpenWrt 12.09.     * A NetGear WNDR3800 router (ar71xx platform) ([[toh/​netgear/​wndr3800]]) using OpenWrt 12.09.
Line 179: Line 180:
  
 Create additional WAN interfaces (e.g. wan3, ...) as desired if more than two WAN connections will be used. More information on howto create interfaces can be found at https://​wiki.openwrt.org/​doc/​uci/​network. Create additional WAN interfaces (e.g. wan3, ...) as desired if more than two WAN connections will be used. More information on howto create interfaces can be found at https://​wiki.openwrt.org/​doc/​uci/​network.
 +If you are using pppoe for multiple ADSL lines from the same company, you may need to use option macaddr to give each interface a unique MAC.  The symptom of this problem is that the ISP will drop the connection on one line when another connects with the same (default) MAC.
  
 ==== The routable loopback (self) ==== ==== The routable loopback (self) ====
Line 184: Line 186:
 On routers with just one wan interface (and one default route), there is no issue on which source address to use for new initiated sessions. But with two or more wan interfaces you may wish to have control over this. Up until version 2.0, mwan3 did not respect the already set source address of router originated packets. Packets were load-balanced regardless of source address, based on configured user rules. On routers with just one wan interface (and one default route), there is no issue on which source address to use for new initiated sessions. But with two or more wan interfaces you may wish to have control over this. Up until version 2.0, mwan3 did not respect the already set source address of router originated packets. Packets were load-balanced regardless of source address, based on configured user rules.
  
-As of version 2.0 mwan3 does respect the already set source address. The advantage of this is that an applications can have control over which wan interface to use. The downside of this is that when an application does not specify which source address to use (most of the time) the kernel will pick a source address based on the routing table. In practice this means the default route with the lowest metric is used to determine which source address to useSo if you don't configure a routable loopback address with corresponding more preferred default route, all traffic originating from the router itself will leave the primary wan with the source address of that wan interface, regardless of configured user mwan3 rules.+As of version 2.0 mwan3 does respect the already set source address. The advantage of this is that an applications can have control over which wan interface to use. The downside of this is that when an application does not specify which source address to use (most of the time) the kernel will pick a source address based on the routing table. In practice this means the default route with the lowest metric is used to determine which source address to use - this does not apply to the latest trunk revisions!! ​So if you don't configure a routable loopback address with corresponding more preferred default route, all traffic originating from the router itself will leave the primary wan with the source address of that wan interface, regardless of configured user mwan3 rules.
  
 This however only effects router initiated traffic. Traffic from LAN clients will always be balanced based on mwan3 configured rules even if no routable loopback address is configured. This however only effects router initiated traffic. Traffic from LAN clients will always be balanced based on mwan3 configured rules even if no routable loopback address is configured.
Line 240: Line 242:
  
 <​code>​ <​code>​
 +root@OpenWrt:​~#​ ip route show
 default via 10.0.3.2 dev eth1  proto static ​ src 10.0.3.15 ​ metric 10  default via 10.0.3.2 dev eth1  proto static ​ src 10.0.3.15 ​ metric 10 
 default via 10.0.4.2 dev eth2  proto static ​ src 10.0.4.15 ​ metric 20 default via 10.0.4.2 dev eth2  proto static ​ src 10.0.4.15 ​ metric 20
Line 966: Line 969:
       * Internal port: 1194 (this is not really needed)       * Internal port: 1194 (this is not really needed)
       * Enable NAT Loopback: enabled ​ (the default)       * Enable NAT Loopback: enabled ​ (the default)
 +
 +OpenWrt 15.05.x (Chaos Calmer) note: Unfortunately,​ the above approach doesn'​t work for UDP port-forwards to the router'​s LAN interface fail to work. TCP port-forwards are fine. This bug report talks about the issue: https://​dev.openwrt.org/​ticket/​18057. Apparently the change in the firewall3 package that broke this functionality has been reverted but the fix happened after the 15.05.x CC release.
 +
  
 == Step 3: OpenVPN client and DNS configuration == == Step 3: OpenVPN client and DNS configuration ==
doc/howto/mwan3.1475545646.txt.bz2 · Last modified: 2016/10/04 03:47 by braian87b