![]() |
|||
| PocketPC Projects | Multihoming for OpenWRT (Preliminary Draft) | Filter Driver |
|
To configure OpenWRT to two ISP's, we will need to configure at least 3 interfaces: WAN-1 for ISP-1, WAN-2 for ISP-2, and LAN. Note that WAN-1 uses WAN port, WAN-2 uses one of the 4 Ethernet Switch ports. The remaining 3 EthernetSwitch ports plus the Wi-Fi form LAN. The Interface names for LAN is vlan0, first WAN is vlan1, and second WAN is vlan2. The nvram setting should be: lan_ifname=br0 vlan0ports="2 3 4 5*" /
+-----------------+ +---------+ DSL link X / +------
| 11.1.1.1 WAN1 +---+ Modem X +--------------+ ISP X
| | +---------+ | +------
-----------| OpenWRT | | Internet
LAN | | +---------+ | +------
192.168.1.1| 22.2.2.2 WAN2 +---+ Modem Y +--------------+ ISP Y
+-----------------+ +---------+ DSL link Y \ +------
\
After the Interface part is fixed, the next step is to configure the route(s). We will need to download the iproute2 and iptables-saverestore package in order to adapt teh following rules:
# ip rule add prio 1 from 11.1.1.1 lookup 1 # ip rule add prio 2 from 22.2.2.2 lookup 2 Set default routes for packets from each source: # ip route add table 1 to default dev vlan1 # ip route add table 2 to default dev vlan2 The above routing setup will allow the incoming traffic from DSL Link X to go back to ISP X, while the incoming traffic from DSL Link Y to go back to ISP Y. If there is a Web Server in OpenWRT, this sever can serve two IP's from two ISP's already. If we setup Round Robin DNS for this server, then it has failover and load balance capabilities.
Load balancing outgoing connections To take care of outboiund traffic, we will need to do multipath route: # ip route add to default nexthop dev vlan1 nexthop dev vlan2Acting as an internet gateway |
| Anti Spam | WinASP | Web2Image | Skype Gateway | Dashboard Chart | OE6 COM/ActiveX |
| Copyright © 2010 4UrEyesOnly | ||
|
||