Setting up DHCP server - fail to start/stop it

8,329

I'd check:

-> /etc/default/isc-dhcp-server contains INTERFACES="eth0" ?

-> be sure if you're using /etc/dhcp3/dhcpd.conf, and not /etc/dhcp/dhcp.config (as you're using isc-dhcp-server)

->Define the group and its contained host into the subnet { } declaration

Share:
8,329

Related videos on Youtube

Alex
Author by

Alex

Updated on September 18, 2022

Comments

  • Alex
    Alex almost 2 years

    I am following this guide. I am completely new to Ubuntu, working on 14.04 LTS.

    When I reach the last step before dealing with Kerrighed (half way through the tutorial), I try to start my DHCP server but it fails.

    root@MASTER:~# /etc/init.d/tftpd-hpa restart
    root@MASTER:~# /etc/init.d/isc-dhcp-server restart
     * Stopping ISC DHCP server dhcpd                                                 [fail] 
     * Starting ISC DHCP server dhcpd                                                         * check syslog for diagnostics.
                                                                                      [fail]
    root@MASTER:~# /etc/init.d/nfs-kernel-server restart
     * Stopping NFS kernel daemon                                                     [ OK ] 
     * Unexporting directories for NFS kernel daemon...                               [ OK ] 
     * Exporting directories for NFS kernel daemon...                                 [ OK ] 
     * Starting NFS kernel daemon                                                     [ OK ] 
    root@MASTER:~# 
    

    Here is what I got in syslog by typing dmesg :

    [18103.047124] nfsd: last server has exited, flushing export cache
    [18104.195774] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    [18104.195797] NFSD: starting 90-second grace period (net ffffffff81cda240)
    root@MASTER:~# 
    

    And syslog :

    Jul 17 17:16:11 MASTER dhcpd: Wrote 0 deleted host decls to leases file.
    Jul 17 17:16:11 MASTER dhcpd: Wrote 0 new dynamic host decls to leases file.
    Jul 17 17:16:11 MASTER dhcpd: Wrote 0 leases to leases file.
    Jul 17 17:16:11 MASTER dhcpd: 
    Jul 17 17:16:11 MASTER dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
    Jul 17 17:16:11 MASTER dhcpd: ** Ignoring requests on eth0.  If this is not what
    Jul 17 17:16:11 MASTER dhcpd:    you want, please write a subnet declaration
    Jul 17 17:16:11 MASTER dhcpd:    in your dhcpd.conf file for the network segment
    Jul 17 17:16:11 MASTER dhcpd:    to which interface eth0 is attached. **
    Jul 17 17:16:11 MASTER dhcpd: 
    Jul 17 17:16:11 MASTER dhcpd: 
    Jul 17 17:16:11 MASTER dhcpd: Not configured to listen on any interfaces!
    Jul 17 17:16:17 MASTER rpc.mountd[24387]: Caught signal 15, un-registering and exiting.
    Jul 17 17:16:17 MASTER kernel: [22896.481789] nfsd: last server has exited, flushing export cache
    Jul 17 17:16:19 MASTER kernel: [22897.636160] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    Jul 17 17:16:19 MASTER kernel: [22897.636192] NFSD: starting 90-second grace period (net ffffffff81cda240)
    Jul 17 17:16:19 MASTER rpc.mountd[24820]: Version 1.2.8 starting
    

    Here is /etc/dhcp/dhcp.config :

    # General options
    option dhcp-max-message-size 2048;
    use-host-decl-names on;
    deny unknown-clients; # This will stop any non-node machines from appearing on the cluster network.
    deny bootp;
    
    # DNS settings
    option domain-name "kerrighed";          # Just an example name - call it whatever you want.
    option domain-name-servers 192.168.1.1;  # The server's IP address, manually configured earlier.
    
    # Information about the network setup
    subnet 192.168.1.0 netmask 255.255.255.0 {
      option routers 192.168.1.1;              # Server IP as above.
      option broadcast-address 192.168.1.255;  # Broadcast address for your network.
    }
    
    # Declaring IP addresses for nodes and PXE info
    group {
      filename "pxelinux.0";                 # PXE bootloader. Path is relative to /var/lib/tftpboot
      option root-path "192.168.1.1:/nfsroot/kerrighed";  # Location of the bootable filesystem on NFS server
    
      host M4500_1 {
            fixed-address 192.168.1.101;          # IP address for the first node, kerrighednode1 for example.
            hardware ethernet XX:XX:XX:XX:XX:XX;  # MAC address of the node's ethernet adapter
      }
    
    
      server-name "kerrighedserver"; # Name of the server. Call it whatever you like.
      next-server 192.168.1.1;       # Server IP, as above.
    }
    

    (The MAC adress is the correct one in the file)

    Here is etc/network/interfaces :

    # The loopback interface:
    auto lo
    iface lo inet loopback
    
    #auto eth0
    # The primary network interface, manually configured to protect NFS:
    iface eth0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    

    The connected slave computer (for the clustering) says PXE-E51 : No DHCP or proxyDHCP offers were received. Therefore it looks like the DHCP server is definitiely not runing. Tftpd does not give any answer when i restart it in the terminal and nfs looks good though.

    • Jos
      Jos almost 10 years
      dmesg is not the same as /var/log/syslog, although there are overlaps.
    • noleti
      noleti almost 10 years
      can you post your /etc/dhcp3/dhcpd.conf ?
    • Lety
      Lety almost 10 years
      could you post your /etc/network/interfaces?