Get the App
SLTechnology News&Howtos  ›  Servers  › 

DHCP server configuration

Shulou Source: shulou.com Published: 2022-06-02 15:27:56 11月15日 Update

DHCP: Dynamic Host Configuration Protocol

Role: Automatically assigns TCP/IP information to each computer in the local area network, including IP addresses, subnet masks, gateways, and DNS servers.

To do this experiment, first set the auto-fetch IP on the local connection of the physical machine, and then configure the connection on Host1 on the simulator to be its own local connection.

1: Start DHCP service

[H3C]dhcp enable

2: First configure the router IP address

[H3C]interface g0/0

[H3C-GigabitEthernet0/0]ip address 192.168.2.1 24

3: Configure address ranges in system view

[H3C]dhcp server ip-pool 0

4: Configure address ranges under DHCP pool view

[H3C-dhcp-pool-0]network 192.168.2.0 mask 255.255.255.0

5: Configure gateway addresses assigned to DHCP clients under DHCP pool view

[H3C-dhcp-pool-0]gateway-list 192.168.2.1

6: Configure which IP addresses in the DHCP address pool do not participate in automatic allocation, or choose not to prohibit this IP, but it will be very troublesome, because DHCP may assign this IP to Host1, which will cause IP conflicts.

[H3C-dhcp-pool-0]forbidden-ip 192.168.2.1

7: In system mode, configure which IP addresses in the DHCP address pool do not participate in automatic allocation

[H3C]dhcp server forbidden-ip 192.168.2.1

8: Under DHCP pool view, lease duration for IP addresses configured as DHCP clients

[H3C-dhcp-pool-0]expired day 5

Then you can use the CMD command on the physical machine to check the configuration, you can ping the gateway or use the ipconfig command to see if Ip is the same as the configuration.

Tags: Address configuration assignment view gateway service command client physical system scope server host role information dynamic client local area local area network situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi MySQL Linux Shulou Tech Info