DHCPThe Sever configuration process is as follows:
One Networking requirement:
1. Configure the DHCP Server on the vswitch so that the following users can dynamically obtain the IP address of the corresponding network segment;
2. the IP address of the DHCP Server is 192.168.0.1/24, and the PC is connected to the E1/0/2 port.
2. Networking diagram:
Step 3:
1. Create and enter) VLAN2
[Switch] vlan 2
2. Add port E1/0/1 to VLAN2
[Switch-vlan2] port Ethernet1/0/2
3. Enter VLAN Interface 2
[Switch-vlan2] int vlan 2
4. Configure IP addresses for VLAN2
[Switch-Vlan-interface2] ip address 192.168.0.1 255.255.255.0
5. Global Enabling DHCP
[Switch] dhcp enable
6. Create a DHCP address pool and enter the DHCP address pool view.
[Switch] dhcp server ip-pool h3c
7. Configure the dynamically assigned IP address range
[Switch-dhcp-pool-h3c] network 192.168.0.1 mask 255.255.255.0
8. Configure the gateway address
[Switch-dhcp-pool-h3c] gateway-list 192.168.0.1
9. Do not assign the gateway address of the PC to the user.
[Switch] dhcp server forbidden-ip 192.168.0.1
10. Specify vlan2 Virtual Interface to work in global address Pool Mode
[Switch] dhcp select global interface vlan-interface 2
Four key points of Configuration:
1. Ensure that the Virtual Interface address is in the address pool so that the PC connected to the VLAN can automatically obtain the IP address of the 192.168.0.0/24 network segment;
2. for DHCP Server devices, you can use the global address pool and interface address pool to allocate addresses. The two configuration methods are applicable if the DHCP Client and DHCP Server are in the same network segment, both configuration methods are applicable. If the DHCP Client and DHCP Server are not in the same network segment, you can only use the DHCP Server configuration based on the global address pool. Run the following command when the virtual interface works in global address pool mode:
[Switch] dhcp select global all
3. by default, Vlan interfaces use a global address pool for Address Allocation. Therefore, when a vlan interface is configured with a global address pool for Address Allocation, DHCP configuration cannot be viewed under the corresponding vlan interface;
4. The specific models of this series of switches include: Quidway S3500, Quidway S3900-EI, Quidway S5600, H3C S3600-EI, H3C S5600 series switch.