nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Linux disable network interface

This is a discussion on Linux disable network interface within the Linux software forums, part of the Linux Getting Started category; I know command service network stop will stop networking. What i want is to disbale just interface eth1 or eth2 ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21-06-2006, 11:14 PM
Senior Member
User
 
Join Date: Jun 2005
Posts: 137
Thanks: 21
Thanked 4 Times in 3 Posts
Rep Power: 5
jerry is on a distinguished road
Default Linux disable network interface

I know command service network stop will stop networking. What i want is to disbale just interface eth1 or eth2

Is there any command that can disable network interface

regards,

JO
Reply With Quote
  #2 (permalink)  
Old 22-06-2006, 01:34 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

To stop / disable network interface use ifconfig command. It is used to configure the kernel-resident network interfaces.

You can pass up and down flags/option to this command.
==> up - This flag causes the interface to be activated. It is implicitly specified if an address is assigned to the interface.
==> down - This flag causes the driver for this interface to be shut down.

So the following command will disable eth1:
Code:
ifconfig eth1 down
And to get it back type the command:
Code:
ifconfig eth1 up
Reply With Quote
  #3 (permalink)  
Old 22-06-2006, 08:27 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 5
tom is on a distinguished road
Default

Jo,

you can use ifup or ifdown command:
* ifup : bring a network interface up
* ifdown : take a network interface down

To take down eth1
Code:
ifdown eth1
To take up eth1:
Code:
ifup eth1
Reply With Quote
  #4 (permalink)  
Old 31-01-2009, 09:25 PM
Junior Member
User
 
Join Date: Jan 2009
OS: kurimim
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
marcos.r.c.vieira is on a distinguished road
Exclamation differences between ifconfig <int> down and ifdown <int>

I have tested both, "ifconfig <int> down" and "ifdown <int>" and the difference I perceived was that the first one had an impact in the routing table, since all the static routes associated with the interface disappeared, even after restarting the interface with the command "ifconfig <int> up". I am not sure it is the normal result of the command or if it is particular to the OS I was using to test (CheckPoint SecurePlatform).

Regards,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Linux disable kernel module / driver sweta Linux hardware 2 21-08-2007 12:38 AM
Redhat linux 4 / 5 disable iptables firewall chiku Networking, Firewalls and Security 0 27-04-2007 05:19 PM
Enable or disable services in Debian Linux raj Linux software 1 25-01-2007 03:00 AM
redhat fedora core linux disable screensaver chiku Linux software 1 13-12-2006 06:35 PM
Linux Network Install vasanth Linux software 1 01-09-2005 10:23 PM


All times are GMT +5.5. The time now is 05:31 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38