Adding multiple IPs to one NIC

poon2313

New Member
Apr 3, 2020
10
0
1
25
Hi there, it is possible to add multiple public IP address to the host server in only 1 NIC card. The purpose is to assign those IPs to VMs in future.
 

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
5,331
1,641
164
South Tyrol/Italy
shop.proxmox.com

Tomas Kucera

Member
Jun 13, 2018
2
0
6
Hi there,

I had gone through a lot of articles and forums and google searches but could not find answer / get working the following scenario. The picture shows what I would like to achieve:

- I have a server in DC and have /28 IP range where x.x.x.1 is the gateway - the server has (at the moment) just one physical NIC connected (eno1)

- I would like to build a single PVE node (for now), where the default public IP will be x.x.x.5 and the private IP 192.168.0.1

- I want that all VMs are accessible via private network within the Node and thus should have their own private IPs from the 192.168.0.0/24 range and using their public IPs (when applicable)

- then I would like to have several VMs in different "configurations / scenarios"

- scenario #1 - the VMs do not have their own public IPs (VM1 and VM2) and the traffic is routed to them using nginx as reverse proxy

- scenario #2 - the VM does not have its own public IP (VM3) and the traffic is routed to it using iptables (port forwarding)

- scenario #3 - the VM has its own public IP (VM4) and can be accessed from outside using this public IP but still being "bridged" via the single NIC (eno1)

Can someone, please, give a hand on the /etc/network/interfaces content on the PVE Node for each individual scenario and also the VMs network settings?

Thanks all in advance!

tom.+

EDIT: I actually had the same question 3 years ago (https://forum.proxmox.com/threads/multiple-public-ips-on-a-single-nic.44537/) but then it was not real issue but still remains unresolved. Now I am getting back to it as I am building a new Node with more public IPs that I would like to use.
 

Attachments

  • PVE Node.png
    PVE Node.png
    15.8 KB · Views: 55
Last edited:
May 14, 2019
43
1
13
59
As a follow up to this question, I would like to place my PVE management, VM data and ceph public and cluster networks on a single 10G NIC, I will keep the PVE cluster network on its own physical NIC.
Hi, while adding multiple IPs is possible it probably won't help you here, as the VMs need to use the IPs, not the Proxmox VE host.
A better option for you could be a routed configuration, see the docs:
https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#_choosing_a_network_configuration
Scroll down to "Routed Configuration"
 

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 your own in 60 seconds.

Buy now!