On Mon, 19 Jan 2015, ScrumpyJack wrote: > I'd like to connect a physical interface from a host to a LXC container > guest like so: > > lxc.network.type=phys > > And then assign a routable IP/32 address to the LXC container for it to > "just work". > > The problem is that I don't have a spare "real" physical interface, so on > the host i create a "virtual" interface > > ip link add link eth0 mac0 type macvlan > > I now have a new virtual interface called mac0 with a separate mac address > in my host. I assign it a test IP and it can be pinged from outside the > host. > > I add the following details to the container's config file > > lxc.network.type=phys > lxc.network.flags = up > lxc.network.link = mac0 > lxc.network.name = eth1 > > > I boot my LXC guest, and as expected the mac0 virtual interface gets > passed on to the guest, as the guest has a new interface called eth1 with > exactly the same mac address as the randomly generated mac0 mac address > from the host, and the mac0 interface is no longer available in the host. > > But that's as far as it goes. Assigning the same test IP address to the > guest doesn't have the desired effect and the containers is unreachable. I > see the traffic coming into eth0 on the host, but that's it. The guest > doesn't seem to get the traffic with it's IP. > > I don't want to use bridging, veths or taps, or any method other than > physical. >
hi again. I'm wondering if my setup is so silly that all as ignoring it :) Meanwhile, I'm trawling this mailing list and searching online and there is nothing i see that might be of any help. If anyone with knowledge of lxc networking would be kind enough to tell me whether I'm mad or not, then I could keep looking for give up on passing a macvlan host interface to the LXC physically. That would be most kind. _______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users