[lxc-users] Create bridge between LXC Container and Ethernet device

Guido Jäkel G.Jaekel at DNB.DE
Sat Jan 9 11:06:12 UTC 2021


Dear Patrick,

congratulations! Now as you seems to have a running setup, you'll probably want to keep it. Said that, I want to give 5ct more on your statement of the fixed IP and MAC you have to use:

Maybe you have pay attention of the MACs used by the veth's attaching to the software bridge: It's a that the brige is using the lowest-numbered MAC of the attached devices as the MACs of the outgoing packets (see e.g. https://backreference.org/2010/07/28/linux-bridge-mac-addresses-and-dynamic-ports/). I don't know about the current state of LXC about this, but in my enviromment I let the container management script assign a certain calculated, "high-numbered" MAC (some prefix and a calculated part derived from the containers IP, in concrete: a.b.c.d -> 00:50:C2:bb:cc:dd (hex)).

In your special hoster-driven situation, it might be necessary to use for the vet's a MACs with an higher number as the one to be used with your fixed IPs to get the expected MACs to be used for the outgoing traffic. If this was the core issue, it may solve the "DNS" problem as well as the "http get"-problem.

Guido 


On 08.01.21 21:09, Patrick wrote:
> Hi,
> 
> I installed dnsmasq and configured the container to use it and I could finally ping domain names. After that, I tried to install some packages, but I just got http timeouts when trying to do that, so something was still wrong.
> 
> Finally I decided to use lxc-net to create a private subnet and forward the ports I need to the container; it's working fine. I still suspect my hoster for the problems I had with the bridge setup, so I don't thought it made any sense to keep trying solving the problem. At least thats my opinion.
> 
> Best wishes to everyone on this mailing list,
> Patrick
> 
>> Patrick <mailing.lists at mailbox.org> hat am 01.01.2021 20:57 geschrieben:
>>
>>  
>> Hi,
>>
>> I'm trying to create a bridge device between my LXC Container and my Ethernet Device, which has 2 public IPs. The bridge device creation fails, as you can see here: https://paste.debian.net/hidden/c81c8832/. I want to bridge the LXC Container with the secondary IP address of the Ethernet interface. Does somebody has an idea how to do that?
>>
>> Best Regards,
>> Patrick
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> 


More information about the lxc-users mailing list