[Lxc-users] What's the setup for macvlan on the host to talk to containers?

Whit Blauvelt whit at transpect.com
Tue Jul 6 12:31:38 UTC 2010


On Tue, Jul 06, 2010 at 08:46:45AM +0100, Gordon Henderson wrote:
> > When it's said that for the host to speak to a guest on macvlan, that this
> > depends on setting up macvlan for the host, too, where can I find
> > instructions on how to do that?
> 
> You need to compile the options into the kernel and make sure that you 
> have the bridge-utils package.
> 
> Under Networking Options:
>    801.1d Ethernet bridging
>    802.1q VLAN
> 
> And under Device Drivers -> Network device support:
>    MAC-VLAN (experimental)
> 
> At least that works for me!

Ah, so many levels of answers to questions! The top answer from Google about
macvlan says in part:

"* There is nearly no documentation.
 * What there is, is inaccurate."

Anyway, from reading around I've gotten just far enough to know to bring my
kernel up from 2.6.32 to .34 (which with a stock Ubuntu config does have
ethernet bridging and vlan turned on, even in .32, but in .32 the underlying
macvlan support is incomplete for lxc's purposes), and I've learned that "ip
link" is the way to add a macvlan on the host.

The syntax to actually work across the macvlan I'm still hazy on. What are
the ssh invocation options? In iptables firewalling, is the best way to base
everything on "-m mac"? Does running with macvlan require adjustments to the
routing tables? The "nearly no documentation" is an understatement.

Is there generic vlan knowledge I should be gaining and applying here? I've
only run real LANs. Or is macvlan quite a different animal for these
purposes?

Thanks,
Whit




More information about the lxc-users mailing list