UBUNTU DHCP not assigning IP address to clients.
I have a minimal knowledge about ubuntu. I am trying to run a DHCP server on UBUNTU so as to share Dongle 3G Internet. I disabled router's DHCP and followed the following guide to setup DHCP server in UBUNTU.
How do I install and configure a DHCP server?
Here's my /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="enp2s0"
And my /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
host server {
hardware ethernet 00:1D:92:EA:DB:3C;
fixed-address 192.168.1.33;
}
host tablet {
hardware ethernet 7C:0B:C6:B4:EE:43;
fixed-address 192.168.1.34;
}
I am assigning static IP to server so as to run bind9 DNS server. My clients can only connect if I configure them to use static IP, but the server doesn't assign them IP if I change static IP option neither UBUNTU gets IP address. Is their any easier approach to achieve this. I am in need of serious help as no client can access internet.
Here's some additional information that might be useful :
/etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
send host-name" /etc/dhcp/dhclient.conf
send host-name UBUNTU-DESKTOP;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers,
dhcp6.fqdn, dhcp6.sntp-servers;
#require subnet-mask, domain-name-servers;
timeout 300;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
I remember I had edited /etc/network/interfaces file.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
sudo netstat -uap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 localhost:54557 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:36172 *:* 694/Plex Media Serv
udp 0 0 *:19844 *:* 4017/dhclient
udp 0 0 MANTHAN-DESKTOP:40486 *:* 694/Plex Media Serv
udp 0 0 *:32410 *:* 694/Plex Media Serv
udp 0 0 *:32412 *:* 694/Plex Media Serv
udp 0 0 *:32413 *:* 694/Plex Media Serv
udp 0 0 *:32414 *:* 694/Plex Media Serv
udp 0 0 *:1900 *:* 966/Plex DLNA Serve
udp 0 0 *:1901 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:domain *:* 2749/dnsmasq
udp 0 0 *:bootpc *:* 4017/dhclient
udp 0 0 *:bootpc *:* 3425/dhclient
udp 0 0 192.168.42.2:netbios-ns *:* 900/nmbd
udp 0 0 MANTHAN-DESK:netbios-ns *:* 900/nmbd
udp 0 0 *:netbios-ns *:* 900/nmbd
udp 0 0 192.168.42.:netbios-dgm *:* 900/nmbd
udp 0 0 MANTHAN-DES:netbios-dgm *:* 900/nmbd
udp 0 0 *:netbios-dgm *:* 900/nmbd
udp 0 0 *:43227 *:* 966/Plex DLNA Serve
udp 0 0 MANTHAN-DESKTOP:33368 *:* 694/Plex Media Serv
udp 0 0 localhost:49934 *:* 694/Plex Media Serv
udp 0 0 *:37737 *:* 966/Plex DLNA Serve
udp 0 0 *:13495 *:* 966/Plex DLNA Serve
udp 0 0 *:42239 *:* 3425/dhclient
udp6 0 0 [::]:17738 [::]:* 3425/dhclient
udp6 0 0 [::]:33559 [::]:* 4017/dhclient
NOTE :- BIND9 DNS server is installed in this system but I failed to configure it properly but I hope it has no connection to this problem.
networking server network-manager dhcp static-ip
add a comment |
I have a minimal knowledge about ubuntu. I am trying to run a DHCP server on UBUNTU so as to share Dongle 3G Internet. I disabled router's DHCP and followed the following guide to setup DHCP server in UBUNTU.
How do I install and configure a DHCP server?
Here's my /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="enp2s0"
And my /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
host server {
hardware ethernet 00:1D:92:EA:DB:3C;
fixed-address 192.168.1.33;
}
host tablet {
hardware ethernet 7C:0B:C6:B4:EE:43;
fixed-address 192.168.1.34;
}
I am assigning static IP to server so as to run bind9 DNS server. My clients can only connect if I configure them to use static IP, but the server doesn't assign them IP if I change static IP option neither UBUNTU gets IP address. Is their any easier approach to achieve this. I am in need of serious help as no client can access internet.
Here's some additional information that might be useful :
/etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
send host-name" /etc/dhcp/dhclient.conf
send host-name UBUNTU-DESKTOP;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers,
dhcp6.fqdn, dhcp6.sntp-servers;
#require subnet-mask, domain-name-servers;
timeout 300;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
I remember I had edited /etc/network/interfaces file.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
sudo netstat -uap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 localhost:54557 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:36172 *:* 694/Plex Media Serv
udp 0 0 *:19844 *:* 4017/dhclient
udp 0 0 MANTHAN-DESKTOP:40486 *:* 694/Plex Media Serv
udp 0 0 *:32410 *:* 694/Plex Media Serv
udp 0 0 *:32412 *:* 694/Plex Media Serv
udp 0 0 *:32413 *:* 694/Plex Media Serv
udp 0 0 *:32414 *:* 694/Plex Media Serv
udp 0 0 *:1900 *:* 966/Plex DLNA Serve
udp 0 0 *:1901 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:domain *:* 2749/dnsmasq
udp 0 0 *:bootpc *:* 4017/dhclient
udp 0 0 *:bootpc *:* 3425/dhclient
udp 0 0 192.168.42.2:netbios-ns *:* 900/nmbd
udp 0 0 MANTHAN-DESK:netbios-ns *:* 900/nmbd
udp 0 0 *:netbios-ns *:* 900/nmbd
udp 0 0 192.168.42.:netbios-dgm *:* 900/nmbd
udp 0 0 MANTHAN-DES:netbios-dgm *:* 900/nmbd
udp 0 0 *:netbios-dgm *:* 900/nmbd
udp 0 0 *:43227 *:* 966/Plex DLNA Serve
udp 0 0 MANTHAN-DESKTOP:33368 *:* 694/Plex Media Serv
udp 0 0 localhost:49934 *:* 694/Plex Media Serv
udp 0 0 *:37737 *:* 966/Plex DLNA Serve
udp 0 0 *:13495 *:* 966/Plex DLNA Serve
udp 0 0 *:42239 *:* 3425/dhclient
udp6 0 0 [::]:17738 [::]:* 3425/dhclient
udp6 0 0 [::]:33559 [::]:* 4017/dhclient
NOTE :- BIND9 DNS server is installed in this system but I failed to configure it properly but I hope it has no connection to this problem.
networking server network-manager dhcp static-ip
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46
add a comment |
I have a minimal knowledge about ubuntu. I am trying to run a DHCP server on UBUNTU so as to share Dongle 3G Internet. I disabled router's DHCP and followed the following guide to setup DHCP server in UBUNTU.
How do I install and configure a DHCP server?
Here's my /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="enp2s0"
And my /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
host server {
hardware ethernet 00:1D:92:EA:DB:3C;
fixed-address 192.168.1.33;
}
host tablet {
hardware ethernet 7C:0B:C6:B4:EE:43;
fixed-address 192.168.1.34;
}
I am assigning static IP to server so as to run bind9 DNS server. My clients can only connect if I configure them to use static IP, but the server doesn't assign them IP if I change static IP option neither UBUNTU gets IP address. Is their any easier approach to achieve this. I am in need of serious help as no client can access internet.
Here's some additional information that might be useful :
/etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
send host-name" /etc/dhcp/dhclient.conf
send host-name UBUNTU-DESKTOP;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers,
dhcp6.fqdn, dhcp6.sntp-servers;
#require subnet-mask, domain-name-servers;
timeout 300;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
I remember I had edited /etc/network/interfaces file.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
sudo netstat -uap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 localhost:54557 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:36172 *:* 694/Plex Media Serv
udp 0 0 *:19844 *:* 4017/dhclient
udp 0 0 MANTHAN-DESKTOP:40486 *:* 694/Plex Media Serv
udp 0 0 *:32410 *:* 694/Plex Media Serv
udp 0 0 *:32412 *:* 694/Plex Media Serv
udp 0 0 *:32413 *:* 694/Plex Media Serv
udp 0 0 *:32414 *:* 694/Plex Media Serv
udp 0 0 *:1900 *:* 966/Plex DLNA Serve
udp 0 0 *:1901 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:domain *:* 2749/dnsmasq
udp 0 0 *:bootpc *:* 4017/dhclient
udp 0 0 *:bootpc *:* 3425/dhclient
udp 0 0 192.168.42.2:netbios-ns *:* 900/nmbd
udp 0 0 MANTHAN-DESK:netbios-ns *:* 900/nmbd
udp 0 0 *:netbios-ns *:* 900/nmbd
udp 0 0 192.168.42.:netbios-dgm *:* 900/nmbd
udp 0 0 MANTHAN-DES:netbios-dgm *:* 900/nmbd
udp 0 0 *:netbios-dgm *:* 900/nmbd
udp 0 0 *:43227 *:* 966/Plex DLNA Serve
udp 0 0 MANTHAN-DESKTOP:33368 *:* 694/Plex Media Serv
udp 0 0 localhost:49934 *:* 694/Plex Media Serv
udp 0 0 *:37737 *:* 966/Plex DLNA Serve
udp 0 0 *:13495 *:* 966/Plex DLNA Serve
udp 0 0 *:42239 *:* 3425/dhclient
udp6 0 0 [::]:17738 [::]:* 3425/dhclient
udp6 0 0 [::]:33559 [::]:* 4017/dhclient
NOTE :- BIND9 DNS server is installed in this system but I failed to configure it properly but I hope it has no connection to this problem.
networking server network-manager dhcp static-ip
I have a minimal knowledge about ubuntu. I am trying to run a DHCP server on UBUNTU so as to share Dongle 3G Internet. I disabled router's DHCP and followed the following guide to setup DHCP server in UBUNTU.
How do I install and configure a DHCP server?
Here's my /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="enp2s0"
And my /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
host server {
hardware ethernet 00:1D:92:EA:DB:3C;
fixed-address 192.168.1.33;
}
host tablet {
hardware ethernet 7C:0B:C6:B4:EE:43;
fixed-address 192.168.1.34;
}
I am assigning static IP to server so as to run bind9 DNS server. My clients can only connect if I configure them to use static IP, but the server doesn't assign them IP if I change static IP option neither UBUNTU gets IP address. Is their any easier approach to achieve this. I am in need of serious help as no client can access internet.
Here's some additional information that might be useful :
/etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
send host-name" /etc/dhcp/dhclient.conf
send host-name UBUNTU-DESKTOP;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers,
dhcp6.fqdn, dhcp6.sntp-servers;
#require subnet-mask, domain-name-servers;
timeout 300;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
I remember I had edited /etc/network/interfaces file.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
sudo netstat -uap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 localhost:54557 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:36172 *:* 694/Plex Media Serv
udp 0 0 *:19844 *:* 4017/dhclient
udp 0 0 MANTHAN-DESKTOP:40486 *:* 694/Plex Media Serv
udp 0 0 *:32410 *:* 694/Plex Media Serv
udp 0 0 *:32412 *:* 694/Plex Media Serv
udp 0 0 *:32413 *:* 694/Plex Media Serv
udp 0 0 *:32414 *:* 694/Plex Media Serv
udp 0 0 *:1900 *:* 966/Plex DLNA Serve
udp 0 0 *:1901 *:* 694/Plex Media Serv
udp 0 0 MANTHAN-DESKTOP:domain *:* 2749/dnsmasq
udp 0 0 *:bootpc *:* 4017/dhclient
udp 0 0 *:bootpc *:* 3425/dhclient
udp 0 0 192.168.42.2:netbios-ns *:* 900/nmbd
udp 0 0 MANTHAN-DESK:netbios-ns *:* 900/nmbd
udp 0 0 *:netbios-ns *:* 900/nmbd
udp 0 0 192.168.42.:netbios-dgm *:* 900/nmbd
udp 0 0 MANTHAN-DES:netbios-dgm *:* 900/nmbd
udp 0 0 *:netbios-dgm *:* 900/nmbd
udp 0 0 *:43227 *:* 966/Plex DLNA Serve
udp 0 0 MANTHAN-DESKTOP:33368 *:* 694/Plex Media Serv
udp 0 0 localhost:49934 *:* 694/Plex Media Serv
udp 0 0 *:37737 *:* 966/Plex DLNA Serve
udp 0 0 *:13495 *:* 966/Plex DLNA Serve
udp 0 0 *:42239 *:* 3425/dhclient
udp6 0 0 [::]:17738 [::]:* 3425/dhclient
udp6 0 0 [::]:33559 [::]:* 4017/dhclient
NOTE :- BIND9 DNS server is installed in this system but I failed to configure it properly but I hope it has no connection to this problem.
networking server network-manager dhcp static-ip
networking server network-manager dhcp static-ip
edited Apr 13 '17 at 12:23
Community♦
1
1
asked Apr 25 '16 at 16:43
Siddharth Manthan
3826
3826
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46
add a comment |
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46
add a comment |
2 Answers
2
active
oldest
votes
To prevent potential conflict, I would not declare MAC based IP addresses within the same pool that is reserved for regular DHCP addresses. I am suggesting that in your /etc/dhcp/dhcpd.conf
file, this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
Should be something like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.40 192.168.1.200;
}
You do not have enough options declared in your /etc/dhcp/dhcpd.conf
file. The important omission, is option routers 192.168.1.???;
(use your router IP address).
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
add a comment |
Ensure that you have cached the latest version of network-manager and network-manager-gnome packages in /var/cache/apt directory.
Failure to do so will create very serious issues as you won't be able to access INTERNET.
How to do it : http://www.tuxradar.com/answers/517
I performed a minimal install so I had it in my cache. Then remove network-manager and network-manager-gnome using following command.
sudo apt-get purge network-manager network-manager-gnome
Then again reinstall and reboot
sudo apt-get install network-manager network-manager-gnome -y && reboot
Find the network interface on which you want to run DHCP server by running the following command in terminal. In my case it was enp2s0. It can be eth0, eth1, etc
ifconfig -a
Now comes the main part. Edit the /etc/network/interfaces file.
sudo gedit /etc/network/interfaces
OR
sudo nano /etc/network/interfaces
Paste the following :
allow-hotplug enp2s0
iface enp2s0 inet static
name Lan
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
Replace enp2s0 by your network interface and make other necessary modifications.
For gedit simply save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
You must have noticed I used allow-hotplug
instead of auto. It is because in UBUNTU 15.10 (can't speak about other version) during boot UBUNTU waits for all the auto interface to be UP. Owing to it UBUNTU waits for 2 mins 3 sec (in my case) and then completes the boot process. So in order to reduce the boot time and to not encounter this issue I am using allow-hotplug
.
Finally modify the main configuration file as follows :
sudo gedit /etc/dhcp/dhcpd.conf
OR
sudo nano /etc/network/interfaces
ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.35 192.168.1.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.33;
}
The following is for IP reservation. If you want to do it then replace 7c:0b:c6:**:**:43
with mac address of your device.
host TABLET {
hardware ethernet 7c:0b:c6:**:**:43;
fixed-address 192.168.1.34;
}
Again, for gedit, save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
Notice that in this configuration address 192.168.1.33
of interfaces file above matches with option routers 192.168.1.33
. Similarly network 192.168.1.0
of interfaces matches with subnet 192.168.1.0
. The same goes with netmask and subnet-mask.
As mentioned above by Doug Smythies and due to error in configuration I set IP range from 192.168.1.35 because I reserved an IP address 192.168.1.34. Keeping the same IP address in reserved list and IP range creates problems.
A final reboot won't hurt.
reboot
If you encounter problems then check the service status using
service isc-dhcp-server status
Because I am an inexperienced UBUNTU user I cannot say why it solved the issue but it did and I am sharing this answer so as to help fellow mates like me who are also inexperienced.
Special Thanks to Doug Smythies for your interest and efforts for the solution. Please make necessary changes and corrections.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f762550%2fubuntu-dhcp-not-assigning-ip-address-to-clients%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
To prevent potential conflict, I would not declare MAC based IP addresses within the same pool that is reserved for regular DHCP addresses. I am suggesting that in your /etc/dhcp/dhcpd.conf
file, this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
Should be something like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.40 192.168.1.200;
}
You do not have enough options declared in your /etc/dhcp/dhcpd.conf
file. The important omission, is option routers 192.168.1.???;
(use your router IP address).
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
add a comment |
To prevent potential conflict, I would not declare MAC based IP addresses within the same pool that is reserved for regular DHCP addresses. I am suggesting that in your /etc/dhcp/dhcpd.conf
file, this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
Should be something like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.40 192.168.1.200;
}
You do not have enough options declared in your /etc/dhcp/dhcpd.conf
file. The important omission, is option routers 192.168.1.???;
(use your router IP address).
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
add a comment |
To prevent potential conflict, I would not declare MAC based IP addresses within the same pool that is reserved for regular DHCP addresses. I am suggesting that in your /etc/dhcp/dhcpd.conf
file, this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
Should be something like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.40 192.168.1.200;
}
You do not have enough options declared in your /etc/dhcp/dhcpd.conf
file. The important omission, is option routers 192.168.1.???;
(use your router IP address).
To prevent potential conflict, I would not declare MAC based IP addresses within the same pool that is reserved for regular DHCP addresses. I am suggesting that in your /etc/dhcp/dhcpd.conf
file, this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.33 192.168.1.200;
}
Should be something like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.40 192.168.1.200;
}
You do not have enough options declared in your /etc/dhcp/dhcpd.conf
file. The important omission, is option routers 192.168.1.???;
(use your router IP address).
answered Apr 25 '16 at 23:20
Doug Smythies
7,15631428
7,15631428
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
add a comment |
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Didn't work... Any other solution.
– Siddharth Manthan
Apr 26 '16 at 5:58
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Here's something. When I remove isc-dhcp-server package all my clients get IP adderss but I don't know from where. The server got IP address 10.42.0.1. I would like to change it and set to static.
– Siddharth Manthan
Apr 26 '16 at 6:37
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
Well, you need to figure that out and disable it.
– Doug Smythies
Apr 26 '16 at 6:58
1
1
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
Thanks for your interest. Problem solved. Should I mention here how it was solved ??
– Siddharth Manthan
Apr 26 '16 at 11:48
1
1
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
Yes, please tell us what the problem was and how you solved it. Either by comment or by writing an answer.
– Doug Smythies
Apr 26 '16 at 14:17
add a comment |
Ensure that you have cached the latest version of network-manager and network-manager-gnome packages in /var/cache/apt directory.
Failure to do so will create very serious issues as you won't be able to access INTERNET.
How to do it : http://www.tuxradar.com/answers/517
I performed a minimal install so I had it in my cache. Then remove network-manager and network-manager-gnome using following command.
sudo apt-get purge network-manager network-manager-gnome
Then again reinstall and reboot
sudo apt-get install network-manager network-manager-gnome -y && reboot
Find the network interface on which you want to run DHCP server by running the following command in terminal. In my case it was enp2s0. It can be eth0, eth1, etc
ifconfig -a
Now comes the main part. Edit the /etc/network/interfaces file.
sudo gedit /etc/network/interfaces
OR
sudo nano /etc/network/interfaces
Paste the following :
allow-hotplug enp2s0
iface enp2s0 inet static
name Lan
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
Replace enp2s0 by your network interface and make other necessary modifications.
For gedit simply save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
You must have noticed I used allow-hotplug
instead of auto. It is because in UBUNTU 15.10 (can't speak about other version) during boot UBUNTU waits for all the auto interface to be UP. Owing to it UBUNTU waits for 2 mins 3 sec (in my case) and then completes the boot process. So in order to reduce the boot time and to not encounter this issue I am using allow-hotplug
.
Finally modify the main configuration file as follows :
sudo gedit /etc/dhcp/dhcpd.conf
OR
sudo nano /etc/network/interfaces
ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.35 192.168.1.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.33;
}
The following is for IP reservation. If you want to do it then replace 7c:0b:c6:**:**:43
with mac address of your device.
host TABLET {
hardware ethernet 7c:0b:c6:**:**:43;
fixed-address 192.168.1.34;
}
Again, for gedit, save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
Notice that in this configuration address 192.168.1.33
of interfaces file above matches with option routers 192.168.1.33
. Similarly network 192.168.1.0
of interfaces matches with subnet 192.168.1.0
. The same goes with netmask and subnet-mask.
As mentioned above by Doug Smythies and due to error in configuration I set IP range from 192.168.1.35 because I reserved an IP address 192.168.1.34. Keeping the same IP address in reserved list and IP range creates problems.
A final reboot won't hurt.
reboot
If you encounter problems then check the service status using
service isc-dhcp-server status
Because I am an inexperienced UBUNTU user I cannot say why it solved the issue but it did and I am sharing this answer so as to help fellow mates like me who are also inexperienced.
Special Thanks to Doug Smythies for your interest and efforts for the solution. Please make necessary changes and corrections.
add a comment |
Ensure that you have cached the latest version of network-manager and network-manager-gnome packages in /var/cache/apt directory.
Failure to do so will create very serious issues as you won't be able to access INTERNET.
How to do it : http://www.tuxradar.com/answers/517
I performed a minimal install so I had it in my cache. Then remove network-manager and network-manager-gnome using following command.
sudo apt-get purge network-manager network-manager-gnome
Then again reinstall and reboot
sudo apt-get install network-manager network-manager-gnome -y && reboot
Find the network interface on which you want to run DHCP server by running the following command in terminal. In my case it was enp2s0. It can be eth0, eth1, etc
ifconfig -a
Now comes the main part. Edit the /etc/network/interfaces file.
sudo gedit /etc/network/interfaces
OR
sudo nano /etc/network/interfaces
Paste the following :
allow-hotplug enp2s0
iface enp2s0 inet static
name Lan
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
Replace enp2s0 by your network interface and make other necessary modifications.
For gedit simply save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
You must have noticed I used allow-hotplug
instead of auto. It is because in UBUNTU 15.10 (can't speak about other version) during boot UBUNTU waits for all the auto interface to be UP. Owing to it UBUNTU waits for 2 mins 3 sec (in my case) and then completes the boot process. So in order to reduce the boot time and to not encounter this issue I am using allow-hotplug
.
Finally modify the main configuration file as follows :
sudo gedit /etc/dhcp/dhcpd.conf
OR
sudo nano /etc/network/interfaces
ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.35 192.168.1.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.33;
}
The following is for IP reservation. If you want to do it then replace 7c:0b:c6:**:**:43
with mac address of your device.
host TABLET {
hardware ethernet 7c:0b:c6:**:**:43;
fixed-address 192.168.1.34;
}
Again, for gedit, save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
Notice that in this configuration address 192.168.1.33
of interfaces file above matches with option routers 192.168.1.33
. Similarly network 192.168.1.0
of interfaces matches with subnet 192.168.1.0
. The same goes with netmask and subnet-mask.
As mentioned above by Doug Smythies and due to error in configuration I set IP range from 192.168.1.35 because I reserved an IP address 192.168.1.34. Keeping the same IP address in reserved list and IP range creates problems.
A final reboot won't hurt.
reboot
If you encounter problems then check the service status using
service isc-dhcp-server status
Because I am an inexperienced UBUNTU user I cannot say why it solved the issue but it did and I am sharing this answer so as to help fellow mates like me who are also inexperienced.
Special Thanks to Doug Smythies for your interest and efforts for the solution. Please make necessary changes and corrections.
add a comment |
Ensure that you have cached the latest version of network-manager and network-manager-gnome packages in /var/cache/apt directory.
Failure to do so will create very serious issues as you won't be able to access INTERNET.
How to do it : http://www.tuxradar.com/answers/517
I performed a minimal install so I had it in my cache. Then remove network-manager and network-manager-gnome using following command.
sudo apt-get purge network-manager network-manager-gnome
Then again reinstall and reboot
sudo apt-get install network-manager network-manager-gnome -y && reboot
Find the network interface on which you want to run DHCP server by running the following command in terminal. In my case it was enp2s0. It can be eth0, eth1, etc
ifconfig -a
Now comes the main part. Edit the /etc/network/interfaces file.
sudo gedit /etc/network/interfaces
OR
sudo nano /etc/network/interfaces
Paste the following :
allow-hotplug enp2s0
iface enp2s0 inet static
name Lan
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
Replace enp2s0 by your network interface and make other necessary modifications.
For gedit simply save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
You must have noticed I used allow-hotplug
instead of auto. It is because in UBUNTU 15.10 (can't speak about other version) during boot UBUNTU waits for all the auto interface to be UP. Owing to it UBUNTU waits for 2 mins 3 sec (in my case) and then completes the boot process. So in order to reduce the boot time and to not encounter this issue I am using allow-hotplug
.
Finally modify the main configuration file as follows :
sudo gedit /etc/dhcp/dhcpd.conf
OR
sudo nano /etc/network/interfaces
ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.35 192.168.1.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.33;
}
The following is for IP reservation. If you want to do it then replace 7c:0b:c6:**:**:43
with mac address of your device.
host TABLET {
hardware ethernet 7c:0b:c6:**:**:43;
fixed-address 192.168.1.34;
}
Again, for gedit, save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
Notice that in this configuration address 192.168.1.33
of interfaces file above matches with option routers 192.168.1.33
. Similarly network 192.168.1.0
of interfaces matches with subnet 192.168.1.0
. The same goes with netmask and subnet-mask.
As mentioned above by Doug Smythies and due to error in configuration I set IP range from 192.168.1.35 because I reserved an IP address 192.168.1.34. Keeping the same IP address in reserved list and IP range creates problems.
A final reboot won't hurt.
reboot
If you encounter problems then check the service status using
service isc-dhcp-server status
Because I am an inexperienced UBUNTU user I cannot say why it solved the issue but it did and I am sharing this answer so as to help fellow mates like me who are also inexperienced.
Special Thanks to Doug Smythies for your interest and efforts for the solution. Please make necessary changes and corrections.
Ensure that you have cached the latest version of network-manager and network-manager-gnome packages in /var/cache/apt directory.
Failure to do so will create very serious issues as you won't be able to access INTERNET.
How to do it : http://www.tuxradar.com/answers/517
I performed a minimal install so I had it in my cache. Then remove network-manager and network-manager-gnome using following command.
sudo apt-get purge network-manager network-manager-gnome
Then again reinstall and reboot
sudo apt-get install network-manager network-manager-gnome -y && reboot
Find the network interface on which you want to run DHCP server by running the following command in terminal. In my case it was enp2s0. It can be eth0, eth1, etc
ifconfig -a
Now comes the main part. Edit the /etc/network/interfaces file.
sudo gedit /etc/network/interfaces
OR
sudo nano /etc/network/interfaces
Paste the following :
allow-hotplug enp2s0
iface enp2s0 inet static
name Lan
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
Replace enp2s0 by your network interface and make other necessary modifications.
For gedit simply save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
You must have noticed I used allow-hotplug
instead of auto. It is because in UBUNTU 15.10 (can't speak about other version) during boot UBUNTU waits for all the auto interface to be UP. Owing to it UBUNTU waits for 2 mins 3 sec (in my case) and then completes the boot process. So in order to reduce the boot time and to not encounter this issue I am using allow-hotplug
.
Finally modify the main configuration file as follows :
sudo gedit /etc/dhcp/dhcpd.conf
OR
sudo nano /etc/network/interfaces
ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.35 192.168.1.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.33;
}
The following is for IP reservation. If you want to do it then replace 7c:0b:c6:**:**:43
with mac address of your device.
host TABLET {
hardware ethernet 7c:0b:c6:**:**:43;
fixed-address 192.168.1.34;
}
Again, for gedit, save and exit. Nano users save using ctrl + o followed by return (enter) key. Then exit by ctrl + x.
Notice that in this configuration address 192.168.1.33
of interfaces file above matches with option routers 192.168.1.33
. Similarly network 192.168.1.0
of interfaces matches with subnet 192.168.1.0
. The same goes with netmask and subnet-mask.
As mentioned above by Doug Smythies and due to error in configuration I set IP range from 192.168.1.35 because I reserved an IP address 192.168.1.34. Keeping the same IP address in reserved list and IP range creates problems.
A final reboot won't hurt.
reboot
If you encounter problems then check the service status using
service isc-dhcp-server status
Because I am an inexperienced UBUNTU user I cannot say why it solved the issue but it did and I am sharing this answer so as to help fellow mates like me who are also inexperienced.
Special Thanks to Doug Smythies for your interest and efforts for the solution. Please make necessary changes and corrections.
answered Apr 27 '16 at 6:40
Siddharth Manthan
3826
3826
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f762550%2fubuntu-dhcp-not-assigning-ip-address-to-clients%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
dhcpd doesn't seem to be running. Are there any messages when you try to start it? Or any log entries anywhere in /var/log?
– Doug Smythies
Apr 26 '16 at 6:46