PVE 4.2 on VServer 1 eth multiple IPs

moritzcorpus

Renowned Member
Jan 11, 2014
4
0
66
Hey guys,
i've the following setup

1 vServer, 1 NIC with 2 public IPv4 addresses
the hoster does not provice another eth interface for the second address. so i'm "stuck" with eth0 & eth0:1
the network setup on my proxmox pve host looks is like this:

eth0 1 IP in a /22 netmask // on vmbr0 (see below)
eth0:1 /32 netmask (!!) // on vmbr1 (see below)

my goal:
provide exclusive access to the second public ip address to a kvm guest vm

simplified:
wan --> pve host --> eth0/vmbr0
wan --> pve host --> eth0:1/vmbr1 --> vm100

vmbr0 - public manamgement of pve host
vmbr1 - seconf public ip to assign to a vm (vm100)
vmbr2 - VM net


NETWORK CONFIG OF PVE HOST:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth0:1
iface eth0:1 inet manual

auto vmbr0
iface vmbr0 inet static
address 18x.xx.xx.24
netmask 255.255.252.0
gateway 18x.xx.xx.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet manual
address 18x.xx.xx.130
netmask 255.255.255.255
bridge_ports eth0:1
bridge_stp off
bridge_fd 0

auto vmbr2
iface vmbr2 inet manual
bridge_ports none



How can I setup a VM using the second /32 IP address
i'm kind of lost to be honest :)
can you guys provide me any hints how to config
1- the host network with the eth0:1/vmbr0
2 - the guest vm network config

cheers
 
Hey guys,
i've the following setup

1 vServer, 1 NIC with 2 public IPv4 addresses
the hoster does not provice another eth interface for the second address. so i'm "stuck" with eth0 & eth0:1
the network setup on my proxmox pve host looks is like this:

eth0 1 IP in a /22 netmask // on vmbr0 (see below)
eth0:1 /32 netmask (!!) // on vmbr1 (see below)

my goal:
provide exclusive access to the second public ip address to a kvm guest vm

Solution 1:

No vmbr1; bridge the VM to vmbr0 and configure inside the VM accordingly.

Attention! works only if the provider allows the virtual's NIC MAC in the network!


Solution 2 (in other cases):

In this case the 2nd address is in host - the VM has a LAN address only

vmbr1:
- without any physical NIC, only connected to VM
- local LAN addresses for connection VM - Host

Incoming traffic:
Route all traffic with 2nd public address via NAT and LAN to the VM

Outgoing traffic (from VM):
use the hots's LAN address as default gateway - and change the source address for in such a way routed packets to the 2nd public address.
 

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!