- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Finding which ethernet cards are connected to the ...
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
Forums
Discussions
Discussions
Discussions
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
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
04-19-2007 06:49 PM
04-19-2007 06:49 PM
The question is for Linux OS.
I have some servers each of which are having 6 Ethernet cards from eth0-eth5 but, only some of them are connected to the network. Most of the times they are eth0-eth2 of which eth0 is configured an IP Address but, not always the case.
I want to findout the which Ethernet cards are connected to the network.
Generally, what I do is assign a temporary unused IP Address to each eth card and check whether it is pingable but, this procedure will take too much of time if I have to repeat the procedure for more than 10 servers (and which is the case with me).
Is there any better way of doing the same? I am looking for any utility link linkloop on HP-UX. I tried linkloop from this URL http://freshmeat.net/projects/linkloop/ but, it is giving segmentation fault.
Please inform. Thanks in advance.
Thanks and Regards,
Prasad.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 06:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 07:47 PM
04-19-2007 07:47 PM
Re: Finding which ethernet cards are connected to the network.
Now, I have one more question.
How can I find out whether I am able to communicate between
eth1 card of A machine and eth1 card of B machine.
In short I want to know whether the communication between the two machines is possible through which eth cards (these cards must not be from cards configured with Ip address)?
Please reply. Thanks in advance.
Thanks and Regards,
Prasad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 07:57 PM
04-19-2007 07:57 PM
Re: Finding which ethernet cards are connected to the network.
I'm not sure that's possible if I've understood your requirement correctly...
Surely you can't communicate over an interface if it's not configured...?
Cheers,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 08:04 PM
04-19-2007 08:04 PM
Re: Finding which ethernet cards are connected to the network.
You could for example 'ping -I eth1 machineB' from machineA, and then check the arp cache:
# arp -i eth1 -a machineB
Then you'd know the MAC address of machineB which returned the ping packets from machineA's eth1.
Linkloop would be easier and less time consuming (and there might be a better way than the above), but hey, as long as we get the job done I guess :-)
Cheers,
Wout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:10 PM
04-19-2007 10:10 PM
Re: Finding which ethernet cards are connected to the network.
I only wanted to thank you for pointing my attention to the linkloop tool which I knew well from HP-UX.
But I didn't know that someone had written a port for Linux.
If I could, I would assign you 10 points for showing me the Linux port of linkloop.
So I downloaded the source tarball, compiled and installed it.
Luckily, it seems to work for me, and I don#t get a segmantation fault.
However, it must be run as root (or maybe the suid bit be set on the executable)
e.g. "ping" layer2 level a NIC from an HP-UX box
$ linkloop -i eth0 0x001083f5abcd
Link connectivity to LAN station: 0x001083f5abcd (HW addr 00:10:83:F5:AB:CD)
socket: Operation not permitted
Ok, one must be root
$ su -c "linkloop -i eth0 0x001083f5abcd"
Password:
Link connectivity to LAN station: 0x001083f5abcd (HW addr 00:10:83:F5:AB:CD)
-- OK -- 1 packets
Nice to have linkloop now also on Linux :-)
This is the distro I built it on:
$ uname -srv
Linux 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005
$ cat /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant)
As the others already have mentioned,
the usual tool on Linux for link checking
is mii-tool (use -v to see more)
or ethtool.
Btw, ethtool has lots of features.
A nice gimmick is that you can make a NICs LED blink to help in identifying the HW.
(see -p in man ethtool)