LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2009, 02:42 AM   #1
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
How can I REALLY disable a NIC?


g'morning guys

I have the following problem which I can't figure out to solve it.
I know how to disable a NIC with ifconfig or ip, but the problem is that our cisco router still "sees" the NIC as connected.

A colleague told me, that Windows could actually really disable the device by powering it off. It then appears as "not connected" for the router. But this doesn't happen by just typing in ifconfig eth0 down or ip link set dev eth0 down. Both commands work fine, but the router still detects the NIC as connected.

I also thought of unloading the module, but I don't know if that's the only possibility. Could someone tell me if and how this is possible?

Thanks in advance!
 
Old 07-08-2009, 03:08 AM   #2
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111
Blog Entries: 1

Rep: Reputation: 17
you need to disable the NIc from bios if it is on-board otherwise unplug the network cable.


Quote:
Originally Posted by ap0calypse View Post
g'morning guys

Iodule, but I don't know if that's the only possibility. Could someone tell me if and how this is possible?

Thanks in advance!
 
Old 07-08-2009, 03:21 AM   #3
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 16
Well, that's not really a satisfying answer. Is there really no possibility that works "online"?
 
Old 07-08-2009, 03:25 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
have you tried something like

Code:
perl -pi -e's/ONBOOT=yes/ONBOOT=no/' /etc/sysconfig/network-scripts/ifcfg-ethxx
and then a network restart?
 
Old 07-08-2009, 03:32 AM   #5
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 16
You don't get my problem :P I just want to make one of my NICs more or less "powerless" (switch off the link).
I just can't accept that Windows can do this an Linux can't ... I don't want to believe this!
 
Old 07-08-2009, 03:37 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
hmmm...apart from unaliasing the driver and restarting the network...

Code:
less /etc/modprobe.conf
alias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter ata_piix
 
Old 07-08-2009, 03:44 AM   #7
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
unload the driver modprobe -r drivername
set the power to zero with ACPI/APM like this

Get the device to shutdonw
Code:
lspci
echo 0-3 into the sys file
Code:
echo 3 > /sys/bus/pci/devices/num_of:your:device/power/state
And the nic should be gone. to reenable just echo 0 to the file. Not quite sure of the numbers. All taken from http://files.opensuse.org/opensuse/e...opendesign.pdf


Cheers Zhjim
 
Old 07-08-2009, 03:46 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Heres a nother link that might be helpful
http://www.gentoo.org/doc/en/power-management-guide.xml
 
Old 07-08-2009, 04:05 AM   #9
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 16
Thanks zhjim, I guess this could possibly help me out.
At first I tried it with simple echo, but after an error message i figured out that it had to be "echo -n"

I'll talk to my colleague to test it now.

Thanks so far!
 
  


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
How to disable networking function of a NIC longtongfish Linux - Networking 1 08-23-2007 08:15 AM
Disable 1 of my 2 NIC in bootups packets Linux - Networking 11 05-20-2007 05:49 PM
How to disable eth1 (wireless nic card) at startup? exitsfunnel Linux - Wireless Networking 4 02-27-2005 11:27 PM
Disable Intel Pro Wireless 2100 Centrino NIC using HD install of Knoppix Substandard Linux - Newbie 1 02-04-2005 12:08 AM
disable plug and play on isa nic alkee Linux - Networking 4 02-15-2002 04:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:27 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