0

I have tried to get into Ubuntu thing recently (newest edition), but I've got a problem with DHCP server. I configured the files /etc/network/interfaces and /etc/dhcp/dhcpd.conf according to my student book, but seems like it's not working. Nmap does not show my DHCP at all so I assume that's not on at all, but still - there is absolutely no error when I start/restart daemons and services with the settings below:

interfaces file:

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
address 192.168.0.110
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

dhcpd.conf file:

subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers                  192.168.0.1;
        option subnet-mask              255.255.255.0;
        option domain-search              "example.com";
        option domain-name-servers       192.168.0.100;
        option time-offset              -18000;     # Eastern Standard Time
        range 192.168.0.150 192.168.0.160;
}

Ifconfig:

eth1      Link encap:Ethernet  HWaddr e0:3f:49:7f:f6:20  
          inet addr:192.168.0.110  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::e23f:49ff:fe7f:f620/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1046758 errors:0 dropped:0 overruns:0 frame:0
          TX packets:647564 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1381761035 (1.3 GB)  TX bytes:88156037 (88.1 MB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:45940 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45940 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3127593 (3.1 MB)  TX bytes:3127593 (3.1 MB)

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="eth1"

What can be wrong?

2
  • Please also provide the content of /etc/default/isc-dhcp-server.
    – FloHimself
    Jun 9 '15 at 19:52
  • 1
    @FloHimself added!
    – Szymon
    Jun 9 '15 at 20:00
0

nmap is an IP tool, DHCP is a method of allocating IP addresses, it doesn't operate at the IP layer as that would make it only useful for entities that no longer need it. Consequently, nmap won't see it.

If you still feel you have a fault, there are tools available to test DHCP servers (eg https://github.com/CyberShadow/dhcptest - never tried by me though)

1
  • The nmap bundle includes hundreds of scripts for a variety of networking tasks which also includes DHCP discovery, namely broadcast-dhcp-discover and dhcp-discover.
    – FloHimself
    Jun 10 '15 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.