can i regularly run dhclient
I am away from my computer (I use it remotely) and it uses a dynamic (DHCP) IP. My network set up is like this:
computer === hub === network (DHCP)
The problem is that the cable between the hub and the network port is bad and doesn't stay in, so it often disconnects randomly for periods of time. When it disconnects and then reconnects, my computer can no longer access / be accessed from the network, because the dhclient only runs at startup. I have ifplugd but this doesn't help since the immediate connection between my computer and the hub is always working (i.e. there is no way to tell from the computer that the cable is disconnected or reconnected). Since I use it remotely, I have to have other people physically there to reboot it or otherwise re-bring-up the interface, which is very inconvenient.
So I was wondering if there is a way to automatically run dhclient every hour or so, so that if the cable disconnects and reconnects, it will automatically re-establish the connection.
|