Install and configure DHCP on a blue dot Linux system

Source: Internet
Author: User


The Blue Dot Linux 1.0 includes a DHCP package that can be used to provide DHCP. When the user installs the Blue Dot Linux, it installs automatically. In most cases, Linux acts as a DHCP server and Windows 95/98 acts as a DHCP client. Linux can also be a DHCP client, linux ipv6 dhcp client  but users will install the DHCPCD RPM package. Linux as a DHCP server, only need to install DHCPD RPM package (take Bluepoint Linux as an example)



A Prerequisites for a DHCP server to work:linux gui dhcp server



In order for the DHCP server to serve the Windows machine, you may need to create a route to address 255.255.255.255, plus this routing command to/etc/rc.d/rc.local so that it runs automatically after each boot.



 #route add -host 255.255.255.255 dev eth0



If you report an error message:linux dhcp server configuration pdf



255.255.255.255: Unkown host



Try adding in the/etc/hosts file: linux enable dhcp command line



255.255.255.255 dhcp, then try:linux interfaces dhcp
  #route add -host dhcp dev eth0



Two DHCPD configuration file/etc/dhcpd.conf



The configuration file for the DHCPD daemon/etc/dhcpd.conf is the following is an example of a DHCP configuration file:



 default-lease-time 1200;
  max-lease-time 9200;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.0.255;
  option routers 192.168.0.254;
  option domain-name-servers 192.168.0.1,192.168.0.2;
  option domain-name “openunix.org”;
  subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.10 192.168.0.100;
  range 192.168.0.150 192.168.0.200;
  }



This allows the DHCP server to assign two segments of the address range to the customer 192.168.0.10-100 or 192.168.0.150-200. The maximum allowable lease time is 9,200 seconds if the client does not continue to request a DHCP address and then releases the IP address after 1200 seconds.



The server sends the following parameter to the DHCP client: using 255.255.255.0 as the subnet mask, using 192.168.0.255 as the broadcast address, and 192.168.0.222 as the default gateway, using the 192.168.0.1 and 192.168.0.2 as a DNS server. If you are assigning a WINS server to a Windows customer, you will need to include the following options in the dhcpd.conf file:



option netbios-name-servers 192.168.0.1;



Third, use DHCP to assign fixed addresses



Generally speaking, DHCP is assigned a dynamic IP address, if the user needs static IP 10, it can also specify a fixed IP address for a block of cards, whenever this network card will always obtain a fixed IP address from the DHCP server: Add the following statement to the/etc/dhcpd.conf:



 host jimmy {
  hardware ethernet 08:00:2b:4c:59:23;
  fixed-address 192.168.1.222:
  }



The contents of the above can be written in one line:



host jupiter {hardware ethernet 00:a0:c9:a6:96:33;
fixed-address 192.168.1.12;}



As in allocating dynamic addresses, users can also specify a different gateway address for a machine, such as the name of the server, such as:



host vienus{hardware ethernet 00:a0:c9:a6:96:33;
fixed-address 192.168.1.12:option routers 192.168.11.5;}



Iv. Create a file dhcpd.leases



In most cases, the installation of DHCP does not create a DHCPD.LEASESDHCP server before you must create an empty file dhcpd.leases



 #touch /var/run/dhcp/dhcpd.leases



To start the DHCP server, simply enter/ETC/RC.D/INIT.D/DHCP start. Or use the NTSYSV setting to start the DHCP service automatically when the system starts.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.