Ubuntu-16.04 Building DHCP Service

Source: Internet
Author: User

Ubuntu-16.04 Building DHCP service One, what is DHCP

DHCP (Dynamic Host Configuration Protocol) is commonly used in large local network environment, the main role is centralized management, assigning IP address, so that the host in the network environment to obtain the dynamic IP address, gateway address , DNS server address and other information, and can increase the usage of the address.

Second, install the DHCP service software

Install Isc-dhcp-server:

sudo apt-get install isc-dhcp-server

Third, configure the DHCP service

There are two main configuration files for DHCP, respectively, in/etc/default/isc-dhcp-server and/etc/dhcp/dhcpd.conf. The next thing to do is to configure these two files.

  1. View native Network information

    Assume that ens160 the network card is an external network card
    Suppose ens192 the NIC is an intranet network card

  2. Configuration isc-dhcp-server

    Modify the listening port INTERFACES to the intranet NIC nameens192

    Save exit

  3. Configure hdcpd.conf

    Modify Configuration
    subnet 10.0.0.0 netmask 255.255.255.0 {range 10.0.0.10 10.0.0.100;option domain-name-servers 202.206.192.33, 223.5.5.5;option domain-name "mylab.com";option subnet-mask 255.255.255.0;option routers 10.0.0.1;option broadcast-address 10.0.0.255;default-lease-time 600;max-lease-time 7200;}

    Line by row explanation

    #subnet后跟子网网段,netmask后跟子网掩码subnet 10.0.0.0 netmask 255.255.255.0 {#地址池range 10.0.0.10 10.0.0.100;#DNS服务器地址(多个地址用","隔开)option domain-name-servers 202.206.192.33, 223.5.5.5;#为所分配的域分配域名option domain-name "mylab.com";#为所分配的主机分发子网掩码option subnet-mask 255.255.255.0;#分发默认网关option routers 10.0.0.1;#分发广播地址option broadcast-address 10.0.0.255;#默认租期时间(秒)default-lease-time 600;#最大租期时间(秒)max-lease-time 7200;}
Iv. Start-up service
    1. Start the DHCP service

      sudo service isc-dhcp-server restart

    2. To see if the DHCP service starts properly
      sudo netstat -uap

      See if the Service list has DHCPD services

V. Verification Services

Restart the NIC on the WIN10 client to get the IP address

Ubuntu-16.04 Building DHCP Service

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.