Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 05-08-2009, 12:27 AM   #1
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Rep: Reputation: 30
Instead of Router DHCP Server, Pass DHCP Server control to Slackware

Hi all,

My current simple network setup involves a single Router (Billion 5102s) acting as a DHCP Server, passing I.P. addresses via ethernet switches to all the LAN client PC's. (BTW, every PC in the LAN is running Slackware 12.0 - 12.2).

When my Server P.C (which is always on) is Router assigned an I.P address of, everything works correctly with my Router configured Network Address Translations (NAT). I am able to ssh, remote control login (krdc), FTP serve, Internet game serve ... etc.. so all happy.

However if there is ever a power fluctuation, and there are any other PC's connected to the Network, for some reason when the systems repower, the Router assigns to one of the other systems and the Server gets assigned some other new I.P. address (which is very frustrating as then, none of my NAT settings will work and I am unable to remotely administer my Server PC.

So I would like to take DHCP control away from the Router, and give it exclusively to the Slackware Server PC.

[My theory being, that the Server will always DHCP configure itself with the NAT happy I.P., and then the Server PC can assign DHCP I.P. address dynamically to all the other PC's on the Network as they are connected (what I.P. addresses the other P.C's get is irrelevant) ]

Also, as my Network PC's fluctuate I want to remain using DHCP and not go to Static I.P. addressing.

So can Slackware do this (DHCP Server)?


I have been reading my router manual (DHCP Server section), and it says that it can 'Relay' DHCP control to an I.P. address, so this looks promising ....


After more reading on this forum, I have discovered that I can (apparently) make my Server PC have a specific I.P. address by editing /etc/rc.d/rc.inet1.conf, and in eth0 section add:

# Config information for eth0:
So this sounds even more promising, that should mean that I can give the Router a 'Relay' DHCP setting and have it look for (ServerPC) for DHCP. (havn't tried it yet).

How then would I turn my Server PC from a DHCP client (getting it's IP from Router), into a DHCP Server (assigning out all IP's to itself and everything else)?

Are there further configurations required in /etc/rc.d/rc.inet1.conf?, or is Slackware DHCP server settings controlled from somewhere else in the filesystem?

Thanks very much for any assistance or tips with this configuration.

I'll look forward to hearing from you.

Old 05-08-2009, 05:13 AM   #2
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,323

Rep: Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515Reputation: 5515
You can entirely switch off the DHCP server functionality on your router and then enable the DHCP server of your Slackware box. There is no need for a DHCP relay unless your LAN has multiple network segments separated by other routers (highly unlikely in a domestic setup).
Alternatively you can also just assign a static IP address to your server and let the router continue serving IP addresses only to your desktops and laptops.

If you want to know more about configurign a DHCP server on Slackware, I have a section about justt hat as part of my article on how to setup a PXE (network boot) server. See

Old 05-08-2009, 05:21 AM   #3
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 229Reputation: 229Reputation: 229
You'll need to set a static ip address for the server and then create yourself a config file /etc/dhcpd.conf .

I'd suggest setting the router up with a staic IP address also.

Of course you can assign a static IP address to machines with dhpcd by using the hardware mac address.
Old 05-08-2009, 06:28 AM   #4
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
In addition to the previous replies - if you wish to setup a Slackware DHCP server have a look at dnsmasq. It's easy to setup and works well.

It's probably easiest to static IP the server and DHCP the others. Another facility that your router may have is to assign IP's by Mac address. You can reserve IP's for particular machines in a table on the router to be DHCP'd. Anyway - lots of solutions for you to play with !
Old 05-09-2009, 03:45 PM   #5
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
I don't know if there is any other reason to move the DHCP service to your server.
If all you want is giving the server a constant IP, then I'd simply configure the server with a static IP instead of using DHCP.

Unless I'm wrong you cannot have the server giving itself an IP address throug DHCP, you always have to configure it with a static IP address.

You can configure a static IP address using "netconfig" in console. If you don't want that you can edit the config files yourself. A hint about what to edit can be found in the slackbook:
Just set USE_DHCP to no and fill in the right information in the other places.
Old 05-10-2009, 07:34 PM   #6
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Original Poster
Rep: Reputation: 30
Hello Everyone, and thank you for all of your replies.

I have tried both methods suggested ...

When I turned off Router DHCP and configured Slackware ServerPC as a DHCP server (thank you Alien Bob for Wiki), I noticed that pages seemed to take longer to load on the workstations?
(I may have had to tweak configs further to resolve that).

I then reverted to Router DHCP, and (netconfig) set up the Slackware Server PC with a Static I.P., and everything works at normal speed again.

So far over the weekend, the Server PC has constantly maintained the correct 192.*.100 I.P address in the Router DHCP table, and there has been no I.P. stealing by the other workstations, so it appears that everything is working correctly.

I'll leave it with this current Server PC static I.P. setup as everything appears to be happy.

Thank you all for your assistance in this topic, it has been an interesting exercise.


Last edited by orbit; 05-10-2009 at 07:43 PM.
Old 05-11-2009, 03:00 AM   #7
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
Just to be safe I'd let the DHCP IP address pool on the router start at . Your server doesn't need DHCP anymore, and if the router accidently hands out the IP to someone, things will get really strange.


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
All in one Proxy Server, DHCP server & Router binary1011100 Linux - Networking 1 05-08-2006 12:18 PM
Static IP Address with DHCP server control taylortbb Linux - Networking 1 06-28-2005 02:43 PM
local web server behind dhcp router j4b Linux - Networking 10 08-09-2004 11:21 PM
Home network using linksys router -- DHCP server? GoinEasy9 Linux - General 12 04-02-2004 12:32 AM
dhcp server in linksys router maxvenum Linux - Networking 3 09-02-2003 08:56 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration