2 distinct DSL lines with same endpoint (8-STABLE)
nvass at gmx.com
Mon Jan 9 21:14:58 UTC 2012
On 1/9/2012 10:20 PM, Christoph Egger wrote:
> Hi all!
> I'm having a FreeBSD 8 gateway that is supposed to do NAT/firewall
> stuff with internet coming through 2 distinct DSL modems from the same
> carrier. Unfortunately I can only run ppp on one of these lines as the
> endpoint address for both lines are the same so bringing up the second
> line fails in
> | PPp ON elephant> Warning: tun1: AIFADDR X.X.X.X -> Y.Y.Y.Y returns -1
> | Warning: iface add: ioctl(SIOCAIFADDR, X.X.X.X -> Y.Y.Y.Y): File exists
> | Error: ipcp_InterfaceUp: unable to set ip address
> Where Y.Y.Y.Y is already also used for the other ppp connection.
> This seems to be a known Problem with FreeBSD ppp (google turns up
> some results) but I haven't found any usefull workarounds. Can anyone
> suggest some way to get this kind of setup working?
You need equal cost multipath routing support to do this. The *correct*
way is to build a kernel with option RADIX_MPATH and then add more than
one routing entries to the same destination, in your case:
a.b.c.d -> e.f.g.h
i.j.k.l -> e.f.g.h
0.0.0.0/0 via tun0
0.0.0.0/0 via tun1
There is also a hackish way to achieve the same thing by:
changing the peer's address to something else arbitrary
and using a firewall to forward there packets.
The first ppp on tun0 will be: a.b.c.d -> e.f.g.h
You'll change it to a.b.c.d -> 192.168.90.1
The second ppp on tun1 will be: i.j.k.l -> e.f.g.h
Then you'll use your favorite firewall to send packets to
192.168.90.1 and e.f.g.h.
More information about the freebsd-questions