Bug 462095 - VLAN configs do not work when renaming ethernet interfaces to non-numeric.
Summary: VLAN configs do not work when renaming ethernet interfaces to non-numeric.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: Brock Organ
URL:
Whiteboard:
: 440603 (view as bug list)
Depends On:
Blocks: 676709
TreeView+ depends on / blocked
 
Reported: 2008-09-12 15:27 UTC by Jim Nelson
Modified: 2014-09-08 11:18 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If an Ethernet interface had letters in the device file name (such as ethWAN or ethVZ) instead of just numbers (such as eth0 or eth5), the /sbin/ifup script failed to enable VLANs configured on such interfaces after the network service was restarted. This bug has been fixed and the /sbin/ifup script now properly configures VLANs regardless of their names.
Clone Of:
: 676708 676709 (view as bug list)
Environment:
Last Closed: 2011-07-21 08:35:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to /sbin/ifup (986 bytes, patch)
2008-09-12 15:28 UTC, Jim Nelson
no flags Details | Diff
remove-network-device-naming-requirement-from-VLAN-names.patch (962 bytes, patch)
2011-02-10 21:17 UTC, Matt Domsch
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CentOS 3128 0 None None None Never
Red Hat Product Errata RHBA-2011:1081 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-07-21 08:33:52 UTC

Description Jim Nelson 2008-09-12 15:27:07 UTC
Description of problem:

When setting up vlans on ethernet interfaces that have letters in the device file name (ethWAN, ethVZ, ethLAN, etc) instead of numbers only (eth0, eth1, eth5, etc) running 'service network restart' fails when trying to enable the VLANs.

It also appears, looking at the /sbin/ifup script, that it will allow VLAN ID's to be specified in excess of 4095. This is not as critical an issue, though.

How reproducible:

Every time

Steps to Reproduce:
1. rename eth0 to ethLAN
2. create a ethLAN.100 config file, and enable VLANs in /etc/sysconfig/network
3. execute 'service network restart'
  
Actual results:

error messages come up when the VLANS are supposed to be configured

Expected results:

VLANS are configured

Additional info:

Attached is a patch to /sbin/ifup that fixes both the problems indicated in the summary.

Comment 1 Jim Nelson 2008-09-12 15:28:51 UTC
Created attachment 316590 [details]
Patch to /sbin/ifup

Comment 2 Bill Nottingham 2008-09-12 15:54:56 UTC
It's not really a sufficient patch - after all, you could name your devices Tom, Dick, and Harry.

Comment 3 Jim Nelson 2008-09-12 16:14:19 UTC
I'm torn - although you could, indeed, name an ethernet interface anything you want, using eth* and bond* prefixes for network interfaces is the normal way to designate these things.  Since VLANs are specific to ethernet interfaces, I'd see it as a reasonable restriction.

I could resubmit if it would make sense to open up ethernet interfaces to any name.

Comment 4 Bill Nottingham 2009-03-19 20:39:43 UTC
*** Bug 440603 has been marked as a duplicate of this bug. ***

Comment 5 Matt Domsch 2011-02-10 21:08:28 UTC
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 1eaabab..d296508 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -73,9 +73,9 @@ fi
 # Ethernet 802.1Q VLAN support
 if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then
     VID=""
-    MATCH='^(eth|hsi|bond)[0-9]+\.[0-9]{1,4}$'
+    MATCH='^.+\.[0-9]{1,4}$'
     if [[ "${DEVICE}" =~ $MATCH ]]; then
-       VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^[a-z0-9]*\.0*\([0-9]\+\)/\1/')
+       VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^.*\.\([0-9]\+\)/\1/')
        PHYSDEV=${DEVICE%.*}
     fi
     MATCH='^vlan[0-9]{1,4}?'

Comment 6 Matt Domsch 2011-02-10 21:17:45 UTC
Created attachment 478120 [details]
remove-network-device-naming-requirement-from-VLAN-names.patch

Patch removes any naming requirement on device names before adding the .1234 VLAN ID.

No sense testing for ID > 4096, vconfig will throw an error that point which the sysadmin can read just as well.

Comment 7 RHEL Program Management 2011-03-18 21:09:47 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Tomas Capek 2011-07-13 12:24:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
If an Ethernet interface had letters in the device file name (such as ethWAN or ethVZ) instead of just numbers (such as eth0 or eth5), the /sbin/ifup script failed to enable VLANs configured on such interfaces after the network service was restarted. This bug has been fixed and the /sbin/ifup script now properly configures VLANs regardless of their names.

Comment 12 errata-xmlrpc 2011-07-21 08:35:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1081.html

Comment 13 errata-xmlrpc 2011-07-21 12:39:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1081.html


Note You need to log in before you can comment on or make changes to this bug.