IFCONFIG Does Not give You Link Status; ETHTOOL Does
For some reason that is a complete mystery to me, RHEL does not give you the link status when you run
# ifconfig -a. This makes it incredibly hard to debug link integrity issues! Buried amongst all of Red Hat’s proprietary commands, however, is a utility called ethtool, which does give you the status of your link.
Since ethtool is used for querying settings of an ethernet device and changing them, it does a lot more than just give link status. Amongst other things, you can use it to turn on or off autonegotiation on your network card. Run # /sbin/ethtool -h for full usage.
Here’s how you use it to see if your server has link:
# /sbin/ethtool eth0
You should see something like this:
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
Solaris Virtual Network Interfaces
Sometimes it’s useful to create a virtual network interface on your Solaris box, so that you can associate multiple IP addresses with the same host and not have to go through all the trouble of buying another NIC.
Here’s a quick HOWTO. Let’s assume our network card is eri0, and we want to create a virtual interface called eri0:1
Create the virtual interface:
# ifconfig eri0:1 plumb
Configure the virtual interface:
# ifconfig eri0:1 179.164.83.161 netmask 255.255.255.0 broadcast 179.164.83.255
Check to make sure it worked:
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843
inet 179.164.83.160 netmask ffffff00 broadcast 179.164.83.255
ether 0:3:ba:9:63:9b
eri0:1: flags=1000842
inet 179.164.83.161 netmask ffffff00 broadcast 179.164.83.255
Finally bring up your new virtual interface:
# ifconfig eri0:1 up
To make it come up on start:
create /etc/hostname.eri0:1 with hostname in it
make sure the hostname is in /etc/hosts
NOTE: The IP addresses in this story have been changed to protect the innocent.


