Determining ethernet MAC address from Open Boot prompt

Today I had a need to jumpstart SunFire V240 using network interface in one of its PCI slots. In order to do that I need to find the MAC address of that interface, preferably with least amount of hassle. There was no Solaris installed and all I had was ok prompt. So I took a quick look at device aliases:

{1} ok devalias
xnet2                    /pci@1d,700000/pci@1/SUNW,hme@0,1:dhcp,
xnet1                    /pci@1e,600000/pci@3/SUNW,hme@0,1:dhcp,
xnet                     /pci@1e,600000/pci@2/SUNW,hme@0,1:dhcp,
net3                     /pci@1d,700000/network@2,1
net2                     /pci@1d,700000/network@2
net1                     /pci@1f,700000/network@2,1
net                      /pci@1f,700000/network@2
cdrom                    /pci@1e,600000/ide@d/cdrom@0,0:f
ide                      /pci@1e,600000/ide@d
disk3                    /pci@1c,600000/scsi@2/disk@3,0
disk2                    /pci@1c,600000/scsi@2/disk@2,0
disk1                    /pci@1c,600000/scsi@2/disk@1,0
disk0                    /pci@1c,600000/scsi@2/disk@0,0
disk                     /pci@1c,600000/scsi@2/disk@0,0
scsi                     /pci@1c,600000/scsi@2
sc-control               /pci@1e,600000/isa@7/rmc-comm@0,3e8
ttyb                     /pci@1e,600000/isa@7/serial@0,2e8
ttya                     /pci@1e,600000/isa@7/serial@0,3f8
name                     aliases

Starting with first net* alias I did:

{1} ok cd /pci@1d,700000
{1} ok ls
f00f8dac network@1
f00b3274 network@2,1
f00acbf4 network@2
{1} ok cd network@1
{1} ok ls
{1} ok pwd
/pci@1d,700000/network@1
{1} ok .properties
assigned-addresses       82000810 00000000 00600000 00000000 00200000
82000830 00000000 00100000 00000000 00100000
d-fru-len                00000000
d-fru-off                0000e800
d-fru-dev                eeprom
s-fru-len                00000800
s-fru-off                0000e000
s-fru-dev                eeprom
compatible               pci108e,abba.11
pci108e,abba
pciclass,020000
pciclass,0200
reg                      00000800 00000000 00000000 00000000 00000000
02000810 00000000 00000000 00000000 00200000
02000830 00000000 00000000 00000000 00100000
address-bits             00000030
max-frame-size           00004000
device_type              network
name                     network
local-mac-address        00 03 ba 4d b3 3f
version                  Sun PCI Gigaswift Base-X FCode 2.6 01/09/27
phy-type                 pcs
board-model              501-5524
model                    SUNW,pci-ce
fcode-rom-offset         00000000
66mhz-capable
fast-back-to-back
devsel-speed             00000002
latency-timer            00000040
cache-line-size          00000010
max-latency              00000040
min-grant                00000040
interrupts               00000001
00000002
00000003
00000004
class-code               00020000
revision-id              00000011
device-id                0000abba
vendor-id                0000108e

The MAC address of the network interface is shown in local-mac-address field above. All it took then was following boot command to get jumpstart going:

{1} ok boot /pci@1d,700000/network@1 -v - install nowin

Posted on June 3, 2008 at 19:02 by somedude · Permalink
In: networking, openboot, sun hardware

5 Responses

Subscribe to comments via RSS

  1. Written by Venugopal
    on May 7, 2010 at 11:01
    Reply · Permalink

    banner command at ok prompt will give mac address
    ok> banner

    • Written by somedude
      on May 7, 2010 at 13:50
      Reply · Permalink

      If I remember right, that’s the mac address of the primary onboard interface. It will not give you mac address if you have an ether card stuck in one of the PCI slots for example…

  2. Written by unixman
    on September 1, 2013 at 18:58
    Reply · Permalink

    There is no “network@1” in the output from devalias.

    if you set local-mac-address? to true, plugin your Ethernet cable and then watch networking packets by doing a “watch-net all”. You can then see to which MAC address your cable is connected.

    There is also a “show-nets” command at the OPB.
    This combination makes it possible to detect from where you
    would network boot.

    What you suggested works also. Es

    • Written by somedude
      on September 2, 2013 at 08:35
      Reply · Permalink

      Depends on the hardware you have. Thanks for the other tips, also. Somedude

  3. Written by northernmunky
    on August 18, 2014 at 21:00
    Reply · Permalink

    On OBP 4.30.0 on my T1000, its slightly different…you use devalias… in my instance I have 4 on board ports… for the 1st one its in the banner or I can check the net0 alias already setup which is as follows..

    ok> cd /pci@7c0/pci@0/network@4
    ok> .properties (shows the mac address on the 1st and 2nd line of the output)

    you can do this for all the other remaining ports via their appopropaite paths!

Subscribe to comments via RSS

Leave a Reply