I'd configure isc-dhcp-server and its works fine but now we are running out of range as we are exceed 255+ active devices.

Current configuration:


I want to setup following things.

eth0: Only for lan devices eth1: Only for wifi routers and wifi devices.

Now my question is how to configure dhcp server so for the dhcp request comes on eth0 port its serve 192.168.0.X ip range and for wireless request comes at eth1 serves 192.168.1.x ip range


First select Interface card

sudo nano /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).

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).

# Additional options to start dhcpd with.
#   Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#   Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0 eth1"

Configure Subnet

sudo nano /etc/dhcp/dhcpd.conf

comment all and above put this

subnet netmask {
       range 192.168.0.xxx 192.168.0.xxx;
        option routers                  192.168.0.x;
        option subnet-mask    ;
        option broadcast-address;
        option domain-name-servers      xxx.xxx.xxx.xxx;
        default-lease-time 86400;
        max-lease-time 86400;


subnet netmask {
        range 192.168.1.xxx 192.168.1.xxx;
        option routers                  192.168.1.x;
        option subnet-mask    ;
        option broadcast-address;
        option domain-name-servers      xxx.xxx.xxx.xxx;
        default-lease-time 86400;
        max-lease-time 86400;


Restart service

sudo service isc-dhcp-server restart


  • One more question as eth1 which is will be connected to wifi router so when some one try to connect wifi router how it will get 192.168.1.X ip address ? When people connect using lan its request comes to eth0 and its get 192.168.0.X ip address and when people connect from wifi its request comes to eth1 and people get 192.168.1.X ip address I don't understand how dhcp do that – Mitesh Shah Mar 27 '15 at 8:38
  • 1
    Connect wifi ruter from lan port to dhcp server eth1, no wan. Wifi router will relay dhcp request to server and that will work. Dhcp serevr offer ip based from ip on witch interface request come. Eth0 ip is 192.168.0.x and if request come on that port server looks on config and offer that range of ip addresses. – 2707974 Mar 27 '15 at 8:54

To get distinct subnet ip addresses for your wifi devices from your lan devices, if you have multiple wifi routers you should connect them to seperate hub or switch connecting it to one of interfaces of your DHCP server say eth1

Other interface say eth0 will be connected to the switch which is having all lan device connected to it.

Now Lets start with configuration,

When a DHCP configured PC boots, it requests its IP address from the DHCP server. It does this by sending a standardized DHCP broadcast request packet to the DHCP server with a source IP address of

If your DHCP server has more than one interface, you have to add a route for this address so that it knows the interface on which to send the reply; if not, it sends it to the default gateway.

Add the route to your /etc/network/interfaces file. In this case the route is added to the eth0 interface.

# File: /etc/network/interfaces

iface eth0 inet static

       up route add -host eth0

iface eth1 inet static

       up route add -host eth1

Now, You can configure your DHCP configuration as given by @2707974

Suppose request comes to say eth0, which is configured with address with subnet 192.168.0.X so that client will get ip in 192.168.0.X range.

Similarly, for eth1 interface.

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.