TechNote: Checking and Setting SUNW,hme Network Card Properties


Sun Microsystem's Fast Ethernet network card (NIC) is one of the most commonly encountered pieces of hardware on a Solaris system. The card, frequently known as an "hme card", after its device driver /dev/hme, has many options which can be both queried and set. These options affect the fundamental functions of the card, such as it's duplex and line speed settings. Presented here are some of the most common tasks an administrator encounters when dealing with the hme cards.

What settings are the NIC currently using?

The first task is to set the instance of the network card you are querying. This is only necessary if there are multiple instances of the hme card on the system. Instance numbers start at 0 and increment. For example, hme0 would be instance 0 and hme1 would be instance 1.
/usr/sbin/ndd -set /dev/hme instance 0
To find whether the card is using its onboard transceiver or its MII interface, use the following:
/usr/sbin/ndd -get /dev/hme transciever_inuse
A value of 0 indicates the onboard transceiver, while a 1 indicates the MII interface is being used.
To find the link status of the card, use the following command:
/usr/sbin/ndd -get /dev/hme link_status 
A value of 0 indicates the link is down, while a value of 1 indicates the link is up.
To find the speed and duplex of the card's link, use the folllowing two commands:
/usr/sbin/ndd -get /dev/hme link_speed
/usr/sbin/ndd -get /dev/hme link_mode
A value of 0 for link_speed indicates 10Mb/s, while a value of 1 indicates 100Mb/s operation. A value of 0 for link_mode indicates half-duplex, while a value of 1 indicates full-duplex operation.

Configuring NIC Capabilities

Being able to configure the manner in which the network card will operate is important. Frequently, the autonegotiate method of determining link speed and mode does not work between different manufacturer's equipment, making it necessary to force the proper mode on the network card (and on the remote end of the link).
There are several modes which the card is capable of using. The mode names as identified by the ndd command are as follows:

For each of these capabilities, a state of 0 indicates an 'off' state, while 1 indicates an 'on' state. When configuring the card's capabilties it is a good idea to set the correct capability to 'on' first, followed by each of the unused modes to 'off'. The adv_autoneg_cap should always be turned off last, as the card will renegotiate its link with its partner at this time.

Configuring Link Partner Capabilities

Configuring the capabilties of the link partner is similar to configuring the actual NIC's capabilties. Once again, a setting of 0 indicates 'off', while a setting of 1 indicates 'on'.