Proxmox Host & VMS different IP Ranges

andrewhfr

New Member
May 1, 2020
8
1
3
49
Hello,

Please bare with me as I slowly learning proxmox.

My server has 2 Nics labelled "enp2s0" and "enp3s0".

Is it possible to have a Proxmox host running on say 192.168.1.10 and have all the created VMs running on say 192.168.2.1, 192.168.2.2 and so on?

I am not sure where to start on achieving this so any pointers would be much appreciated.

Thanks,

Andrew
 
Last edited:
Yes. You can have the other subnet running on the second NIC if you wish. To do so, add a new Linux Bridge to your network config and use `enp3s0` (or the other) as bridge port. You don't have to define an IP address if the PVE host itself should not be reached in the other network.


Which IP addresses you assign your VMs is completely up to you. Technically it is valid to have different subnets on the same physical link. It's not a secure abstractions (VLANs would be used for that) and traffic between the two networks will need a router.
 
  • Like
Reactions: andrewhfr
Hello Aaron,

Thanks for the reply it is much appreciated. I will have a go at what you said.

Regards,

Andrew
 
Another thing, if you install `ifupdown2` you can apply network changes to the host without a reboot.

apt install ifupdown2 on the CLI
 
  • Like
Reactions: hmohr
@andrewhfr Sorry to dig out this post again, but I'm struggling to achieve the same thing with IP ranges 192.168.0.0/24 and 172.16.0.0/16. Could you please post the `/etc/network/interfaces` file you ended you with?
Also, wouldn't there be multiple gateways, one for each subnet?
I'm just getting started in networking, so I'm sorry if this question seems stupid.
 
@andrewhfr Sorry to dig out this post again, but I'm struggling to achieve the same thing with IP ranges 192.168.0.0/24 and 172.16.0.0/16. Could you please post the `/etc/network/interfaces` file you ended you with?
Also, wouldn't there be multiple gateways, one for each subnet?
I'm just getting started in networking, so I'm sorry if this question seems stupid.
Does the PVE node need access in these different subnets or just the guest? The two subnets are on different NICs right?
 
The PVE nodes in the cluster only need to talk to each other, while the the VMs also only need to talk to each other. And yes, both Subnets are on different interfaces.
 
Well, can you show us your network config?

I am still not sure if the VMs need access to both networks and if the nodes themselves (e.g. GUI) needs to be accessible on both networks.
 

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!