FreeBSD router two DSL connections
Michael Vince
mv at roq.com
Sun Jan 1 00:33:15 PST 2006
Yance Kowara wrote:
>Hi all,
>
>I am trying to figure out if *BSD can achieve this:
>
>I have two DSL connections to play with, and I would
>like to configure a *BSD router that can combine the
>two DSLs together.
>
>There is a howto at
>http://stevenfettig.com/mythoughts/archives/000173.php
>
>But it concerns OpenBSD and it was for a T1 connection
>using a dual T1 card. I would like to configure one on
>2 DSLs connected to two individual NICs.
>
>Is this feasible at all, or should I just invest in a
>dual Wan hardware?
>
>
>
Yes its possible, I have such done such a setup. Its actually one ADSL
user PPP connection the other connection is direct Ethernet to a small
ISP that happens to be in the same building.
The aim isn't anything that serves data and doesn't use anything complex
such as using routing protocols like the other guys are talking about.
Its just using NAT via PF to its users behind the box, all they need 24
hour Internet access and don't have to serve anything which I assume is
your same situation.
All I have done to make use of the multi Internet connection was if one
connection goes down they can just choose the other ISP via a simple
menu I created for them which just deletes and changes the route,
Just uses something like
route flush
route add default isp_gateway_ip
Or for the PPP link that uses "ISP1" profile
/usr/sbin/ppp -quiet -ddial isp1
and a "/etc/rc.d/pf resync" afterwards.
Its just as easy to hack your own self monitoring link changer script
but I felt it was better to leave it in the hands of the people with a menu.
The core of the problem is just scripting something to change routes /
connection using scripting.
Because you appear to be using to DSL and probably pppoe links you would
need to put something like this with two profiles in your
/etc/ppp/ppp.conf file
default:
# set log CBCP CCP Chat Connect Command IPCP tun Phase Warning Debug LCP
sync
set device PPPoE:dc0:isp1
set speed sync
disable ipv6cp
set cd 5
set dial
set login
set redial 0 0
add default HISADDR
set timeout 0
enable dns
isp1:
set authname yance at isp1.net
set authkey yancepassword
isp2:
set authname yance at isp2.net
set authkey yancepassword
and script something to run either "/usr/sbin/ppp -quiet -ddial isp1" or
"/usr/sbin/ppp -quiet -ddial isp2"
Mike
More information about the freebsd-questions
mailing list