Register a domain and help support LQ
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 08-07-2007, 04:33 AM   #1
Registered: Feb 2006
Distribution: RHCL 5
Posts: 229

Rep: Reputation: 30
Bind ip with mac address

with DCHP server:

is it possible to bind mac address of dhcp clients with particular ip address, so if a user change ip, It does not work in lan.
Old 08-07-2007, 06:35 AM   #2
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 254

Rep: Reputation: 32
you can bind a particular IP address to a MAC address like this...
host ns {
hardware ethernet 00:14:22:58:1D:4F;

in the /etc/dhcpd.conf file...
Old 08-07-2007, 06:43 AM   #3
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 37
@culin: is that restrictive? Like, if the client just chooses its own ip and uses that on the lan, that would not be blocked in any way, right?
Old 08-07-2007, 11:42 PM   #4
Registered: Feb 2006
Distribution: RHCL 5
Posts: 229

Original Poster
Rep: Reputation: 30
agree with muha question...
Old 08-08-2007, 11:13 AM   #5
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 558

Rep: Reputation: 37
Are you asking about a user who puts in their own IP, instead of using DHCP. If so, then it will be a fixed IP, and DHCP won't be involved. DHCP will only hand out IPs to clients, who request one.

Or are you asking about a user who takes his machine off one network, using DHCP, and connects it to yours, where, initially, the client will try and renew the existing IP. In this case, DHCP should reject that request, and the client will then request a new IP, which will be the one specified in your DHCP configuration.

Old 08-10-2007, 01:23 AM   #6
Registered: Oct 2006
Location: Porsgrunn, Norway
Distribution: CentOS 5 / 6 / 7
Posts: 102

Rep: Reputation: 16
You would need to set up DHCP as "Culin" has stated in his previous post, this will always supply the same IP adress to a particular MAC address.

If the user changes the IP adress manually, you will need to block this on your Firewall using IP tables to allow only the DHCP adresses.


Last edited by daveginorge; 08-10-2007 at 01:25 AM.


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
(98)Address already in use: make_sock: could not bind to address bruvajon Linux - Software 34 11-30-2011 03:08 PM
Bind Mac with Ip address shipon_97 Linux - Newbie 5 11-23-2007 12:14 AM
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM

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