Book Reviews   Digital Libraries   Astronomy Log   Software   About  

Setting speed and duplex of Solaris network interfaces
11 April 2003 02:00

11 Apr 2003
I found today that the network interface on one of the SPARCS I manage today was only set to 100Mb/s, half-duplex. Yuk. So much for autonegotiation. Well, here's how to check and how to fix such a problem, (Solaris OS). To find out what mode you're operating in you can do the following:

            # ndd -get /dev/hme link_mode
            1
            # ndd -get /dev/hme link_status
            1
            # ndd -get /dev/hme link_speed
            1
          
If you get all '1's you're in good shape. That means the link is up, (link_status=1), running at 100 Mb/s (link_speed=1), and at full-duplex (link_speed=1). If you get any zeros back, that could be an indication of a problem. link_mode=0 indicates half-duplex, link_status=0 means the if is down, and link_speed=0 means you're only running at 10Mb/s (btw, I wonder what you'd get with a GigE interface at 1000Mb/s...2???). Anyways, to fix such a problem you'll want to do something like this:
            # ndd -set /dev/hme instance 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
          
This assumes you're dealing with interface hme0. If not change the /dev file, and instance number accordingly, (e.g., ndd -set /dev/qfe instance 1). If you look at the names of the parameters you are setting you should be able to get a good idea of what this all means. To make this permanent across reboots, put the following in /etc/system:
            * Force full-duplex operation
            set hme:hme_adv_autoneg_cap=0
            set hme:hme_adv_100fdx_cap=1
            set hme:hme_adv_100hdx_cap=0
            set hme:hme_adv_10fdx_cap=0
            set hme:hme_adv_10hdx_cap=0
          
If for some strange reason you need half-duplex or 10Mb/s, you can probably figure out what to do.

One more note. If you're doing this across a remote link, and manipulating the interface over which you've got your shell running, you may be wondering whether your connection will stay up across these changes. Especially if you don't have a serial console connection to bail you out...well, don't fear. After you run the last ndd command (-set adv_autoneg_cap 0...) your connection will hang for a few seconds, but should come back (I'm writing this here, as none of the docs I could find told me what would happen...) after a few seconds.


Comments
Happiness
True love begins when the needs of others become more important than your own.
The practice of true love begets true happiness

Me

Daniel Hanks

I'm a system administrator working for Omniture

Interested in

perl
books
python
databases
genealogy
astronomy
digital archival
digital libraries
web applications
web infrastructure
distributed storage

among other things . . .

Storyteller


Pamela Hanks

is an excellent storyteller.

(She also happens to be my wife :-)

A storyteller makes a wonderful and unique addition to family, school, church or other group events. Schedule her for your next gathering.


Kiva.org
Kiva - loans that change lives

Recent Blog Entries

Subscribe with Bloglines
- OpenWest Conference 2014 Presentation Slides - Ansible
- OpenWest Conference 2013 Presentation Slides
- Utah Open Source Conference 2012 - Presentation slides
- E-Book Review: Data Mashups in R
- Book Review: Illustrated Guide to Astronomical Wonders
- Book Review: Wicked Cool Shell Scripts
- PLUG Presentation Slides: The Open Source Data Center
- Harnessing human computational power from computer games
- I love a good roadtrip
- FamilySearch Developers Conference 2008 presentations now available online
- FHT follow up: an idea for a mobile genealogical application
- Family history and technology: it's only getting better
- President Hinckley passes away
- December is NaBoMoReMo - National Book of Mormon Reading Month
- Family History, Photos, Blogs, and Books
- The Compact Oxford English Dictionary
- 1830s English and the Book of Mormon
- Google adds My Library feature to Book Search
- Utah Open Source Conference
- Wiki diagrammer (Steal this idea!)

All Entries . . .

LDSOSS
LDS Open Source Software
A website discussing the use of Open-source software for applications useful to those sharing values of the Latter-day Saint (Mormon) faith.

© 2009, Daniel C. Hanks