How the Linux system configures the DHCP service

Source: Internet
Author: User

Everyone knows that DHCP can be dynamic IP address assignment service pull! In a network, it may not be a lot of computers in the case, everyone so always manually assigned to each computer IP address, such as the majority of network settings. Perhaps there is a network of hundreds of computers, we also want to set up a platform for their IP address, so I hope that people will always adjust the dizziness, but also on the string jumping around running. How does the Linux system configure the DHCP service?

DHCPD background program always read the configuration file/etc/dhcpd.conf, the following gives an example of the DHCP configuration file on my host:

Ddns-update-style Interim;

Ignore client-updates;

Subnet 192.168.25.0 netmask 255.255.255.0 {

#---Default gateway

Option routers 192.168.25.15;

Option Subnet-mask 255.255.255.0;

# option Nis-domain "Uc88.domain";

Option Domain-name "Uc88.domain";

Option Domain-name-servers 202.96.128.68,192.168.25.15;

Option time-offset-18000; # Eastern Standard Time

# option Ntp-servers 192.168.1.1;

# option Netbios-name-servers 192.168.1.1;

#---Selects point-to-point node (default is hybrid). Don ' t change this unless

#--You understand Netbios very

# option Netbios-node-type 2;

Range DYNAMIC-BOOTP 192.168.25.100 192.168.25.254;

Default-lease-time 259200;

Max-lease-time 518400;

# We want the nameserver to appear in a fixed address

# host NS {

# Next-server marvin.redhat.com;

# Hardware Ethernet 12:34:56:78:AB:CD;

# fixed-address 207.175.42.254;

# }

}

The above means:

Using 255.255.255.0 as the subnet mask, using 192.168.25.255 as the broadcast address, using 192.168.25.15 as

Default gateways, with 202.96.128.68 and 192.168.25.15 as the range of assigned addresses for DNS servers: 192.168.25.100-192.168.25.254

Save exit

Four. In most cases, a DHCP installation does not create a dhcpd.leases file, and you must create an empty file before you start the DHCP server dhcpd.leases

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

To start the DHCP server, simply enter the/USR/SBIN/DHCPD or use #ntsysv to automatically start the DHCP service

This is used to boot dhcpd on the eth0 device, and you may want to start dhcpd on the eth1 device,

#/usr/sbin/dhcpd eth1

How to observe the customer's IP in the end there is no access to it?

Run Winipcfg at 98

Run the Ipconfig/all under 2000

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.