Linux Learning Note Configuration for DHCP server

Source: Internet
Author: User

first, before learning, we need to understand the DHCP 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" j_0003.gif "/>

DHCP server: Dynamic Host Configuration Protocol is a network protocol for a LAN. Refers to a range of IP addresses controlled by the server, which automatically obtains the IP address and subnet mask assigned by the server when the client logs on to the server.

features of the DHCP server : 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0011.gif "alt=" j_0011.gif "/>

two computers connected to the Internet to communicate with each other, must have their own IP address, due to the limited IP address resources, broadband access operators can not do to each of the broadband users will be able to assign a fixed IP address (so-called fixed IP is even when you are not on the Internet, Other people can not use this IP address, this resource has been exclusive to you, so the use of DHCP to the Internet users to temporary address assignment. That is, your computer connected to the Internet, the DHCP server from the address pool temporarily assigned an IP address to you, each time the Internet assigned IP address may be different, This is related to IP address resources at that time. When offline, the DHCP server may assign this address to other computers on the line. This can effectively save the IP address, not only guarantee the network communication, but also improve the use of IP address.


allocation Method 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0013.gif "alt=" J_0013.gif "/>

In how DHCP works, the DHCP server provides three ways to assign IP: auto-assign (Automatic allocation), manual assignment, and dynamic allocation.

1. Automatic assignment is the permanent use of this IP address when the DHCP client obtains an IP address from the DHCP server for the first time.

2. Manual assignment is an IP address specifically specified by the DHCP server administrator

3. Dynamic allocation is when the client obtains the IP address from the DHCP server for the first time, it is not permanently used, and after each use, the DHCP client needs to release the IP for use by other clients.

The third is the most common form of use.

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/88/FB/wKiom1gDdQvwRJ_CAABY35Ss_qY472.jpg-wh_500x0-wm_3 -wmp_4-s_2589151267.jpg "title=" 9e3df8dcd100baa1075b8a984510b912c8fc2e9a.jpg "alt=" WKiom1gDdQvwRJ_CAABY35Ss_ Qy472.jpg-wh_50 "/>


DHCP Server build 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0038.gif "alt=" j_0038.gif "/>

( the reset virtual machine is required if no IP is found after the reset virtual machine . ) you need to /etc/sysconfig/network-scripts/ifcfg- NIC configuration file name ipaddr NETMASK DNS1 GATEWAY)

Yum Install dhcp-y (Installation DHCP services)

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/88/F4/wKiom1gCLcDRFWX1AAGsV-M-1-k436.png-wh_500x0-wm_3 -wmp_4-s_2153598034.png "title=" 1.png "alt=" Wkiom1gclcdrfwx1aagsv-m-1-k436.png-wh_50 "/>

Cd/etc/dhcps

Ls

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/F2/wKioL1gCLc-DLvfpAABjCfr-Kw0512.png-wh_500x0-wm_3 -wmp_4-s_1047509768.png "title=" 2.png "alt=" Wkiol1gclc-dlvfpaabjcfr-kw0512.png-wh_50 "/>

Vim dhcpd.conf

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/F4/wKiom1gCLeDx2nBCAABehd9INBc214.png-wh_500x0-wm_3 -wmp_4-s_3152946810.png "title=" 3.png "alt=" Wkiom1gcledx2nbcaabehd9inbc214.png-wh_50 "/>

Less/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example

cp/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.conf//dhcp-4.2.5 (DHCP version number )

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/F4/wKiom1gCLfeBSnEBAAEPG4rRalU992.png-wh_500x0-wm_3 -wmp_4-s_2667720297.png "title=" 4.png "alt=" Wkiom1gclfebsnebaaepg4rralu992.png-wh_50 "/>

Configuration DHCP file Start DHCP Service

Vim/etc/dhcp/dhcpd.conf


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/F2/wKioL1gCLgrCUpDNAAA63sQ9ZIQ069.png-wh_500x0-wm_3 -wmp_4-s_3609201921.png "style=" Float:none; "title=" 5.png "alt=" Wkiol1gclgrcupdnaaa63sq9ziq069.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/F2/wKioL1gCLguSrzIuAAA31X4jCOw262.png-wh_500x0-wm_3 -wmp_4-s_4097248127.png "style=" Float:none; "title=" 6.png "alt=" Wkiol1gclgusrziuaaa31x4jcow262.png-wh_50 "/>

Systemctl STARTDHCPD Boot Up yourself

Systemctl Enable SHCPD

Test : Unplug the network cable in another virtual machine test 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0031.gif "alt=" j_0031.gif "/>

Empty File : >/var/log/messages

Restart Service : systemctl Restart DHCPD

Tracking View : Cat/var/log/messages

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/F4/wKiom1gCLhrCfMd8AAHyRUGwhfY969.png-wh_500x0-wm_3 -wmp_4-s_4207832587.png "title=" 7.png "alt=" Wkiom1gclhrcfmd8aahyrugwhfy969.png-wh_50 "/>

in the DHCP view on the server: cat/var/log/messages

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/F5/wKiom1gCLjyB0IYkAAEWvm-WzyU815.png-wh_500x0-wm_3 -wmp_4-s_3890551870.png "style=" Float:none; "title=" 8.png "alt=" Wkiom1gcljyb0iykaaewvm-wzyu815.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/88/F2/wKioL1gCLj2xbB6WAAGL7bfQNdA645.png-wh_500x0-wm_3 -wmp_4-s_1612934416.png "style=" Float:none; "title=" 9.png "alt=" Wkiol1gclj2xbb6waagl7bfqnda645.png-wh_50 "/>


Linux Learning Note Configuration for DHCP server

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.