SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Instructions
1. Download dhcp rpm package from Red Hat and install:
# rpm -ivh dhcp-2.0pl5-8.i386.rpm
2. Open file /etc/sysconfig/dhcpd and edit the first line as follows:
DHCPDARGS=eth1
Replace 'eth1' above with the network interface that you want to use for dhcp; this should be an
internal network interface; denial of service attacks are possible if dhcp is running on an external
interface.
3. Copy /usr/share/doc/dhcp-2.0pl5/dhcpd.conf.sample to /etc
# cp /usr/share/doc/dhcp-2.0pl5/dhcpd.conf.sample /etc/dhcpd.conf
This sample file is a good starting point for our /etc/dhcpd.conf file, which by default is not
installed. Alternatively, copy the file from a working server.
Edit /etc/dhcpd.conf to suit your needs. An example file is included below for reference:
#################file begin######################
subnet 10.0.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;
# option nis-domain "mydomain.com";
option domain-name "mydomain.com";
option domain-name-servers 216.227.56.120, 64.34.4.36;
option time-offset -28800; # Pacific Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this
unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range 10.0.0.50 10.0.0.254;
default-lease-time 604800;
max-lease-time 604800;
host test {
# option dhcp-client-identifier "test";
hardware ethernet 00:e0:18:90:28:b2;
fixed-address 10.0.0.10;
}
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
########################file end##########################
Notes: specific settings always override global settings; in the above, the range 10.0.0.50 to
10.0.0.254 have been set side for dynamic hosts; this allows anything between 10.0.0.1 and
10.0.0.49 to be set aside as static ips. In the example, host 'test' is given a static ip using its mac
address. The option 'dhcp-client-identifier' may work as an alternative to mac address, but may
require some additional configuration on the client. The max lease time of 604800 translates to 7
days. Lease times are automatically renewed by clients once 50% of the expiration date is
reached. Because of this, very long lease times should be unnecessary. If a very long one is
required, provide the client a static ip using the host declaration. Also, the option time-offset
setting is in seconds according to the manual page; Red Hat's configuration document
erroneously lists this setting in hours. Use option host-name "apex.example.com" in a host
declaration to provide hostnames to clients.
4. Check that the lease database has been created; the rpm should create this file automatically; if
not, create the file:
# touch /var/lib/dhcp/dhcpd.leases
The lease database is recreated from time to time so that it is not too large. First, all known
leases are saved in a temporary lease database. The dhcpd.leases file is renamed
dhcpd.leases~, and the temporary lease database is written to dhcpd.leases.
The DHCP daemon could be killed or the system could crash after the lease database has been
renamed to the backup file but before the new file has been written. If this happens, there is no
dhcpd.leases file that is required to start the service. Do not create a new lease file if this occurs.
If you do, all the old leases will be lost and cause many problems. The correct solution is to
rename the dhcpd.leases~ backup file to dhcpd.leases and then start the daemon.
5. Run 'setup' and check dhcpd to have it load at system boot
6. Start/restart the server
# service dhcpd start (restart)
Changes to the file /etc/dhcpd.conf require the dhcp server to be restarted
7. Test to make sure it works.

Weitere ähnliche Inhalte

Was ist angesagt?

Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21
Hussain111321
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipc
Peter Lawrey
 
Fighting Spam With A Perimeter Mail System 20071108 Sasag
Fighting Spam With A Perimeter Mail System 20071108 SasagFighting Spam With A Perimeter Mail System 20071108 Sasag
Fighting Spam With A Perimeter Mail System 20071108 Sasag
garrett honeycutt
 
Introduction to hadoop administration jk
Introduction to hadoop administration   jkIntroduction to hadoop administration   jk
Introduction to hadoop administration jk
Edureka!
 

Was ist angesagt? (20)

Hadoop at Bloomberg:Medium data for the financial industry
Hadoop at Bloomberg:Medium data for the financial industryHadoop at Bloomberg:Medium data for the financial industry
Hadoop at Bloomberg:Medium data for the financial industry
 
Automation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure DataAutomation of Hadoop cluster operations in Arm Treasure Data
Automation of Hadoop cluster operations in Arm Treasure Data
 
Common Support Issues And How To Troubleshoot Them - Michael Hackett, Vikhyat...
Common Support Issues And How To Troubleshoot Them - Michael Hackett, Vikhyat...Common Support Issues And How To Troubleshoot Them - Michael Hackett, Vikhyat...
Common Support Issues And How To Troubleshoot Them - Michael Hackett, Vikhyat...
 
Champion Fas Deduplication
Champion Fas DeduplicationChampion Fas Deduplication
Champion Fas Deduplication
 
Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipc
 
