Set up and configure the dhcp server under CentOS6.5

Source: Internet
Author: User
1. install and configure dhcp [root @ localhost ~] # Yum-yinstalldhcp [root @ localhost ~] # Cd/usr/share/doc/dhcp-4.1.1/[root@localhostdhcp-4.1.1] # cp-radhcpd.conf.sampl/etc/dhcp/dhcpd. conf [roo

1. install and configure dhcp

[Root @ localhost ~] # Yum-y install dhcp

[Root @ localhost ~] # Cd/usr/share/doc/dhcp-4.1.1/

[Root @ localhost dhcp-4.1.1] # cp-ra dhcpd. conf. sampl/etc/dhcp/dhcpd. conf

[Root @ localhost ~] # Vim/etc/dhcp/dhcpd. conf

Option domain-name "wxw.com"; DNS server domain name

Option domain-name-servers 192.168.1.24; IP address of the DNS server

 

Default-lease-time 360000; default lease time

Max-lease-time 720000; max lease time

Ddns-update-style none;

Log-facility local7;

 

# Address pool configuration

Subnet 192.168.1.0 netmask 255.255.255.0 {allocated network segment 192.168.1.0/24

Range 192.168.1.100 192.168.1.230; allocated IP address range;

Option routers 192.168.1.1; gateway ip address;

Option broadcast-address 192.168.1.255; broadcast address;

}

 

# Assign an ip address to a host

Host boss {boss is the host name;

Hardware ethernet 00: 0C: 29: 6C: A6: F8; mac address of the host Nic;

Fixed-address 192.168.1.10; ip address assigned to it;

}

 

2. start the dhcpd server

[Root @ localhost ~] #/Etc/init. d/dhcpd restart

Disable dhcpd: [OK]

Starting dhcpd: [OK]

3. view the port listening status

[Root @ localhost ~] # Netstat-ltunp | grep dhcpd

Udp 0 0 0.0.0.0: 67 0.0.0.0: * 5346/dhcpd

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.