Having multiple IPs per server

Businezz

New Member
Jan 6, 2023
15
1
3
Hey,

I’m new to proxmox, still learning. Finally i got a chance to mess with the GUI and learn about it.

But there’s something that I didn’t found yet. Currently when I deploy VM i am assigning IPs manually during the OS installation which is fine. Is there a way to have IPs automatically assigned on the VM during the installation?

Example: I have 10 usable IPv4, instead of adding them one by one on each VM, can i have them set automatically? So the VM can pick the first available random IP during the OS installation or however is possible.

I can’t find anything about it online, google, youtube, forums. Any help is appreciated!

TIA
 
You need to have a DHCP server on your network. There are lots of possibilities, depends on your use case.

Simplest setup would be to create a small lxc container and install isc-dhcp-server. If you're running windows server, you can add the DHCP role and do it that way. Quite often, the approach is to install a firewall/router appliance such as pfsense or opnsense and use them to provide DHCP & DNS
 
You need to have a DHCP server on your network. There are lots of possibilities, depends on your use case.

Simplest setup would be to create a small lxc container and install isc-dhcp-server. If you're running windows server, you can add the DHCP role and do it that way. Quite often, the approach is to install a firewall/router appliance such as pfsense or opnsense and use them to provide DHCP & DNS
Hi,

The server im using is on debian 11 if that makes any difference in my question and your answer…

Ty
 
Hey, it's been a while. I followed the steps and everything works! Thanks.

Question... If i get another range of IPs from my provider, should i add those the same way i did with the original IPs?

Just adding an additional line like with the new IPs will it work?

Code:
# specify network address and subnetmask
# specify the range of lease IP address
subnet 10.0.0.0 netmask 255.255.255.0 {
    # specify gateway
    option routers 10.0.0.1;
    # specify subnet mask
    option subnet-mask 255.255.255.0;
    # specify the range of lease IP address
    range dynamic-bootp 10.0.0.200 10.0.0.254;
}
 
  • Like
Reactions: trentmu
Hey, it's been a while. I followed the steps and everything works! Thanks.

Question... If i get another range of IPs from my provider, should i add those the same way i did with the original IPs?

Just adding an additional line like with the new IPs will it work?

Code:
# specify network address and subnetmask
# specify the range of lease IP address
subnet 10.0.0.0 netmask 255.255.255.0 {
    # specify gateway
    option routers 10.0.0.1;
    # specify subnet mask
    option subnet-mask 255.255.255.0;
    # specify the range of lease IP address
    range dynamic-bootp 10.0.0.200 10.0.0.254;
}

Not sure if I understand your question correctly, but ip addresses provided by an ISP are public addresses, not local (like 10.0.0.0/24).
 

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!