how can i shutdown the PHYSICAL interface of an ethernet interface

4,041 views
Skip to first unread message

Chetan Khatri

unread,
Apr 26, 2013, 10:06:14 AM4/26/13
to vg...@googlegroups.com
I would like to shutdown the physical interface of an ethernet interface, without disconnecting the cable that is connected to this interface.

Basically, I would like to shutdown the LED of the ethernet interface.



If I do 

ifconfig eth2 down

then the IP address is removed from the routing table, but the LED is still blinking on the interface.

same for 

ip link set eth3 off

how can I switch the interface off (so simulate a cable cut ?) without really disconnecting the cable ?

Deep Patel

unread,
Apr 26, 2013, 10:48:59 AM4/26/13
to vg...@googlegroups.com
Dear Chetan,

I remember there is an option In the command ethtool.

Check for the man page of ethtool

Warm regards,
Deep Patel
--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG
 
---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Deep Patel ( RHC{X,E,SS,VA}, CE|H, CCNA )
CodeLogic
C/3 Sandeep Appartments
Above New Alka Restaurant,
R.C.Dutt Road,
Alakapuri Vadodara 390007
Website: www.codelogic.co.in
M: +91 9601009898

Free Open Source Knowledge Share: http://www.fossks.org

CodeLogic,
910, J.B.Tower, Opp T.V.Tower,
Drive In Road, Thaltej, Ahmedabad
www.codelogic.co.in
Email: in...@codelogic.co.in
M: +91 9601009898


"The most of ugliness that i saw in others was but a reflection of my own"

Tejas Barot

unread,
Apr 26, 2013, 11:32:05 AM4/26/13
to VGLUG
Hello,

Don't know this will work for you or not.

But you can go ahead with Mr. Deep Suggested.

Try by turning off Auto negotiation and your Link Detection value will change.

#ethtool -s ethX autoneg off
#ethtool ethX

Never tried but give it try and update us.

To Moderators and others, I am sorry for my lots of Top posting as I am replying from Blackberry Device and its not providing facility to modify/change Original e-mail. Sorry again.
--
Thanks & Regards,
Tejas Barot
Linux Administrator,
Red Hat Certified Engineer,
Linux Blog:- http://www.tejasbarot.com
Linux Forums :- http://linuxforums.tejasbarot.com
Open Source :- http://opensource.tejasbarot.com
Facebook :- http://www.fb.me/tejasbarot.official
Facebook Page :- http://www.fb.me/AllLinuxUsersBlog
Twitter :- https://twitter.com/imtejasbarot
LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Sent on my BlackBerry® from Vodafone

From: Chetan Khatri <smarty...@gmail.com>
Date: Fri, 26 Apr 2013 07:06:14 -0700 (PDT)
Subject: [VGLUG] how can i shutdown the PHYSICAL interface of an ethernet interface
--

nehal dattani

unread,
Apr 27, 2013, 4:23:01 AM4/27/13
to vg...@googlegroups.com
Hi chetan,



On Fri, Apr 26, 2013 at 7:36 PM, Chetan Khatri <smarty...@gmail.com> wrote:

I would like to shutdown the physical interface of an ethernet interface, without disconnecting the cable that is connected to this interface.

Basically, I would like to shutdown the LED of the ethernet interface.

I am not sure why do you want to do this but simply unload the driver and all the NICS managed by that driver will be instant dead.

If you want to make it permanent for particular NIC, set following line in /etc/modprobe.conf

install ethX ( or whatever device name is) /bin/true

 Regards,
Nehal Dattani

Chetan Khatri

unread,
May 10, 2013, 3:42:28 PM5/10/13
to vg...@googlegroups.com
First of all sorry for late reply as i was out of station few days.

Thanks to all for your replies,

I have already tried ifconfig, ethtool, mii-tool and other third party tools also but none of them is providing me the solution.

Nehal - As i have mentioned that I need to monitor LED (i.e)  the Hard Link of the interface so Unloading driver is not suitable.
Tejas / Deep - In ethtool there is option for Monitor the Soft Link , it does not monitor the LED as per my analyses, Please correct me if m wrong anywhere.

Actually I am developing a NMS Plugin where i need to monitor the Interface Hard Link (LED).

Thanks & Regards,
Chetan Khatri



--

ElectroMech

unread,
May 11, 2013, 4:45:24 AM5/11/13
to vglug
Hi,


On Sat, May 11, 2013 at 1:12 AM, Chetan Khatri <smarty...@gmail.com> wrote:
First of all sorry for late reply as i was out of station few days.

Thanks to all for your replies,

I have already tried ifconfig, ethtool, mii-tool and other third party tools also but none of them is providing me the solution.


Nehal - As i have mentioned that I need to monitor LED (i.e)  the Hard Link of the interface so Unloading driver is not suitable.
Tejas / Deep - In ethtool there is option for Monitor the Soft Link , it does not monitor the LED as per my analyses, Please correct me if m wrong anywhere.


There are very less chances it will work. Just logically , even if you boot from BIOS do not allow to load os still LED's are blinking. 

There are two LED's, one is for connectivity and other is for data.
 
Actually I am developing a NMS Plugin where i need to monitor the Interface Hard Link (LED).

You need to develop a patch to control LED, if controls are given in Network cards.

And in few cards only the patch is available to controls LED, not all.

This is my observation. 

Might help you.



Thanks & Regards,
Chetan Khatri



Thanks and Regards. 

--
--
Nilesh Vaghela
(RHCSA RHCE)
ElectroMech Corporation
Redhat Channel Partner and Training Partner
302, New York Plaza, Opp Judges Bunglow, Bodakdev, Ahmedabad
22, 1st Floor, Vardhaman Complex, Subhanpura , Baroda.
www.electromech.info
Reply all
Reply to author
Forward
0 new messages