On 07/09/2012 12:48 PM, "Matthias P. Würfl" wrote:
> Am 09.07.2012 17:29, schrieb Stéphane Graber:
>> This isn't LXC specific, what's happening in your case is that you're
>> contacting eth1 but getting a reply from eth0 as that's where your
>> default route is.
> 
> OK, but in "real world" (without LXC) I'd configure eth0 and eth0:1. 
> This doesn't work with LXC: ifcopnfig in the container shows everythin's 
> ok, but i cannot ping the additional IP-address.

Nothing forces you to define the IP addresses in LXC's config.
You can perfectly go with a single:

lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
lxc.network.hwaddr = [...]:ed:d8

Then define the addresses in /etc/network/interfaces in the container
with something like:
auto eth0
iface eth0 inet static
    address ...
    netmask ...
    gateway ...

auto eth0:0
iface eth0:0 inet static
    address ...
    netmask ...

>> I'm also a bit surprised that using a /32 "works well" but I'm assuming
>> you have some routes to make that all work.
> 
> What am i supposed to use instead of "/32"? With "/24" the console 
> doesn't start and i'm not able to ssh to the container.
> 
> Matthias

No idea, I don't know your network :)

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to