jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.21k stars 727 forks source link

VLAN support for linux bridges #227

Open kvaps opened 6 years ago

kvaps commented 6 years ago

Hi, this change should work much better than macvlan_mode, please review the changes.

The new option for setting upper interface was added, example usage:

pipework br63@bond0 -i eth0 <guest> 1.2.3.4/24@1.2.3.1 @63

This cmd will create the next chain of devices:

bond0 (top interface)
    \
    bond0.63 (vlan)
       \
       br63 (bridge)
          \
          <your container veth>

If vlan option is not set, it will add bond0 directly to the bridge