From: Wray Cason (wrayman_at_auxiliumcomputing.com)
Date: Wed 27 Feb 2002 - 18:37:28 GMT
>
> No you can't set default routes in vserver
> what you need is somewhat more advanced routing in the real
> server.
>
> say that you have eth0 which is the default interface for
> which you have a default gateway configured and now you want
> a vserver to use eth1 instead, then maybe somethine like this
> can help.
>
> ip rule add from <ipthevserverisusing> table 200
>
> ip route add <network on that interface> dev eth1 table 200
> ip route add default via <default gateway for this interface>
> dev eth1 table 200
>
> replace <ipthevserverisusing> with the ipaddress the vserver
> is using. <network on that interface> is something like 192.168.1.0/24
> <default gateway for this interface> is maybe 192.168.1.1 ?
> replace with actual default gateway.
>
> if you have several vserver that should use eth1 but diffrent
> ipaddresses and those addresses are located in the same subnet
> you can add more 'ip rule' rows, one for each ip.
>
> and if you have vserver that use an ipaddress on eth1 that's
> part of another subnet you have to add all these 3 rules but
> change the table number from 200 to something diffrent, say
> 201.
>
> I hope this helps.
>
> /Martin
>
> Never argue with an idiot. They drag you down to their level,
Thank you very much. This was very helpful to me. I have a related
question. Please confirm or refute that this is true:
A vserver can never, under any circumstances be aware of networks and
interfaces in the base computer other than the one it is bound to. As such,
if all base interfaces are addressed with private unroutable addresses, and
only the vserver has the public address, it is impossible to route all
server traffic out through the public address.
Thanks. I have found this mailing list to be incredibly helpful and
educational.
-- Wray Cason "Wrayman" Auxilium Computing www.auxiliumcomputing.com wrayman_at_auxiliumcomputing.com main: 206-595-2080 fax: 425-895-9825