Download your favorite Linux distribution at LQ ISO.
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 12-05-2005, 07:14 PM   #1
LQ Newbie
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
Configure DHCP server to assign IP using mac addr

Just installed Suse10 and got it configured to act as the dhcp server. Right now, its set to assign IP within a pool, lets say from and I can also add static IP by manually coding in /etc/dhcpd.conf file.

My question is how do I configure so that I can easily add mac addr and have it assign IP without going into the main dhcpd.conf file as I may accidentally delete other lines or such.

any advice/suggestions is greatly appreciated.

Old 12-05-2005, 07:59 PM   #2
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
The /etc/dhcpd.conf file is the place to be. Edit it with Vim on the command line, but if you don't trust yourself make a copy of the original file first. Copy it back if changing it with Vim fails for whatever reason. The cp routine should be fairly foul proof

Add something like this to /etc/dhcpd.conf:
host linux
hardware ethernet 00:35:14:8E:C3:8F;
fixed-address linux.local.lan;

linux.local.lan must have it's IP number in the /etc/hosts file on the server, otherwise use numbers in the dhcpd.conf file.

Last edited by Moloko; 12-05-2005 at 08:02 PM.
Old 12-06-2005, 10:22 AM   #3
LQ Newbie
Registered: Aug 2005
Posts: 8

Original Poster
Rep: Reputation: 0
thx Moloko..but I was looking for better alternative..its quite tedius/cumbersome when I have to enter 400-500 mac there really no other feasible alternatives?
Old 12-06-2005, 05:56 PM   #4
Registered: Dec 2005
Location: Greece, Xanthi
Distribution: Red Hat 9, FreeBSD 5.4
Posts: 38

Rep: Reputation: 15
u can write a script to import the lines needed to dhcpd.conf with the m4 command
it works simply by a tamplate where add the line include(file_to_insert) where u want to insert it and then m4 template.txt > dhcpd.conf
I m sure with some bash scripting you can do it but why do you need the 400 fixed ips anyway?
Old 12-07-2005, 05:00 PM   #5
LQ Newbie
Registered: Aug 2005
Posts: 8

Original Poster
Rep: Reputation: 0
thx for the tips...needed something with more options and found DHCP Turbo by third party software called Weird solutions. It definitely has lots of room in terms of flexibility for configurations.

As for why 400 ips, its for a secured network. We don't want folks coming in with their laptop and plugging to our network.


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
Configure dhcpd (Configure DHCP Server) hanserver2004 Member Success Stories 3 10-23-2006 06:39 AM
Obtain IP addr. from MAC addr? Ryand833 Linux - Wireless Networking 3 06-30-2005 01:59 PM
Redboot gets wrong default server IP-addr from DHCP ? waynix Linux - Networking 4 06-10-2005 12:44 AM
Configure dhcpd (Configure DHCP Server) hanserver2004 General 1 08-16-2004 01:39 PM
Change my MAC addr borbjo Linux - Networking 4 09-02-2003 06:33 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:48 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