Experiment purpose:
Master the configuration method of the DHCP server based on the global address pool
Master the configuration method of the DHCP server based on the interface address pool
Master the inspection and maintenance methods of DHCP configuration
Experimental steps:
In the first step, build the following topology diagram.
2 Basic configuration Basic configuration (interface IP address, device host name, etc.)
3 Configure a DHCP server based on the global address pool for clients in LAN1 and LAN2 Assign IP address
Step 1: Enable DHCP service
Step 2: Configure global address pool
Step 3: Configuration The interface works in global address pool mode
4 Configure the DHCP server based on the interface address pool to allocate IP addresses to clients in LAN3
5 Configure the host to obtain a fixed IP address (requires fixed allocation of 10.1.2.100 for PC3)
Step 1: Start the DHCP service
[AR1]dhcp enable
Step 2: Configure global address pool
[AR1]ip pool LAN1
[AR1-ip-pool-LAN1]network 10.1.1.0 mask 255.255.255.0
[AR1-ip-pool-LAN1]excluded-ip-address 10.1.1.101 10.1.1.254
[AR1-ip-pool-LAN1]gateway-list 10.1.1.1
[AR1-ip-pool-LAN1]dns-list 8.8.8.8
[AR1-ip-pool-LAN1]lease day 2
[AR1-ip-pool-LAN1]quit
[AR1]ip pool LAN2
[AR1-ip-pool-LAN2]network 10.1.2.0 mask 255.255.255.0
[AR1-ip-pool-LAN2]gateway-list 10.1.2.1
[AR1-ip-pool-LAN2]dns-list 8.8.8.8
[AR1-ip-pool-LAN2]lease day 0 hour 12
[AR1-ip-pool-LAN2]quit
Step 3: Configure the interface to work in global address pool mode
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]dhcp select global
[AR1-GigabitEthernet0/0/0]quit
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]dhcp select global
[AR1-GigabitEthernet0/0/1]quit
Test: Dynamically configure network parameters using DHCP on PC1-PC4
View configuration:
4 Configure the DHCP server based on the interface address pool to allocate IP addresses to clients within LAN3
[AR1]interface GigabitEthernet 0/0/2
[AR1-GigabitEthernet0/0/2]dhcp select interface
[AR1-GigabitEthernet0/0/2]dhcp server dns-list 8.8.8.8
[AR1-GigabitEthernet0/0/2]dhcp server lease day 2
[AR1-GigabitEthernet0/0/2]quit
Test: Use DHCP to dynamically configure network parameters on PC5-PC6
5 Configure the host to obtain a fixed IP address (requires fixed allocation of 10.1.2.100 for PC3)
[AR1]ip pool LAN2
[AR1-ip-pool-LAN2] static-bind ip-address 10.1.2.100 mac-address 5489-98FE-4FB5
Test: Use DHCP to dynamically configure network parameters on PC3
Important knowledge points
Overview of DHCP principles
DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) works in C/S mode. DHCP
Client dynamically requests configuration information from DHCP Server, and DHCP Server returns corresponding configuration information according to the policy.
When the DHCP client logs into the network for the first time, it mainly establishes contact with the DHCP server through 4 stages.