答复: Find MAC address stored in NIC firmware
frankzou
frankzou at sz.cntrans.cn
Sat Oct 16 03:49:25 UTC 2010
DEAR:
On Sun Machine you can use command "banner" in OK mode.
MSN:xiangdongzou2006 at hotmail.com
-----邮件原件-----
发件人: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com] 代表 Phebe_Mertes at aotx.uscourts.gov
发送时间: 2010-10-16 5:02
收件人: General Red Hat Linux discussion list
主题: Re: Find MAC address stored in NIC firmware
redhat-list-bounces at redhat.com wrote on 10/15/2010 03:17:41 PM:
> From: Yong Huang <yong321 at yahoo.com>
> To: redhat-list at redhat.com
> Date: 10/15/2010 03:50 PM
> Subject: Find MAC address stored in NIC firmware
> Sent by: redhat-list-bounces at redhat.com
>
> The MAC address of an Ethernet network card can be changed with
> ifconfig or ip command. Correct me if wrong. But I think the real
> hardware address stored in the NIC firmware is not changed. How do I
> find the real MAC address? I checked ifconfig, ip, lspci, dmidecode,
> /sys/class/net/..., and ethtool. Most report whatever is shown by
> ifconfig, which could have been altered. The only possible solution
> is to dump EEPROM of NIC.
>
> For NIC using e1000 driver:
>
> # ifconfig eth3 | grep HW
> eth3 Link encap:Ethernet HWaddr 00:11:0A:56:81:B1
> <-- We changed it to this earlier.
> # ethtool -e eth3 | head -3 <-- dump EEPROM
> Offset Values
> ------ ------
> 0x0000 00 11 0a 56 81 b0 30 05 ff ff ff ff ff ff ff ff
> <-- first 6 bytes are HW address 00:11:0a:56:81:b0
> # ifconfig eth3 hw ether 00:11:0a:56:81:ff <-- assign an arbitrary
one
> # ifconfig eth3 | grep HW
> eth3 Link encap:Ethernet HWaddr 00:11:0A:56:81:FF
> <-- ifconfig is fooled
> # ethtool -e eth3 | head -3
> Offset Values
> ------ ------
> 0x0000 00 11 0a 56 81 b0 30 05 ff ff ff ff ff ff ff ff
> <-- but firmware ignores it
> # ifconfig eth3 hw ether 00:11:0a:56:81:b1 <-- temporarily change it
> back to what we had
> # ll /sys/class/net/eth3/device/driver/ | grep module
> lrwxrwxrwx 1 root root 0 Oct 14 21:29 module -> ../../../../
> module/e1000 <-- driver for it is e1000
> # ethtool -i eth3 <-- another way to check driver
> driver: e1000
> version: 7.3.21-k4.1-NAPI
> firmware-version: N/A
> bus-info: 0000:06:01.1
>
> For a NIC using tg3 or bnx2 driver, the command has to be `ethtool -
> e eth1 length <some number>', otherwise I would get "Cannot get
> EEPROM data: Cannot allocate memory". Then the hw address is in the
> data or value column starting at some offset. The command output is
> long so has to be saved in a file to be view'ed with vi.
>
> Question: What's the correct way to find the original manufacturer's
> MAC address of an Ethernet card?
>
> Yong Huang
On and HP server running RHEL5 you can search for the Ethernet controllers
in this output
/sbin/lspci -vv | more
[snip]
03:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709
Gigabit Ethernet (rev 20)
Subsystem: Hewlett-Packard Company NC382i Integrated Quad Port PCI
Express Gigabit Server Adapter
[snip]
Link: Supported Speed 2.5Gb/s, Width x4, ASPM L0s L1, Port
0
Link: Latency L0s <4us, L1 <4us
Link: ASPM Disabled RCB 64 bytes CommClk- ExtSynch-
Link: Speed 2.5Gb/s, Width x2
**** Capabilities: [100] Device Serial Number 46-1b-8e-fe-ff-d1-e7-78
Capabilities: [110] Advanced Error Reporting
Capabilities: [150] Power Budgeting
Capabilities: [160] Virtual Channel
## The MAC address will be 78:e7:d1:8e:1b:46
play with this on a good machine.
Had to do this when all the disks pulled from one chassis and put into the
new chasis. The disks still had the old IP's in the ifcfg-eth# files
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
__________ Information from ESET Smart Security, version of virus signature database 5086 (20100504) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 5086 (20100504) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 5086 (20100504) __________
The message was checked by ESET Smart Security.
http://www.eset.com
More information about the redhat-list
mailing list