Bug 57819 - Ifup script doesn't set MACADDR correctly from ifcfg-eth*
Ifup script doesn't set MACADDR correctly from ifcfg-eth*
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-24 18:14 EST by Sergey D
Modified: 2014-03-16 22:24 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Sergey D 2001-12-24 18:14:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; 
Q312461)

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:
Always

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" 
field.

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-01 23:38:15 EST
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 16:30:03 EST
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.