How to add additional IP to Proxmox itself...

jaceqp

Well-Known Member
May 28, 2018
95
7
48
43
Hi there.
I wonder if it's possible to easily add additional IP to main Proxmox NIC.
I can easily add additional IP lets say in windows network TCP/IP setup...

I need to Proxmox showing up in both subnets with apropriate IP. I'd like to run it on a single NIC (as a member of vmbr0). Thing is I'm about to setup VPN access on a different IP pool for ex. for administration purposes only.

Vmbr0 is already being used by one VM, other VMs have PCIE passthrough to different NIC. Multiple IP's are already up'n'runninng in VMs.
 
hi,

you can just create a bridge and assign it the additional IP.

in GUI Node -> System -> Network you can do this, or in /etc/network/interfaces and interfaces.d files via the command line
 
So all I need is to create another vmbr with same NIC? I cannot do this from GUI cause bridge (vmbr2) creator says that my NIC (eno1) is already a member of another bridge (vmbr0)...
 
So all I need is to create another vmbr with same NIC? I cannot do this from GUI cause bridge (vmbr2) creator says that my NIC (eno1) is already a member of another bridge (vmbr0)...

Same issue here!

Moreover modifying /etc/network/interfaces:

Bash:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

A more precise guide on adding multiple addresses on a single nic is strongly welcome!

Please share! :)

Francesco
 
Why do you want to create another bridge on the same network card ? Do you want to have Vlan ?
 
Here's a scenario.
I have LAN network within 192.168.0.x subnet. I need to add additional subnet (let's say 200.200.200.x) working simultaneously in same network. I want to dedicate this subnet for VPN and administration traffic. No need for me to use vlans etc. - just different subnet.
Since it's really easy to add another IP in same NIC under windows I hope to do the same to Proxmox(linux)...
Main internet traffic will go through 1st subnet so no multiple gateways etc...
 
Allright.
I've tested something on my 'lab'.

Manually edited etc/network/interfaces (added another IP/netmask to vmbr0):
Code:
auto lo
iface lo inet loopback

iface enp3s4f0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.xxx
        netmask 255.255.255.0
        gateway xxxx
        bridge_ports enp3s4f0
        bridge_stp off
        bridge_fd 0
iface vmbr0 inet static
        address 200.200.200.xxx
        netmask 255.255.255.0

iface enp3s4f1 inet manual

Also (not sure if necessary) added additional line to etc/hosts:

Code:
127.0.0.1 localhost.localdomain localhost
192.168.1.xxx proxmox.test proxmox
200.200.200.xxx proxmox.test proxmox

After ifdown & ifup seem to work (I'm able to access/ping proxmox from both subnets.
GUI though shows pretty messed up setup:
proxmox_net.png
proxmox_net2.png

I mean it no longer shows primary IP. I guess GUI needs a small tweak...

PS. Apreciated for a green light approvement from Proxmox staff to production environment on this...
 
In the old time, to have multiple ip and the same network interface , we use ( interface:number) like this

Code:
auto vmbr0
iface vmbr0 inet static
address 83.167.254.20
netmask 255.255.255.128
gateway 83.167.254.1
bridge_ports eth3
bridge_stp off
bridge_fd 0

auto vmbr0:1
iface vmbr0:1 inet static
address 83.167.254.21
netmask 255.255.255.128

auto vmbr0:2
iface vmbr0:2 inet static
address 83.167.254.22
netmask 255.255.255.128

but now not sure is the right way
 
Here's what
In the old time, to have multiple ip and the same network interface , we use ( interface:number) like this

Code:
auto vmbr0:1
iface vmbr0:1 inet static
address 83.167.254.21
netmask 255.255.255.128

auto vmbr0:2
iface vmbr0:2 inet static
address 83.167.254.22
netmask 255.255.255.128

but now not sure is the right way

I've tested your solution and it... kills network completely.
Defining vmbr's with :1; :2 etc. actually seem to correspond with VLAN setups. It might work on some other linux distros though...
It also shows VLAN Linux tag in these network interfaces in GUI. I recommend to leave default vmbr as it is and add another one tagged with :1 to test it. If you change all your vmbr lines in etc/network/interfaces you might get stuck with Proxmox network connection offline.

In my lab enviroment only (WORKING) solution is to define IP's to direct (same) vmbr name, so again:
auto vmbr0
iface vmbr0 inet static
address IP1
netmask 255.255.255.0
gateway xxxx
bridge_ports enp3s4f0
bridge_stp off
bridge_fd 0

iface vmbr0 inet static
address IP2
netmask 255.255.255.0

Not sure how the setup should look with VLAN separation implemented... Not my concern though.
 
Last edited:
  • Like
Reactions: Soxism
Here's what


I've tested your solution and it... kills network completely.
Defining vmbr's with :1; :2 etc. actually seem to correspond with VLAN setups. It might work on some other linux distros though...
It also shows VLAN Linux tag in these network interfaces in GUI. I recommend to leave default vmbr as it is and add another one tagged with :1 to test it. If you change all your vmbr lines in etc/network/interfaces you might get stuck with Proxmox network connection offline.

In my lab enviroment only (WORKING) solution is to define IP's to direct (same) vmbr name, so again:


Not sure how the setup should look with VLAN separation implemented... Not my concern though.
Sorry for necro-posting but I must write it for clearance (yes, now I've faced this case) . For vlans is using "." (dot symbol)

You killed the network using ":0" solution because of not pointing the bridge_ports. The right config might be like:

Code:
auto vmbr0
iface vmbr0 inet static
       address IP1
       netmask 255.255.255.0
       gateway xxxx
       bridge_ports enp3s4f0
       bridge_stp off
       bridge_fd 0

iface vmbr0:0 inet static
       address IP1
       netmask 255.255.255.0

If not adding ":0" leads mess in WebUI - it shows only last IP for vmbr0 and this risks to broke the network if you decide to edit it by WebUI in the future.
 
Last edited:
  • Like
Reactions: mabright3000

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!