Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deployment of DHCP Services and deployment of DHCP Relay tutorials (original Word documentation)

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This paper mainly introduces how to use DHCP technology to realize IP address automatic allocation.

The key points include: the working process and principle of DHCP

Configuration of the DHCP service

Configuration of the client

DHCP relay server

Benefits of using DHCP

1 reduce the workload of administrators

2 avoid the possibility of input error

3 avoid IP address conflicts

4 when the network changes the IP address range, there is no need to reconfigure the IP address of each user

5 improve the utilization of IP address

6 facilitate the configuration of the client

The working process and principle of DHCP

Principle:

DHCP service provides three ways to assign IP addresses.

Automatic allocation is used permanently when a client gets an IP from DHCP.

Manual assignment is the IP address specifically specified by the administrator of the DHCP server

Dynamic allocation means that the client does not permanently use an IP address from the DHCP, but after each use, the client releases the IP for use by other clients.

Working process:

1 client requests IP address (Discover) the client sends Discover discovery information to find the DHCP server in a broadcast that includes the client's MAC address and computer name so that the DHCP server can determine which client sent the request.

2 Server response (Offer) after receiving the client's request, the DHCP server will look in its own IP address pool to see if there is a legitimate IP address provided to the client. If so, the DHCP server will broadcast an Offer message containing the following information

MAC address of the DHCP client

Legal IP address provided by the DHCP server

Subnet mask

Default gateway

The term of the lease

IP address of the DHCP server

3 client chooses IP address (Request) the client accepts the Offer message, extracts the IP address, and sends Request broadcasts to all DHCP servers, indicating that it has received the content. The Request message includes the service identifier of the server on which the client provides the IP configuration. The DHCP server looks at the server identifier field to determine whether the provided IP is accepted, and if the Offer message is rejected, the DHCP cancels and retains the client IP address.

4 the server determines that the ACK server receives the Request and sends the ACK broadcast. The message contains the valid lease and other configurable information of the IP address. When the client receives the ACK message, it configures the IP address and completes the initialization of the TCP/IP.

5 when the client logs in again, there is no need to send a Discover message, but a Request message containing the last assigned IP address. After receiving the message, the server will try to let the client continue to use the original IP and answer an ACK confirmation message. If the last used IP address has been assigned to another client, the server answers an Nack denial message to the client. When the client receives the denial message, it sends a Discover message again to request a new IP address.

6 renew the lease, when the IP address lease leased by the server to the client reaches 50%, the client needs to renew the lease. The client sends the Request packet directly to the server with the total lease to request the renewal of the lease.

Configure the DHCP service

1 installation requirements:

DHCP can be installed on all windows server versions.

Server should have static IP address

In the second domain environment, you need to use the active Directory server to authorize the DHCP service.

Establish scope and activate

The following information needs to be planned before installation:

Determine the range of IP addresses that DHCP distributes to clients

Determine the correct subnet mask for the client

Make sure that the server should not be like the IP address distributed by the client, and reserve part of the fixed IP for use by the print server, and so on.

Determine the lease term of IP

2 install the DHCP service:

First, configure a static IP for the server before installing the service

(here I use a virtual machine to demonstrate and add two network cards, and two network cards are configured with different network segments. Later, I will demonstrate how to assign different network segments to different machines.)

Open Administrative tools in Control Panel and click Server Manager

In Server Manager, on the roles tab, click add role

In the role wizard window, select Server role and check DHCP Server, next

In the DHCP server window, click next directly

In the Select Network connection binding window, select the network connection used to provide the DHCP service to the client, and click next

(here I have 2 network cards and assigned different network segments)

In the specify IPv4 DNS settings window, do not add the parent domain and DNS server address, click next

(automatically fill in if DHCP is installed on DC)

In specify IPv4WINS Settings server settings, select "applications on this network do not require WINS", and next

(now most systems come with WINS services, but windows server 2000 needs to be installed.)

In the add or edit DHCP scope window, click "add". In the pop-up add scope dialog box, specify the IP address range assigned to the client, enter the scope name, start IP, end IP, subnet mask, default gateway, select the subnet type, and check "activate this scope". OK, the next step (here I add 2 scopes, if the default gateway is not filled in, you will not be able to access the Internet)

In the configure DHCPv6 stateless mode window, select disable DHCPv6 stateless mode for this server, and next

Confirm installation

Progress

As a result, the DHCP server is installed

3 authorized DHCP service:

(authorization is a security measure to ensure that only authorized DHCP servers can assign IP addresses on the network, demonstrating that the machine itself is DC, as specified in the above steps and authorized in the wizard.)

Wizard Authorization

Server authorization steps: start-Administrative tools-DHCP

Authorization right-click on the DHCP service to "authorize" authorization to complete

View scope

4 Verification:

Connect client 1 (win7) to network card 2, client 2 (win2008) to network card 1, configure IPv4 protocol to automatically obtain IP address and view IP address

Client one

Client 2

The IP address has been obtained automatically

5 Management scope

The scope has the following properties:

IP address range

Subnet mask

Function domain name

Lease term value

Reserve IP addresses for specific services

(the server option takes effect for the entire server, the scope option takes effect for the entire scope, and the reserved option specifies a private IP address)

The retention option has the highest priority, followed by the scope option, followed by the server option.

Retain:

New retention

Enter the reserved name, the IP address to be reserved, the MAC address, and OK. (the MAC address of client 1 I entered here)

Verify on client 1

6 maintain DHCP service

Backup and restore

Backup

Select backup location

Reduction

Choose to restore files

Restore succeeded

DHCP relay service

Start a new windows server 2008 R2

Install DHCP relay service (refer to DHCP server installation method)

Start-Administrative tools-routing and remote access

Turn on routing and remote access

Right-click locally-configure and enable routing and remote access

Open the installation wizard, next step

On the configuration page, click Custom configuration, and next

Check "LAN routing" in the custom configuration interface, and next

Click finish

Click to start the service

Expand Local-IPv4- right-click on General options-add routing Protocol

On the new routing protocol page, select the DHCP relay agent and make sure

Right-click on the DHCP relay agent and add a new interface

Add local connection 2 in turn (the host has 2 network cards)

Right-click on the DHCP relay agent-Properties

Add the DHCP server address, make sure

Detection

View address lease information on the DHCP server

Check the IP address allocation between client 1 and client 2

Attachment: http://down.51cto.com/data/2366757

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report