[SOLVED] Changed DHCP Range of Router -> Proxmox Server has no valid IP-Adress

Rututum

New Member
Aug 11, 2021
11
0
1
30
Hi there

I changed the DHCP-Range of my Router due to use of VPN for connections to my servers from outside the network.

When i set up my Proxmox Server(s) (Cluster), i had to set a IP-Adress for the Proxmox-Server.
I think, this was the adress, which was used by the server before. Everything was good.

But when i changed the DHCP Range, my Proxmox-Servers could not get a new IP-Adress per DHCP.
But want to still use the old ones, and this is not possible.
The servers are now not connected to the network!
I had restarted the Servers and all other devices after changing the DHCP Range.


Question:
How can i configure a Proxmox Server, that it use a automatically generated IP-Adress from DHCP?
Or if this is not possible: How can i change the IP Adress of my Servers, probably without using DHCP?

I would be lucky, if i do not have to change IP-Adresses manually all the time, so using DHCP would be nice....


Thanks very much for your help

Greetings

Rututum
 
Hey oguz

thanks very much.
When DHCP isn't recommended for the host, i will use the static IP.
So the /etc/network/interfaces - "Method" should be enough.

Just one little question:
Why do i need to configure the static IP Adress within my Proxmox Server an not within the router?
Normally i need to "allocate" the static IP in my Router settings, which is naturally not possible at the moment.
So how will my Server get the IP when the router does not know about it?
Or is this a pseudo problem?


Thank you very much for your help, i'm very lucky that i found a solution for this actually simple Problem.

Greetings

Rututum
 
Why do i need to configure the static IP Adress within my Proxmox Server an not within the router?
Normally i need to "allocate" the static IP in my Router settings, which is naturally not possible at the moment.
So how will my Server get the IP when the router does not know about it?
Or is this a pseudo problem?
that "allocating" the static IP address on your router settings would be what i described earlier, that usually works with DHCP and a specific MAC address (as in, the router then knows which IP to assign for that device MAC).

when you configure static IP in the interfaces file, there's no DHCP involved

Thank you very much for your help, i'm very lucky that i found a solution for this actually simple Problem.
you're welcome!
 
Hey oguz

Me again

I changed the ip's of the three servers to 192.168.11.150-152. (192.168.11.150/24)
Those are free ips in the network.

The default gateway is set to 192.168.11.1, which is the internal ip of the router, should be correct.

Now, just one server is functioniong correctly, the others are running but not available in the cluster, like in picture.
In the Network, they're online.
Cluster 1.PNG

The Node which is running correctly changes after reboot all servers.


Is the ip "/24" correct, or do i have to use "/16" ?
I thing 24 should be correct.


Could you give me a hint, how i can solve this?


Greetings

Rututum
 
....
Could be due to clustering, becuase older IPs are deposited.
Can i change the ips of the nodes in the cluster?
 
Could be due to clustering, becuase older IPs are deposited.
yeah that's the reason why they don't show up.

Can i change the ips of the nodes in the cluster?
you can change the IP addresses in the corosync configuration (careful while editing this, follow the wiki [0])

also you might have to change the IP address in /etc/hosts as well, see [1]

[0]: https://pve.proxmox.com/pve-docs/chapter-pvecm.html#pvecm_edit_corosync_conf
[1]: https://pve.proxmox.com/wiki/Renaming_a_PVE_node
 
Hi oguz

Unfortunately, i cannot change the file /etc/pve/corosync.conf, what is needed.
Permission denied!

Changing the right to write for root (seems to be the owner) with chmod is not functioning.


finally i changed the other two files, but this is obviously not enough, since propagation, like said in the wiki, comes from the other one.

1. why is it not possible to change the file or overwrite or replace it?
2. How can i change my rights? Im root user, i should be able to do anything! XD


Thanks for help

Greetings

Rututum
 
Unfortunately, i cannot change the file /etc/pve/corosync.conf, what is needed.
Permission denied!
check the doc link i've sent you -- you can't edit that file directly.

if it still doesn't work try like the following:
Code:
systemctl stop pve-cluster corosync
pmxcfs -l
cp /etc/pve/corosync.conf /etc/pve/corosync.conf.bak
vi /etc/pve/corosync.conf # change IP
killall pmxcfs
systemctl restart pve-cluster corosync
 
Nice Shot!
I Think your Code worked.

Second Node is online...

Cluster 3.PNG
cluster 4.PNG

The IPs in the Cluster are now the new ones.

Thus, the third node don't want to run in the cluster, who knows why...



I controlled the files /etc/pve/corosync.conf and the /etc/hosts, since they are look ok, it should all be good.
Used your Method (code) to change the corosync.conf file.

After reboot of all Nodes, it is still the same.


Is there another File which i need to change?


Greetings

Rututum
 
you can try adding the IP address for that pve3-hp in the /etc/hosts files on the other nodes, for example

Code:
127.0.0.1 localhost.localdomain localhost
192.168.11.150 pve1
192.168.11.151 pve2
192.168.11.152 pve3-hp

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
Hey oguz

It still does not work.

I checked all files on all nodes and tried the hint above.
So i changed the hosts file.

The node pve3-hp is still outside of the cluster.

Cluster seems to be working (superficial), since the join information is now available again.
The Summary shows, two nodes online, one offline.

Greetings

Rututum
 
Hey There

Problem solved!.........
Cluster 6.PNG


Checked all files again, restarted services and reboot the nodes.

Probably there was just a simple mistake in writing in some file or something similar........

Now it's running.


Thank you very much.


Greetings

Rututum
 
great! please mark the thread [SOLVED] by editing the title prefix
 

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!