About this list Date view Thread view Subject view Author view Attachment view

From: Dennis Roos (dennis_at_intouch.net)
Date: Tue 24 May 2005 - 09:13:08 BST

On Sun, 2005-05-22 at 11:25 +0200, Gilles wrote:
> Hi.
> >
> > > Is it OK to have several "default" routes.
> >
> > yes, it _is_ okay, as long as they are bound to a source address,
> > otherwise they do not make too much sense ...
> >
> 1. How do the "users" of the gateway know their source address?
AFAIK it is the first interface that was created when starting the

> 2. Does the output of "route" show an indication of what is the source?
Not necessarily ;)

> 3. How to set the source for a default route?
Using iproute2 you can use:
 ip rule add from ${MYNET}/${SVRPFX} table ${VLAN}

> > see http://archives.linux-vserver.org/200311/0470.html
> > (solution a) was implemented and b) is still? planned but might
> > be superceeded by ngnet ...)
> >
> First I removed the "network" and "gateway" entries in the "interfaces" file.
> Then I put a "routing.sh" script in "/etc/vservers/phony/scripts/pre-start.d"
> containing the following lines:
> ip route add dev eth0.2
> ip route add default via dev eth0.2
> ip rule add from
First of all, I have had issues when doing routing changes in the pre-start fase,
so I made a habbit of doing those changes in the post start fase and that solved
a lot of my problems.

> Then:
> # vserver phony start
> ERROR: trying to add VLAN #2 to IF -:eth0:- error: Invalid argument
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: Invalid argument
> Failed to start vserver 'phony'
What version of util-vserver are you using ? I've had vlan issues with

> > might be interesting to add an /etc/vservers/*/interfaces/*/gateway
> > to the config and set up table based routing if compiled into
> > the kernel, etc ... (any volunteers?)
I sent a script not too long ago to the list that I am currently using.

It is a workaround for the limitations I found. However the script is
pretty much focused on my own environment, but shouldn't be too hard to
adapt to make generic.

Vserver mailing list

About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 24 May 2005 - 09:13:34 BST by hypermail 2.1.3