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 10-29-2004, 07:09 AM   #1
aronnok
Member
 
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Rep: Reputation: 15
MAC based DHCP configuration ! Help wanted


helo all,
I'm working on an ISP. Our internal Clients ( in house ) are frequently having some problems of IP conflict. So, i think DHCP would be a proper solution. But at the same time i want to restrict their IP. Can anybody help me? I need some idea abt DHCP server config file which will provide a pre selected IP for a host.
like, if someone have the MAC of 00:C0:26:78:6B:8A
He should obtain the ip 192.168.1.50

Thanx in advance

Last edited by aronnok; 10-29-2004 at 07:12 AM.
 
Old 10-29-2004, 07:41 AM   #2
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
you wanna use dhcpd. then edit the config accordingly... (i think its /etc/dhcpd.conf but i cant remember for sure off the top of my head)

subnet 192.168.1.0 netmask 255.255.255.0 { - declare network
range dynamic-bootp 192.168.1.x 192.168.1.x; - declare 'pool' of address.

option routers 192.168.1.x; - gateway
option subnet-mask 255.255.255.0; - subnet
default-lease-time 360000; -lease times
max-lease-time 259200;

host yourmachine {
hardware ethernet 00:00:00:00:00; - mac addres of the nic that wants the ip below
fixed-address 192.168.0.x; - ip you want the client to get
}

that should point you in the right direction. obviously you can add as many 'host' methods as you want.

hope that helps.
 
Old 10-30-2004, 02:04 AM   #3
aronnok
Member
 
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Original Poster
Rep: Reputation: 15
thanx, but my question is, where is the DNS address?
i also need to define the DNS address.
looking forward to get help from you again.

Code:
subnet 192.168.1.0 netmask 255.255.255.0 { - declare network
range dynamic-bootp 192.168.1.x 192.168.1.x; - declare 'pool' of address.

option routers 192.168.1.x; - gateway
option subnet-mask 255.255.255.0; - subnet
default-lease-time 360000; -lease times
max-lease-time 259200;

host yourmachine {
hardware ethernet 00:00:00:00:00; - mac addres of the nic that wants the ip below
fixed-address 192.168.0.x; - ip you want the client to get
}
 
Old 10-30-2004, 02:10 AM   #4
aronnok
Member
 
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Original Poster
Rep: Reputation: 15
Should it be like
Quote:
option dns 192.168.1.254; - dns
?
 
Old 10-30-2004, 02:15 AM   #5
aronnok
Member
 
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Original Poster
Rep: Reputation: 15
or, i think it shoud be like....

option domain-name "data-edge.net";
option domain-name-servers 69.88.10.36;
 
Old 10-30-2004, 06:37 AM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
Originally posted by aronnok
or, i think it shoud be like....

option domain-name "data-edge.net";
option domain-name-servers 69.88.10.36;
That's correct! For a list of all dhcpd.conf options, see:
man dhcp-options

There are also some good example configurations listed in:
man dhcpd.conf
 
  


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
Wanted Linux Based CVS(With GUI) kartheekpn Linux - Software 2 11-14-2005 05:45 AM
Is Mac based on BSD ? inspiredbymetal Other *NIX 6 10-17-2005 04:55 PM
MAC Address based hostname hogg85 Linux - Networking 2 06-13-2005 12:51 PM
Shell Based Distro Wanted Android_808 Linux - Distributions 1 04-23-2004 03:44 AM
Get IP based on Mac address sunmiewon Linux - Networking 4 01-31-2004 06:18 PM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration