LINUX 6 builds an experiment as a DHCP server--and uses a DHCP relay link
-
-----------------------------------DHCP-------------------------------------------
DHCP Relay Agent--to help the DHCP service broadcast across VLANs
-
How DHCP is assigned:
1. Automatic assignment: Permanent use after assigning to an IP address
2. Manual assignment: The IP address is specifically specified by the DHCP server administrator
3. Dynamic allocation: Release the IP after use for use by other clients
-
Advantages of DHCP:
1, reduce the workload of the Administrator
2. Avoid IP address conflicts
3. When the current network changes the IP address segment, you do not need to reconfigure each user's IP address
4, improve the utilization of IP address
5, convenient configuration of the client
-
DHCP-assigned address information mainly includes:
IP address, subnet mask with NIC
The corresponding network address, broadcast address
Default gateway Address
DNS server address
-
The process of the DHCP service:
1. Client requests IP to send a broadcast request address
2. The server responds to the server reply address, the source IP address is the server address, the client can use the address
3. The client chooses the IP client to request the time period for which the address can be used.
4. The server determines the lease
> All the steps above are broadcast, the client does not have an address in the process
The lease period must be renewed after the lease of the PS:IP address reaches 50%
The client sends a third-phase acknowledgment packet and re-updates the lease period
-----------------------------------------Experimental Environment-------------------------------------------
1-
LINUX 6--red Hat Enterprise 6.5 x86_64
2-
LINUX 6 rpm:dhcp-4.1.1-38.p1.el6.centos.x_86_64.rpm
3-
GNS3 Simulator
----------------------------------------the experimental process--------------------------------------------
Steps:
Switch SW2 configuration operation: * *
- Go to global mode, turn off the routing feature, create vlan10,vlan20,vlan120
- Dividing the F1/1 port into VLAN 10
- Divide the F1/2 port into VLAN20
- Divide the F1/3 port into VLAN120
- Configuring trunk on the f1/0 port
Three-layer Switch SW1 configuration operation:
Go to f1/0 port, configure trunk, and create vlan10,vlan20,vlan120
Enter VLAN10, add IP
Enter VLAN20, add IP
Enter VLAN120, add IP
- Go to VLAN 10 and VLAN 20, add to DHCP Relay Agent, point to DHCP server, help the DHCP service broadcast across VLANs
-
Environment settings for LINUX 6 systems
-
DHCP server configuration
1. [Email protected] ~]# vim/etc/dhcp/dhcpd.conf #修改DHCP的配置文件
Press I to enter the input mode, find the following information to modify
2. After the modification is complete, press ESC to enter command mode, press: Enter the last line mode, press Wq to save exit
3. Restart the DHCP service
---------------------------------------------test the DHCP service-----------------------------------
Test on the GNS3 simulator
LINUX 6 Experiment as a DHCP server--Using DHCP relay link