Bug 193133 - ifup does not like layered IPs on vlan interface
ifup does not like layered IPs on vlan interface
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts (Show other bugs)
4.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Miloslav Trmač
Brock Organ
:
Depends On:
Blocks: 176344
  Show dependency treegraph
 
Reported: 2006-05-25 11:44 EDT by Jake Garver
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0303
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 13:29:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch committed to rawhide (1.74 KB, patch)
2006-07-27 23:50 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Jake Garver 2006-05-25 11:44:18 EDT
In /etc/sysconfig/network, VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD, so my interface
for vlan 120 is named "vlan120".  I had to do this to work around a SteelEye
LifeKeeper bug.

When I try to create "vlan120:0" and don't define PHYSDEV, I get: 
[root@dev1dba1 ~]# ifup vlan120:0
PHYSDEV should be set for device vlan120:0

[root@dev1dba1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120:0
DEVICE=vlan120:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.22
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31

So, I put a PHYSDEV in (which is bond0 in my case) and now I get:
[root@dev1dba1 ~]# ifup vlan120:0
ERROR: trying to add VLAN #120 to IF -:bond0:-  error: Invalid argument
SIOCSIFFLAGS: Cannot assign requested address

But the interface comes up correctly, so I'm setting the severity of this issue
to "low" as I have a workaround that just whines a bit.

I don't think the PHYSDEV should be required and we don't need to build the vlan
interface.  So, I propose changing the regexp that looks for vlan* interfaces
before making sure we have a PHYSDEV:
71c71
<      if echo ${DEVICE} | LANG=C egrep -q 'vlan[0-9][0-9]?[0-9]?[0-9]?'; then
---
>      if echo ${DEVICE} | LANG=C egrep -q 'vlan[0-9][0-9]?[0-9]?[0-9]?[^:]*$'; then

This leaves me with the SIOCSIFFLAGS error:
[root@dev1dba1 network-scripts]# ifup vlan120:0
SIOCSIFFLAGS: Cannot assign requested address

I tracked this down to "/sbin/ip link set dev ${DEVICE} down" in the Bonding
initialization.  The interface under vlan120 is bond0.  Ethtool reports the
driver as bonding, so ifup bounces the interface.
[root@dev1dba1 ~]# ethtool -i vlan120:0
driver: bonding
version: 2.6.1
firmware-version: 2
bus-info:

I don't think we need to bounce layered IPs, so I skip it for bonding interfaces
with colons in the name:
231,237c231,239
<     /sbin/ip link set dev ${DEVICE} down
<     /sbin/ip link set dev ${DEVICE} up
<     for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}"
/etc/sysconfig/network-scripts/ifcfg-*` ; do
<         if [ "$BOOTPROTO" = "dhcp" ]; then
<               /sbin/ifup ${device##*/}
<       fi
<     done
---
>     if echo ${DEVICE} | LANG=C egrep -q '^[^:]*$'; then
>         /sbin/ip link set dev ${DEVICE} down
>         /sbin/ip link set dev ${DEVICE} up
>         for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}"
/etc/sysconfig/network-scripts/ifcfg-*` ; do
>             if [ "$BOOTPROTO" = "dhcp" ]; then
>                 /sbin/ifup ${device##*/}
>             fi
>         done
>     fi

Now ifup brings up the layed IP with no errors.


My complete config:
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.33.51
NETWORK=10.42.32.0
NETMASK=255.255.254.0
BROADCAST=10.42.33.255
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120
DEVICE=vlan120
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.1
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31
PHYSDEV=bond0
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120:0
DEVICE=vlan120:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.22
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dev1dba1
NOZEROCONF=yes
VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
Comment 1 Bill Nottingham 2006-05-25 12:39:40 EDT
Aliases on top of vlan on top of bonding? Honestly, I'm not sure we tried that
before. Patch seems reasonable at first glance.
Comment 2 Miloslav Trmač 2006-05-28 21:48:45 EDT
Both huunks should probably use $ISALIAS, and move the checks to upper-level
conditions.
Comment 3 Miloslav Trmač 2006-07-27 23:50:08 EDT
Created attachment 133213 [details]
Patch committed to rawhide
Comment 4 RHEL Product and Program Management 2006-08-18 11:48:13 EDT
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 6 Bill Nottingham 2006-11-20 16:26:21 EST
Added in CVS, will be in 7.93.26.EL-1.
Comment 10 Red Hat Bugzilla 2007-05-01 13:29:33 EDT
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 the 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-2007-0303.html

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