Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-04-2016, 11:00 AM   #1
LQ Newbie
Registered: Oct 2003
Location: Home
Distribution: Debian
Posts: 3

Rep: Reputation: 0
Configuring a DHCP server

Hello all,

I have a catch 22 situation, which I am not sure how to solve.

I would like the machine running the DHCP server to have a static ip, but I would rather not specify the ip in eth0 but rather have it set by the DHCP server.
  • The DHCP server requires eth0 to be running
  • but when eth0 loads up and as the DHCP server is not running yet then eth0 doesn't have an IP and therefore no subnet
  • then when the DHCP server starts, it complains that the subnet on eth0 does not match the current subnet in dhcpd.conf.

It's like an endless loop, is there any solution to this?

Old 06-04-2016, 03:26 PM   #2
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 804

Rep: Reputation: 257Reputation: 257Reputation: 257
I'm wondering what your network looks like; usually you'd use dhcpd to serve your intranet. For example, if eth0 goes out to your internet connection then you'd set something like 'dhcpd -cf /etc/dhcpd.conf wlan0' to serve your wireless intranet. Your dhcpd.conf should reflect that. Why don't you want to set your first internal address statically? What is eth0 connecting to: a cable modem, or a router? Does it/can it assign an address? We may be able to answer better if we knew more what the network looks like and how it's set up.
Old 06-05-2016, 09:26 AM   #3
LQ Newbie
Registered: Oct 2003
Location: Home
Distribution: Debian
Posts: 3

Original Poster
Rep: Reputation: 0
Sorry you are right, I should explain the configuration with a bit more detail.

I have a small Banana Pi box running Bananian. It is basically a nas box running a few services like OpenMediaVault, transmission, samba, etc. So it needs to have network and internet connectivity. Because it is running 24x7 I thought a dhcp server would be nice merely because the one I have on my router is not very stable.

If I configure a static IP on eth0, I would also have to configure the router ip address and dns servers, and then repeat the same configuration in the dhcp server config file. For that reason I was hopping leaving eth0 to obtain it's [fixed] ip and other information dynamically from the dhcp server (which is located on the same machine).

Being that my dhcp server is for a small home network, is there an option for excluding the subnet configuration? There is only one subnet and only one ip range anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Configuring the DHCP Server on openSUSE LXer Syndicated Linux News 0 08-25-2011 01:20 PM
problem configuring dhcp server with authentication sandysingharoy Linux - Newbie 1 04-23-2010 03:26 AM
Problem in configuring DHCP server siddhant_2010 Linux - Server 2 04-01-2010 05:57 AM
Problem configuring DHCP on Fedora 4 server khantahirkheli74 Linux - Networking 1 04-05-2006 09:45 PM
configuring dns server on dhcp client ydpk Linux - Networking 3 11-04-2004 10:23 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration