Centos/ubuntu Installing a DHCP server (not configured to listen on any interfaces!)

Source: Internet
Author: User

Recently, in a soft route, one of the features is the DHCP service. Record the process for other people to refer to.

(DHCPD version 4.1.1,centos version 6.6)

Reference article:

(1) Click to open the link

(2) Click to open the link


Body:


(1) Installing DHCP

Ubuntu uses Yum with Apt-get,centos, which is not much to say.


(2) Boot and start service

Set DHCPD to boot, CentOS under command Chkconfig DHCPD on;

Ubuntu under how to set up the launch please google.


Service DHCPD Start if you want to start services immediately;


(3) Adding a configuration file

After installing DHCPD. The default profile is not content, so service dhcpd start will error.

Two of these error prompts are as follows:

No Subnet declaration for ETH5 (192.168.106.221)

Not configured to listen on any interfaces!


The reason is that we haven't set up the configuration file yet.

can put/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample

Copy to/etc/dhcp/dhcpd.conf (different distributions, the configuration file location may not be the same).


(4) Modify the configuration file

If you do not modify the configuration file, the startup DHCPD will still error.

You can refer to someone else's dhcpd.conf file for modification.

Because I do the router, network card more, the parameters are more complex, it is not posted out.

This is relatively easy to understand by pasting the others below:

<span style= "FONT-SIZE:14PX;"     >ddns-update-style Interim;  #配置使用过渡性 dhcp-dns Interactive update mode.         Ignore client-updates;        #忽略客户端更新 Subnet 192.168.1.0 netmask 255.255.255.0 {option routers 192.168.1.1;      #路由器地址 option Subnet-mask 255.255.255.0;          #子网掩码选项 option Nis-domain "xfbaydhcp.com";     Option Domain-name "xfbaydhcp.com";       #域名 option Domain-name-servers 202.102.152.3; #DNS地址 option time-offset-18000;       # Eastern Standard Time range DYNAMIC-BOOTP 192.168.1.100 192.168.1.200;    #租用IP地址的范围 Default-lease-time 21600;        #缺省租约时间 Max-lease-time 43200; #最大租约时间 # We want the nameserver to appear at a fixed address host ns {Next-server MA                  rvin.redhat.com;                  Hardware Ethernet 12:34:56:78:AB:CD;          Fixed-address 207.175.42.254; }  }&Lt;/span> 



(5) LAN Nic binding dhcpd

Not configured to listen on any interfaces!

The reason for this error is that there is no statement on which network card to start the DHCP function.

Workaround:

Add a row in/ETC/SYSCONFIG/DHCPD

<span style= "FONT-SIZE:14PX;" >DHCPDARGS=eth4</span>
This is the path inside CentOS, which may be a little different in Ubuntu.

After you have modified these, service DHCPD start;


(6) Appendix: dhcpd.conf Parameter Description

/etc/dhcpd.conf usually consists of three parts: parameters, declarations, and option. Parameters (Parameters) in the 1.DHCP configuration file: Indicates how to perform a task, whether to perform a task, or which network configuration options to send to the customer Ddns-update-style configure Dhcp-dns Interactive update mode. DEFAULT-LEASE-TIME Specifies the length of the lease time, in seconds. MAX-LEASE-TIME Specifies the maximum length of lease time, in seconds. HARDWARE Specifies the NIC interface type and MAC address. Server-name notifies the DHCP client server name. Get-lease-hostnames flag checks the IP address used by the client. Fixed-address IP is assigned to a client with a fixed address. Authritative rejects the request for an incorrect IP address. declarations (declaration) in the 2.DHCP configuration file: Used to describe the network layout, provide the customer's IP address, etc. shared-network to inform whether some sub-networks share the same network. Subnet describes whether an IP address belongs to that subnet. Range Start IP Termination IP provides the scope for dynamically assigned IP. Host host name refer to special hosts. Group provides a declaration for a set of parameters. Allow Unknown-clients;deny unknown-client whether the IP is dynamically assigned to unknown users. Allow Bootp;deny if BOOTP responds to an activation query.       Allow Booting;deny booting           Whether to respond to consumer queries. FileName to start the file name. Apply to diskless workstations. Next-server set the server from the boot file, such as hostname, to the diskless workstation. 3. option in the DHCP configuration file: Used to configure the DHCP optional parameters, all with the option keyword as the starting subnet-mask to set the subnet mask for the client. Domain-name indicates the DNS name for the client. Domain-name-servers indicates the DNS server IP address for the client. HOST-NAME Specifies the host name for the client. Routers sets the default gateway for the client. Broadcast-address sets the broadcast address for the client. Ntp-server sets the network time server IP address for the client. Time-offset sets the offset time for the client and GMT, in seconds. Note: If the client is using a Windows operating system, do not select the "host-name" option, that is, do not specify a host name for it



Centos/ubuntu Installing a DHCP server (not configured to listen on any interfaces!)

Related Article

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.