How to move physical host to new network with new gateway?

bvrulez

Member
Jan 13, 2022
61
2
8
43
I have a gateway 192.168.100.1 and the host has an assigned Ip 192.168.100.89 in that LAN.

Now I want to move the physical host to a new LAN with a range 192.168.200.0/24 and the new gateway will be 192.168.200.1.

Is it enough to change those settings in Proxmox/System/Network where I have my vmbr0?

I tried to add a new vmbr1 as a test. I thought I might be able to add two seperate configurations and the host will connect according to the IP the LAN will assign to it. But the new vmbr1 can not have a second gateway. There obviously can only be one gateway.

How can I make sure I am not locking myself of beeing able to manage it? As a test I moved the machine already and after booting my display showed the old IP and a CIFS error (I had a CIFS mount in fstab). I was not able to use the keyboard to do anything so I am very anxious to lock me out with wrong settings for the gateway and network.
 
Thanks, but actually I read that before and it does not fit my case because the gateway doesn't change.
 
Edit /etc/network/interfaces (including gateway)
Edit /etc/hosts
Edit /etc/issue (This is shown on the screen after boot)

Reboot
 
  • Like
Reactions: bvrulez
How many nics do you have on the proxmox node?

If at least 2, you can take it slowly and setup vmbr1 (without a gateway) with a static Proxmox address (192.168.200.2 for example) in the 192.168.200.0/24 subnet and use the second nic as bridgeport. Connect that second Proxmox nic to the 192.168.200.1 gateway/router and see if you can ping proxmox at 192.168.200.2 from the 192.168.200.1 gateway/router. If that works you are likely ready to take the leap of faith and remove the 192.168.100.1 gateway from vmbr0 and add the 192.168.200.1 gateway line to vmb1 and change the /etc/hosts file as described in the webpage.
 
  • Like
Reactions: bvrulez
Thank you very much for the detailed response. I did not have two NICs but that is going to happen in the future. :) I successfully used the GUI to change /etc/hosts and the vmbr0 interface with changes to the gateway and it worked fine in the second LAN.

However, I wonder if a dynamic setting should be possible so that the IP gets set automatically according to the specific LAN the hosts is put into and thus the gateway is also set automatically in that process. But maybe this is just not the way it works on a professional setup.
 

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!