More Sun ok> Prompt Commands

Topicsun
Courtesy of a Sun v120.

Use the following to determine the mac addresses of each interface
ok>devalias

The command above returns the following
rootdisk                 /pci@1f,0/pci@1/scsi@8/disk@0,0
lom                      /pci@1f,0/pci@1,1/ebus@c/SUNW,lomh@14,200000
dload                    /pci@1f,0/pci@1,1/network@c,1:,
net2                     /pci@1f,0/pci@1,1/network@5,1
net                      /pci@1f,0/pci@1,1/network@c,1
{truncate}

Then you can cd to the path for either net or net2 and run the following command
ok> .properties

This command returns the following for mac address
local-mac-address        00 03 ba 96 38 c0

In this case I was working to troubleshoot a jumpstart install, so I needed to see what mac address was being presented externally.

ok>printenv

printenv reveals that local mac address is set to true which means that each network interface presents it own mac. Being that I was plugged into nic 0 on this box i am also able to boot like so.

ok boot /pci@1f,0/pci@1,1/network@c,1:dhcp – install

Being specific in this way, I am taking any way chance that I have the mac address incorrect, or am plugged into the correct ethernet port.

I can verify which port has my link by doing the following from the ok prompt

ok watch-net
Internal loopback test — succeeded.
Link is  — up
Looking for Ethernet Packets.
‘.’ is a Good Packet.  ‘X’ is a Bad Packet.
Type any key to stop.
…………

If I try this on net2 is see that this link is down

ok watch-net2
Internal loopback test — succeeded.
Link is  — down

8 thoughts on “More Sun ok> Prompt Commands

  1. Hi every one I am new to Solaris I want to know hwo, how i know my machine has hme0 or eri0 or any other adopter name? at ok prompt…. for the perpuse of jump start boot entry in boot serversysidcfg file.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s