User Tools

Site Tools


ifup-ifdown

Ifup-ifdown

ifup - ifdown

restart networking on a DHCP network.

ifdown eth0 ifup eth0

/etc/init.d/ifupdown eth0 :- this doesn't seem to properly deactivate and reactive the network with dhcp etc.

Manual restart of Networking eth0 etc.

As mentioned above, /etc/init.d/ifupdown doesn't fully deactive and reactive eth0, and instead just flushes it etc. In order to manually restart eth0, /etc/init.d/ifdown eth0 must be called. If this is done however and there is no physical access to the server - then, your network goes down and you cant reach your server. This is very very bad. A simple piped sleep ifdown ipup command can be called however. The command is: sleep 90 | ifdown eth0 && ifup eth0

ip link show eth0 //the iproute package is required. If there is no ip package, apt-get install iproute

If eth0 has a Network link, the following will be returned:<br> 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000<br> link/ether 00:0c:29:26:57:4e brd ff:ff:ff:ff:ff:ff<br>

If eth0 has no Network link, the following will be returned:<br> 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000<br> link/ether 00:0c:29:26:57:4e brd ff:ff:ff:ff:ff:ff<br>

The “UP” is the operative word.


More info at: http://learnlinux.tsf.org.za/courses/build/net-admin/ch05.html

ifup-ifdown.txt · Last modified: 2022/07/19 21:13 by 127.0.0.1