RE: [Vserver] assigning a different IP to each vserver guest

From: Matt Anger (manger) <manger_at_cisco.com>
Date: Wed 07 Feb 2007 - 18:16:08 GMT
Message-ID: <343A23D683F39E48819B6B6B2814F809AC1600@xmb-sjc-22e.amer.cisco.com>

The great flower page has the information you need:
http://www.nongnu.org/util-vserver/doc/conf/configuration.html

COPIED:

# /etc/vservers/<vserver-name>/interfaces

    * bcast
      The default broadcast address.
    * dev
      The default network device.
    * mask
      The default network mask.
    * novlandev
      When this file exists, the steps which setup and destroy a VLAN
interface will be skipped. This overrides the global vlandev setting for
this vserver.
    * prefix
      The default network prefix-length.
    * scope
      The default scope of the network interfaces.
    * vlandev
      When this file exists, the steps which setup and destroy a VLAN
interface will be executed for all interfaces of this vserver.
    * /etc/vservers/<vserver-name>/interfaces/<iface>
      'iface' is an arbitrary name for the interface; the value itself
is not important but may be interesting regarding interface-creation and
usage with chbind. Both happens in alphabetical order and numbers like
'00' are good names for these directories.
          o bcast
            The broadcast address.
          o dev
            The network device.
          o disabled
            When this file exists, this interface will be ignored.
          o ip
            The ip which will be assigned to this interface.
          o mask
            The network mask.
          o name
            When this file exists, the interface will be named with the
text in this file. Without such an entry, the IP will not be shown by
ifconfig but by ip addr ls only. Such a labeled interface is known as an
"alias" also (e.g. 'eth0:foo').
          o nodev
            When this file exists, the interface will be assumed to
exist already. This can be used to assign primary interfaces which are
created by the host or another vserver.
          o novlandev
            When this file exists, the steps which setup and destroy a
VLAN interface will be skipped. This will override the global vlandev
and the per-guest vlandev.
          o prefix
            The network prefix-length.
          o scope
            The scope of the network interface.
          o vlandev
            When this file exists, the steps which setup and destroy a
VLAN interface will be executed.

         
Matt Anger

-----Original Message-----
From: vserver-bounces@list.linux-vserver.org
[mailto:vserver-bounces@list.linux-vserver.org] On Behalf Of KyoungSoo
Park
Sent: Wednesday, February 07, 2007 7:55 AM
To: vserver@list.linux-vserver.org
Subject: [Vserver] assigning a different IP to each vserver guest

Hello,

I'm a newbie, and I'm trying to assign an IP to each vserver
guest. Specifically, I have three working IPs
(128.112.136.35, 128.112.136.36, 128.112.136.37) but only
one NIC (eth0) on a machine. I want to run three vserver
guests but each vserver should only (and exclusively) use
one of the IPs. How should I set up this?

I checked the documentation, and this mailing list, but I couldn't
figure out yet. What I've tried is to set something like

IPROOT="128.112.136.36"

in /etc/vservers/guestX.conf, but everytime I run the guestX, I always
see eth0 is mapped to 128.112.136.35, which is the the IP address of
the machine as you ssh into as root. I want to see this IP changed to
128.112.136.36 in guestX when I ifconfig in guestX. Is this possible?

Thanks,
KyoungSoo
_______________________________________________
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 Wed Feb 7 19:43:31 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 07 Feb 2007 - 19:43:41 GMT by hypermail 2.1.8