New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document macvlan scenario #3273

Closed
techtonik opened this Issue May 3, 2017 · 4 comments

Comments

2 participants
@techtonik
Contributor

techtonik commented May 3, 2017

It would be extremely handy to document macvlan scenario for accessing containers from the LAN. Without knowing about macvlan it is hard to discover it, and without knowing about MAC and NIC concepts it is hard to configure.

This is default LXD setup.

$ lxc profile show default
config: {}
description: ""
devices:
  eth0:
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default
used_by:
- /1.0/containers/rpm
- /1.0/containers/lxdtox
- /1.0/containers/lxdtox/init
  • switch profile to macvlan mode (and document implications)
    • change default profile
    • create separate profile for LAN containers

Explain why this works (https://stgraber.org/2016/10/27/network-management-with-lxd-2-3/#comment-241550):

lxc network attach-profile eth0 default eth0

SVG diagrams would greatly help.

@stgraber

This comment has been minimized.

Show comment
Hide comment
@stgraber

stgraber May 3, 2017

Member

Yeah, we probably need a bridge vs macvlan section in network.md to explain the two different modes and their limitations (well, mostly macvlan's limitations).

Member

stgraber commented May 3, 2017

Yeah, we probably need a bridge vs macvlan section in network.md to explain the two different modes and their limitations (well, mostly macvlan's limitations).

@stgraber stgraber added this to the lxd-2.14 milestone May 3, 2017

@techtonik

This comment has been minimized.

Show comment
Hide comment
@techtonik

techtonik May 3, 2017

Contributor

Creating a separate webdev profile with macvlan mode:

$ lxc profile copy default webdev
$ lxc profile device set webdev eth0 nictype macvlan
$ lxc profile device set webdev eth0 parent eth0
$ lxc profile assign rpm webdev
$ lxc profile show webdev
config: {}
description: ""
devices:
  eth0:
    nictype: macvlan
    parent: eth0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: webdev
used_by:
- /1.0/containers/rpm
Contributor

techtonik commented May 3, 2017

Creating a separate webdev profile with macvlan mode:

$ lxc profile copy default webdev
$ lxc profile device set webdev eth0 nictype macvlan
$ lxc profile device set webdev eth0 parent eth0
$ lxc profile assign rpm webdev
$ lxc profile show webdev
config: {}
description: ""
devices:
  eth0:
    nictype: macvlan
    parent: eth0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: webdev
used_by:
- /1.0/containers/rpm
@techtonik

This comment has been minimized.

Show comment
Hide comment
@techtonik

techtonik May 3, 2017

Contributor

Wow. It works. =)

Contributor

techtonik commented May 3, 2017

Wow. It works. =)

@techtonik

This comment has been minimized.

Show comment
Hide comment
@techtonik

techtonik May 3, 2017

Contributor

Contributor

techtonik commented May 3, 2017

stgraber added a commit to stgraber/lxd that referenced this issue May 24, 2017

doc: Add section on macvlan vs bridge
Closes #3273

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

@brauner brauner closed this in 83bda7c May 24, 2017

stgraber added a commit that referenced this issue May 24, 2017

doc: Add section on macvlan vs bridge
Closes #3273

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment