SUMMARY: forcing full duplex on only 1 of 5 hme interfaces using ndd

From: Adam Singer (regnis@worldnet.att.net)
Date: Thu Apr 01 1999 - 22:01:04 CST


Well thanks again to all the Sun Managers who so quickly responded:
(in order of arrival):
Stephen Tremain
Petri Kallberg
Alun P. Gwynne
Daniel Lorenzini
Ronald Loftin
Blayne Puklich
Frank Cusack
Ramindur Singh
The Wizard
Mark Hargrave

My original post is after the 3 specific examples/scripts from people
who posted.

Pretty much everyone pointed out the fact that you use the "instance"
variable to set which instance you are going to be tweaking.

Frank Cusack corrected what was my erroneous base assumption: "ndd
(with /dev/{hme,qfe}) does not affect all interfaces. Just the one
corresponding to the "instance" variable."

Also the Wizard (excerpted below) also showed me how to put this in
the /etc/system file:
>set hme2:hme_adv_100fdx_cap=1
It was just this that I was really looking for (my error to include
just ndd in the subject). It was my thinking that you would do
something like hme2, but when I tried to implement it with ndd it gave
an error. Hence within set you use one syntax while with ndd you
toggle instances. I would have preferred that ndd use the same
method, hme2, etc. so you know for sure which instance you are working
on, but your feedback helps tremendously.

thanks again for the information.
Adam Singer

The Wizard wrote:
> You can do this in the /etc/system file on a per-instance basis:
>* Set hme2 to 100BaseT/full-duplex
>*
>* Turn off auto-negotiation
>set hme2:hme_adv_autoneg_cap=0
>* Force 100BaseT/full-duplex mode on
>set hme2:hme_adv_100fdx_cap=1
>* Force 100baseT/half-duplex mode off
>set hme2:hme_adv_100hdx_cap=0
>* Force 10BaseT/full-duplex mode off
>set hme2:hme_adv_10fdx_cap=0
>* Force 10BaseT/half-duplex mode off
>set hme2:hme_adv_10hdx_cap=0

Mark Hargrave kindly forwarded me an example for setting multiple nics
that was from a previous Summary I did not see in the archives, here
is it's title so you can pull it up yourself:
>Subject: SUMMARY: 100mb quad card to fun full duplex

Frank Cusack wrote:
>ndd (with /dev/{hme,qfe}) does not affect all interfaces. Just the
>one corresponding to the "instance" variable.
>
>ndd -set /dev/qfe instance 0 (for qfe0)
>... settings ...
>ndd -set /dev/qfe instance 1 (for qfe1)
>... settings ...
>
>You get the idea. The answerbook will tell you this.

Stephen Tremain wrote:
>Here is a little script I whacked together to list the settings of each qfe
>interface.
>
>
>#!/bin/sh
>
>host=`hostname`
>echo "Hostname: $host"
>echo
>
>ifconfig -a
>echo
>
>echo "qfe interfaces"
>if='0 1 2 3'
>
>for i in $if; do
> ndd -set /dev/qfe instance $i
> echo "**** Instance : \c"
> ndd /dev/qfe instance
> echo "ndd /dev/qfe link_speed: \c"
> ndd /dev/qfe link_speed
> echo "ndd /dev/qfe link_mode: \c"
> ndd /dev/qfe link_mode
> echo "ndd /dev/qfe adv_autoneg_cap: \c"
> ndd /dev/qfe adv_autoneg_cap
> echo "ndd /dev/qfe adv_100hdx_cap: \c"
> ndd /dev/qfe adv_100hdx_cap
> echo "ndd /dev/qfe adv_100fdx_cap: \c"
> ndd /dev/qfe adv_100fdx_cap
> echo
>done
>Cheers,

Alun P. Gwynne wrote:
>File: /etc/rc2.d/S99hmeconfig
>----------------------------------------------
>#!/bin/sh
>PATH=/usr/sbin/:/usr/bin
>export PATH
>
># Force hme0 to 10 full Duplex
>ndd -set /dev/hme instance 0
>ndd -set /dev/hme adv_100T4_cap 0
>ndd -set /dev/hme adv_100fdx_cap 0
>ndd -set /dev/hme adv_100hdx_cap 0
>ndd -set /dev/hme adv_10fdx_cap 1
>ndd -set /dev/hme adv_10hdx_cap 0
>ndd -set /dev/hme adv_autoneg_cap 0
>echo HME0 is set to 10Mbit Full Duplex
># Force hme1 to 100 full Duplex
>ndd -set /dev/hme instance 1
>ndd -set /dev/hme adv_100T4_cap 0
>ndd -set /dev/hme adv_100fdx_cap 1
>ndd -set /dev/hme adv_100hdx_cap 0
>ndd -set /dev/hme adv_10fdx_cap 0
>ndd -set /dev/hme adv_10hdx_cap 0
>ndd -set /dev/hme adv_autoneg_cap 0
>echo HME1 is set to 100Mbit Full Duplex
>
>
>This setup will force the interfaces into the specified modes and turn off
>autonegotiation, if you want autoneg to stay on then change the
>adv_autoneg_cap
>line to have a 1 instead of 0.

My original Post:
>Dear Sun Managers
>I need to force full duplex on one hme interface (qfe2) while I leave
>the other 4 interfaces (1 quad ethernet and the internal 100baseT)
>alone. This is a firewall and there is only one interface that I need
>to change but from what I can understand of all the posts, faq's and
>other info on 100baseT and the ndd command, it affects the entire
>interface. So I am asking if it is possible to configure just one
>individual NIC/interface and leave the others alone and if so, what is
>the command sequence. I tried a few variations of ndd -set /dev/qfe
>qfe2:qfe_adv_100fdx_cap=1 but they gave back errors....

email: regnis@worldnet.att.net



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:17 CDT