On 07/19/2010 09:21 AM, Sabdar wrote: > Hi, > i tried the same but by upgrading to the latest ip utility and its > works fine as you specified.With the old ip utility the "link add" commands > fails,Thanks for the help. > > I tried "PHYS" in the kernel version 2.6.35-rc4 and phys seems to work but > with a problem ie) the working configuration is as follows, > > lxc.utsname = gamma > lxc.network.type = phys > lxc.network.flags = up > *lxc.network.link = eth0* > *lxc.network.name*<http://lxc.network.name/>* = eth0* > lxc.network.ipv4 = 192.168.10.1 > > The same when we change as below fails to release the host interface after > lxc is stopped > > lxc.utsname = gamma > lxc.network.type = phys > lxc.network.flags = up > *lxc.network.link = eth1* > *lxc.network.name*<http://lxc.network.name/>* = eth0* > lxc.network.ipv4 = 192.168.10.1 > > Instead i see an interface as dev3 in my host after the lxc is stopped.Is it > necessary that both the network.link and network.name has to be same in the > case of "PHYS". > When the container exits, the kernel "move" the physical interface from the container space to the host space. But within the container, the physical interface is named "eth0", when it goes back to the host, the name is conflicting because the host has another interface with the eth0 name. So the kernel creates a new name (eg. dev3). When no name is specified in the configuration file, the default name is "eth0", you are probably right that would make sense to keep the original name for the physical interface instead of defaulting to "eth0" but at the cost of having to modify generic scripts within the container to match the physical interface name. IMHO, the kernel should reassign the previous name when the interface goes back to the host namespace, and if it conflicts then create a new name like "dev%d". Thanks -- Daniel _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers