LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Difference between ifconfig down and ifdown (https://www.linuxquestions.org/questions/linux-networking-3/difference-between-ifconfig-down-and-ifdown-4175440247/)

kanishka.dutta 12-06-2012 05:11 AM

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?

acid_kewpie 12-06-2012 05:37 AM

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

kanishka.dutta 12-06-2012 05:48 AM

Quote:

Originally Posted by acid_kewpie (Post 4843702)
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?

acid_kewpie 12-06-2012 05:49 AM

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.

kanishka.dutta 12-06-2012 06:00 AM

OK .. Thanks for the response :)


All times are GMT -5. The time now is 01:00 AM.