sun workstation nic card

I have an older sun workstation that was just moved to a different location.  I am trying to configure it to connect to the network in its new location.  I am not well versed on unix commands.  I need to know what command to use to show its current ip address and mac address.  I would also like to know what kind of network card it has.  speed and duplex settings.  It was working in its old location.  Unfortunately i cannot find the old switchport configs.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use "ifconfig -a" to show you all the interfaces... if its an older Sun, it will probably have one or more hmeX interfaces, although you'll likely be interested only in hme0.  Your specific interface will look something like this:

eri0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet netmask ffffff00 broadcast

This tells you that the IP is

To find the gateway, do "netstat -nr" (or "cat /etc/defaultrouter")

bash-2.05$ netstat -nr

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------        U         1  37873  eri0          U         1      0  eri0
default            UG        1 520147              UH        33764114  lo0

bash-2.05$ cat /etc/defaultrouter

The line containing "UG" in the Flags column is the default route.

To reconfigure the interface/gateway, do the attached commands.

To make it permanent you will need to edit a few files:


ifconfig hme0 <new IP> netmask <your netmask>
route add default <new gateway IP>

Open in new window

bryanordAuthor Commented:
This should help and i will try this tomorrow.  What about determining the network card properties for example duplex mode and speed?

After you bring it up successfully, look in /var/adm/messages for the word "duplex":

bash-2.05$ grep -i duplex /var/adm/messages
/var/adm/messages.1:Nov 29 03:01:10 eri: [ID 517527] SUNW,eri0 : 100 Mbps full duplex link up

It will say what speed and duplex it came up at.  If you need to set it, use the ndd command, and you can make it permanent by editing /etc/system.  Personally I've had the best success just setting autonegotiate on both the switch and server side, but here are the commands to change it:

To force full duplex operations, in /etc/system add:
*   NO Auto-Negotiation-Protocol:
*   Force to 100BaseT Full Duplex:
set hme:hme_adv_autoneg_cap = 0
set hme:hme_adv_100fdx_cap = 1

or to do it on the fly:

ndd -set /dev/hme instance 0            #<- select hme0
ndd -set /dev/hme adv_100fdx_cap 1      #<- enable full duplex
ndd -set /dev/hme adv_autoneg_cap 0     #<- turn off auto-neg

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bryanordAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.