I dont know if there is a way to detect a bad ended network device.
I guess the best you can do is set up a scipt that pings the routers ip and if it fails does a "ifconfig eth0 down && ifconfig eth0 up".
Code:
while true
do if ping -c1 192.168.1.2
then sleep 1
else echo "its gone !!!"
ifconfig eth0 down
ifconfig eth0 up
fi
done
I have not tested it but it worked with the echoes, so on your your own risk
.