Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
        address 11.22.33.5
        netmask 255.255.255.248
        network 11.22.33.3
        broadcast 11.22.33.10
        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
        address 11.22.77.8
        netmask 255.255.255.248
        network 11.22.77.6
        broadcast 11.22.77.23
        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

share|improve this question
2  
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
1  
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
1  
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
add comment

2 Answers

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
        address 11.22.33.1
        netmask 255.255.255.248
        network 11.22.33.0
        broadcast 11.22.33.7

# Server B
iface eth0 inet static
        address 11.22.33.2
        netmask 255.255.255.248
        network 11.22.33.0
        broadcast 11.22.33.7

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.