![]() |
![]() |
Please consider the more actual information on multiwan at 3gdongle. This howto will explain how to used two uplinks without multiwan package which badly documented and hard to config. Background info: http://lartc.org/howto/lartc.rpdb.multiple-links.html. After running included code you can connect to wired WAN IP and to 3G IP. If not adding routing tables all packages from router are sent via default GW and ssh etc protocols won't work
comgt
manpage for comgtchat
(dependency of comgt)kmod-usb-core
(already in 10.03 RC3 Image)kmod-usb-uhci
kmod-usb-ohci
before installing this.ppp
(already in 10.03 RC3 Image)kmod-usb-serial-option
kmod-usb-serial-wwan
Edit your '/etc/config/network' file:
config interface wan2
option ifname ppp0
option device <your device>
option apn <your apn>
option service umts
option proto 3g
option defaultroute 0 |
Edit your '/etc/config/firewall' file:
config zone
option name wan
option network "wan wan2" |
Add route tables:
echo "11 wan" >> /etc/iproute2/rt_tables echo "22 wan2" >> /etc/iproute2/rt_tables
Run this code:
#!/bin/sh
. /etc/functions.sh
include /lib/network
scan_interfaces
config_get WAN wan ifname
config_get WAN_IP wan ipaddr
config_get WAN_GATEWAY wan gateway
config_get WAN2 wan2 ifname
config_get WAN2_IP wan2 ipaddr
config_get WAN2_GATEWAY wan2 gateway
WAN_NET=`ip route | grep $WAN_IP | awk -F " " '{print $1}'`
#foo=echo
foo=""
$foo ip route add $WAN_NET dev $WAN src $WAN_IP table wan
$foo ip route add default via $WAN_GATEWAY table wan
$foo ip route add $WAN2_IP dev $WAN2 src $WAN2_IP table wan2
$foo ip route add default via $WAN2_GATEWAY table wan2
$foo ip rule add from $WAN_NET table wan
$foo ip rule add from $WAN2_IP table wan2
#$foo ip route add default scope global nexthop via $WAN_IP dev $WAN weight 1 nexthop via $WAN2_IP dev $WAN2 weight 1;
$foo ip route add default via $WAN_IP |
init script! failsafe, nat, port forward, more explanations why to use this…?