SUMMARY: Will "ndd -set adv_autoneg_cap 1" ignore the other ndd commands running before it?

From: John Lee <thesunlover2002_at_yahoo.com>
Date: Mon May 20 2002 - 09:53:40 EDT
Thanks: Anthony Miller
(anthony.miller@vf.vodafone.co.uk), "Darren Dunham"
<ddunham@taos.com>, "Homan, Charles (NE)"
<Charles.Homan@GDC4S.Com>, McCaffity, Ray
(Contractor)"<McCaffityR@epg.lewis.army.mil>,
Simon-Bernard Drolet" <sxi@sympatico.ca>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Question:
>From my last question about ndd, I got two
enlightening answers:
1) "ndd -set /dev/qfe adv_autoneg_cap 0" will
reinitialize the interface. Your interface will
probably go offline for 3~4 seconds when it does so.
(Darren Dunham)
2) "ndd -set /dev/qfe adv_autoneg_cap 0" actually
forces the interface to reset its speed. (Martin
Hepworth)
Here is my new question: Will "ndd -set /dev/qfe
adv_autoneg_cap 1" ignore the other ndd commands
running before it? For example:
# ndd -set /dev/qfe instance 3
# ndd -set /dev/qfe adv_100fdx_cap 1
# ndd -set /dev/qfe adv_100hdx_cap 1
# ndd -set /dev/qfe adv_10fdx_cap 1
# ndd -set /dev/qfe adv_10hdx_cap 1
# ndd -set /dev/qfe adv_autoneg_cap 1
Will the last command " ndd -set /dev/qfe
adv_autoneg_cap 1" ignore all the previous ndd
commands? Will the last command "ndd -set /dev/qfe
adv_autoneg_cap 1" just go to communicate with the hub
connecting to the qfe port 3 and set the proper
parameters based on the communication with the hub?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Answer 1 - From Darren Dunham:
>From a functional view, that's basically correct. ndd
doesn't 'ignore' anything. It's just passing it along
to a driver. The driver when set to "autonegotiate"
may choose to ignore the settings of the other
advertisements. From my understanding, it does just
that, but if it's important in your environment, you'd
want to test it before relying on it.
Setting 'adv_autoneg_cap' to anything (even the
current value) appears to cause the driver to check
all current settings and reinitialize the interface
based upon them. So if your changing them, changing
that one last is usually a good idea.
> Will the last command " ndd -set /dev/qfe
adv_autoneg_cap 1" just go to communicate with the hub
connecting to the qfe port 3 and set the proper
parameters based on the communication with the hub?
It will try to. Whether or not that setup is
successful depends on a variety of things including
the capability of programmers on the sun hardware and
software side, and on the side of the other switch
(not hub) that you're talking to. (If you're talking
to a hub, it may or may not do autonegotiation, but it
doesn't do full duplex).

Answer 2 - From Homan, Charles (NE):
I'm not absolutely positive, but I believe that the
adv_autoneg_cap only tells the interface whether to
auto-negotiate or not. The other command still define
what are "valid" speeds/modes to negotiate to. Check
out this link:
http://abelew.web.wesleyan.edu/docs/explainhme0.html.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anthony Miller (anthony.miller@vf.vodafone.co.uk)
wrote a long answer for my previous question:
Have attached a script that we use to set up
interfaces. Its kinda generic but good because it
makes setting up qfe's etc easy:
Create the script /etc/rcS.d/S32sunps.ndd containing
the following code. Ensure it is owned by root:sys
with permission 744.
Change the variables n100H (100Mb half-duplex) and
n100F (100Mb full duplex) as appropriate.

#!/bin/sh
# /etc/rcS.d/S32sunps.ndd
# set the speed as defined
# for all the ports on QFE cards 0 and 1 (qfe 0-7)

n100H="1 2 4 5 6 7"
n100F="0 3"
n10F=""
n10H=""
AUTO=""

for nic in $n100F
do
   ndd -set /dev/qfe instance ${nic}
   ndd -set /dev/qfe adv_100fdx_cap 1
   ndd -set /dev/qfe adv_100hdx_cap 0
   ndd -set /dev/qfe adv_10fdx_cap 0
   ndd -set /dev/qfe adv_10hdx_cap 0
   ndd -set /dev/qfe adv_autoneg_cap 0
done

for nic in $n100H
do
   ndd -set /dev/qfe instance ${nic}
   ndd -set /dev/qfe adv_100fdx_cap 0
   ndd -set /dev/qfe adv_100hdx_cap 1
   ndd -set /dev/qfe adv_10fdx_cap 0
   ndd -set /dev/qfe adv_10hdx_cap 0
   ndd -set /dev/qfe adv_autoneg_cap 0
done

for nic in $n10F
do
   ndd -set /dev/qfe instance ${nic}
   ndd -set /dev/qfe adv_100fdx_cap 0
   ndd -set /dev/qfe adv_100hdx_cap 0
   ndd -set /dev/qfe adv_10fdx_cap 1
   ndd -set /dev/qfe adv_10hdx_cap 0
   ndd -set /dev/qfe adv_autoneg_cap 0
done

for nic in $n10H
do
   ndd -set /dev/qfe instance ${nic}
   ndd -set /dev/qfe adv_100fdx_cap 0
   ndd -set /dev/qfe adv_100hdx_cap 0
   ndd -set /dev/qfe adv_10fdx_cap 0
   ndd -set /dev/qfe adv_10hdx_cap 1
   ndd -set /dev/qfe adv_autoneg_cap 0
done

for nic in $AUTO
do
   ndd -set /dev/qfe instance ${nic}
   ndd -set /dev/qfe adv_100fdx_cap 0
   ndd -set /dev/qfe adv_100hdx_cap 0
   ndd -set /dev/qfe adv_10fdx_cap 0
   ndd -set /dev/qfe adv_10hdx_cap 0
   ndd -set /dev/qfe adv_autoneg_cap 1
done

# eof

Reboot the system then use dmesg again (as above) to
confirm that all interfaces are configured
appropriately.

Note: The following commands can be used interactively
to check the configuration settings of network
interfaces should dmesg output nolonger be available.

Use the netstat utility to confirm which network
interfaces have been configured.
# netstat -i

Select an interface and query all configuration
parameters:
# ndd /dev/qfe \? | more

Select an interface you are interested in  and query
the  specific
configuration parameter you are interested in (all
available parameters 
are shown in above).  The example below uses interface
qfe0 (qfe instance 0) and parameter adv_100fdx_cap
(100Mbits full duplex). An output of 1 indicates
parameter is on/set and a 0 indicates it is off):
# ndd -set /dev/qfe instance 0
# ndd /dev/qfe adv_100fdx_cap 1
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon May 20 10:07:41 2002

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