Automatic IP assignment (OVH Failover IP)

Yiv

Member
Mar 24, 2018
1
0
6
25
Hello,

trying setting up an automatic IP assignment for my virtualized machines (hosted on a physical machine rented at the OVH company with Failover IP's also bought there) I ran into some issues.

My current approach is using a DHCP server hosted on the main machine (virtualized with Proxmox) but there's a small but important issue I am not able to solve myself.

I took a look at the guide provided by the Proxmox Wiki and the manual configuration is working fine. Now I tried to do that with a DHCP server but I'm stuck with the gateway.

I guess the problem occurs because the gateway IP is outside the subnet of the Failover IP but I cannot change that.

First of all, the configurations:
The IPS we use in this example (original IP's were replaced by search-'n-replace):
Code:
00:11:22:33:44:55 - The virtual mac address of the failover ip.
127.0.0.123 - The failover ip itself.
192.168.1.254 - The main machines gateway (different subnet compared to the failover ip).
213.186.33.99 - The OVH default dns (original).

dhcpd.conf (on my physical machine):
Code:
default-lease-time 21600000;
max-lease-time 432000000;

subnet 0.0.0.0 netmask 0.0.0.0 {
    authoritative;
}

# Bind IPs by MAC
host VM103 {
    hardware ethernet 00:11:22:33:44:55;
    fixed-address 127.0.0.123;
    option broadcast-address 127.0.0.123;
  
    option routers 192.168.1.254;
    option subnet-mask 255.255.255.255;
    option domain-name-servers 8.8.8.8,213.186.33.99;
}

My testing VM runs FreeBSD 11.1. The actual Failover IP were assigned and I can see that in the "ifconfig"-command but another issue occurs regarding the gateway.
/etc/rc.conf (on my virtual machine, regarding network configuration):
Code:
ifconfig_em0="DHCP"

On my FreeBSD VM:
The problem now is that the "netstat -rn" command looks like this:
Code:
127.0.0.123            link#1            UHS        lo0
127.0.0.123/32        link#1            U        em0
127.0.0.1            link#2            UH        lo0

With the manual configuration (working internet connection, but I need to configure it on the VM itself):
Code:
default                192.168.1.254            UGS        em0
192.168.1.254/32            00:11:22:33:44:55    US        em0
127.0.0.123            link#1            UHS        lo0
127.0.0.123/32        link#1            U        em0
127.0.0.1            link#2            UH        lo0

As you can see the first two entries regarding the gateway are missing and I'm unable to configure the DHCP server in a correct way to get this stuff working.

Can anyone help me?
I am willing to leave DHCP behind and try another approach but we need something automatic and it's important that it does not depend on the OS we're virtualizing since the VM could be anything (Debian, Ubuntu, FreeBSD, CentOS, ...).

With kind regards
Yiv
 

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!