Netwerkkaart Solaris

Permanent settings

Changing an IP-address
– vi /etc/hosts
– change the IP-address of the NIC you want to change
– if the server has more then 1 NIC there should be more then 1 entry in the hostfile.

Change the netmask
– vi /etc/netmasks
– this contains the networks with there netmasks the server is using.

Set the name of a NIC
– /etc/hostsname.eri1
– the mentioned name in there corresponds with the line in the hosts-file where its IP-address is set

Set the NIC settings
– vi /etc/init.d/qfeconfig
– in there the settings of each NIC are set

Set the default gateway
– vi /etc/defaultgateway
– the IP-address there sets the defaultgateway

Set the broadcast address
– vi /etc/defaultrouter
– the IP-address there represents the broadcast address of the first NIC

Settings until the next reboot

Set and start the NIC
– ifconfig eri0 unplumb ## shutdown the NIC, after that you won’t see the NIC with ifconfig
– ifconfig eri0 plumb ## the NIC is visible, but without any setting
ifconfig eri0 netmask broadcast
## the NIC gets all it settings but is not up yet
– ifconfig eri0 up ## the NIC is up and running, and should be usable if everything is correct

Read the setting of a NIC
– /usr/sbin/ndd -set /dev/eri instance 0
To specify the NIC of which you want to read the settings
– /usr/sbin/ndd -get /dev/eri adv_100fdx_cap
should be 1
– /usr/sbin/ndd -get /dev/eri adv_100hdx_cap
should be 0
– /usr/sbin/ndd -get /dev/eri adv_100T4_cap
should be 0
– /usr/sbin/ndd -get /dev/eri adv_10fdx_cap
should be 0
– /usr/sbin/ndd -get /dev/eri adv_10hdx_cap
should be 0
– /usr/sbin/ndd -get /dev/eri adv_autoneg_cap
should be 0

The six above mentioned setting can be set with set if you type set instead of get.

GB ethernet
If you are working with a GB NIC the command are different
/usr/sbin/ndd -set /dev/ge instance 0
/usr/sbin/ndd -get /dev/ge adv_1000fdx_cap
/usr/sbin/ndd -get /dev/ge adv_1000hdx_cap
/usr/sbin/ndd -get /dev/ge adv_pauseTX
/usr/sbin/ndd -get /dev/ge adv_pauseRX
/usr/sbin/ndd -get /dev/ge adv_1000autoneg_cap
/usr/sbin/ndd -get /dev/ge link_speed
/usr/sbin/ndd -get /dev/ge link_mode
/usr/sbin/ndd -get /dev/ge link_status

With the next command lines you can troubleshoot the NIC
– ndd /dev/eri link_status
1 means link is up
0 means link is down
– ndd /dev/eri link_speed
1 means speed is 100Mb
0 means speed is 10 Mb
if you are working on a GB NIC the reported value can be 1000
which obvious means that the link speed is 1000Mb
– ndd /dev/eri link_mode
1 means full-duplex
0 means half-duplex

Maar voor BGE’s :

To force bge0 interface card speed and duplex (autoneg off) run the
following script.

Create script /etc/rc2.d/S68net_tune

#!/sbin/sh
# /etc/rc2.d/S68net-tune
PATH=/usr/bin:/usr/sbin
echo “Implementing Solaris ndd Tuning Changes ”
# bge-Interfaces
# Force bge0 to 100fdx autoneg off
ndd -set /dev/bge0 adv_1000fdx_cap 0
ndd -set /dev/bge0 adv_1000hdx_cap 0
ndd -set /dev/bge0 adv_100fdx_cap 1
ndd -set /dev/bge0 adv_100hdx_cap 0
ndd -set /dev/bge0 adv_10fdx_cap 0
ndd -set /dev/bge0 adv_10hdx_cap 0
ndd -set /dev/bge0 adv_autoneg_cap 0

Make the script executable:
# chmod 755 /etc/rc2.d/S68net_tune

After the script is run, you will see that the nic is set to 100fdx autoneg
off.

BGE.CONF
To force bge interface to 100mbps full duplex, put the following entries in
/platform/sun4u/kernel/drv/bge.conf
A reboot is required for this method.

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;

NOTE: Using bge.conf will force all instances of bge to the speed/duplex
specified in the file. Use ndd to force individual instances if for example
bge0 needs to be 10hdx and bge1 needs to be 100fdx.

To query the bge device for link status, speed, duplex, autonegotiation:

# /usr/sbin/ndd -get /dev/bge0 link_speed /*actual link speed in Mbit/s */
# /usr/sbin/ndd -get /dev/bge0 link_status /*actual link state, 0=down 1=up
*/
# /usr/sbin/ndd -get /dev/bge0 link_duplex /*actual link mode, 0=Half
Duplex, 1=Full Duplex -1=no cable connected */
# /usr/sbin/ndd -get /dev/bge0 adv_autoneg_cap /* 0=autonegotiation off
1=autonegotiation on */

To show a list of possible bge settings:

# ndd -get /dev/bge0 \?
? (read only)
adv_1000fdx_cap (read and write)
adv_1000hdx_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)
adv_autoneg_cap (read and write)
adv_pause_cap (read and write)
adv_asym_pause_cap (read and write)
link_status (read only)
link_speed (read only)
link_duplex (read only)
loop_mode (read only)

Bookmark de permalink.

Geef een reactie

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *