How to Check Interface Duplex and Speed Using ndd/kstat on Solaris.

  • Article ID:100030046
  • Modified Date:
  • Product(s):

Problem

How to Check Interface Duplex and Speed Using ndd/kstat on Solaris.

Solution

To verify the duplex and speed settings for a network interface.

KSTAT
Using kstat to display network interface variables.

# kstat -p | grep link_ | grep bge


NDD
Use the ndd command to check or set network interface configurables. Some of the more important settings, as the relate to speed and duplex, are as follows:
ndd variable values Description
link_status 0/1 read only 0 = link up, 1 = link down
link_speed 0/1 read only 0 = 10 meg, 1 = 100 meg
link_mode 0/1 read only 0 = half duplex, 1 = full duplex
adv_autoneg_cap 0/1 read/write 0 = autonegotiation off, 1 = autonegotiation on
adv_100T4_cap 0/1 read/write 0 = 100T4 off, 1 = 100T4 on
adv_100fdx_cap 0/1 read/write 0 = 100/full off, 1 = 100/full on
adv_100hdx_cap 0/1 read/write 0 = 100/half off, 1 = 100/half on
adv_10fdx_cap 0/1 read/write 0 = 10/full off, 1 = 10/full on
adv_10hdx_cap 0/1 read/write 0 = 10/half off, 1 = 10/half on

Use the link_status, link_speed, and link_mode variables to check your current network interface. Alternatively you can use 'netstat -k' which is extremely verbose. Use the adv_* variables to set what you want the interface to be capable of.

Note: The tips about link_speed and link_mode do not work with /dev/ce (Gigabit Interfaces). At this time you have to use `netstat -k` for getting speed and status information.

Example
# ndd /dev/bge0 link_duplex
2
# ndd /dev/bge0 link_autoneg
1
# ndd /dev/bge0 link_status
1
# ndd /dev/bge0 link_speed
1000
 

 

Related Articles

How to monitor the physical interface of a Network Card using Solaris kstat

Was this content helpful?

Get Support