Install DHCP service and configuration at rpm in Linux

Source: Internet
Author: User
Article Title: Install the DHCP service and configuration at rpm in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Configuration of DHCP server in Linux

[Root @ loaclhost/] mount/dev/hdc // mount the disc to/dev/

[Root @ loaclhost/] cd hdc/Server // enter the Server Directory of the Disk

[Root @ loaclhost Server] rpm? Ivh dhcp-3.0.5-7.el5.i386.rpm // rpm server side for DHCP Installation

[Root @ loaclhost Server] cp/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf // set/etc/dhcpd. replace conf with/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample

// Tips: by default, the DHCP server does not have a configuration file. You need to copy the sample from the/usr directory and then modify it. If you are a skilled engineer, you can create it directly.

[Root @ loaclhost Server] cd/etc

[Root @ loaclhost etc] vi dhcpd. conf

Ddns-update-style interim;

Ignore client-updates; // Dynamic DNS resolution

Subnet 192.168.0.0 netmask 255.255.255.0 {

# --- Default gateway

Option routers 192.168.0.1; // Gateway

Option subnet-mask limit 255.0; // subnet mask

Option nis-domain "domain.org"; // The NIS domain name is domain.org

Option domai-name "domain.org"; // The domain name is domain.org

Option domain-name-servers "192.168.1.1"; // DNS

Option time-offset-18000; # eastern Standard Time //

# Option ntp-servers 192.168.1.1;

# Option netbios-name-servers 192.168.1.1;

# --- Selscts point-to-point node (default is hybrid). don't change thisunless

# -- You understand Netbios very well

# Option netbios-node-type 2;

Range dynamic-bootp 192.168.0.128 192.168.0.254; // address pool allocation

Default-lease-time 21600; // Default lease time: 21600 s

Max-lease-time 43200; // The maximum lease time is 43200 s.

# We want the nameserver to appear at a fixed address

Host ns {

Next-server marvin.redhat.com

Hardware ethernet 12: 34: 56: 78: AB: CD;

Fixed-address 192.168.0.11;

}

}

Note: In the configuration file, the orange part is the global configuration, the blue part is the opportunity MAC, and the host name is assigned a static IP.

[Root @ localhost etc] ifconfig eth0 192.168.0.1

[Root @ localhost etc] service dhcpd restart // restart the dhcpd service

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.