DHCP server not responding to requests from KVM guest

6,314
subnet 192.168.0.0 netmask 255.255.255.224 {
....
      host 104 {hardware ethernet 1A:27:59:82:39:8E;fixed-address 95.141.36.124;}
}

THe IP address (95.141.36.124) you want to associate to that MAC address is out of the range you defined (192.168.0.1 to 192.168.0.30)

If I set a similar config (fixed address out of range) at home, then the requests from the associated MAC address are ignored.

Try removing completly the entry, your host 104 should then got a dynmaic address from the 192.168.0.0/27 range

Share:
6,314

Related videos on Youtube

Joel Kennedy
Author by

Joel Kennedy

Updated on September 18, 2022

Comments

  • Joel Kennedy
    Joel Kennedy over 1 year

    I've setup a DHCP server on my Debian server (Proxmox) so that I can provision IPs to my KVM guests on the server automatically. For some reason the DHCP server (isc-dhcp-server) isn't responding to requests for an IP. The DHCP server is set to listen to a bridge interface I've created called vmbr1 and I know requests are getting through to the host from the KVM guest as I've tested it through dhcpdump -i vmbr1.

    I've obviously made a mistake somewhere, can anyone spot it? I've included my configuration files below.

    dhcp.conf file:

    ddns-update-style none;
    deny declines;
    deny bootp;
    default-lease-time 600;
    max-lease-time 7200;
    log-facility local7;
    subnet 192.168.0.0 netmask 255.255.255.224 {
         interface vmbr1;
         option routers 192.168.0.5;
         option broadcast-address 192.168.0.31;
         option ntp-servers 192.168.0.101;
         option domain-name-servers 192.168.0.101;
         option netbios-name-servers 192.168.0.101;
         option netbios-node-type 2;
         default-lease-time 86400;
         max-lease-time 86400;
         #vmbr1ipv4
          host 104 {hardware ethernet 1A:27:59:82:39:8E;fixed-address 95.141.36.124;}
    }
    

    isc-dhcp-server file:

    # Defaults for isc-dhcp-server initscript
    # sourced by /etc/init.d/isc-dhcp-server
    # installed at /etc/default/isc-dhcp-server by the maintainer scripts
    
    #
    # This is a POSIX shell fragment
    #
    
    # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
    #DHCPD_CONF=/etc/dhcp/dhcpd.conf
    
    # Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
    #DHCPD_PID=/var/run/dhcpd.pid
    
    # Additional options to start dhcpd with.
    #       Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
    #OPTIONS=""
    
    # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
    #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
    INTERFACES="vmbr1"
    

    interfaces file on host:

    # network interface settings
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet manual
    
    auto vmbr0
    iface vmbr0 inet static
            address  95.141.36.188
            netmask  255.255.255.0
            gateway  95.141.36.1
            broadcast  95.141.36.255
            bridge_ports eth0
            bridge_stp off
            bridge_fd 0
            network 95.141.36.0
            bridge_maxwait 0
    
    auto vmbr1
    iface vmbr1 inet static
            address  192.168.0.5
            netmask  255.255.255.224
            bridge_ports none
            bridge_stp off
            bridge_fd 0
    

    Example request from KVM guest to host server through vmbr1 using dhcpdump -i vmbr1:

      TIME: 2014-05-28 21:40:14.232
        IP: 0.0.0.0 (1a:27:59:82:39:8e) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
        OP: 1 (BOOTPREQUEST)
     HTYPE: 1 (Ethernet)
      HLEN: 6
      HOPS: 0
       XID: 599fa654
      SECS: 0
     FLAGS: 0
    CIADDR: 0.0.0.0
    YIADDR: 0.0.0.0
    SIADDR: 0.0.0.0
    GIADDR: 0.0.0.0
    CHADDR: 1a:27:59:82:39:8e:00:00:00:00:00:00:00:00:00:00
     SNAME: .
     FNAME: .
    OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
    OPTION:  55 (  8) Parameter Request List      1 (Subnet mask)
                             28 (Broadcast address)
                              2 (Time offset)
                              3 (Routers)
                             15 (Domainname)
                              6 (DNS server)
                             12 (Host name)
                             42 (NTP servers)
    
    OPTION:  60 (  3) Vendor class identifier   d-i
    ---------------------------------------------------------------------------
    

    Output from dhcpd

    Internet Systems Consortium DHCP Server 4.2.2
    Copyright 2004-2011 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/
    WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
    Wrote 0 deleted host decls to leases file.
    Wrote 0 new dynamic host decls to leases file.
    Wrote 0 leases to leases file.
    Listening on LPF/vmbr1/fa:98:02:e0:1c:28/192.168.0.0/27
    Sending on   LPF/vmbr1/fa:98:02:e0:1c:28/192.168.0.0/27
    Sending on   Socket/fallback/fallback-net
    There's already a DHCP server running.
    

    Hopefully I've included enough information to help aid in a resolution. Many thanks!

    • eyoung100
      eyoung100 almost 10 years
      What "other server" is running?? There's already a DHCP server running.
    • Joel Kennedy
      Joel Kennedy almost 10 years
      @ECarterYoung That's the actual DHCP server I've setup and have a problem with I think. The 'dhcpd' command would usually start the server, the server was already running as I had started it already so I just used the command to show the output information.
  • Joel Kennedy
    Joel Kennedy about 10 years
    I've just tried disabling iptables but no luck I'm afraid. There's no other firewall enabled on the system.