LinuxQuestions.org
Help answer threads with 0 replies.
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 12-06-2012, 05:11 AM   #1
kanishka.dutta
LQ Newbie
 
Registered: Dec 2012
Posts: 11

Rep: Reputation: Disabled
Difference between ifconfig down and ifdown


What is the difference in the following:
"ifconfig down lo" and "ifdown lo"?
Can anyone please explain the internal behavoial differenced?
 
Old 12-06-2012, 05:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,390

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
ifdown will wrap ifconfig with the network configuration files, e.g. /etc/sysconfig/network-scripts/ifcfg-eth0 on redhat based systems. Bringing down the interface is fairly simple, but the differences are much more apparent if you comapre ifup with ifconfig
 
Old 12-06-2012, 05:48 AM   #3
kanishka.dutta
LQ Newbie
 
Registered: Dec 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
ifdown will wrap ifconfig with the network configuration files, e.g. /etc/sysconfig/network-scripts/ifcfg-eth0 on redhat based systems. Bringing down the interface is fairly simple, but the differences are much more apparent if you comapre ifup with ifconfig
Do you mean to say that the ifdown will run low level utilities such as ifconfig and route to do the job? Since it is just a wrapper, then the internal fucntionality remain same?

Could you also explain the scenario when ifup is used instead of ifconfig up?
 
Old 12-06-2012, 05:49 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,390

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
yes, ifdown will execute "ifconfig down" inside it.

if you run "ifup eth0" it will fetch the config file and bring up the interface with the correct IP address, mask, routes etc. "ifconfig eth0 up" would just start the interface with no IP etc.
 
Old 12-06-2012, 06:00 AM   #5
kanishka.dutta
LQ Newbie
 
Registered: Dec 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
OK .. Thanks for the response
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
difference ifconfig up and ifup fawrell Linux - Networking 4 12-06-2012 05:15 AM
[SOLVED] What is difference in ip and ifconfig command when usage is for adding alias.? bhushanj_a1 Linux - Networking 3 12-28-2011 07:46 AM
ifconfig , ifdown, ifup deci007 Linux - Newbie 2 11-13-2009 01:00 AM
Difference between Network Connection configuration and ifconfig aarav2306 Linux - Newbie 1 07-07-2009 02:54 PM
what's difference between ifconfig and "hostname -i" SeanatIL Linux - Software 1 07-14-2004 07:31 PM


All times are GMT -5. The time now is 11:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration