Check IP addresses dynamically allocated to clients

5

On S series switches except S1700 switches, you can view IP addresses that have been dynamically assigned to users as follows:
- If an interface address pool is used, run the display ip pool interface interface-pool-name used command.
- If a global address pool is used, run the display ip pool name ip-pool-name used command.
You can obtain the IP address used by each user according to the mapping between IP addresses and MAC addresses in the command output.

Other related questions:
Can addresses that cannot be allocated dynamically be used by clients
Run the excluded-ip-address start-ip-address [ end-ip-address ] or dhcp server excluded-ip-address start-ip-address [ end-ip-address ] command to configure the IP addresses that cannot be automatically allocated in the DHCP address pool. The IP addresses are used as reserved addresses and can be used when clients use static addresses.

How are IP addresses that cannot be dynamically allocated configured on an AR
During network planning, some IP addresses in the address pool may be used by servers or other hosts, or some clients can be configured with specified IP addresses only. In this case, IP addresses cannot be dynamically allocated in the address pool to prevent IP address conflicts. Assume that IP addresses in the range of 10.10.10.11 to 10.10.10.20 cannot be dynamically allocated. The configuration on the AR is as follows: - Based on the interface address pool: [Huawei] dhcp enable [Huawei] interface gigabitethernet 1/0/1 //Enter the view of the AR interface connected to the DHCP client. [Huawei-GigabitEthernet1/0/1] undo portswitch [Huawei-GigabitEthernet1/0/1] ip address 10.10.10.10 24 [Huawei-GigabitEthernet1/0/1] dhcp select interface [Huawei-GigabitEthernet1/0/1] dhcp server excluded-ip-address 10.10.10.11 10.10.10.20 - Based on the global address pool: [Huawei] dhcp enable [Huawei] interface gigabitethernet 1/0/1 ///Enter the view of the AR interface connected to the DHCP client. [Huawei-GigabitEthernet1/0/1] undo portswitch [Huawei-GigabitEthernet1/0/1] ip address 10.10.10.10 24 [Huawei-GigabitEthernet1/0/1] dhcp select global [Huawei-GigabitEthernet1/0/1] quit [Huawei] ip pool global1 [Huawei-ip-pool-global1] network 10.10.10.0 mask 24 [Huawei-ip-pool-global1] excluded-ip-address 10.10.10.11 10.10.10.20

Can a static IP address be allocated to different clients
S series switches except S1700 switches do not assign IP addresses in use to clients. Before assigning an IP address to a client, a switch functioning as the DHCP server sends ping packets to the IP address to prevent IP address conflicts. You can run the dhcp server ping { packet number | timeout milliseconds } command in the system view to specify the maximum number of ping packets to be sent by a DHCP server and the maximum response time of a ping packet. If there is no response to the ping packet within the maximum response time, the DHCP server continues to send ping packets to this IP address until the number of ping packets reaches the maximum value. If there is still no response, this IP address is not in use and the DHCP server assigns the IP address to a client. This ensures that the IP address assigned to the client is unique.

Method used to configure DHCP relay on the AR
When the DHCP server and DHCP clients are on different network segments, the DHCP relay agent can be configured so that the DHCP server can assign IP addresses to the DHCP clients. Procedure: 1. Configure the router # sysname Router # dhcp enable //Enable the DHCP function. # ip pool ip-pool1 gateway-list 10.10.1.1 //Set the gateway IP address. network 10.10.1.0 mask 255.255.255.128 //Specify the range of IP addresses that can be dynamically allocated in the global address pool. excluded-ip-address 10.10.1.2 //Set the IP address 10.10.1.2 that is not assigned automatically in the address pool. excluded-ip-address 10.10.1.4 //Set the IP address 10.10.1.4 that is not assigned automatically in the address pool. dns-list 10.10.1.2 //Configure the IP address of the DNS server for the DHCP client. nbns-list 10.10.1.4 //Configure the IP address of the NetBIOS server for the DHCP client. lease day 10 hour 12 minute 0 //Set the IP address lease to 10 days and 12 hours. domain-name huawei.com //Set the domain name to huawei.com. static-bind ip-address 10.10.1.5 mac-address fc12-2567-ce34 //Assign a fixed IP address to the PC_AD. # ip pool ip-pool2 gateway-list 10.10.1.129 //Set the gateway IP address. network 10.10.1.128 mask 255.255.255.128 //Specify the range of IP addresses that can be dynamically allocated in the global address pool. dns-list 10.10.1.2 //Configure the IP address of the DNS server for the DHCP client. lease day 5 hour 0 minute 0 //Set the IP address lease to 5 days. domain-name huawei.com //Set the domain name to huawei.com. # interface GigabitEthernet0/0/0 ip address 10.10.1.1 255.255.255.128 dhcp select global //Configure the global address pool mode. # interface GigabitEthernet0/0/1 ip address 10.10.1.129 255.255.255.128 dhcp select global //Configure the global address pool mode. 2. Verify the configuration. Run the display ip pool command on the router to check the IP address pool configuration.

Failure to obtain IP addresses from DHCP server
For S series switches (except S1700 switches), a client may fail to obtain an IP address from the DHCP server due to the following: - Incorrect configuration - No available IP address in the address pool - STP enabled on the upper-layer access device of diskless workstations For the fault locating and troubleshooting procedure, see the section "A Client Fails to Obtain an IP Address from a DHCP Server" in Configuration Guide �?IP Service.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top