[SOLVED] Create a Cluster by using the LAN IP, not the main/public IP - how to?

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hey,

I have two servers:
Both servers are in the same (Hetzner) 4001 vSwitch: https://www.screencast.com/t/GLPbiq9iK

They can ping/access each other without any problems.
Bash:
root@pmx1298466 ~ # ping 192.168.1.11
PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.
64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.240 ms
64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.380 ms
64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.353 m

root@pmx11298467 ~ # ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data.
64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.261 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.355 ms
64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=0.369 ms

When creating the Cluster I do it like this: https://www.screencast.com/t/qpzj3NSQCvP

The issue is that the Cluster uses the public IP, not the private one, even if I selected it (as you can previously see).

The Proxmox documentation specifies this:
Under Datacenter → Cluster, click on Create Cluster. Enter the cluster name and select a network connection from the dropdown to serve as the main cluster network (Link 0). It defaults to the IP resolved via the node’s hostname.

Also the pvecm documentation specifies this:
pvecm create <clustername> [OPTIONS]
Generate new cluster configuration. If no links given, default to local IP address as link0.

<clustername>: <string>
The name of the cluster.

--link[n] [address=]<IP> [,priority=<integer>]
Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)

--nodeid <integer> (1 - N)
Node id for this node.

--votes <integer> (1 - N)
Number of votes for this node.
So what is basically "link"? Because it seems that it influences the IP used by the Cluster.

My end-game is to set the Cluster to use the LAN IP class, not the public IP.

Thanks!
 
Last edited:
Hey,

I have two servers:
Both servers are in the same (Hetzner) 4001 vSwitch: https://www.screencast.com/t/GLPbiq9iK

They can ping/access each other without any problems.
Bash:
root@pmx1298466 ~ # ping 192.168.1.11
PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.
64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.240 ms
64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.380 ms
64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.353 m

root@pmx11298467 ~ # ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data.
64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.261 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.355 ms
64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=0.369 ms

When creating the Cluster I do it like this: https://www.screencast.com/t/qpzj3NSQCvP

The issue is that the Cluster uses the public IP, not the private one, even if I selected it (as you can previously see).

The Proxmox documentation specifies this:


Also the pvecm documentation specifies this:

So what is basically "link"? Because it seems that it influences the IP used by the Cluster.

My end-game is to set the Cluster to use the LAN IP class, not the public IP.

Thanks!

/etc/hosts should to contain the correct host<-->IP mapping for all cluster nodes.
While joining further nodes you should select what IP to use for the link.
 
/etc/hosts should to contain the correct host<-->IP mapping for all cluster nodes.
While joining further nodes you should select what IP to use for the link.
Sorry for the late reply.

Here's the current hosts file:
Code:
127.0.0.1 localhost.localdomain localhost
46.4.52.91 pmx1298466.eu.neutralisp.com pmx1298466

Should I ... resolve the hostname to the LAN IP? Is that "sane"?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!