Cant connect a VM with an additional IP

mmmax

New Member
Jun 15, 2021
2
0
1
29
Hi,

It is my first installation on Proxmox

I installed a Proxmox server 6.4.8 on a dedicated server on Hetzner, I have access to the console and the web interface.
Host IP 135.xx.22.125/26

I now need to create a VM on ubuntu 20 with it own IP address, so I ordered an additional IP address for the VM : 135.xx.22.99/26

enp9s0 is configured automatically by hetzner, I added, according to this documentation https://community.hetzner.com/tutorials/install-and-configure-proxmox_ve , vmbr1, the virtual interface for the bridged vm

Proxmox server :
Code:
auto enp9s0
iface enp9s0 inet static
        address 135.xx.22.125/26
        gateway 135.xx.22.65
        up route add -net 135.xx.22.64 netmask 255.255.255.192 gw 135.xx.22.65 dev enp9s0
# route 135.xx.22.64/26 via 135.xx.22.65


iface enp9s0 inet6 static
        address 2a01:4f9:4b:4682::2/64
        gateway fe80::1


auto vmbr1
iface vmbr1 inet static
        address 135.xx.22.99/26
        bridge-ports none
        bridge-stp off
        bridge-fd 0


I activated the ip forwarding on my host (ipv4 & ipv6)

Then i configured netplan on my ubuntu VM

Virtual Machine
Code:
network:
  version:2
  ethernets:
    ens18:
     dhcp4: no
     addresses : [135.xx.22.99/26]
     gateway4: 135.xx.22.65
     nameservers:
       addresses: [8.8.8.8]


I have set up the IP according to the additional IP address, i also set up the VM Mac address to match with the given address

But the vm still doesn't have internet, and still can't ping the gateway 135.xx.22.65


Thanks for your help
 
So I found by myself

If I can help someone, I was trying to put the same configuration on enp9s0 and on vmbr0

the good way was to turn enp9s0 in "manual" without any config
Code:
iface enp9s0 inet manual

iface enp9s0 inet6 manual

Then configuring vmbr0 to bridge enp9s0

Code:
auto vmbr0
iface vmbr0 inet static
        address 135.xx.22.125/32
        gateway 135.xx.22.65
        bridge-ports enp9s0
        bridge-stp off
        bridge-fd 1
        pointopoint 135.xx.22.65
        bridge_hello 2
        bridge_maxage 12

With this config, everything is ok
 

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!