Summary: Manually setting nic speed / duplex problem Solaris 9

From: Kirkland, Mike # IHTUL <mike.kirkland_at_ndchealth.com>
Date: Wed Dec 10 2003 - 17:23:23 EST
First thanks to all the people who replied: Vinnie German, Alan Fox, Mike
Demarco, joe_flethcer@btconnect.com, Chad Johnson, Darren Dunham,
john@jc.homeunix.net, ed.rolison@jtc.alstom.com, Eric Voisard, Matthew
Hallam, David Harrington, I hope I did not left anyone off.

My original problem was -

I have a sunfire v120 running solaris 9.
I manually set the speed on the nic card you can use the following command:

ndd -set /dev/eri adv_autoneg_cap 0
ndd -set /dev/eri adv_10hdx_cap 0
ndd -set /dev/eri adv_10fdx_cap 0
ndd -set /dev/eri adv_100hdx_cap 0
ndd -set /dev/eri adv_100fdx_cap 1

I also added this to the /etc/system file to make to setting permenant So it
would be set correctly on reboot.

set eri:eri_adv_100fdx_cap=1
set eri:eri_adv_100hdx_cap=0
set eri:eri_adv_10fdx_cap=0
set eri:eri_adv_10hdx_cap=0
set eri:eri_adv_autoneg_cap=0

But when I rebooted the server and checked to nic configuration, all the
setting were reset to 1

ndd -get /dev/eri adv_autoneg_cap
1
ndd -get /dev/eri adv_10hdx_cap 
1
ndd -get /dev/eri adv_10fdx_cap 
1
ndd -get /dev/eri adv_100hdx_cap 
1
ndd -get /dev/eri adv_100fdx_cap 
1

Anything thoughts on what might be causing this to happen?
Also I have an older ultra 1 that has solaris 9 loaded on it. It's nic is
the /dev/le0 type
When I try to check the nic speed / settings I get this error any thoughts?

ndd -get /dev/le adv_10fdx_cap
Operation failed: Invalid arguement



The answer about the le0 is the easy part and submitted by Darren:

The le driver does not support the 'ndd' interface.
It doesn't matter though.  The le driver is 10mb/s, half-duplex only. The
adapter does not support any form of autonegotiation.



The rest of the question is answered in various forms from the rest of the
group but can be summarized as follows:

To set the settings by hand without reboot use do this
You may need to set the instance. E.g.

ndd -set /dev/eri instance 0
ndd -set /dev/eri adv_10hdx_cap 0
ndd -set /dev/eri adv_10fdx_cap 0
ndd -set /dev/eri adv_100hdx_cap 0
ndd -set /dev/eri adv_100fdx_cap 1
ndd -set /dev/eri adv_autoneg_cap 0

Note that the "adv_autoneg_cap" should be the LAST entry.

Dbh

The settings in the /etc/system to make it permanent on reboot put the in
/etc/system this way:
If you have an hme or qfe interface notice that the eri interface variable
are set
differently versus hme/qfe interface format of    set
hme:hme_adv_autoneg_cap=0 as Matt states.

set eri:adv_100fdx_cap=1
set eri:adv_100T4_cap=0
set eri:adv_100hdx_cap=0
set eri:adv_10fdx_cap=0
set eri:adv_10hdx_cap=0
set eri:adv_autoneg_cap=0

ie without the "eri_" prefix on each one.. Sun have been inconsistent 
here given that you have to use hme_ and qfe_ prefixes on their hme and 
qfe interfaces

hope this helps
Matt


I checked and we do not have another script that is overwriting the values
from /etc/system at startup as pointed by Eric.
Are you sure your /etc/system settings aren't overridden by some other
startup script? Here, we have a script in /etc/rc2.d to force the nic card's
settings...

Yours, Eric Voisard

Also ensure you have the correct interface instance set to see the settings:
Do you have more than one NIC?
Because if you do, you might have to do an 'ndd -set instance [1|0]'

HTH
Ed Rolison

Another tip is to see all the varibles available of the /dev/eri device
follow JC's advice.
also, with checking interfaces try: ndd -get /dev/eri \? 
and my sure you instance is set correctly... You should be able to check and

change the ones that say (read and write) if you have not made them perm. in
the 
/etc/system file.  Hope this helps.
JC

Another method as pointed out by Chad Johnson:
The driver looks for the <driver>.conf file on boot by default.

Yeah, what I meant is that when you enter information into the eri.conf file
you dont have to state the 'ndd -set /dev/eri' info since it knows it is for
all devices and it know it is for eri (eri.conf).

If you put this:

adv_autoneg_cap 0
adv_100T4_cap  0
adv_10fdx_cap  0
adv_10hdx_cap 0
adv_100hdx_cap 0
adv_100fdx_cap 1
 
into /kernel/drv/sparcv9/eri.conf and reboot all devices should be set from
that point on.  Then the S99 files can be use to make changes on a  per
interface basis.  So if you had eri0,eri1 and eri2 they would all be set to
100 full duplex, but you could override that for any one with the S99 file.
Say eri1 had to be 10 half duplex, you only put the entries for that in the
S99 file to change just that one and the others would still be defaulted to
100/full duplex.

Also, as a side note, it is normal convention to place the startup script in
/etc/init.d and then link back to it with a symbolic link.  So you would
have /etc/init.d/netcfg.eri and then would do 'ln -s /etc/init.d/netcfg.eri
/etc/rc3.d/S99netcfg.eri'.

Hope this helps.

Another helpful tool is the setndd.sh by Mike Dermarco
#! /bin/sh

# read all interface configs from system

echo "setting all network interfaces to 100/Full"

types="hme|qfe|eri|ce|dmfe|bge"

iface=`/usr/sbin/ifconfig -au | egrep $types | awk -F: '{ print $1 }'`

# this will not do interfaces above single digits
for interface in ${iface}
do
    driver=`echo ${interface} | sed "s/[0-9]//"`
    instance=`echo ${interface} | sed "s/[a-z]*//"`
    if [ "$driver" = "bge" ] || [ "$driver" = "dmfe" ] ; then
        driver="$driver$instance"
    else
        /usr/sbin/ndd -set /dev/${driver} instance ${instance}
    fi
    /usr/sbin/ndd -set /dev/${driver} adv_1000fdx_cap 0
    /usr/sbin/ndd -set /dev/${driver} adv_1000hdx_cap 0
    /usr/sbin/ndd -set /dev/${driver} adv_100fdx_cap 1
    /usr/sbin/ndd -set /dev/${driver} adv_100hdx_cap 0
    /usr/sbin/ndd -set /dev/${driver} adv_10fdx_cap 0
    /usr/sbin/ndd -set /dev/${driver} adv_10hdx_cap 0
    /usr/sbin/ndd -set /dev/${driver} adv_autoneg_cap 0
done

echo "All network interfaces have been set to 100/Full"

This can be adapted to your particular interface type.

I made the setting changes in the correct places but it did not fix my
problem I'm having, but since there was so much good info that others might
find helpful, I will summarize this and start another question thread about
incoming packet errors and how to find the source of that problem.

Thanks to all.


This E-Mail message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply E-Mail, and destroy all copies
of the original message.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Dec 10 17:23:12 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:25 EST