Solaris NIC Setting

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

Working with network ports (NIC) .......... +++++++++++++++++++++++++++++++++++ -----------------------------------------------------NIC ports currently used by system -----------------------------------------------------bash-3.

00$ kstat | grep -i net |egrep 'ce|bge' name: bge0 name: bge1 name: ce0 name: ce1 name: ce2 name: ce3 bash-3.00$ class: class: class: class: class: class: net net net net net net

-----------------------------------------------------Total no of NIC ports avilable for system. -----------------------------------------------------bash-3.00$ more /etc/path_to_inst | grep -i net "/pci@1f,700000/network@2" 0 "bge" "/pci@1f,700000/network@2,1" 1 "bge" "/pci@1d,700000/network@2" 2 "bge" "/pci@1d,700000/network@2,1" 3 "bge" "/pci@1d,700000/pci@1/network@0" 0 "ce" "/pci@1d,700000/pci@1/network@1" 1 "ce" "/pci@1d,700000/pci@1/network@2" 2 "ce" "/pci@1d,700000/pci@1/network@3" 3 "ce" bash-3.00$ /etc/prtconf -Pvv | grep -i net network, instance #0 dev_path=/pci@1f,700000/network@2:bge0 network, instance #1 dev_path=/pci@1f,700000/network@2,1:bge1 network, instance #2 dev_path=/pci@1d,700000/network@2:bge2 network, instance #3 dev_path=/pci@1d,700000/network@2,1:bge3 network, instance #0 network, instance #1 network, instance #2 network, instance #3 dev_path=/pci@1f,700000/network@2,1 dev_path=/pci@1d,700000/pci@1/network@0 dev_path=/pci@1f,700000/network@2 dev_path=/pci@1d,700000/pci@1/network@0 dev_path=/pci@1f,700000/network@2 dev_path=/pci@1f,700000/network@2,1 dev_link=/dev/vx/netiod bash-3.00$ -----------------------------------------------------To check physical connectivity and current link speed -----------------------------------------------------bash-3.00$ kstat -p| grep -i ce | egrep 'link_speed|link_up|link_duplex'

ce:0:ce0:link_duplex 2 ce:0:ce0:link_speed 1000 ce:0:ce0:link_up 1 ce:1:ce1:link_duplex 0 ce:1:ce1:link_speed 0 ce:1:ce1:link_up 0 ce:2:ce2:link_duplex 0 ce:2:ce2:link_speed 0 ce:2:ce2:link_up 0 ce:3:ce3:link_duplex 0 ce:3:ce3:link_speed 0 ce:3:ce3:link_up 0 bash-3.00$ kstat -p| grep -i bge | egrep 'link_speed|link_up|link_duplex' bge:0:mac:link_duplex 2 bge:0:mac:link_up 1 bge:0:mii:link_duplex 2 bge:0:mii:link_up 1 bge:0:parameters:link_duplex 2 bge:0:parameters:link_speed 1000 bge:1:mac:link_duplex 2 bge:1:mac:link_up 1 bge:1:mii:link_duplex 2 bge:1:mii:link_up 1 bge:1:parameters:link_duplex 2 bge:1:parameters:link_speed 1000 bge:2:mac:link_duplex 0 bge:2:mac:link_up 0 bge:2:mii:link_duplex 0 bge:2:mii:link_up 0 bge:2:parameters:link_duplex 0 bge:2:parameters:link_speed 0 bge:3:mac:link_duplex 0 bge:3:mac:link_up 0 bge:3:mii:link_duplex 0 bge:3:mii:link_up 0 bge:3:parameters:link_duplex 0 bge:3:parameters:link_speed 0 bash-3.00$

+++++++++++++++++++++++++++++++++++++++++++++ Solaris NIC speed and duplex settings The following is a Bourne shell script I wrote settings for all active network interfaces on am Favorite for fixing the script to work with g. ge0), and to Royce Williams for providing a ormation. Download the script. Example output: Interface --------hme0 hme1 hme2 Speed ----100 Mbit/s 100 Mbit/s 100 Mbit/s Duplex -----full full full

