Adding IPv4 block to a container?

Speedy059

Renowned Member
Jul 3, 2010
14
1
68
In Proxmox I can easily add a single IPv4 to a container, no problem. How do I add an IPv4 Range to a container? Let's say I wanted to add an entire /24 block to a container, I don't quite see how to do that from the GUI. Anyone have any guidance on how to add more than 1 IP address to a container? Same question applies to a VM, but more urgently I'm trying to figure it out for a container.
 
More I research this, i'm starting to think the IPv4 block (or multiple IP's) needs to be added via CLI. Anyone have any guidance on how to accomplish this? I currently have the proxmox host port as a trunk, so I can pass several different networks in for the CT's and VM's. Surely there is a way to add more than 1 IP without creating a bunch of new interfaces?
 
You don't need to configure the IP-addresses via PVE's automatism at all - if a container should configure all 256 ips from a /24 - just configure it manually/via config management inside the container and disable the automatic network configuration done by PVE:
see the '.pve-ignore' hint in the reference documentation:
https://pve.proxmox.com/pve-docs/chapter-pct.html#_guest_operating_system_configuration

for VMs this is even more true - a VM's network interface is a virtualized NIC - you configure the IPs inside the guest

I hope this helps!