# How to connect frontend and backend Linux servers using cable?

I'm trying to connect a web server A, with a database server B so that they have the least possible delay. Both servers run Debian, are on the same rack and are connected together by a cable on their second Ethernet port . here are the /etc/network/interfaces specs.

Server A (front)

auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
network 11.22.33.3
gateway 11.22.33.4
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8


Server B (back)

auto lo
iface lo inet loopback
auto eth0

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
network 11.22.77.6
gateway 11.22.77.7
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 11.22.77.89


I am wondering what change(s) should I make to the interface files in order to make server A communicated directly with B through the cable. Thanks

• I highly recommend you use the ipcalc tool to assist you with choosing a suitable subnet for the connection. Better, use IPv6 for the link and you can use the link-local addresses. – MikeyB Oct 8 '12 at 18:18
• Please make sure that eth0 is the actual port you want to use for the cross connect link. Choosing the wrong NIC will make you lose access. – pauska Oct 8 '12 at 18:29
• If you want the least possible delay have you considered using Infiniband? it's latencies are an order of magnitude better than IP over 1GigE. – Chopper3 Oct 8 '12 at 18:31

Make sure the IP-addresses are on the same IP-network. In the config-snips you gave, they aren't.

So a valid configuration would be:

# Server A
iface eth0 inet static
network 11.22.33.0

Learn about how IP-networks, their sizes and how netmasks work. The config-snips you gave make no sense at all. network 11.22.33.3 is no network (networks always start with even numbers) and 11.22.77.23  is not the broadcast address of the network 11.22.77.6 with the netmask of 255.255.255.248.
Neither should have a gateway set, since there is no routing going on. Configure both interfaces to be on the same subnet. Then create a persistent static route on both machines that point to each other and is bound to the second interface. man route should help you with this part if you're unsure of how to do it.