to determine the speed and duplex a Solaris system. Thanks to Willi two-letter network interfaces (e. patch to exclude subinterface inf

Setting NIC speed and duplex Solaris is often unable to correctly auto-negotiate duplex settings with a link partner (e.g. switch), especially when the switch is set to 100Mbit full-duplex. You can force the NIC into 100Mbit full-duplex by disabling auto-negotiation an d 100Mbit half-duplex capability. Example with hme0: 1. Make the changes # ndd -set /dev/hme # ndd -set /dev/hme # ndd -set /dev/hme to the running system. adv_100hdx_cap 0 adv_100fdx_cap 1 adv_autoneg_cap 0

2. Make kernel parameter changes to preserve the speed and duplex settings after a reboot. # vi /etc/system Add: # set hme:hme_adv_autoneg_cap=0 # set hme:hme_adv_100hdx_cap=0 # set hme:hme_adv_100fdx_cap=1 Note: the /etc/system change affects all hme interfaces if multiple NICs are pre sent (e.g. hme0, hme1). More information: http://www.science.uva.nl/pub/solaris/solaris2/Q4.13.html The /etc/system settings listed above are not supported for configuring ce Ether net adapters during system startup; you may either use ndd commands in an /etc/r c?.d script or create a /platform/sun4u/kernel/drv/ce.conf file with appropriate settings. Example: /etc/init.d/nddconfig #!/bin/sh ndd ndd ndd ndd ndd ndd ndd ndd -set -set -set -set -set -set -set -set /dev/ce /dev/ce /dev/ce /dev/ce /dev/ce /dev/ce /dev/ce /dev/ce instance 0 adv_1000fdx_cap 0 adv_1000hdx_cap 0 adv_100fdx_cap 1 adv_100hdx_cap 0 adv_10fdx_cap 0 adv_10hdx_cap 0 adv_autoneg_cap 0

# ln -s /etc/init.d/nddconfig /etc/rc2.d/S31nddconfig $ dmesg | grep ce0 Jan 20 11:05:01 crmmdb22 genunix: [ID 611667 kern.info] NOTICE: ce0: xcvr addr:0 x01 - link up 100 Mbps half duplex Jan 20 11:05:15 crmmdb22 genunix: [ID 408822 kern.info] NOTICE: ce0: no fault ex ternal to device; service available Jan 20 11:05:15 crmmdb22 genunix: [ID 611667 kern.info] NOTICE: ce0: xcvr addr:0 x01 - link up 100 Mbps full duplex +++++++++++++++++++++++++++++++++++++ ============================================================ [root@e02k208:/root] #> ndd -get /dev/qfe \? ? (read only)

transceiver_inuse (read only) link_status (read only) link_speed (read only) link_mode (read only) ipg1 (read and write) ipg2 (read and write) use_int_xcvr (read and write) pace_size (read and write) adv_autoneg_cap (read and write) adv_100T4_cap (read and write) adv_100fdx_cap (read and write) adv_100hdx_cap (read and write) adv_10fdx_cap (read and write) adv_10hdx_cap (read and write) autoneg_cap (read only) 100T4_cap (read only) 100fdx_cap (read only) 100hdx_cap (read only) 10fdx_cap (read only) 10hdx_cap (read only) lp_autoneg_cap (read only) lp_100T4_cap (read only) lp_100fdx_cap (read only) lp_100hdx_cap (read only) lp_10fdx_cap (read only) lp_10hdx_cap (read only) instance (read and write) lance_mode (read and write) ipg0 (read and write) [root@e02k208:/root] #> ndd -get /dev/qfe link_speed 1 [root@e02k208:/root] #> ndd -get /dev/qfe adv_autoneg_cap 0 ++================================================================ ++++++++++++++ Manually determining NIC speed and duplex If you have ce or bge interfaces, use kstat ce and kstat bge, respectively, to r eturn NIC settings. All other interfaces may use ndd to determine NIC settings. ndd example with hme0, assuming "instance" is 0: # ndd -get /dev/hme link_mode Interpretation: 0 -- half-duplex 1 -- full-duplex # ndd -get /dev/hme link_speed Interpretation: 0 -- 10 Mbit 1 -- 100 Mbit 1000 -- 1 Gbit To query a different NIC, such as hme1, set the "instance" to 1, and then perfor m the link_mode and link_speed queries above. # ndd -set /dev/hme instance 1

Note: the ndd commands above must be run as root. Otherwise, you will receive er rors such as "couldn't push module 'hme0', No such device or address." ce Ethernet adapters Older versions of the Sun GigaSwift Ethernet 1.0 driver do not support the ndd l ink_mode and link_speed parameters. You may either install the latest Sun GigaSw ift Ethernet adapter patch (111883) or you may use kstat ce ce_device to get spe ed and duplex information for ce Ethernet adapters. For example (from http://www.samag.com/documents/s=9142/sam0405l/0405l.htm): $ kstat -p| grep -i ce | egrep 'link_speed|link_up|link_duplex' Interpretation: link_up - 0 down, 1 up link_speed - speed in Mbit/s link_duplex - 1 half duplex, 2 full duplex, 0 down Host/link partner mismatch example A large number of output errors or collisions may indicate a host and link partn er mismatch. The following is netstat -in output from a system configured for 10 0 half-duplex while the switch was configured for 100 full-duplex. Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Col lis Queue ce0 1500 192.168.1.0 192.168.1.1 2707133478 25 2895422910 142310052 182 856975 0 In this example, the switch was configured for 100 half-duplex and the system wa s configured for 100 full-duplex. Note the percentage of Ierrs/Ipkts (~ 1.7%). Name Mtu Net/Dest lis Queue qfe1 1500 10.0.0.0 0 Address 10.0.0.3 Ipkts 1430247 Ierrs Opkts 24663 1779341 Oerrs 0 Col 0

CHANGELOG 2007/07/10 -- Added e1000g interfaces 2006/11/29 -- Added dmfe interfaces, fixed bge and ce interfaces, many other mod ifications and fixes. 2006/04/27 -- Solaris 7 and earlier include subinterface information with netsta t -i. Patch by Royce Williams to only query physical NIC interfaces. 2006/03/09 -- Fixed bge interfaces, added support for iprb interfaces, added "su pport" for le interfaces, modified script to only require root access if using / usr/sbin/ndd to determine NIC speed and duplex settings 2005/05/25 -- Fixed ce interface handling. 2004/09/15 -- Added support for ce and bge interfaces.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy