Book Reviews   Digital Libraries   Astronomy Log   Software   About  
The main stuff

Setting speed and duplex of Solaris network interfaces
11 April 2003 00: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
Add a comment
Your name: (Required)


Your email: (Optional, not displayed)


URL: (Optional, the address of your web site or blog)


Your comments: (Required)

Please enter the text you see in the image
The CAPTCHA image


Thank you!
Please donate
liftingupserenity.com

Some dude

Daniel Hanks

I'm a database/systems administrator working for a large web hosting company in Utah.

Interested in

perl
books
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

Recent Entries

Subscribe with Bloglines
- 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!)
- Microloans at Internet-scale
- Podcasting content created by someone else
- Silver Lining thought: Parking at work
- Emerging technologies for system administrators
- Amazon S3 storage engine for MySQL, part II
- Total lunar eclipse on Sat, Mar 3, 2007
- Are you ready for the 2007 Daylight Savings time changes?

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.

Cool Perl Modules

My del.icio.us
Recent bookmarks

Spread the Word
Get Firefox!

--> © 2004, Daniel C. Hanks