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
Loo Cypher
  • 38
  • 3
Mehdi Azizi
  • 51
  • 11

2 Answers2

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
Loo Cypher
  • 38
  • 3
  • eth1 is for internet in this case; did you mean eth0 ? – thinice Feb 06 '13 at 16:56
  • Yes, sorry, I copied is from my VPS witch is connected with a virtual cross-cable ;) – Loo Cypher Feb 06 '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 06 '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 06 '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 (http://www.linuxquestions.org/questions/linux-networking-3/file-transfer-using-ethernet-cross-over-cable-802756/) – Loo Cypher Feb 06 '13 at 17:32
  • I dont have phisical access to the server. can you answer my new question http://serverfault.com/questions/476669/ethernet-cable-is-connected-but-it-shows-unplugged – Mehdi Azizi Feb 08 '13 at 00:36
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).

Daniel t.
  • 9,061
  • 1
  • 32
  • 36