# multiple uplinks to the net, default route config failure

## Sargastic

Hello,

We are running into (small, but bothering) troubles while configuring two links to the 'net on one of our boxes.

Schematically :

eth7 goes to our first ISP router

eth6 goes to our second ISP router

There are a few other interfaces on the box, but not related to our problems.

We followed the LARTC documentation and more precisely the fourth chapter (rules-routing policy database), section 4.2 (Routing for multiple uplinks/providers, http://lartc.org/howto/lartc.rpdb.multiple-links.html). It does work when the proper iproute2 commands are given through the console.

Be we partially fail to configure the conf.d/net file for those commands to be run at boot time.

Our config :

sys-apps/baselayout  Installed versions:  2.0.3

 sys-apps/openrc        Installed versions:  0.8.3-r1

 sys-apps/iproute2       Installed versions:  2.6.35-r2

The conf.d/net file is :

```

modules="iproute2"

# Internal network

config_eth0="192.168.1.1/24"

# DMZ 1

config_eth1="192.168.2.1/24"

# ISP 1

config_eth7="192.168.53.1/24"

routes_eth7="default via 192.168.53.2"

routes_eth7="

192.168.53.0/24 dev eth7 src 192.168.53.1 

192.168.53.0/24 dev eth7 scope link src 192.168.53.1 table ISP1

default via 192.168.53.2 table ISP1

"

rules_eth7="from 192.168.53.1 table ISP1"

# Provider 2

config_eth6="192.168.10.1/24"

routes_eth6="

192.168.10.0/24 dev eth6 src 192.168.10.1 

192.168.10.0/24 dev eth6 scope link src 192.168.10.1 table ISP2

default via 192.168.10.254 table ISP2

"

rules_eth6="from 192.168.10.1 table ISP2"

```

This file is properly processed at boot, without errors. Interfaces are properly configured, tables filled, rules defined.

Our problem is to define the default route, with something like

```

ip route add default nexthop via 192.168.53.2 dev eth7 weight 10 nexthop via 192.168.10.254 dev eth6 weight 1

```

All our tries to put something close to the above command somewhere in the conf.d/net file (especially in some routes_iface variable) failed with a "No such process" error.

So... any hint about what we forgot or did wrong ?

Tia,

-- Sarg'

----------

## NeddySeagoon

Sargastic,

 */usr/share/doc/openrc-0.8.3-r1/net.example.bz2 wrote:*   

> 
> 
> # Each module described below can set a default base metric, lower is
> 
> # preferred over higher. This is so we can prefer a wired route over a
> ...

 

It looks like you need to set a metric for each interface in a separate statement to the route

```
routes_eth7="default via 212.110.180.254" 

metric_eth7="10"
```

and something similar for eth6

----------

