LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-08-2009, 03:51 PM   #1
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
how to determine if nic is unplugged?


can anyone tell me the best way to determine if there is a connectivity problem with a nic on solaris 8/10. i tried pulling the network cable from my ultra 10 box and then pinged an address on my subnet and got:
Quote:
Mar 8 16:46:14 unknown genunix: WARNING: hme0: fault detected in device; service degraded
Mar 8 16:46:14 unknown genunix: WARNING: hme0: No response from Ethernet network : Link down -- cable problem?
is this the only way? is there some log file i can check, a command to use?
 
Old 03-08-2009, 04:28 PM   #2
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Hi,

/sbin/mii-tool should do the trick

hedgehog@darkstar:/proc$ sudo mii-tool eth1
eth1: negotiated 100baseTx-FD, link ok

Last edited by hedgy102; 03-08-2009 at 04:32 PM.
 
Old 03-08-2009, 04:31 PM   #3
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Otherwise, there is also ethtool

hedgehog@darkstar:/proc$ sudo ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
 
Old 03-08-2009, 04:55 PM   #4
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Just to add to the list...

You can also use ip address show to check the physical link

Here, I have unplugged my ethernet cable:

Code:
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:0c:76:b3:d9:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20c:76ff:feb3:d95c/64 scope link
       valid_lft forever preferred_lft forever
Then plugged it back in

Code:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:76:b3:d9:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20c:76ff:feb3:d95c/64 scope link
       valid_lft forever preferred_lft forever
 
Old 03-08-2009, 05:14 PM   #5
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Also, depending on your particular need, ethtool returns link status for nics that are down.
 
Old 03-08-2009, 05:53 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I'm afraid the suggested mii-tool and ethtool are Linux specific.

Under Solaris 10 and newer, you might use "dladm show-phys". For older releases, ndd or kstat should report the network status.
 
Old 03-09-2009, 02:40 AM   #7
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Oops, sorry about that. Didn't notice this was a Solaris question.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about unplugged NIC behavior in Linux rozeboom Linux - Networking 2 01-09-2009 01:39 PM
Nic settings (how to determine) gammy Linux - Newbie 7 09-12-2007 08:09 AM
DISCUSSION: Becoming Unplugged jeremy LinuxAnswers Discussion 3 02-14-2007 05:54 AM
How do i determine my IP address? How do i determine my host name? jwymore Linux - Networking 5 02-07-2007 09:57 AM
Making dhcpd listen to unplugged NIC Steamrunner Linux - Networking 4 07-25-2005 04:53 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration