- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- check lan for network cable plug or no ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 03:13 PM
тАО01-02-2007 03:13 PM
As you know, in Windows, when we plug in network cable, network symbol will change to other status.
Please help me. How can i know which lans have network cable ?
Many Thanks,
Vu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 03:22 PM
тАО01-02-2007 03:22 PM
SolutionUse lanscan to check for the mac address...
linkloop -i OUTGOINGPPA MACADDRESSOFREMOTEMACHINE
Example
linkloop -i 2 0x00306E385244
Link connectivity to LAN station: 0x00306E385244
-- OK
Here's another little script to check all your lan cards:
# cat /usr/local/bin/lancards
#!/usr/bin/sh
# script to check speed and settings of lan cards
PATH=/usr/sbin:/usr/bin
ppas=`lanscan | awk '$3~/^[0-9]$/{print $3}' | xargs`
for i in $ppas
do
printf "Card at PPA %s - " $i
ipa=`ifconfig lan${i} 2>/dev/null | awk '{ip=$2}END{if(ip==""){printf("Not assigned")}else{printf("%s ",ip)}}'`
printf "IP Address: %15s- " "$ipa"
lanadmin -x $i 2>/dev/null | awk '{$1="";printf("%s",$0)}'
echo ""
done
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 03:43 PM
тАО01-02-2007 03:43 PM
Re: check lan for network cable plug or no ?
ifconfig
the output will miss the UP status if the cable is not connected.
Also I had a work instruction for the lan error that is :
# ll /var/adm/nett*
-rw-r--r-- 1 root root 36205 Jul 5 16:18 /var/adm/nettl.LOG000
If the date/time stamp on nettl.LOG000 matches the date / time of the error reported in the request , this may indicate something had been logged by the system logging facilities. If this is an old date stamp then there will be no relevant information in the log file.
# netfmt -Nlf /var/adm/nettl.LOG000 >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 04:19 PM
тАО01-02-2007 04:19 PM
Re: check lan for network cable plug or no ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 05:29 PM
тАО01-02-2007 05:29 PM
Re: check lan for network cable plug or no ?
The card has lights on the back too, which will light up and indicate a good connection. The color scheme's vary from card to card.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 06:04 PM
тАО01-02-2007 06:04 PM
Re: check lan for network cable plug or no ?
Use linkloop command of netfmt command to see the connectivity.
netfmt -Nlf /var/adm/nettl.LOG000
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2007 10:32 PM
тАО01-03-2007 10:32 PM
Re: check lan for network cable plug or no ?
For example, "lanadmin -g 0" gathers the state of and statistics for lan0.
Administrative status = up indicates only that the card has been initialized by the driver and passed self test.
Opertational status = up is the flag you are looking for. It indicates that the link is up electrically, meaning the cable is plugged into an operational network port network port. Here's an example of a working port:
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan0 1500 16.113.144.0 16.113.145.161 427280 0 125216 0 0
lo0 4136 127.0.0.0 127.0.0.1 100678 0 100678 0 0
# lanadmin -g 0
LAN INTERFACE STATUS DISPLAY
Thu, Jan 4,2007 06:18:15
PPA Number = 0
Description = lan0 HP PCI 1000Base-T Release B.11.23.05
Type (value) = ethernet-csmacd(6)
MTU Size = 1500
Speed = 100000000
Station Address = 0x306ef493ee
Administration Status (value) = up(1)
Operation Status (value) = up(1)
Last Change = 110
Inbound Octets = 134165467
Inbound Unicast Packets = 78990
Inbound Non-Unicast Packets = 1404078
Inbound Discards = 0
Inbound Errors = 0
Inbound Unknown Protocols = 34556
Outbound Octets = 9934783
Outbound Unicast Packets = 93478
Outbound Non-Unicast Packets = 494
Outbound Discards = 0
Outbound Errors = 0
Outbound Queue Length = 0
Specific = 655367
Ethernet-like Statistics Group
Index = 1
Alignment Errors = 0
FCS Errors = 0
Single Collision Frames = 0
Multiple Collision Frames = 0
Deferred Transmissions = 0
Late Collisions = 0
Excessive Collisions = 0
Internal MAC Transmit Errors = 0
Carrier Sense Errors = 0
Frames Too Long = 0
Internal MAC Receive Errors = 0
You may also be interested in whether the spped and duplex are what you expected. That command is:
# lanadmin -x 0
Speed = 100 Full-Duplex.
Autonegotiation = On.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2007 05:10 AM
тАО01-04-2007 05:10 AM
Re: check lan for network cable plug or no ?
Ifconfig will only show things if the interface has been plumbed.
Linkloop is good, but it depends on another linkloop-aware system within the broadcast domain. Any UX system will be such; there is a port of linkloop to "linux"
http://freshmeat.net/projects/linkloop/
of course there is the chance that the link is up on the system where linkloop is run, but something on the other side of a switch is down, so a lack of response on linkloop could be a false positive on cable disconnect on the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2007 03:47 PM
тАО01-07-2007 03:47 PM
Re: check lan for network cable plug or no ?
Many thanks for your support ! I resolved my problems. Many Thanks!
Vu