Monitoring, Management & Location Tracking

How to check which NIC on Airwave server is mapped to which eth port in Linux?

If you want to change the mapping of Ethernet interface to physical port you can do the following.

1) Check the Hardware address to Ethernet port mapping

[root@localhost mercury]# ifconfig -a | grep -i HW
eth0      Link encap:Ethernet  HWaddr 00:50:56:9D:12:15
eth1      Link encap:Ethernet  HWaddr 00:50:56:9D:6D:5E

2) Modify the HWADDR of the file below

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
IPV6INIT=no
NM_CONTROLLED=no
ONBOOT=yes
IPADDR=10.162.118.200
NETMASK=255.255.255.0
GATEWAY=10.162.118.1
HWADDR=00:50:56:9D:12:15

Make sure no other ifcfg-eth1 or ifcfg-eth2 files are using that MAC address which you are going to replace it with. For my example I replaced eth1 HW address in step 1 with eth0 HW address so the above file will look as

DEVICE=eth0
BOOTPROTO=none
IPV6INIT=no
NM_CONTROLLED=no
ONBOOT=yes
IPADDR=10.162.118.200
NETMASK=255.255.255.0
GATEWAY=10.162.118.1
HWADDR=00:50:56:9D:6D:5E

I also modified /etc/sysconfig/network-scripts/ifcfg-eth1 so that ifcfg-eth1 and ifcfg-eth0 do not have the same MAC.

3) Once done, you will have to reboot the system. Restarting the network service won't work

shutdown now -r

This will map eth0 to any Hardware address that you want.

 

Troubleshooting :

 

Check the following files

1) /etc/sysconfig/network-script/ifcfg-eth0

Check MAC Address and verify if we have connected to the correct NIC

DEVICE=eth0
BOOTPROTO=none
IPV6INIT=no
NM_CONTROLLED=no
ONBOOT=yes
IPADDR=10.162.118.200
NETMASK=255.255.255.0
GATEWAY=10.162.118.1
HWADDR=00:50:56:9D:12:15

Similarly check for other interfaces as well ifcfg-eth1, ifcfg-eth2 and so on.

2)  cat /etc/udev/rules.d/70-persistent-net.rules

Check which NIC is mapped to which MAC and ethernet interface as shown below

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:9d:6d:5e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:9d:12:15", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

3) Check arp -a to see if we have an entry for the gateway

4) Connect all hardware ports one by one if you still cannot establish connectivity to the server

Version History
Revision #:
1 of 1
Last update:
‎07-05-2014 05:29 PM
Updated by:
 
Labels (1)
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.