Linux and cloud Computing-Phase II: DHCP server Setup

Source: Internet
Author: User
Tags domain name server

Linux and Cloud computing--the second phase of Linux Server Setup Chapter II: DHCP Server erection

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/84/7D/wKioL1eR5AqwSWVlAArkCY9mxWs501.jpg-wh_500x0-wm_3 -wmp_4-s_2352564707.jpg "title=" map-high-end data center. jpg "alt=" wkiol1er5aqwswvlaarkcy9mxws501.jpg-wh_50 "/>


1. Configure the DHCP server

Configuration DHCP (Dynamic Host Configuration Protocol) Server . DHCP uses UDP ports.

[1] Install and configure the DHCP server .

[[email protected] ~]# yum-y Install DHCP

[Email protected] ~]# vim/etc/dhcp/dhcpd.conf

# Create a new file

# Specify domain name

Option Domain-name "example.com";

# Specify the host name or IP address of the domain name server

Option Domain-name-servers 8.8.8.8;

# the default lease period

Default-lease-time 600;

# Maximum lease period

Max-lease-time 7200;

# DHCP server is advertised as an available server

authoritative;

# Specify the network address and subnet mask;

Subnet 192.168.96.0 netmask 255.255.255.0 {

    # specify an assigned address range

range DYNAMIC-BOOTP 192.168.96.150 192.168.96.180;

    # Specify a broadcast address

option broadcast-address 192.168.96.255;

    # Specify a default gateway

Option routers 192.168.96.2;

}

[Email protected] ~]# systemctl start DHCPD

[Email protected] ~]# Systemctl enable DHCPD

2. Configuring the DHCP client
Configuration DHCP Client . DHCP client completes communication using UDP port 68 .

[1] on CentOS, use the following method to complete the configuration . ( Change the configuration in enoxxxx to your own NIC name)

[Email protected] ~]# nmcli C Modify eno16777736 Ipv4.method Auto

[[email protected] ~]# nmcli c down eno16777736;nmcli c up eno16777736

Connection ' eno16777736 ' successfully deactivated (d-bus active path:/org/freedesktop/networkmanager/ ACTIVECONNECTION/1)

Connection successfully activated (D-bus active path:/ORG/FREEDESKTOP/NETWORKMANAGER/ACTIVECONNECTION/2)

[[Email protected] ~]# IP A

1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN

Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00

inet 127.0.0.1/8 Scope host Lo

Valid_lft Forever Preferred_lft Forever

INET6:: 1/128 Scope Host

Valid_lft Forever Preferred_lft Forever

2:eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000

Link/ether 00:0c:29:60:33:58 BRD FF:FF:FF:FF:FF:FF

inet 192.168.96.150/24 BRD 192.168.96.255 scope Global Dynamic eno16777736

Valid_lft 541sec preferred_lft 541sec

Inet6 FE80::20C:29FF:FE60:3358/64 Scope link

Valid_lft Forever Preferred_lft Forever


Look again. How to configure DHCP client on Windows

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/84/7D/wKioL1eR4ujyX4WYAABuFv32dB8483.png-wh_500x0-wm_3 -wmp_4-s_2648574811.png "title=" image 3.png "alt=" Wkiol1er4ujyx4wyaabufv32db8483.png-wh_50 "/>


Select Tcp/ipv4

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/84/7D/wKioL1eR4yajNDSHAABqu-IotgE214.png-wh_500x0-wm_3 -wmp_4-s_3393881863.png "title=" image 4.png "alt=" Wkiol1er4yajndshaabqu-iotge214.png-wh_50 "/>

This article is from the "11830455" blog, please be sure to keep this source http://11840455.blog.51cto.com/11830455/1828874

Linux and cloud Computing-Phase II: DHCP server Setup

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.