Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Solaris ndd

News See Also Recommended Links Reference Quiz Humor Etc

The ndd utility is used to examine and set kernel parameters, namely the TCP/IP drivers. Most kernel parameters accessible through ndd can be adjusted without rebooting the system. To see which parameters are available for a particular driver, use the following ndd command:

# ndd /dev/hme \?

Here /dev/hme is the name of the driver and  command lists the parameters for this particular driver.  Use of backslash in from of "?"  prevents the shell from interpreting the question mark as a special character.

Using \? will list all parameters for the driver and indicate whether the parameter is read only or read and write. The current parameter value or status information can be read by specifying the driver and parameter names. Only the parameters marked as read and write can be changed.

# ndd /dev/hme link_speed 0

This example shows the output of a ndd command examining the link speed of the hme driver (The output 0 indicates that the option is set for 10Mbps). ndd-specified parameter values are integers with 0 meaning disabled, 1 meaning enabled, or a large integer to set a time or size value.

Setting parameters requires the -set option, the driver name, the parameter name, and the new value. For example, to enable the 100 Mbps hme driver use the following ndd command:

# ndd -set /dev/hme link_speed 1 && ndd /dev/hme link_speed

ndd parameters are also available for the ARP, IP, ICMP, and TCP drivers. To see which parameters are available for those drivers use the following commands:

# ndd /dev/arp \? && ndd /dev/icmp \? && ndd /dev/ip \? &&  ndd /dev/tcp \?

For example for ARP you need to use the command:

ndd /dev/ip ip_ire_arp_interval

to display the length of time that ARP entries are cached. The default is 1200000 microseconds (20 min).  That means that Solaris cache  solicited ARP entries for 20 minutes.  Unsolicited ARP entries cache for only 5 minutes.  Use the command:

ndd /dev/ip arp_cleanup_interval

Note - ndd parameter documentation is currently not available from Sun except for network card configuration. This is a known issue. Setting driver parameters involves making trade-offs. Most parameters involve changing the default Solaris Operating Environment configuration. The default settings are optimal for most situations. Adjusting parameters can affect normal system operation, so Sun does not encourage making parameter changes. Sun may also change the names of parameters in future versions of the Solaris Operating Environment.

You can set the hme device driver parameters in three ways (ndd, /etc/system, or startup shell script), depending on your needs. To set parameters that are valid until you reboot the system, use the ndd utility. Using the ndd utility interactively is a good way to test parameter settings.

To set parameters so they remain in effect after you reboot the system, add the parameter values to /etc/system when you want to configure parameters for all devices in the system.

A startup script can also be used to set a ndd parameters across system reboots. Include the appropriate ndd command in a system startup script, such as the /etc/init.d/inetinit file or a customized script in /etc/rc2.d or /etc/rc3.d. Be sure to make a copy of any files before adding the ndd commands.

Recommended Links


In case of broken links please try to use Google search. If you find the page please notify us about new location
Google     

Solaris NIC speed and duplex settings

[PDF]Solaris™ Operating Environment Network Settings for Security

Solaris - Tuning Your TCP/IP Stack

Summary: Manually setting nic speed / duplex problem Solaris 9

Solaris Tips - Ethernet Card Tips

Solaris Operating Environment Network Settings for Security Updated for Solaris 9 Operating Environment The ndd Command

Reference

EXAMPLES

ATTRIBUTES

NOTES

SunOS 5.10  Last Revised 8 Nov 1999

 

Quiz

Q1.  Which command will increase the TCP transmit and receive buffers ?

 A: ndd

Q2: The network interface on your system is capable of functioning in both half-duplex and full-duplex modes. Which command allows you to view whether your network interface is functioning in half-duplex or full-duplex mode?

Q3: Which command will cause subsequent commands of the same type, to affect only hme1

A: ndd -set /dev/hme instance 1

Q4: When using the ndd utility, which command sets the device instance in order to examine the values associated with the third network interface?
  1. ndd -set /dev/hme inst 2
  2. ndd -set /dev/hme2 instance
  3. ndd -set /dev/hme instance 2
  4. ndd -set /dev/hme instance 3

 

Last modified: June 02, 2008