Subject: Too many network devices inside guest?
From: Gerhard Mehsel <sparking@gmx.net>
Date: Fri, 30 Oct 2009 15:18:39 +0100

Hello,

I just set up a Debian Lenny Vserver and tried to customize my network.
My Problem is, that I configured 3 network devs, but now inside the 
vserver appear five devices?

Is there a small tutorial what to set to get 2 IP adresses and a 
loopback device inside a verserver guest?
Do the devices have to be configured in the host, also?

On the host system I have mutliple IP Adresses on one device with some 
aliases:

/etc/network/interfaces:

eth0
....

eth0:0
....

eth0:1
....

eth0:2
....

eth0:3
....

eth0:4
....




in /etc/vservers/$VSERVER/interfaces/{0 1 2}
0/dev: eth0
1/dev: eth0:1
2/dev: lo

0/ip: 192.168.1.10
1/ip: 192.168.1.11
2/ip: 127.0.0.1


After booting the vserver guest ifconfig displays 5 devices:
-----------------------------------------

eth0      Link encap:Ethernet  HWaddr xxxx
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:858628 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1302041 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:220101426 (209.9 MiB)  TX bytes:1809823317 (1.6 GiB)
           Interrupt:19 Base address:0xa400

eth0:0    Link encap:Ethernet  HWaddr xxxx
           inet addr:192.168.1.10 ...

eth0:1    Link encap:Ethernet  HWaddr xxxx
           inet addr:192.168.1.11 ...

eth0:3    Link encap:Ethernet  HWaddr xxxx
           inet addr:192.168.1.10  ...

eth0:4    Link encap:Ethernet  HWaddr xxxx
           inet addr:192.168.1.11 ...

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:5669 errors:0 dropped:0 overruns:0 frame:0
           TX packets:5669 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:1482322 (1.4 MiB)  TX bytes:1482322 (1.4 MiB)
--------------------------------------------------------


Is this a mixture between the configured devices from Host and Guest system?

How do I do this correctly?

Thanks a lot,
Gerd