0

I have bought another server for mysql. and now the webserver and the mysql server are connected with a crossover cable.
I want to configure ips manually.
On webserver eth1 is for internet. eth0 is connected to crossover cable.
how should I configure this file on webserver.
/etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82579LM Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=none
BROADCAST=x.x.x.x
HWADDR=00:25:90:57:d7:63
IPADDR=x.x.x.x
NETMASK=x.x.x.x
NETWORK=x.x.x.x
ONBOOT=no
GATEWAY=x.x.x.x
TYPE=Ethernet
  • Are you trying to set up a private network? – NickW Feb 6 '13 at 16:53
1

On server 1:

TYPE=Ethernet
DEVICE=eth0
IPADDR=10.0.0.1
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes

Then on server 2:

TYPE=Ethernet
DEVICE=eth0
IPADDR=10.0.0.2
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes
  • eth1 is for internet in this case; did you mean eth0 ? – thinice Feb 6 '13 at 16:56
  • Yes, sorry, I copied is from my VPS witch is connected with a virtual cross-cable ;) – Loo Cypher Feb 6 '13 at 17:02
  • You probably also want to make sure to bind the mysql server to this interface too. This is the bind-address setting in the my.cf. – chrskly Feb 6 '13 at 17:12
  • thank you I changed files and I did "service network restart" and then I used ping to check if it work or not. it is not working. How do I check if the crossover cable is connected properly or it is not. – Mehdi Azizi Feb 6 '13 at 17:20
  • You could check what it does if you switch the cable from eth1 to eth0, if the port works, then you know that it's the cable. This config is tested (linuxquestions.org/questions/linux-networking-3/…) – Loo Cypher Feb 6 '13 at 17:32
0

For the interfaces connected through the cross over cable (direct nic-to-nic connection) i.e. eth0 ,make sure the IP address assigned to both interfaces is with in the same subnet. It is also recommended that the IP address to be within the reserved private networks (check RFC 1918).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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