Just a reminder to myself about the important bits of the ndd command. This controls many driver parameters, but here the network settings are of concern ... such as whether to autonegotiate or not.
Given a driver name (such as /dev/hme ... note the lack of a number) and a parameter, ndd will display a value indicating what that parameter is set to. As an example, ndd /dev/hme link_status will indicate whether the network hardware believes there is a valid link or not.
The following parameters are also useful :-
Name | Meaning of 0 | Meaning of 1 |
---|---|---|
link_speed | 10Mbps | 100Mbps |
(gigabit interfaces will show the real speed) | ||
link_mode | Half duplex | Full duplex |
adv_autoneg_cap | Off | On |
By default, ndd operates on the first associated device. If you have multiple hme interfaces you want to control, you have to set an appropriate instance with the ndd command.
ndd -set /dev/hme instance 1 will associate all future relevant ndd commands to the 2nd hme device. The command ndd /dev/hme instance will display the current instance.
In some cases (especially with some Cisco switches), autonegotiation fails to set the speeds at either end appropriately which results in abysmal network performance. This may not be immediately obvious when a system is not under intense network load, but is still worth checking into.
Checking the output of netstat -i will display a series of numbers for each interface; the second from last number (in theory under the "Collis" heading) is the number of collisions. This number should be 0 (or close to 0) for all modern networks; if high it indicates a possible problem.
At which point you should use the commands detailed in the previous section, and the relevant commands on your switch to find out what each side thinks the speed is, and whether full-duplex is being used. If a mismatch is apparent, you will need to fix these parameters on the Sun system, and probably the switch as well.
The following settings in the file /etc/system will fix all hme interfaces to 100Mbps full duplex :-
set hme:hme_adv_autoneg_cap=0 set hme:hme_adv_100hdx_cap=0 set hme:hme_adv_100fdx_cap=1