Monday, November 3, 2014

ubuntu 14.04 - bridged LXC: container's mac address learned on wrong interface

Ubuntu host has p2p1.17 physical interface attached to bri17 bridge. LXC container FOO has following net config:



lxc.network.type = veth

lxc.network.link = bri17
lxc.network.hwaddr = 00:16:3e:aa:aa:66


When I start it, I get:



# lxc-info -n FOO | grep Link
Link: vethHUPG1B

# brctl show bri17

bridge name bridge id STP enabled interfaces
bri17 8000.3cfdfe01eee0 no p2p1.17
vethHUPG1B


so far it looks OK, but



# brctl showmacs bri17
port no mac addr is local? ageing timer
1 00:16:3e:aa:aa:66 no 19.81

2 fe:d8:27:6b:72:1d yes 0.00
2 fe:d8:27:6b:72:1d yes 0.00


shows that the container's mac address is learned on wrong port (p2p1.17)



When I add ip's to the bri17 and container's eth0, they can ping themselves, but container can not ping anything outside host, like the gateway. To be more funny, container has correct arp table:



# arp -n
Address HWtype HWaddress Flags Mask Iface

gateway-ip ether 00:15:2c:16:68:40 C eth0


What is wrong in this configuration?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...