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 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:  192.168.200.100
netmask:  255.255.0.0
gateway:  192.168.111.1

eth1 [to mysql]
ip addr:  192.168.200.101
netmask:  255.255.0.0
gateway:  [blank]

MySQL box

eth0 [to apache]
ip addr:  192.168.200.203
netmask:  255.255.0.0
gateway:  192.168.200.201

The rest of our network is on 192.168.111.0/24 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

1 Answer 1

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 192.168.111.0/24 subnet. - All your netmasks are putting all your addresses on a 192.168.0.0/16 subnet, adding confusion. Set all your netmasks to 255.255.255.0. - 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 192.168.200.203. It should decide to use eth1, since it is on the 192.168.200.0/24 subnet, and the ping should get to the MySQL box (firewalls notwithstanding).

Cheers!

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

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.