I am trying to simulate disconnecting the network cable from a pi.
So how do I invoke this? I've tried ifdown / ifup in various different forms.
When I say simulate, you may ask yourself on what level. All, the system must behave as though there has been a break at layer 1 OSI(physical).
Now maybe I sound a bit too stringent in my question, I don't want to go touching drivers and anything on the kernel level.
What I have so far is this, and my ultimate question is: I have a console cable to my cisco router. It has a switch EHWIC card, to which my pi is connected, to one of the ports.
From pi in terminal:
sudo ifconfig eth0 down
sudo ifconfig eth0 up
And the router reports the interface goes down on layer 3 and layer 2. and then up again. Is this the closest I am going to get?