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

From: Gilles (gilles_at_harfang.homelinux.org)
Date: Sat 04 Jun 2005 - 00:52:55 BST


Hello.

> >
> > here is an example setup how to accomplish your 'funny'
> > routing scenario ... enjoy!
> >

I'm on the right track, finally.
 
> >
> > Tested as two QEMU instances connected via a simple
> > bridging setup on the real machine ...
> >

Referring to your example, traffic between 2 vservers on Host 1
is now routed through Host 2.

While turning some knobs ;-) I could single out a few problems.

(1)
I had been trying to figure out what was the purpose of the
"ip route del ..." invocation in "Host 1 Magic", and arrived
to the conclusion that it shouldn't be there at all!
Indeed, here, these commands (or some side-effect of it?) removes
my "eth0.2" and "eth0.3" interfaces, which has the unfortunate
consequence that "ip route add default via ..." results in a
"Network Unreachable" error.

> >
> > Host 1 Magic:
> > =============
> >
> > /* default gw for Guest 1 */
> > ip rule add from 172.16.0.1 table 16
> > ip route add default via 172.16.0.2 table 16
> > ip route del 172.16.0.0/16
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
         I removed that one.
> >
> > /* default gw for Guest 2 */
> > ip rule add from 172.17.0.1 table 17
> > ip route add default via 172.17.0.2 table 17
> > ip route del 172.17.0.0/16
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
         And that one.

Can you confirm that it should be so?
The rest is perfect :-) [But see (2).]

(2)
I wanted to modify it to have something more flexible but all my attempts
resulted in errors. For instance, I tried to replace the "default" argument
by a specific network/host address, but always got an "Invalid argument" from
RTNETLINK.
The purpose is now to have traffic from Host 1 to vservers routed through the
usual "direct" (lo) route. So the question is: Is it possible to limit the
effect of the "indirect" route to selected networks?

(3)
I couldn't make your example work while following your advice about suppressing

  /etc/vservers/*/interfaces/dev and
  /etc/vservers/*/interfaces/0/prefix

and adding

  /etc/vservers/*/interfaces/0/nodev

Attempts to do so resulted in no interface being visible within the guest, and
no connectivity.

With the usual setup (with the "interfaces/dev" file being present), it works
as expected but then there is always that

  ERROR: trying to add VLAN #3 to IF -:eth0:- error: Invalid argument

at vserver startup.

Thanks for your patience and best regards,
Gilles
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


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 Sat 04 Jun 2005 - 00:53:33 BST by hypermail 2.1.3