[SOLVED] Multiple IPs dedi for each vm 1ip

Dk2014

Active Member
Sep 25, 2018
10
0
41
27
I have a dedi with 5ip, this is interfaces config
additional ip don't have virtual mac address
Code:
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp2s0f0
iface enp2s0f0 inet static
        address 1.2.3.100
        netmask 255.255.255.255
        gateway 100.64.1.9

allow-hotplug enp2s0f0:1
iface enp2s0f0:1 inet static
        address 1.2.3.101
        netmask 255.255.255.255
        gateway 100.64.1.9

allow-hotplug enp2s0f0:2
iface enp2s0f0:2 inet static
        address 1.2.3.102
        netmask 255.255.255.255
        gateway 100.64.1.9

allow-hotplug enp2s0f0:3
iface enp2s0f0:3 inet static
        address 1.2.3.103
        netmask 255.255.255.255
        gateway 100.64.1.9

allow-hotplug enp2s0f0:4
iface enp2s0f0:4 inet static
        address 1.2.3.104
        netmask 255.255.255.255
        gateway 100.64.1.9

I try using GUI create bridge connect enp2s0f0:1 to enp2s0f0:4 for each vm, vm can connect web
but can't use ip connect vm, ip still point to dedi
 
Last edited:
A bridge is a layer 2 device - just create one bridge - assign one ip for the node/dedi to it, and then configure the other ip's inside the vms
 
A bridge is a layer 2 device - just create one bridge - assign one ip for the node/dedi to it, and then configure the other ip's inside the vms
like this?
Code:
auto lo
iface lo inet loopback

allow-hotplug enp2s0f0
iface enp2s0f0 inet static
        address 1.1.1.100
        netmask 255.255.255.255
        gateway 100.64.1.9

auto vmbr0
iface vmbr0 inet static
    address  1.1.1.100
    netmask  255.255.255.255
    gateway 100.64.1.9
    bridge_ports none
    bridge_stp off
    bridge_fd 0

then create lxc with ip: 1.1.1.101/32 gateway: 1.1.1.100

after change interfaces, i try
Code:
service networking restart && ifdown enp2s0f0 && ifup enp2s0f0
a few seconds later, ssh disconnected, dedi offline, the isp did't have any control panel, so i must wait crontab reset interface hourly
 
do not configure an ip on the interface enp2s0f0 and instead add it as bridge_port to vmbr0 - also depending on your hoster your netmask (255.255.255.255) might be wrong (usually your gateway is in the same subnet and hence you have a netmask like 255.255.255.0) - do a quick search for your hoster and Proxmox on google - that usually shows people with similar setups.

check our reference documentation https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#sysadmin_network_configuration
 
  • Like
Reactions: Dk2014
do not configure an ip on the interface enp2s0f0 and instead add it as bridge_port to vmbr0 - also depending on your hoster your netmask (255.255.255.255) might be wrong (usually your gateway is in the same subnet and hence you have a netmask like 255.255.255.0) - do a quick search for your hoster and Proxmox on google - that usually shows people with similar setups.

check our reference documentation https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#sysadmin_network_configuration

Thank you, solved
just wait few minutes to reboot
Code:
auto lo
iface lo inet loopback

iface enp2s0f0 inet manual

auto vmbr0
iface vmbr0 inet static
       address 1.1.1.100
       netmask 255.255.255.0
       gateway 100.64.1.9
       bridge_ports enp2s0f0
       bridge_stp off
       bridge_fd 0
 

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!