Building Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scaleBuilding Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scale
 
Google File System
Google File SystemGoogle File System
Google File System
 
Llnl talk
Llnl talkLlnl talk
Llnl talk
 
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NYApache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
 
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu YongUnlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
 
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...
 
Scaling Apache Pulsar to 10 Petabytes/Day
Scaling Apache Pulsar to 10 Petabytes/DayScaling Apache Pulsar to 10 Petabytes/Day
Scaling Apache Pulsar to 10 Petabytes/Day
 
Redis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintrayRedis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintray
 
Difference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image getDifference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image get
 
Perforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the ProfanePerforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the Profane
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL database
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
 
Fighting Spam With A Perimeter Mail System 20071108 Sasag
Fighting Spam With A Perimeter Mail System 20071108 SasagFighting Spam With A Perimeter Mail System 20071108 Sasag
Fighting Spam With A Perimeter Mail System 20071108 Sasag
 
Introduction to hadoop administration jk
Introduction to hadoop administration   jkIntroduction to hadoop administration   jk
Introduction to hadoop administration jk
 

Andere mochten auch

Andere mochten auch (6)

Privacy and personal information
Privacy and personal informationPrivacy and personal information
Privacy and personal information
 
Encryption & interception of communication
Encryption & interception of communicationEncryption & interception of communication
Encryption & interception of communication
 
Professionalism
ProfessionalismProfessionalism
Professionalism
 
Manual de Buenas Prácticas en Movilidad Virtual
Manual de Buenas Prácticas en Movilidad VirtualManual de Buenas Prácticas en Movilidad Virtual
Manual de Buenas Prácticas en Movilidad Virtual
 
Professional ethics in_computing
Professional ethics in_computingProfessional ethics in_computing
Professional ethics in_computing
 
Freedom of speech
Freedom of speechFreedom of speech
Freedom of speech
 

Ähnlich wie Dhcp in linux

Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
franbow
 

Ähnlich wie Dhcp in linux (20)

Dhcp
DhcpDhcp
Dhcp
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Lession4 Dhcp
Lession4 DhcpLession4 Dhcp
Lession4 Dhcp
 
Advanced Hadoop Tuning and Optimization - Hadoop Consulting
Advanced Hadoop Tuning and Optimization - Hadoop ConsultingAdvanced Hadoop Tuning and Optimization - Hadoop Consulting
Advanced Hadoop Tuning and Optimization - Hadoop Consulting
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Dhcp confg
Dhcp confgDhcp confg
Dhcp confg
 
configure a DHCP server on Fedora.pdf
configure a DHCP server on Fedora.pdfconfigure a DHCP server on Fedora.pdf
configure a DHCP server on Fedora.pdf
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OSSupercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Ppt
PptPpt
Ppt
 
DHCP concept
DHCP conceptDHCP concept
DHCP concept
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
ha_module5
ha_module5ha_module5
ha_module5
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 

Mehr von Uc Man

Unit 3 maintain yourself in professional practice
Unit 3    maintain yourself in professional practiceUnit 3    maintain yourself in professional practice
Unit 3 maintain yourself in professional practice
Uc Man
 
Student attendancereportofit 105(a)
Student attendancereportofit 105(a)Student attendancereportofit 105(a)
Student attendancereportofit 105(a)
Uc Man
 

Mehr von Uc Man (20)

Unit 3 maintain yourself in professional practice
Unit 3    maintain yourself in professional practiceUnit 3    maintain yourself in professional practice
Unit 3 maintain yourself in professional practice
 
Unit 3 maintain yourself in professional practice
Unit 3    maintain yourself in professional practiceUnit 3    maintain yourself in professional practice
Unit 3 maintain yourself in professional practice
 
Course outline pp_2
Course outline pp_2Course outline pp_2
Course outline pp_2
 
Unit 3 maintain yourself in professional practice
Unit 3    maintain yourself in professional practiceUnit 3    maintain yourself in professional practice
Unit 3 maintain yourself in professional practice
 
Course outline pp_2
Course outline pp_2Course outline pp_2
Course outline pp_2
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 
Unit 3 maintain yourself in professional practice
Unit 3    maintain yourself in professional practiceUnit 3    maintain yourself in professional practice
Unit 3 maintain yourself in professional practice
 
Pro in the_workplace2
Pro in the_workplace2Pro in the_workplace2
Pro in the_workplace2
 
Encryption & interception of communication
Encryption & interception of communicationEncryption & interception of communication
Encryption & interception of communication
 
Effective time-management
Effective time-managementEffective time-management
Effective time-management
 
