LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-14-2008, 10:42 PM   #1
mangueJOE
Member
 
Registered: Nov 2001
Location: Brazil
Distribution: Ubuntu, Debian
Posts: 66

Rep: Reputation: 16
How to make DHCP answer only to select mac address?


I have a network with 100 hosts, I want DHCPD to simple ignore 10 of them. How do I do that using software?
 
Old 10-14-2008, 11:09 PM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
you can:
1. block the mac address of the 10 with an iptables rule like:

iptables -A INPUT -m mac --mac-source 00:aa:cc:bb:nn:dd -j DROP

2. in your DHCP server configuration (assuming to be /etc/dhcpd.conf), you can
define the mac address to ip definition, and don't define an IP range to be offerred:

host OKPC01 {
hardware ethernet 00:16:3e:0b:f2:29;
fixed-address 192.168.222.30;
}
 
Old 10-15-2008, 01:16 AM   #3
mangueJOE
Member
 
Registered: Nov 2001
Location: Brazil
Distribution: Ubuntu, Debian
Posts: 66

Original Poster
Rep: Reputation: 16
Thanks.

Option 2 is best for me because I have two dhcp/LTSP servers and some hosts need to get IP settings from one server and some other hosts from the other server. Why you ask. Because it is a thin client network so every thin client has to get ip settings from the same dhcp/LTSP everytime they boot. Otherwise crazy things might happen.

But in this network I also have lots of normal desktop clients that also need IP settings from a dhcp server.

1 - Can I use this...

Code:
host OKPC01 {
hardware ethernet 00:16:3e:0b:f2:29;
fixed-address 192.168.222.30;
}
...and also especify a range for normal clients?

2 - If 1 is possible. I'd specify this range in one of the DHCP servers. What happens if a normal desktop client asks for Ip settings from a DHCP server and it's rejected. Would the desktop client try again to find another DHCP server in the network or would it just bail?
 
Old 10-15-2008, 01:37 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
For the record, using iptables won't work if the daemon uses raw sockets (like dhcpd does).

So iptables wasn't really an option for this in the first place.
 
  


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
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 01:54 AM
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-09-2007 12:16 AM
DHCP + Mac address tiger3090 Linux - Networking 1 12-07-2004 09:13 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 11:33 AM
MAC Address Encap Vs DHCP zooma Linux - Networking 0 11-21-2001 10:14 AM

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

All times are GMT -5. The time now is 03:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration