[SOLVED] DHCP Server, Proxmox and OVH

May 3, 2018
8
0
6
36
Hello!

I have been pulling my hair out in an attempt to set this up, so any assistance to get this going would be greatly appreciated, thank you. I am on the OVH network (i.e. SoYouStart) and have been trying to follow this guide here: docs.modulesgarden.com/Proxmox_Cloud_For_WHMCS#Automatic_IP_Address_Assignment

I have come this far:

Code:
# option definitions common to all supported networks...
option domain-name "<main-host-name>";
option domain-name-servers <nameserver-1>, <nameserver-2>;
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address <broadcast-address>;
option routers <gateway-address>;
subnet xxx.xxx.xxx.56 netmask 255.255.255.248 {
#ProxmoxIPv4
        host 1 {hardware ethernet xx:xx:xx:xx:57:d8;fixed-address xxx.xxx.xxx.56; }
        host 2 {hardware ethernet xx:xx:xx:xx:09:09;fixed-address xxx.xxx.xxx.57; }
        host 3 {hardware ethernet xx:xx:xx:xx:40:88;fixed-address xxx.xxx.xxx.58; }
        host 4 {hardware ethernet xx:xx:xx:xx:88:d9;fixed-address xxx.xxx.xxx.59; }
        host 5 {hardware ethernet xx:xx:xx:xx:87:26;fixed-address xxx.xxx.xxx.60; }
        host 6 {hardware ethernet xx:xx:xx:xx:3f:89;fixed-address xxx.xxx.xxx.61; }
        host 7 {hardware ethernet xx:xx:xx:xx:65:01;fixed-address xxx.xxx.xxx.62; }
        host 8 {hardware ethernet xx:xx:xx:xx:7f:70;fixed-address xxx.xxx.xxx.63; }
}

It's coming up with the error:

Code:
May 03 07:19:39 tauryk dhcpd[19967]: No subnet declaration for vmbr0 (xxx.xxx.xxx.xxx).
May 03 07:19:39 tauryk dhcpd[19967]: ** Ignoring requests on vmbr0.  If this is not what
May 03 07:19:39 tauryk dhcpd[19967]:    you want, please write a subnet declaration
May 03 07:19:39 tauryk dhcpd[19967]:    in your dhcpd.conf file for the network segment
May 03 07:19:39 tauryk dhcpd[19967]:    to which interface vmbr0 is attached. **
May 03 07:19:39 tauryk dhcpd[19967]:
May 03 07:19:39 tauryk dhcpd[19967]:
May 03 07:19:39 tauryk dhcpd[19967]: No subnet declaration for vmbr1 (no IPv4 addresses).
May 03 07:19:39 tauryk dhcpd[19967]: ** Ignoring requests on vmbr1.  If this is not what
May 03 07:19:39 tauryk dhcpd[19967]:    you want, please write a subnet declaration
May 03 07:19:39 tauryk dhcpd[19967]:    in your dhcpd.conf file for the network segment
May 03 07:19:39 tauryk dhcpd[19967]:    to which interface vmbr1 is attached. **
May 03 07:19:39 tauryk dhcpd[19967]:
May 03 07:19:39 tauryk dhcpd[19967]:
May 03 07:19:39 tauryk dhcpd[19967]: No subnet declaration for eth0 (no IPv4 addresses).
May 03 07:19:39 tauryk dhcpd[19967]: ** Ignoring requests on eth0.  If this is not what
May 03 07:19:39 tauryk dhcpd[19967]:    you want, please write a subnet declaration
May 03 07:19:39 tauryk dhcpd[19967]:    in your dhcpd.conf file for the network segment
May 03 07:19:39 tauryk dhcpd[19967]:    to which interface eth0 is attached. **

I have Virtual MAC Addresses for each IP but what am I doing wrong? Any help would be sincerely appreciated, thanks.
 
I have gotten the DHCP server working in the end, thank you :) In the last of places where you look, right before you give up, you come across this article!

lowendtalk.com/discussion/125165/assign-static-ips-to-kvm-vps-in-proxmox-using-dhcp
 
Hey! For anyone taking a look at this topic in the future the posted guide alone is NOT enough to fully set up a DHCP server It will only assign an IP address, it will not assign a default gateway. Because of this you should receive an error similar to this when installing debian on a KVM machine: "The network autoconfiguration was SUCCESSFUL. However, no DEFAULT ROUTE was set". To make sure your KVM machines are assigned a default route or default gateway your /etc/dhcp/dhcpd.conf needs to look similar to this:

option rfc3442-classless-static-routes code 121 = array of integer 8;
subnet 0.0.0.0 netmask 0.0.0.0 {
default-lease-time 21600000;
max-lease-time 432000000;
option rfc3442-classless-static-routes 32,e,f,g,h,0,0,0,0,0,e,f,g,h;

host VM1 { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address a.b.c.d; option domain-name-servers 8.8.8.8,8.8.4.4; }
}

xx:xx:xx:xx:xx:xx=the mac address associated with the IP address you want to assign
a.b.c.d=the IP address to be assigned
e,f,g,h=the default gateway IP address e.g. if your default gatway IP is 192.168.10.23 then e=192,f=168,g=10,h=23 (and yes those are commas, not periods)

I have tested this configuration with OVH's infrastructure like the title suggests but anyone trying to do anything similar with another hosting company should follow this example.
 
Why did you leave the subnet and netmask as 0.0.0.0? OVH asks for the subnet to be set to 255.255.255.0 so should that part be changed if I'm using them?

Because that acomodates all subnets.
 

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!