When I boot up my Raspberry PI running Raspbian 9 while it's connected to ethernet, eth0 is not seen as disconnected when I unplug the device.
So if I do ifconfig after boot (with wired connection) eth0 has an IP. But when I unplug the ethernet cable, the eth0 interface STILL has an IP address...
BUT: this does not occur when it boots without a connected ethernet cable. If I then connect it wired, it gets an IP, and if I unplug it, eth0 loses its IP - which is what I want.
None of my interfaces have a static ip, I only set the metric from eth0 to 100 and wlan0 to 200.
So how can I make eth0 always lose its IP address whenever the ethernet cable gets disconnected?
<UP>
flag when the cable is disconnected? 2) Does it continue showing<LOWER_UP>
flag andstate UP
too?/sys/class/net/eth0
likecarrier
indicate that eth0 is still up.