Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple uplinks to the net, default route config failure
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Sargastic
n00b
n00b


Joined: 28 Aug 2011
Posts: 35

PostPosted: Sun Aug 28, 2011 1:04 pm    Post subject: multiple uplinks to the net, default route config failure Reply with quote

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 :
Code:

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
Code:

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'
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46296
Location: 56N 3W

PostPosted: Sun Aug 28, 2011 1:13 pm    Post subject: Reply with quote

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
# wireless route automatically. You can override this by setting
#metric_eth0="100"
# or on a global basis
#metric="100"


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

Code:
routes_eth7="default via 212.110.180.254"
metric_eth7="10"

and something similar for eth6
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum