X
76 Rate this article:
No rating

[Internal] Changing an Ethernet Mac Address Mapping from 'eth1' to 'eth0'

David Blackston

Probably a half-dozen times per year we encounter ITT Visual Information Solutions licensees, whose FLEXnet-compatible Ethernet cards are mapped to their system's 'eth1' device ID rather than to 'eth0'. FLEXnet software is only designed to query the 'eth0' device, so this is a crippling problem to a non-eval ITT VIS product installation. Luckily, the mapping of the 'eth...' devices is user-configurable. This Tech Tip filters and synthesizes the content of several Linux-expert tips that we have encountered on the Internet and tested successfully with our customers.

Note: None of these tips have been tested on UNIX systems other than Linux - probably due to a shortage of reports of this problem from other O.S. customers. Nevertheless, some or all of the workaround tips listed here may extrapolate to other UNIX O.S.'s.

Warning: The information contained in this article are suggestions ONLY and may not provide an appropriate solution for the platform or environment you are using. Remember, always make a backup of any configuration files prior to making changes. All code and examples are provided "AS IS". ITT Visual Information Solutions is not responsible for any loss of data, down time, or system crashes resulting from the use of the information contained herein or any other Tech Tip article. Please consult your systems documentation or your Administrator for further information or assistance.

Discussion
How do we detect that the mapping of the Ethernet card to 'eth0' might be a problem? The primary tell-tale sign, of course, is that either the commands "lmgrd" or "idl"/"idlde" will issue an error about the invalidity of the current "LM Host ID" or "Ethernet Mac address". The follow-up debug test is to run the command "$IDL_DIR/bin/lmhostid". If the return value is a) "0", b) "ffffffffffff", c) a string less than 6 or greater than 12 characters in length, or d) a string containing non-hexadecimal-valid characters, then this is evidence of a potential 'eth0' mapping problem.

The final test at that point is to check the output of the UNIX network configuration querying command "/sbin/ifconfig -a". It is common to see at least two blocks of data in that output, one for the 'eth0' "primary" Ethernet card device, a second for the 'lo' Local Loopback address (an IP address useful for intra-host TCP/IP port messaging). These blocks of data can tell you definitively if the Ethernet card, whose Mac and IP address you would like to use for licensing management communications, is mapped to 'eth0' or not. If you see that it is mapped to 'eth1' (or higher) and that 'eth0' is mapped to a device, whose 'HWaddr' did not have a traditional 6-hex-character-pair, colon-delimited address (or to another Ethernet card whose matching IP address is not appropriate for licensing management communications), then you have a problem that can probably be most expediently solved by remapping your 'eth1' device to 'eth0'.

The first comprehensive source for options on how to perform this remapping is an article named "Changing MAC addresses" at URL:

Generally, we expect the advice in the Wikisource article "Changing MAC addresses" to work. With Donald I was able to at least confirm that Fedora's boot script for networking does indeed still have the Fedora-specific unique name "network" and that it stops and starts with these commands:

/etc/init.d/network stop
/etc/init.d/network start

The following critical step after the network stop, running the command:

ip link set eth0 address 02:01:02:03:04:08

threw an error message, however. (I forgot to record the exact message.) Eventually, we figured out that the above probably was failing because there was NO mapping for 'eth0' in Donald Walters' machine. Probably these other link commands you tried earlierwith Donald failed for the same reason. I bet this is unusual. Most of our customers who have troubles with 'eth0', I think, have trouble because it is mapped to something that is not useful for 'lmgrd', NOT because they have no 'eth0'. However, this missing 'eth0' may be more common than I think.

In any case, I discovered in another Web article that, at least on Fedora, a file named "/etc/sysconfig/network-scripts/ifcfg-eth0" plays an important role in creating the 'eth0' mapping on a Linux machine. Donald did not have this file; he had only '/etc/sysconfig/network-scripts/ifcfg-eth1'. Through trial and error we were able to fix Donald's problem with 'eth0', 'lmhostid' and 'lmgrd' through these steps:

Step 1: Stop the network devices that are mapped in the current 'ifconfig -a' output:

/etc/init.d/network stop

Step 2: Open '/etc/sysconfig/network-scripts/ifcfg-eth1' in a text editor, find the line that reads "DEVICE=eth1" and change that to "DEVICE=eth0". Save and close.

Step 3: Rename the file from "ifcfg-eth1" to "ifcfg-eth0":

mv /etc/sysconfig/network-scripts/ifcfg-eth1 \
/etc/sysconfig/network-scripts/ifcfg-eth0

Step 4: Restart the network daemon(s):

/etc/init.d/network start

This accomplishes replacing 'eth1' with 'eth0', you see this immediately in the new output of "ifconfig -a". 'lmhostid' can now find the network card, and that makes 'lmgrd' happy.