Monday, July 8, 2019

Ubuntu 16.04LTS DHCP Server issue

Been stuck on this issue for quite some time now and unsure how to fix this. Would there be a way to fix this? /etc/dhcp/dhcpd.conf: interface name too long (is 20)

  • /etc/default/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="mgmt" 
  • /etc/dhcp/dhcp.conf File: (Note: Changed my DNS/Domain name here, but inputted my real one on my own config file)

ddns-update-style none; option domain-name "(MyDomainName.com)"; option domain-name-servers (DNS ADDRESS), (DNS ADDRESS); default-lease-time 600; max-lease-time 7200; authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # A slightly different configuration for an internal subnet. subnet 172.16.1.0 netmask 255.255.255.0 { range 172.16.1.10 172.16.1.50; option domain-name-servers (DNS ADDRESS), (DNS ADDRESS); option domain-name "(MYDomainNme.com)"; option subnet-mask 255.255.255.0; option routers 172.16.1.1; option broadcast-address 172.16.1.255; default-lease-time 600; max-lease-time 7200; } 
  • Restart/Status of DHCP

root@ubuntu:/# systemctl restart isc-dhcp-server.service root@ubuntu:/# systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - ISC DHCP IPv4 server Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor Active: failed (Result: exit-code) since Tue 2019-07-09 16:36:12 CST; 7s ago Docs: man:dhcpd(8) Process: 4079 ExecStart=/bin/sh -ec CONFIG_FILE=/etc/dhcp/dhcpd.conf; Main PID: 4079 (code=exited, status=1/FAILURE) Jul 09 16:36:12 ubuntu sh[4079]: Not configured to listen on any interfaces! Jul 09 16:36:12 ubuntu sh[4079]: If you think you have received this message due Jul 09 16:36:12 ubuntu sh[4079]: than a configuration issue please read the sect Jul 09 16:36:12 ubuntu sh[4079]: bugs on either our web page at www.isc.org or i Jul 09 16:36:12 ubuntu sh[4079]: before submitting a bug. These pages explain t Jul 09 16:36:12 ubuntu sh[4079]: process and the information we find helpful for Jul 09 16:36:12 ubuntu sh[4079]: exiting. Jul 09 16:36:12 ubuntu systemd[1]: isc-dhcp-server.service: Main process exited, Jul 09 16:36:12 ubuntu systemd[1]: isc-dhcp-server.service: Unit entered failed Jul 09 16:36:12 ubuntu systemd[1]: isc-dhcp-server.service: Failed with result ' 
  • Interface File

# The primary network interface auto mgmt iface mgmt inet static address 192.168.1.4 netmask 255.255.255.0 gateway 192.168.1.1 


No comments:

Post a Comment