I would probably write a script and stick it in a cron job. something like:
Code:
#!/bin/bash
ping OTHER_HOST -c 3 -w 5 > /dev/null
if [ $? == 1 ]; then
mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth-temp
mv /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth0
mv /etc/sysconfig/network-scripts/ifcfg-eth-temp /etc/sysconfig/network-scripts/ifcfg-eth1
service network restart
fi
It may need tweaking but it will give you a start.