1

I installed Ubuntu 14.04.3 LTS on two HP Servers. Each server has four network interfaces and I want to use the 2nd interface to connect the two servers. The first interface (em1) is configured to connect to a router and works fine on both servers. I tried the following on server 1 :

iface em1 inet static
address 192.168.1.XX
netmask 255.255.255.0
gateway 192.168.1.1


auto em2
allow-hotplug em2
iface em2 inet static
address 192.168.1.2
netmask 255.255.255.0

and on server 2 :

iface em1 inet static
address 192.168.1.YY
netmask 255.255.255.0
gateway 192.168.1.1

auto em2
allow-hotplug em2
iface em2 inet static
address 192.168.1.2
netmask 255.255.255.0

which is basically inspired from this so question

but then I try to ping from one to the other :

ping -I em2 192.168.3.2
PING 192.168.3.2 (192.168.3.2) from 192.168.3.1 em3: 56(84) bytes of data.
From 192.168.3.1 icmp_seq=1 Destination Host Unreachable
From 192.168.3.1 icmp_seq=2 Destination Host Unreachable

Ultimately I'd like to ssh from one server to the other. This is my first foray into networks, so forgive me if the answer is obvious.

  • Do you intentinally ping 192.168.**3**.2? The configuration you give here all operates in the subnet 192.168.**1**.0. Also, how is em3 configured, as the reply is coming in from em3. – s3lph Nov 24 '15 at 20:15
2

You are using the same address 192.168.1.2 on both servers. That is the first error.

I would also suggest to use another class of addreses for the interconnection. If you have servers connected to the network on 192.168.1.XX and 192.168.1.YY, then use another class for interconnection. For instance use 192.168.2.XX and 192.168.2.YY for the second network cards. Then you can ping 192.168.2.YY from the XX and 192.168.2.XX from YY.

So use 192.168.1 for the network and 192.168.2 for interconnections. But do not assign both servers the same address. That causes collisions on the network.

If you have addresses setup correctly you don't need to use -I in ping. The ping will find out correctly which adapter to use by the destination address. It will forward all traffic to 192.168.1.0/255.255.255.0 and all other addresses via em1 because default gateway is setup there. It will use em2 only for addresses 192.168.2.0/255.255.255.0.

I assume you know netmasks addresses and stuff. w.x.y.z/255.255.255.0 means that addresses with the same w.x.y are on the same segment and addreses that have different w.x.y are going to be accessed via default gateway which takes care that packets get to the right destination.

| improve this answer | |

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.