Skip to contentSkip to conversation

Can't use two uplinks on a linux box

LARTC Lee, Myoung Ho 2 participants 2 messages Dec 21, 2001

lore
Share & tools
lore
#0 lore raw

There are three NICs on my linux(kernel 2.4.13), two of them are for adsl line(two uplinks) and the other is for NAT.

Here is my network.

 +-------+                      +---------+
 |   ISP    |                      |   ISP      |
 +-------+                      +---------+
10.10.10.254                      20.20.20.254
       \                                   /
         \                               /
 ppp0: 10.10.10.1           ppp1: 20.20.20.1
                 +------------+
                 |    Linux       |
                 +------------+
                eth2: 172.31.0.1/16

and I tried as:

#  ip  route  add  10.10.10.254  dev ppp0   table 200
#  ip  route  add   default   via  10.10.10.254  dev ppp0  table 200
#  ip  route  add  20.20.20.254  dev ppp1   table 100
#  ip  route  add   default   via  20.20.20.254  dev ppp1  table 100

# ip route add 10.10.10.254 src 10.10.10.1 dev ppp0
RTNETLINK answers: File exists ---> error 1
# ip route add 20.20.20.254 src 20.20.20.1 dev ppp1
RTNETLINK answers: File exists

# ip route add default scope global nexthop via 10.10.10.254 nexthop
via 20.20.20.254
RTNETLINK answers: Network is unreachable ----> error 2

Why the second error is occured?

Here is my route table;

# ip route show
10.10.10.254   dev ppp0  proto  kernel  scope link  src 10.10.10.1
20.20.20.254  dev  ppp1  proto kernel  scope  link   src 20.20.20.1
172.31.0.0/16  dev  eth2   proto kernel   scope link  src  172.31.0.1
127.0.0.0/8   dev  lo  scope link
default  via  10.10.10.254   dev ppp0

Why I can't set up equal cost multipath default route?

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

#1 lore raw
Quoted 16 lines

Here is my network.

 +-------+                      +---------+
 |  ISP  |                      |   ISP   |
 +-------+                      +---------+
10.10.10.254                      20.20.20.254
       \                                   /
         \                               /
 ppp0: 10.10.10.1           ppp1: 20.20.20.1
                 +------------+
                 |   Linux    |
                 +------------+
                eth2: 172.31.0.1/16
Quoted 1 line

Why I can't set up equal cost multipath default route?

you can't without special arrangements with the ISPs.

IMHO, if you want to do some kind of load balancing, you should do some SNAT balancing.

Jerome Petazzoni <skaya at enix dot org>
--
'They come back to the mountains to die,' said the King. 'They live in Ankh-Morpork.'
(The Fifth Elephant)

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/