I have two Ubuntu PCs whose network cards connected directly to each other with cross-over cable. I have assigned ip addresses manually to their interfaces using command similar to
ifconfig eth0 192.168.2.1 up
The problem is that every time I physically disconnect those PCs, the connection goes down and next time when I connect it back, the IP addresses are lost. Also whatever applications I have bound to those addresses before disconnect needs restarting two.
Is there a way to keep network interfaces UP during physical cable disconnect so the apps which create listening sockets on those addresses, would not need to be restarted after re-connect?