voxpupuli / puppet-network

Types and providers to manage network interfaces
https://forge.puppet.com/puppet/network
Apache License 2.0
66 stars 107 forks source link

network_config should support vlan interfaces #48

Open jhoblitt opened 11 years ago

jhoblitt commented 11 years ago

It's highly desirable to be able to configure tagged vlan interfaces for a multiple of reasons but in particular when configuring a host to act as a Linux kernel based hypervisor. In the specific hypervisor scenario (under linux) there is normally a chain of interfaces like:

eth0 (raw interface) -> eth0.100 (802.1q tagged interfaces) -> br100 (bridge interface)

or

eth0/eth1/etc. (raw interfaces) -> bond0 (bond interface) -> eth0.100 (802.1q tagged interfaces) -> br100 (bridge interface)

The $::osfamily == debian and redhat configuration file approach for modeling the the relationship of the raw interfaces and the vlan interface are flexible but there is at least one syntax that is fairly similar between them.

On redhat, the ifcfg configuration file DEVICE variable provides both the name of the parent raw device and the vlan tag ID. The VLAN variable also needs to be declared to invoke this magic device name parsing (it has not be tested if it it works without doing this but the VLAN variable is required per the rhel documenation)

DEVICE=ethX.192
..
VLAN=yes

(from: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces_802.1q-vlan-tagging.html)

On debian, the iface declaration seems to declare the vlan tag (similar to the redhat DEVICE variable) but doesn't auto-magically seem to imply the parent raw device. A separate sub declaration of vlan-raw-device is needed.

iface eth0.110 inet manual
        vlan-raw-device eth0

(from: http://wiki.debian.org/NetworkConfiguration#Howto_use_vlan_.28dot1q.2C_802.1q.2C_trunk.29_.28Etch.2C_Lenny.29)

jhoblitt commented 11 years ago

Here's some thoughts on a possible [simple] implementation of vlan support into network_config.

Thoughts/comments/criticisms?

jhoblitt commented 11 years ago

Off issue discussed with @adrienthebo has resulted in the conclusion that it makes more sense to add a parameter to set the type of interface that's being configured. eg, vlan|bridge|bond as these states seem to be mutually exclusive, at least under the linux kernel.

jyaworski commented 8 years ago

Hello:

What's the status of this issue? I'm just pinging old issues. Is this possibly related to #98?