Re: [Vserver] Configure a second NIC for a vserver

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Fri 27 Jan 2006 - 19:48:25 GMT
Message-ID: <20060127194825.GA16752@MAIL.13thfloor.at>

On Fri, Jan 27, 2006 at 01:51:31PM +0100, Paul wrote:
> Warning, I have little experience with vservers on Debian (which is
> the Dist our vserver is on). Our guy who usually takes care of this
> is away, and we need to make a change.
>
> I have a running vserver which is a web server and everything is
> fine. On the physical machine an ifconfig command shows me (where
> webgate01 is the vserver name):
>
> eth0:webgate01 Link encap:Ethernet HWaddr 00:0D:87:31:82:E6
> inet addr:192.168.81.20 Bcast:192.168.81.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:10 Base address:0xe000
>
> This has access from the outside IP address to the vserver's apache
> server by mapping through a firewall.
>
> I need to configure another ethernet card that the vserver can see in
> addition to eth0 for access to another server on another IP segment.
> For now, suffice it to say there are sound business reasons for doing
> this which are beyond my control, so please, I would appreciate not
> going into justification for such a thing if it should seem looney to
> some.
>
> I have, using ifconfig, set up on the physical machine this:
>
> eth1:webgate01 Link encap:Ethernet HWaddr 00:50:BA:8B:C2:7B
> inet addr:192.168.91.22 Bcast:192.168.92.255
> Mask:255.255.255.248
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:11 Base address:0xe400
>
> I have not restarted the vserver because I'm not sure if I have done
> this correctly, or if I have done enough. I'm also not sure if
> restarting it so it sees this new eth1 configuration would be
> sufficient and not create any conflict with the vserver's use of the
> iP address in eth0. I presume I need to set up a route to the
> 192.168.91.0 segment.

if you need two different gateways for the guests,
you will have to configure table based routing
(details can be found here:
 http://archives.linux-vserver.org/200311/0470.html)

> Would I do that inside the running vserver, after restarting it, or on
> the physical machine somewhere before the restart?

basically guests only use the IPs, the routing and
networking happens on the host, so once your host
routing setup is fine, the guest can be started with
'just' the proper subset of IPs ...

HTH,
Herbert

> background info, uname -a yields this:
> Linux webgate01 2.4.27+vserver #1 (and so forth with date info)
> GNU/Linux
>
> The names have been changed to protect the innocent ;-)
>
> Any help would be much appreciated.
>
> Paul W
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Jan 27 19:48:50 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 27 Jan 2006 - 19:48:56 GMT by hypermail 2.1.8