What's the difference between ifconfig eth0 down and physically unplugging eth0 cable? Do they mean the same thing to an application?
Edit:
I have an application that uses a specific interface let's say eth0 and it crashes if I do ifconfig eth0 down and then back ifconfig eth0 up. Ideally the application should resume but it crashes. On the other hand, if I just unplug the eth0 cable, the application is still running but there is no incoming data and if I plug the cable back again the data stream resumes. Also when I run ifconfig command (after unplugging the cable), the output of ifconfig still shows eth0 as up. However ifconfig eth0 downremoves the interface all together. One more thing, the routes are deleted as well incase of an ifconfig eth0 down but not in case of unplugging the cable. So I am guessing unplugging the cable physically is not the same as using the command ifconfig eth0 down. Correct me if I am wrong. Is there a way to simulate an ethernet cable being unplugged? Apart from adding a rule in iptables and dropping the traffic altogether.