Set up DHCP relay service

A lab environment

GNS3, VMware (built a Linux system, two sets of Windows10 system)

Two dhcp Features Overview

1dhcp Profile

DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) is generally used in large local area network environment, the main role is to centralize the management, assign an IP address, the host to dynamic network environments to obtain an IP address, Gateway address, DNS server addresses and other information, and be able to enhance the utilization of addresses.
DHCP adopts a client / server model, a host address dynamically assigned tasks driven by a network host. When the DHCP server receives the application information from the network host address, the address will be sent to the relevant configuration information to the network host, to achieve a dynamic allocation of network host address information.

2 dhcp function

  1. Ensure that any IP address can only be used by a DHCP client at the same time.
  2. DHCP can be permanently assigned a fixed IP address to the user.
  3. DHCP can be obtained with other methods coexist host IP address (e.g., manually configure the IP address of the host).
  4. DHCP server should provide service to existing BOOTP clients.

3 dhcp distribution

1 automatic allocation (Automatic Allocation), DHCP server assign a permanent IP address for the host, once the DHCP client for the first time successfully leased from the DHCP server to the IP address, you can use that address permanently.

2 dynamic allocation (Dynamic Allocation), DHCP server specifies the IP address to a host having a time limit, the time expires, or when the host discard the clear address, which can be used by other hosts.

3 manual distribution (Manual Allocation), IP address of the client is specified by the network administrator, DHCP server assigned IP address will only tell the client host.
Three types of addresses distribution, only the dynamic allocation can be reused address of the client no longer needed.

4 dhcp advantage

1 reduces the time to configure and deploy equipment.

2 reduces the possibility of configuration errors.

3 IP address can be centrally managed distribution equipment

Three dhcp relay service set up

Build the topology shown below in the GNS3, host3 for a Linux system, as dhcp server. Because to create a vlan, switches, and three switches need to set the virtual memory

Set up DHCP relay service

Dhcp service is installed on a Linux system

Set up DHCP relay service

After installation is complete, the card host3 VMnet1 changed, two sets of additional cards to VMnet2 windowns10 and the VMnet8, are off the network, only the master mode. VMnet8 which changed only need to reconfigure the host mode, the card set up, configure host3 card address.

Set up DHCP relay service

Set up DHCP relay service

Host3 After configuration is complete, restart card services, check whether success

Set up DHCP relay service

In GNS3 wherein R1, R2 configuration vlan

(1) R 1

Creating vlan

Set up DHCP relay service

The link f1 / 0 interface resides made trunk
Set up DHCP relay service

Vlan10,20,30 virtual interface to configure the gateway

Set up DHCP relay service

Check whether the configuration take effect

Set up DHCP relay service

The gateway relaying the dhcp

Set up DHCP relay service

(2) R 2

Close routing function to create vlan

Set up DHCP relay service

To the interface is divided vlan

Set up DHCP relay service

Check whether the configuration is successful
Set up DHCP relay service

The dhcp service on Linux systems

Set up DHCP relay service

Set up DHCP relay service

Set up DHCP relay service

Set up DHCP relay service

/Etc/dhcp/dhcpd.conf enter the dhcp

Set up DHCP relay service

Configuration is complete, save, restart the service, see

Set up DHCP relay service

Verify the configuration.

Set up DHCP relay service
Set up DHCP relay service

Set up DHCP relay service

Set up DHCP relay service

The test results, two sets windowns10 machine automatically obtain an IP address, and not on the same network segment and communicate host3

Assign a fixed ip address

Set up DHCP relay service

Set up DHCP relay service

Restart the service, see the results

Set up DHCP relay service

Guess you like

Origin blog.51cto.com/14449536/2434825