Skip to content
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

VLAN definition doesn't create correct configuration #104

Open
sandynomad opened this issue Jul 5, 2016 · 1 comment
Open

VLAN definition doesn't create correct configuration #104

sandynomad opened this issue Jul 5, 2016 · 1 comment
Assignees
Labels

Comments

@sandynomad
Copy link

Configuration file for an interface with a VLAN (ie: ifcfg-enp6s0f0.330) appears to be missing 'VLAN=yes'

The following config:

network::if::static { 'enp6s0f0.330':
ensure => 'up',
ipaddress => '10.2.3.248',
netmask => '255.255.255.0',
}

Generates:

File managed by Puppet

DEVICE=enp6s0f0.330
BOOTPROTO=none
HWADDR=....
ONBOOT=yes
HOTPLUG=yes
TYPE=Ethernet
IPADDR=10.2.3.248
NETMASK=255.255.255.0
PEERDNS=no
NM_CONTROLLED=no

However the mandatory variable 'VLAN=yes' is missing.

Refer to:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Configure_802_1Q_VLAN_Tagging_Using_the_Command_Line.html#sec-Setting_Up_802.1Q_VLAN_Tagging_Using_ifcfg_Files

@razorsedge razorsedge self-assigned this Jul 28, 2017
@razorsedge razorsedge added the bug label Jul 28, 2017
@matschundbrei
Copy link

While the RHEL Docs clearly state this, /usr/sbin/ifup on CO7 includes the 'global' /etc/sysconfig/network file upon starting (not sure about other distros in the rhel family).

For VLANs to be activated it is sufficient to use it only once in this file, and then all adapters that are matching MATCH='^.+\.[0-9]{1,4}$' and are not an alias will get the VLAN-ID from that match attached.

There is a risk because the VLAN matching will be done for each interface on the host when VLAN=yes is set in the 'global' /etc/sysconfig/network file. This might have implications on other interfaces named that way by accident, choice or habit.

I would suggest to either add define network::if::vlan or allow "VLAN=yes" to be set on interface level while removing it from global entirely.

matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 29, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 29, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 29, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
matschundbrei pushed a commit to matschundbrei/puppet-network that referenced this issue Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants