在RHEL上使用udev获取mac地址?

不知怎的,我的服务器上的eth0和eth1的ifcfg脚本在其中具有相同的HWAddr:

# Intel Corporation 82571EB Gigabit Ethernet Controller DEVICE=eth0 SLAVE=yes MASTER=bond0 HWADDR=00:1b:21:ac:ae:d2 ONBOOT=no BOOTPROTO=none TYPE=Ethernet # Intel Corporation 82571EB Gigabit Ethernet Controller DEVICE=eth1 SLAVE=yes MASTER=bond0 HWADDR=00:1b:21:ac:ae:d2 ONBOOT=no BOOTPROTO=none TYPE=Ethernet 

我如何使用udev从硬件获得正确的MAC?

启动后运行DMESG来查看正确的MAC地址,然后编辑eth0和eth1; ifconfig eth0 hw ether xx:xx:xx:xx:xx