Digital divide
Digital divideDigital divide
Digital divide
 
Course outline pp
Course outline ppCourse outline pp
Course outline pp
 
Computer crime
Computer crimeComputer crime
Computer crime
 
Maintain yourself in professional practice
Maintain yourself in professional practiceMaintain yourself in professional practice
Maintain yourself in professional practice
 
Time management
Time managementTime management
Time management
 
Time management,planning and prioritization
Time management,planning and prioritizationTime management,planning and prioritization
Time management,planning and prioritization
 
Student attendancereportofit 105(a)
Student attendancereportofit 105(a)Student attendancereportofit 105(a)
Student attendancereportofit 105(a)
 
Personal effectiveness
Personal effectivenessPersonal effectiveness
Personal effectiveness
 
Professional context of ICT (Need of professionalism)
Professional context of ICT (Need of professionalism) Professional context of ICT (Need of professionalism)
Professional context of ICT (Need of professionalism)
 
Ethics and professionalism
Ethics and professionalismEthics and professionalism
Ethics and professionalism
 

Kürzlich hochgeladen

FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
dollysharma2066
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Dipal Arora
 

Kürzlich hochgeladen (20)

The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 

Dhcp in linux

  • 1. Instructions 1. Download dhcp rpm package from Red Hat and install: # rpm -ivh dhcp-2.0pl5-8.i386.rpm 2. Open file /etc/sysconfig/dhcpd and edit the first line as follows: DHCPDARGS=eth1 Replace 'eth1' above with the network interface that you want to use for dhcp; this should be an internal network interface; denial of service attacks are possible if dhcp is running on an external interface. 3. Copy /usr/share/doc/dhcp-2.0pl5/dhcpd.conf.sample to /etc # cp /usr/share/doc/dhcp-2.0pl5/dhcpd.conf.sample /etc/dhcpd.conf This sample file is a good starting point for our /etc/dhcpd.conf file, which by default is not installed. Alternatively, copy the file from a working server. Edit /etc/dhcpd.conf to suit your needs. An example file is included below for reference: #################file begin###################### subnet 10.0.0.0 netmask 255.255.255.0 { # --- default gateway option routers 10.0.0.1; option subnet-mask 255.255.255.0; # option nis-domain "mydomain.com"; option domain-name "mydomain.com"; option domain-name-servers 216.227.56.120, 64.34.4.36; option time-offset -28800; # Pacific Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range 10.0.0.50 10.0.0.254; default-lease-time 604800; max-lease-time 604800; host test { # option dhcp-client-identifier "test"; hardware ethernet 00:e0:18:90:28:b2; fixed-address 10.0.0.10; } # we want the nameserver to appear at a fixed address # host ns { # next-server marvin.redhat.com; # hardware ethernet 12:34:56:78:AB:CD; # fixed-address 207.175.42.254; # } } ########################file end########################## Notes: specific settings always override global settings; in the above, the range 10.0.0.50 to 10.0.0.254 have been set side for dynamic hosts; this allows anything between 10.0.0.1 and 10.0.0.49 to be set aside as static ips. In the example, host 'test' is given a static ip using its mac address. The option 'dhcp-client-identifier' may work as an alternative to mac address, but may
  • 2. require some additional configuration on the client. The max lease time of 604800 translates to 7 days. Lease times are automatically renewed by clients once 50% of the expiration date is reached. Because of this, very long lease times should be unnecessary. If a very long one is required, provide the client a static ip using the host declaration. Also, the option time-offset setting is in seconds according to the manual page; Red Hat's configuration document erroneously lists this setting in hours. Use option host-name "apex.example.com" in a host declaration to provide hostnames to clients. 4. Check that the lease database has been created; the rpm should create this file automatically; if not, create the file: # touch /var/lib/dhcp/dhcpd.leases The lease database is recreated from time to time so that it is not too large. First, all known leases are saved in a temporary lease database. The dhcpd.leases file is renamed dhcpd.leases~, and the temporary lease database is written to dhcpd.leases. The DHCP daemon could be killed or the system could crash after the lease database has been renamed to the backup file but before the new file has been written. If this happens, there is no dhcpd.leases file that is required to start the service. Do not create a new lease file if this occurs. If you do, all the old leases will be lost and cause many problems. The correct solution is to rename the dhcpd.leases~ backup file to dhcpd.leases and then start the daemon. 5. Run 'setup' and check dhcpd to have it load at system boot 6. Start/restart the server # service dhcpd start (restart) Changes to the file /etc/dhcpd.conf require the dhcp server to be restarted 7. Test to make sure it works.