Re: Split 2 ISP connections (GNU/Debian iproute2 network configuration)

From: riviereg (riviereg_at_gmail.com)
Date: 09/01/04


Date: 31 Aug 2004 18:10:36 -0700

Thank you very much for this,
I will try it ASAP ...

Before starting, I have another question around my GNU/Debian sarge
network configuration:

How to automaticaly (at boot) set my ip interface with iproute2
instead of ifconfig: I mean, curently, I use /etc/network/interface
(see below)

How to do this automatically and with a possibility of
stop/start/restart with
iproute2 ?

I check many discussions auroud this I cannot find something clear for
me.

Thanks a lot,
Guillaume

my /etc/network/interface
# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian
installation
# (network, broadcast and gateway are optional)
auto eth1 eth0 eth2

# local network (LAN)
iface eth0 inet static
        address 10.117.71.1
        netmask 255.255.255.0

# external network (etown WAN)
iface eth1 inet static
        address 1.2.3.4
        netmask 255.255.255.248
       gateway 1.2.3.10

iface eth1:0 inet static
        address 1.2.3.5
        netmask 255.255.255.248
        gateway 1.2.3.10

AcCeSsDeNiEd <dillon@SpamMinuSaccessdenied.darktech.org> wrote in message news:<3dq7j0pmetoklm3n4rr6ijf61b4da7biqu@4ax.com>...
> You are in luck. I just got this setup after weeks of hunting, asking for help and tweaking.
>
> First read this: http://linux-ip.net/html/adv-multi-internet.html
> This site brought me closer to my solution.
> Credit given to the poster who pointed me to this site.
>
>
> This is what I did:
>
> #ISP 1 nat (defualt route)
> iptables -t nat -A POSTROUTING -o $ISP1_iface -s ip_net1/bits -j MASQUERADE
>
> #ISP 2 nat
> $iptables -t mangle -A PREROUTING -s $ip_net2/bits -j MARK --set-mark 5
> $iptables -t nat -A POSTROUTING -o $ISP2_iface -j SNAT -s ip_net2/bits --to-source $ISP2_IPaddr
>
> #Add the iproute2 and marker/s for ISP2 nat

> /sbin/ip route flush table 5
> /sbin/ip route add table 5 default via ISP2_gw_IPaddrr
> /sbin/ip rule add fwmark 5 table 5
>
>
> Good luck.
>
>
>
> On 29 Aug 2004 21:04:58 -0700, riviereg@gmail.com (riviereg) wrote:
>
> >Hi,
> >
> >I try to loadbalance my 2 ISP connection for my office,
> >but it wasn't a good idea (The line bandwith are too differents).
> >
> >Now, I would like to simply "route" a part of my local network to
> >my first ISP and an other part to my second ISP.
> >
> >Do you know a very simple way to this ?
> >
> >For example, my LAN is 10.0.0.0, my first ISP IP address is 1.2.3.4
> >and my second ISP IP address is 5.6.7.8
> >
> >I would like to send (SNAT) all my customer from 10.0.0.0 ->
> >10.0.0.128 to ISP 1
> >and all others to ISP2. I also would like to do some DNAT on ISP 1.
> >
> >I try some configuration with iproute and iptables2 but it's not
> >working.
> >Is there a simple example of route (iproute) and NAT (iptable)
> >configuration for this somewhere ?
> >
> >Thank you very much,
> >Guillaume
>
>
> To e-mail, remove the obvious



Relevant Pages