LinuxDHCP server super Scope

Source: Internet
Author: User
Configure DHCP in RedHatLinux. dhcp Dynamic Host address protocol, assign IP addresses to automatically obtained clients throughout the process: 1. client broadcast DHCPdiscover data packet to find the server 2. the server responds to DHCPoffer3. the client selects the server DHCPrequest4. the server segment sends the IP address information DHCPack 2. topology environment: vmware

DHCP configuration in RedHat Linux

I. Dhcp Dynamic Host address protocol

Dynamic Host address protocol to assign IP addresses to automatically obtained clients

The entire process:

1. The client broadcasts the DHCP discover packet to find the server.

2. The server responds to DHCP offer.

3. The client selects the server DHCP request

4. DHCP ack

2. Topology

Environment: in vmware, redhat is the server. xp is the client. The network mode is hostonly.

The dhcp feature provided by vmware is not used.

Iii. configuration process

1. Create a directory and mount the CD

[Root @ dg ~] # Mkdir/mnt/cdrom

[Root @ dg ~] # Mount/dev/cdrom/mnt/cdrom

Mount: block device/dev/cdrom is write-protected, mounting read-only

2. Switch the Directory and install the Dhcp service.

[Root @ dg ~] # Cd/mnt/cdrom/Server/

[Root @ dg Server] # ll dhcp *

-R -- 108 root 886718 2009-07-16 dhcp-3.0.5-21.el5.i386.rpm

-R -- 125 root 134127 2009-07-16 dhcp-devel-3.0.5-21.el5.i386.rpm

-R -- 108 root 196554 2009-07-16 dhcpv6-1.0.10-17.el5.i386.rpm

-R -- 108 root 125916 2009-07-16 dhcpv6-client-1.0.10-17.el5.i386.rpm

[Root @ dg Server] # rpm-ivh dhcp-3.0.5-21.el5.i386.rpm

Warning: dhcp-3.0.5-21.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ######################################## ### [100%]

Package dhcp-3.0.5-21.el5.i386 is already installed

3. modify the configuration file

[Root @ dg Server] # vim/etc/dhcpd. conf

After entering, the original data does not have a few lines entered in command line mode.

: R/usr/share/doc/dhcp-3.0.5/dhcpd. conf complete center can be completed with the Tab key

The configuration is as follows:

#

Ddns-update-style interim;

Ignore client-updates;


Subnet 192.168.1.0 netmask 255.255.255.0 {subnet scope, subnet mask


# --- Default gateway

Option routers 192.168.1.254; Gateway

Option subnet-mask limit 255.0;


Option nis-domain "domain.org ";

Option domain-name "dg.com"; dns server domain name

Option domain-name-servers 192.168.1.1; dns server address

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 well

# Option netbios-node-type 2;

Range dynamic-bootp 192.168.1.30 192.168.1.60; region IP address pool

Default-lease-time 21600;

Max-lease-time 43200;


# 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 207.175.42.254;

}

}

# DHCP Server Configuration file.

# See/usr/share/doc/dhcp */dhcpd. conf. sample

4. Check for any errors and start the dhcp service.

[Root @ dg Server] # service dhcpd configtest

Syntax: OK

[Root @ dg Server] # service dhcpd start

Start dhcpd: [OK]

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.