DHCP server setup issues

Discussion in 'Linux Ubuntu' started by TAC, Aug 13, 2018.

  1. TAC

    TAC New Member

    Joined:
    Aug 13, 2018
    Messages:
    4
    Likes Received:
    1
    Trying to setup isc-dhcp-server on UDOO Neo.

    I've setup the following files

    /etc/dhcp/dhcpd.conf:

    default-lease-time 86400;
    max-lease-time 8640000;
    log-facility local7;

    subnet 192.168.7.0 netmask 255.255.255.252 {
    option routers 192.168.7.2;
    option subnet-mask 255.255.255.252;
    range 192.168.7.1 192.168.7.1;
    }

    subnet 192.168.100.0 netmask 255.255.255.0 {
    option routers 192.168.100.1;
    option subnet-mask 255.255.255.0;
    range 192.168.100.10 192.168.100.20;
    }


    /etc/default/isc-dhcp-server:

    # 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="eth0"



    /etc/network/interfaces:

    # Loopback network interface
    auto lo
    iface lo inet loopback

    # Primary network interface
    auto eth0
    #iface eth0 inet dhcp
    iface eth0 inet static
    address 192.168.100.0
    netmask 255.255.255.0
    gateway 192.168.100.1



    # USB OTG connection
    allow-hotplug usb0
    iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252




    Running dhcpd it looks like something is not configured correctly
    with the icmp socket and LPF error.
    I also had to keep using chmod to allow write access to the lease file folder,
    this seems to get reset to read only on restart

    Console output:

    udooer@udooneo:~$ dhcpd
    Internet Systems Consortium DHCP Server 4.2.4
    Copyright 2004-2012 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/
    unable to create icmp socket: Operation not permitted
    Wrote 0 leases to leases file.

    No subnet declaration for wlan0 (no IPv4 addresses).
    ** Ignoring requests on wlan0. If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network segment
    to which interface wlan0 is attached. **

    Open a socket for LPF: Operation not permitted
    udooer@udooneo:~$



    Any suggestions? Thanks
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,236
    Likes Received:
    561
  3. TAC

    TAC New Member

    Joined:
    Aug 13, 2018
    Messages:
    4
    Likes Received:
    1
    Got it to work using sudo dhcpd, provides ips to external clients
    added it to crontab "@reboot dhcpd" starts up no problem
     
    waltervl likes this.

Share This Page