FIXME Unfinished.
FIXME: REDUNDANT with 3gdongle

Wired WAN + 3G dongle

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

Required Packages

  • chat (dependency of comgt)
  • kmod-usb-core (already in 10.03 RC3 Image)
  • kmod-usb-uhci :!: Please remove kmod-usb-ohci before installing this.
  • ppp (already in 10.03 RC3 Image)
  • kmod-usb-serial-option
  • kmod-usb-serial-wwan

Network configuration

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

Firewall configuration

Edit your '/etc/config/firewall' file:

config zone option name wan option network "wan wan2"

Proof of concept code

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

TODO

init script! failsafe, nat, port forward, more explanations why to use this…?

Back to top

doc/howto/wired.wan.with.3g.dongle.txt · Last modified: 2014/03/20 12:20 by valentt