Node can not connect to other node with its private IP

I have 3 servers in same datacenter and running ip a and ip r on the nodes, I see the private IP addresses listed.

I don't want to use Network Helper as I need a fixed static IP for specific machine, not autogenerated.

Output of ip a


root@ubuntu:~# ip a | grep inet
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
    inet 192.168.130.1/17 brd 192.168.255.255 scope global eth0
    inet 109.XXX.XX.XX/24 brd 109.XXX.XX.255 scope global eth0:1
    inet6 2a01:7e00::f03c:91ff:fed8:2486/64 scope global dynamic 
    inet6 fe80::f03c:91ff:fed8:2486/64 scope link 

Output of ip r

root@ubuntu:~# ip r
default via 212.71.249.1 dev eth0 
192.168.128.0/17 dev eth0  proto kernel  scope link  src 192.168.130.1 
109.XXX.XX.0/24 dev eth0  proto kernel  scope link  src 109.XXX.XX.XX

But I am unable to ping any node from any other node using private IPs. Public IPs are working fine and are open to ping.

when using ping on private IP

root@ubuntu:~# ping 192.168.130.1
PING 192.168.130.1 (192.168.130.1) 56(84) bytes of data.
From 192.168.130.3 icmp_seq=1 Destination Host Unreachable
From 192.168.130.3 icmp_seq=2 Destination Host Unreachable
From 192.168.130.3 icmp_seq=3 Destination Host Unreachable

when using ping on public IP

root@ubuntu:~# ping 109.XXX.XX.XX
PING 109.XXX.XX.XX (109.XXX.XX.XX) 56(84) bytes of data.
64 bytes from 109.XXX.XX.XX: icmp_seq=1 ttl=63 time=0.498 ms
64 bytes from 109.XXX.XX.XX: icmp_seq=2 ttl=63 time=0.561 ms
64 bytes from 109.XXX.XX.XX: icmp_seq=3 ttl=63 time=0.526 ms
64 bytes from 109.XXX.XX.XX: icmp_seq=4 ttl=63 time=0.505 ms

7 Replies

Something looks a little off with the IPs assigned to eth0 and eth0:1. Can you attach your network config file for one of those servers?

Here is the content of /etc/network/interfaces


# The loopback network interface
auto lo
iface lo inet loopback

# This is an autoconfigured IPv6 interface
iface eth0:1 inet6 auto

# The primary network interface
auto eth0 eth0:1
iface eth0:1 inet static
    address 109.XXX.XX.XX/24
    gateway 109.XXX.XX.1

iface eth0 inet static
  address 192.168.130.3/17

I tried with this version as well and rebooted but, no change


# The loopback network interface
auto lo
iface lo inet loopback

# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto

# The primary network interface
auto eth0
iface eth0 inet static
    address 109.XXX.XX.XX/24
    gateway 109.XXX.XX.1
    up   ip addr add 192.168.130.3/17 dev eth0 label eth0:1
    down ip addr del 192.168.130.3/17 dev eth0 label eth0:1

Hmm… either one of these configs should work. Did you confirm that each private IP is assigned to the correct Linode? You should be able to confirm on each Linode's Remote Access page.

Any firewall rules in place that might be blocking ICMP traffic?

Yes, I confirmed but by logging into each node.
Only Private IP assigned via Network helper is being shown on Remote Access Page, not the ones I manually assigned via configuration.

I have disabled the Auto Network Management from my machine configuration as I need to have specific static IP for each of my nodes.

I did not add any new firewall rules, and I am able to ping via public IP so I am guessing ICMP traffic is not blocked.

I checked via iptables and ufw and could not find any active rules for blocking any kind of traffic.

So, you're using different private IP address than the ones assigned to you in the Linode Manager?

If so, that won't work -- you'll need to use the IPs assigned by Linode. Is there a reason you need to use specific private IPs?

Yes, I want to identify my nodes based on IP.

If I cannot use different private IP other than already assigned by Network Helper, what is the advantage of turning off Auto Network Management in configuration.

There are some cases where you would need to disable the network helper. For example, if you wanted to specify custom DNS resolvers or if you needed too assign IPv6 addresses from an IPv6 pool/range.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct