[Linux][自分用メモ] 「Device eth0 has different MAC address than expected, ignoring」の対処。

AIX、UNIX、Linux

知識が無いのをひけらかすようで情けないのですが、備忘録として残しておきます。

CentOS 6.3環境で、古くなった筐体から新しい筐体にHDDだけ移植した形で出た問題で、起動してネットワークが繋がらないなと思い、Networkサービスの再起動を実施したところ以下のメッセージが。

Device eth0 has different MAC address than expected, ignoring

そういえばMACアドレスをifcfgファイルに書いていたことを思い出し、現在のNICのMACアドレスに修正して再起動しましたが起動せず。
dmesgを確認したところ以下のメッセージが出力されていました。

Dec 12 09:03:07 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:03:08 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:03:33 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:03:34 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:04:07 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:04:08 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:04:35 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:04:36 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:07:55 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:07:56 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:08:24 diana /etc/sysconfig/network-scripts/ifdown-eth: Device br0 has MAC address 06:54:0B:6E:07:91, instead of configured address 00:26:2D:F4:12:85. Ignoring.
Dec 12 09:08:25 diana /etc/sysconfig/network-scripts/ifup-eth: Device br0 has different MAC address than expected, ignoring.
Dec 12 09:09:11 diana kernel: e1000e 0000:00:19.0: eth0: MAC: 7, PHY: 8, PBA No: 1008FF-0FF

なんでかなー、と思って調べてみたところ以下のrulesファイルの修正が必要ということが分かりました。

/etc/udev/rules.d/70-persistent-net.rules

覗いてみると、ーーなるほど、ここでMACアドレスとNICを紐付けていることが分かりました。

# 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 0x14e4:0x170c (b44)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:18:8b:aa:1c:22", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:18:de:cc:bb:dd", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x8086:0x10f5 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:2d:f4:12:85", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x423b (iwlwifi)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:eb:20:77:44", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

ということで古い筐体の要らないNICについてはコメントアウト(または削除)し、OSを再起動することで問題なくNetworkサービスを起動することができました。
こういう作業を実施するときは事前に確認しないといけないですね・・・

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました