Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Others => Miscellaneous => Topic started by: hghh on March 22, 2005, 11:19:13 PM
-
I have two 3COM card(eth0 and eth1) in one system. One Card with a Network connected and the other leave unconnected. I want to find out the status for each card. If I use ifconfig then I can tell right away the card had network or not. Is there any way to get around without using ifconfig? I have look into sys/class/net directory but it doesn't help.
Thanks for any help.
hghh
-
Hi dear
Ya u can check it
go to
# cd /etc/sysconfig/network-scripts/
#ls
when u give ls command here then if eth0 is configured , then u will see the file name as ifcfg-eth0
if eth1 is configred i, u wiill see the file named ifcfg-eth1 there & so on...
if u want to know abt the eth0 inteface(means abt ipaddress etc)
open these files in any editor
& also u can see all ip address through ifconfig ..., it will show u all the interfaces which have ip-addresses..
Gaurav
-
U can see ur network card status if u compile all of ur network card driver as modules. TO check ur network card driver can be one of the way other than ifconfig.
root@slacky# lsmod
Of course, this way is hard, and u must really noe ur network card driver module.
Let's say mine is Realtek 8139too ---> module is (8139too.o)
If u use this command u will see ur network card is working or not.
Another way will be ping-ing ur own network card's ip.
-
Thank you all. I look into 'cd /etc/sysconfig/network-script/' and the directory is not exist. I am not using redhat or suse, I download the source code from kernel.org and compile the kernel. The similar directory I seen 'cd /etc/sys/class/net' and when I do 'ls' I seen 'eth0' and 'eth1' but can't tell which one has network connected. Any idea that I can try.
Thanks
hghh