LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2005, 07:14 PM   #1
mayaLinux
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 10.1.1.10-10.1.1.250 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.

thx
 
Old 12-05-2005, 07:59 PM   #2
Moloko
Member
 
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
mayaLinux
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 addresses....is there really no other feasible alternatives?
 
Old 12-06-2005, 05:56 PM   #4
kyriakos
Member
 
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
mayaLinux
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.
 
  


Reply


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 LinuxQuestions.org 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:41 AM.

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