[SOLVED] Adding a second public IP range


Active Member
Aug 1, 2017

my cluster shares a public IP range assigned to bridge in a very simple config:

iface vmbr0 inet static
address 5.X.X.1 # each node has his own IP from within the range.
gateway 5.X.X.254
bridge_ports eno1
bridge_stp off
bridge_fd 0

I need to add another new IP range and I want to keep the possibility to assign IPs in new range to VM in all nodes.

Do I have to create a new Bridge vmbr1 or it is possible to add new range to the same bridge with routing like:

up ip route add 6.X.X.0/24 dev vmbr0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward

Are there any pros and cons?

I would like to use the same NIC interface eno1.

Thank you.
Hello Stoiko,

thank you for your reply.

The Debian page has simple examples with IPs in the same subnet and without bridge involved.

My case is with a bridge and a new subnet with its gateway address.

I think adding the iproute and ip_forward lines to bridge config could be enough to make it work but my doubts are:

- Using GW of first range is OK ?
- I know that enabling ip_forward is related to security issues. Which are the security aspects to check in a Proxmox cluster with forwardiing enabled?

Thank you
My case is with a bridge and a new subnet with its gateway address.
You cannot (simply) have 2 'gateways' a.k.a default routes.
It's always only one which will be used (and if it's for the same prefix (default route is simply the route for you will even get an error)

Did you try simply adding your second ip as alias to your vmbr0 ? (you should not need to enable ip-forwarding for that)

as far as security is concerned - usually in the regular setups a bridge acts like a layer2 switch and forwards frames (i.e. the VMs are directly connected to the network and can speak with it) with ip-forwarding you allow your node to be a layer3 switch (this is needed for masquerading setups)

- Using GW of first range is OK ?
This depends on the configuration of your/your provider's network (in most simple cases I know it works without problems)

check out the reference documentation on networks - it describes these situation : https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration

Hope this helps!
  • Like
Reactions: Paspao
I just have received the range assigned by ISP and I confirm it works:

echo 1 > /proc/sys/net/ipv4/ip_forward

ip route add X.Y.Z.0/24 dev vmbr0

Created a new LXC with IP X.Y.Z.10/32 and gateway in a different prefix A.B.C.254 (same as my vmbr0 default GW)

Simpler than I thought.

Thank you!



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!