Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a CentOS box with multiple NIC's running Apache. I also have another box running RHEL that will be the MySQL server. I'm trying to use the secondary NIC on the Apache box to connect directly to the MySQL server, but so far no luck. I want to isolate the MySQL box as much as possible which is why I'm going for a direct connection as opposed to running through a switch.

I have a crossover cable running between them.

IP configs:

Apache box

eth0 [to lan]
ip addr:

eth1 [to mysql]
ip addr:
gateway:  [blank]

MySQL box

eth0 [to apache]
ip addr:

The rest of our network is on subnet.

Ping only returns Destination Host Unreachable. I've tried various variations of this setup (including straight through cable), and I can't seem to get them to talk to each other.

Any help appreciated.

share|improve this question
up vote 1 down vote accepted

There are a few small issues with your setup so far: - The Apache box's gateway isn't reachable on any of its interfaces. Set the Apache box's eth0 IP address to something on your subnet. - All your netmasks are putting all your addresses on a subnet, adding confusion. Set all your netmasks to - Unless your Apache box is performing routing (don't do that), it won't behave as a gateway. Change the MySQL box's eth0 gateway to [blank].

Once those are done, at the Apache box, do ping It should decide to use eth1, since it is on the subnet, and the ping should get to the MySQL box (firewalls notwithstanding).


share|improve this answer
Thanks! That did it. – stormdrain Jun 1 '10 at 20:32

Your Answer


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.