Re: [Vserver] Multiple gateways ... what is the best way with vserver ?

From: Luc Dumaine <>
Date: Thu 11 May 2006 - 11:41:08 BST
Message-ID: <>

Sébastien CRAMATTE wrote:
> I've got a server configured with 2 vlans
> each vlan in a subred one vserver by vlan
> vlan100 -> gateway
> vlan200 -> gateway
> what is the best way to allow each vserver to reach internet (i need
> internet access on each vlan to use apt-get)

The linux kernel can support multiple routing tables, and you can use a
different routing table for packet with a given source address.

I would use commands like this:

/sbin/ip ru add from table 5
/sbin/ip ro add via table 5

/sbin/ip ru add from table 6
/sbin/ip ro add via table 6

The kernel must be compiled with CONFIG_IP_MULTIPLE_TABLES=Y
(IP: policy routing).
Vserver mailing list
Received on Thu May 11 11:41:33 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 11 May 2006 - 11:41:38 BST by hypermail 2.1.8