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
vserver.

> 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 192.168.83.0/24 dev eth0.2
> ip route add default via 192.168.83.2 dev eth0.2
> ip rule add from 192.168.83.0/24
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
0.30.195

<SNIP>
> > 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
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to