Bug 57819 - Ifup script doesn't set MACADDR correctly from ifcfg-eth*
Summary: Ifup script doesn't set MACADDR correctly from ifcfg-eth*
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 7.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-12-24 23:14 UTC by Sergey D
Modified: 2014-03-17 02:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-02 21:30:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Sergey D 2001-12-24 23:14:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; 

Description of problem:
When you want to change the MAC address of network card using MACADDR 
field in /etc/sysconfig/network-scripts/ifcfg-eth* - this not works.
This worked fine in 7.1 and doesn't work in 7.2

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Set MACADDR field to some valid MAC-Adress value in ifcfg-eth*
2. Run network restart
3. See, that HW address not changing. And when trying to
do: ip link set eth0 address xxxxxxxxxxxx 
in shell, you'll get the error message: "xxxxxxxxxx is invalid lladdr"


Actual Results:  HW address is not changing to the value of "MACADDR" 

Expected Results:  HW Address should be changed to "MACADDR" field value

Additional info:

Actually, the ifup script in 7.2 uses "ip" util to manage the
interfaces, while 7.1 was using "ifcfg"

So, when I use:
ip link set eth0 address 0000F4AB9D47 
I get the error message:
"0000F4AB9D47" is invalid lladdr
and the MAC address not changing.

And when I try:
ifconfig eth0 hw ether 0000F4AB9D47
Everything works fine...

So, to make things working right in 7.2, I was
forced to change the ifup script:

I'd replaced the section in /etc/sysconfig/network-scripts/ifup:
if [ -n "${MACADDR}" ]; then
 ip link set ${DEVICE} address ${MACADDR}

with this one: 

if [ -n "${MACADDR}" ]; then
  ifconfig ${DEVICE} hw ether ${MACADDR}

(As it was in 7.1)

Comment 1 Bill Nottingham 2002-01-02 04:38:15 UTC
You need to colon delimit the MAC address for /sbin/ip to use it correctly. I
honestly didn't know that that sort of address (without ':' delimiters) worked
with the old setup.

Comment 2 Sergey D 2002-01-02 21:30:03 UTC
Oh, great :)

Yes, this works.
Since I was unable to find any documentation 
in man-pages for the correct syntax of the 
MACADDR field earlier, when I've used
7.1 with /sbin/ifconfig - I found experimentally
that entry without semicolons works fine.
And I was sure that it will work
fine with new ifup scripts, that are using /sbin/ip.

I was wrong :)

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