Long time to obtain IP addresses from S series switch

9

Users on S series switches except S1700 switches obtain IP addresses slowly because the STP function is enabled on interfaces of the switches. (By default, STP is enabled on all interfaces of a switch.)
When an interface of a switch goes Up, STP convergence is performed for about 30 seconds. During STP convergence, the switch discards all received packets including DHCP request packets sent from users. As a result, the users obtain IP addresses slowly.
You can resolve the problem using either of the following methods:
- Run the stp edged-port enable command to configure the switch interface connected to users as an edge interface.
If the stp bpdu-protection command has been configured on the switch, the edge interface of the switch goes Down when the switch receives attack BPDUs. To enable the edge interface to automatically go Up, run the error-down auto-recovery cause bpdu-protection interval interval-value command.
- If no physical ring topology exists on the network, you can run the stp disable command on the switch globally or on the switch interface connected to users.
Additionally, when the switch functions as a DHCP server and after you remove and reinstall the network cable, the PC obtains an IP address after 1 minute. The problem may be caused by a software bug. When you remove and reinstall the network cable, the PC sends DHCP Request messages to the DHCP server. In earlier versions of a switch, software cannot properly process this event.

Other related questions:
Causes for a long period of obtaining an IP address on an S series switch
For S series switches excluding the S1700, the main cause is that the STP function is enabled. (By default, STP on all switch interfaces is enabled.) When the interface changes from Down to Up, STP convergence is performed (the process takes about 30s). During STP convergence, a switch interface directly discards received packets. That is, DHCP Request messages are all discarded during the STP convergence period. As a result, IP addresses are obtained slowly in this case. Use either of the following method: - Run the stp edged-port enable command on the switch interface connected to a user terminal to configure the interface as an edge interface. If the switch is configured with the stp bpdu-protection command, the edge interface of the switch becomes Down when there are malicious attacks of BPDUs. To enable the edge interface to automatically go Up, run the error-down auto-recovery cause bpdu-protection interval interval-value command to configure the interface to restore Up state automatically. - If there is no physical loop, run the stp disable command to disable STP on the switch or interfaces connected to users. In another scenario where the switch functions as a DHCP server, a user obtains the IP address for more than 1 minute when the network cable of the PC is removed and reinstalled. This problem occurs due to a software bug. When the network cable of the PC is removed and reinstalled, the PC sends DHCP Request messages to request for an IP address. In earlier versions of switches, some problems occur in the software.

Why different clients obtain the same IP address
When an S series switch functions as a DHCP server, a DHCP client accesses the network again in the following process: The DHCP client broadcasts a DHCP Request packet carrying the IP address allocated in the first time, that is, the Option 50 field in the packet. After receiving the DHCP Request packet, the DHCP server checks whether the lease record exists based on the MAC address in the packet. If so, the DHCP server replies with a DHCP ACK packet to notify the DHCP client that the requested IP address can be used. If not, the DHCP server waits for a new DHCP Discover message from the client.

Failure of obtaining IP addresses from other devices on interfaces of S series switch
For S series switches (except S1700 switches), DHCP Snooping divides interfaces into trusted or untrusted interfaces, and discards messages from untrusted interfaces. This prevents bogus DHCP servers from assigning bogus IP addresses to clients. By default, all interfaces are untrusted, so the interfaces cannot obtain IP addresses from other devices.

A user on an AR waits for a long time to obtain an IP address through DHCP
When the AR is used as the user access device (the WAN uplink interface connects to the Internet and the LAN downlink interface connects to the intranet), STP is enabled by default. After a user connects to an AR, the interface is in Discarding state in the first 30s. DHCP Request messages are discarded. After 30s, DHCP messages can be exchanged. You are advised to enable STP to prevent network flapping caused by STP convergence.

Delete static IP addresses from the global address pool on S series switch
On an S series switch, you run the undo static-bind [ ip-address ip-address | mac-address mac-address ] command to delete a static IP address from a global address pool. For example: - Delete a static IP address based on a specified IP address: [HUAWEI] ip pool global1 [HUAWEI-ip-pool-global1] undo static-bind ip-address 10.10.10.10 - Delete a static IP address based on a specified MAC address: [HUAWEI] ip pool global1 [HUAWEI-ip-pool-global1] undo static-bind mac-address dcd2-fc96-e4c0

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