[Lxc-users] Network confusion
Matteo Ghezzi
tenyosama at gmail.com
Fri Jan 29 14:46:29 UTC 2010
2010/1/29 Daniel Lezcano <dlezcano at fr.ibm.com>:
Thanks for your answer.
> Can you send the config file of the container ? it should be in
> /var/lib/lxc/<container_name>/config or /etc/lxc/<container_name>.
The config file of the container:
--------------------------------------------
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /lxc/debian-nossh//rootfs
lxc.cgroup.devices.deny = a
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm
# network
lxc.utsname = debian-mini
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = 4a:49:43:49:79:bf
lxc.network.ipv4 = 192.168.0.100/24
> As well as the result of ifconfig in the container and outside the
> container.
In the host:
-----------------
br0 Link encap:Ethernet HWaddr 62:60:2D:80:63:DE
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::e2cb:4eff:fe00:5a7a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19229 errors:0 dropped:0 overruns:0 frame:0
TX packets:11042 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1656726 (1.5 Mb) TX bytes:1824850 (1.7 Mb)
eth0 Link encap:Ethernet HWaddr E0:CB:4E:00:5A:7A
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::e2cb:4eff:fe00:5a7a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24207 errors:0 dropped:0 overruns:0 frame:0
TX packets:14136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8070883 (7.6 Mb) TX bytes:2093847 (1.9 Mb)
Memory:fbee0000-fbf00000
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:309 errors:0 dropped:0 overruns:0 frame:0
TX packets:309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31734 (30.9 Kb) TX bytes:31734 (30.9 Kb)
vethJzYN6 Link encap:Ethernet HWaddr 62:60:2D:80:63:DE
inet6 addr: fe80::6060:2dff:fe80:63de/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1096 (1.0 Kb) TX bytes:1242 (1.2 Kb)
In the container:
------------------------
lxc-testing:~# ifconfig
eth0 Link encap:Ethernet HWaddr 4a:49:43:49:79:bf
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::4849:43ff:fe49:79bf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1242 (1.2 KiB) TX bytes:1096 (1.0 KiB)
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
More information about the lxc-users
mailing list