LinuxRHEL4: DHCP setup

Source: Internet
Author: User
Step 1: Turn the server and client into the same Network Segment II: mount the disc: mount-tiso9660/dev/cdrom/media/cdrom set the Server IP address to 192.168.1.1 III: Install the DHCP service: cd/media/cdrom/RedHat/RPMSrpm-ivhdhcp-3.0 -....... (Press the table key) cp/usr/share/doc/dhcp-3.0.1/dhcpd. conf. sam

Step 1: Change the server and client to the same network segment
Ii. Attach a CD: mount-t iso9660/dev/cdrom/media/cdrom
Set the Server IP address to 192.168.1.1
Iii. Install the DHCP service:
Cd/media/cdrom/RedHat/RPMS
Rpm-ivh dhcp-3.0-... (press table key)
Cp/usr/share/doc/dhcp-3.0.1/dhcpd. conf. sample/etc/dhcpd. conf
4. Configure the DHCP service
Vi/etc/dhcpd. conf
The modification content is as follows:
Ddns-update-style interim;
Ignore client-updates;

Subnet 192.168.1.0 netmask 255.255.255.0 {
Option routers 192.168.1.1;
Option subnet-mask limit 255.0;
Option domain-name "test.com ";
Option domain-name-servers 192.168.1.1, 172.16.1.1;
Option time-offset-18000;
Range dynamic-bootp 192.168.1.10 192.168.1.254;
Default-lease-time 21600;
Max-lease-time 43200;
Host ns {
Hardware ethernet 12: 34: 56: 78: AB: CD;
Fixed-address 192.168.1.2;
}
}
The IP addresses of the above 192.168.1.0 CIDR block must be changed to their own environment, and the host ns should be set separately.

5. Start the service
Service dhcpd start
You can also view the dhcp service lease file: more/var/lib/dhcp/dhcpd. leases
View the log file tail/var/log/messages
6. Use the client for verification and set it to automatically obtain the ip address.
The client can be XP, ipconfig, or release.
Ipconfig/renew
It can also be linux: dhclient

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.