create vm using different subnet ips (KVM)

somnath31

Member
Oct 9, 2020
13
0
6
31
Hello!
Is there any way to add a different IP subnet and create vm using them?
Also I want to use the IPs from the new server to create vm in future servers when I add more servers into the cluster.

Here's the situation:
the main node where vm will create have 1 /32 IPv4 for a subnet Ex: 59.54.45.554

Now I want to add another sunbet on my proxmox setup /22 IPv4
Example: 79.154.169.240


So how to do it?

As the main server have only 1 IPv4 so I have to add this new subnet to create vm



Do I need to add a new bridge on /etc/network/interfaces ?
Something like vmbr0:0 ?


Or any different setting?



Right now my /etc/network/interfaces have something like this

Code:
auto vmbr0
iface vmbr0 inet static
address 59.54.45.554/32
gateway 59.54.45.1
bridge-ports eth0
bridge-stp off
bridge-fd 0

iface vmbr0 inet6 static
address 2a94:483a::5
gateway 2a94:483a::1



How I can add the new subnet on the server so then I can create vm?
Also I will add more server in the cluster in future, so the subnet needs to work on all servers.

Which kind of settings I need?


anyone help??
 
hi,


yes

but not like that, using vmbrN (where N is a number) should also work

you should check our network configuration docs [0]

[0]: https://pve.proxmox.com/wiki/Network_Configuration

So you mean in /etc/network/interfaces

I have to make some changes similar to this?

Code:
auto vmbr0
iface vmbr0 inet static
address 59.54.45.554/32
gateway 59.54.45.1
bridge-ports eth0
bridge-stp off
bridge-fd 0


iface vmbr0 inet6 static
address 2a94:483a::5
gateway 2a94:483a::1




auto vmbr1
iface vmbr1 inet static
address 79.154.169.5/22
gateway 79.154.169.1
bridge-ports eth0
bridge-stp off
bridge-fd 0


iface vmbr1 inet6 static
address 2a94:483a::7
gateway 2a94:483a::1



If yes then there's a problem as the IPv6 belongs from the same subnet so it's gateway already assign to vmbr0


Any help?
 
if you use ifupdown2, you can define multiple vmbr0 , or also define multiple time "address ..." in same vmbr0.

but it's not yet supported in gui. (so you need to do always the config manually).

Another way could be to use the new sdn feature

https://pve.proxmox.com/pve-docs/chapter-pvesdn.html

where you can define multple subnets by bridge. (just use the "simple" zone sdn model)
 

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!