Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Huawei router for DHCP service configuration (interface address pool and global address pool configuration)

Shulou Source: shulou.com Published: 2022-06-01 04:46:51 10月03日 Update

I. configuration of interface address pool

1. Configure the DHCP service as AR1

[Huawei] interface g0/0/0

[Huawei-GigabitEthernet0/0/0] ip add 192.168.1.1 255.255.255.0

[Huawei-GigabitEthernet0/0/0] undo shutdown

[Huawei-GigabitEthernet0/0/0] dhcp select interface

[Huawei-GigabitEthernet0/0/0] dhcp server dns-list 192.168.20.50

[Huawei-GigabitEthernet0/0/0] dhcp server excluded-ip-address 192.168.1.1

[Huawei-GigabitEthernet0/0/0] dhcp server lease day 1

[Huawei] display ip pool

Pool-name: GigabitEthernet0/0/0

Pool-No: 0

Position: Interface Status: Unlocked

Gateway-0: 192.168.1.1

Mask: 255.255.255.0

* × × instance:--

IP address Statistic

Total: 253

Used: 0 Idle: 253

Expired: 0 Conflict: 0 Disable: 0

II. Global address pool configuration

Principle: in the global mode, multiple global address pools are set, and the corresponding relationship between the defined address pool network segment and the port IP is the same network segment, that is, multiple different network segments correspond to their respective ports, and finally the clients of different network segments obtain the corresponding addresses automatically.

Configure the DHCP service as AR1

[Huawei] dhcp enable

[Huawei] ip pool jszx

[Huawei-ip-pool-jszx] network 192.168.1.0 mask 24

[Huawei-ip-pool-jszx] gateway-list 192.168.1.1

[Huawei-ip-pool-jszx] lease day 1

[Huawei] interface g0/0/0

[Huawei-GigabitEthernet0/0/0] dhcp select global

[Huawei] display ip pool

Pool-name: jszx

Pool-No: 0

Position: Local Status: Unlocked

Gateway-0: 192.168.1.1

Mask: 255.255.255.0

* × × instance:--

IP address Statistic

Total: 253

Used: 0 Idle: 253

Expired: 0 Conflict: 0 Disable

III. Additional upgrade test

According to the global configuration process of "two", it takes several network segments to define several address pools.

1. Add the JYD address pool on the basis of "two". The topology is as follows:

Configure AR1 to add JYD address pool

[Huawei] interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1] ip address 192.168.100.1 255.255.255.0

[Huawei] ip pool JYD

[Huawei-ip-pool-jszx] network 192.168.100.0 mask 24

[Huawei-ip-pool-jszx] gateway-list 192.168.100.1

[Huawei-ip-pool-jszx] lease day 1

[Huawei] interface g0/0/1

[Huawei-GigabitEthernet0/0/0] dhcp select global

[Huawei] display ip pool

PC5 gets the address

PC1 gets the address

Tags: Address configuration network segment global mode service different multiple port interface principle foundation customer client topology process upgrade trial attachment service configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Linux Shulou Tech Info Shulou Information