I've got 2 PCs connected on an Ethernet crossover cable. On PC1 I run:
sudo ip addr add 192.168.2.1 peer 192.168.2.2 dev eth0 sudo ip link set dev eth0 up
On PC2 I run:
sudo ip addr add 192.168.2.2 peer 192.168.2.1 dev eth0 sudo ip link set dev eth0 up sudo ip route add default via 192.168.2.1
What's the cleanest way to replicate this set up in the interfaces(5) config file, so I can run ifup(8) instead of configuring each interface manually?
I'm on Linux Mint 15, if it matters, but I'd think it'd be the same in any Debian-based distro.