[Lxc-users] a newbie question, trying lxc on Debian :-

Alex equetts at gmail.com
Sat Sep 14 09:33:41 UTC 2013


Hi

I'm running Debian 7.1 Wheezy, and have used the following to create a lxc
container from
a debian template :

# lxc-create -n c1 -t debian
# lxc-start -n c1
# lxc-console -n c1

After logging in to c1, from within the container, the command 'ifconfig'
shows that
eth0 interface up with the following parameters:

root at c1:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr f0:bf:97:eb:ee:d7
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f2bf:97ff:feeb:eed7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:641 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:137561 (134.3 KiB)  TX bytes:19544 (19.0 KiB)
          Interrupt:41 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)


This is exactly the eth0 configuration of the host which runs the container
c1.

>From within the container checking network configuration:

root at c1:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Can someone explain why the host eth0 configuration is visible from within
the container? I would expect that only interface 'lo' is visible from
within c1.

The full c1 config file attached, /var/lib/lxc/c1/config (this I didn't
modify, came like this from the debian template).

Thanks,
AK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130914/3f12c940/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config
Type: application/octet-stream
Size: 2040 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130914/3f12c940/attachment.obj>


More information about the lxc-users mailing list