
After either of the preceding operations is performed, terminal PCs can rapidly
obtain IP addresses after they start.
After dynamic IP address allocation is configured, it takes a PC a long
time to obtain an IP address after it starts. The reason is that an STP-
enabled switch recalculates the spanning tree topology every time a PC
connects to the switch. To solve this problem, disable STP or configure
the switch interface that connects to user devices as an edge port.
ACC1 is used in the example below.
# Disable STP.
[ACC1]
interface GigabitEthernet 0/0/1
[ACC1- GigabitEthernet0/0/1]
stp disable
//Alternatively, run the
undo
stp enable
command.
[ACC1- GigabitEthernet0/0/1]
quit
# Configure the switch interface that connects to user devices as an edge port.
[ACC1]
interface GigabitEthernet 0/0/1
[ACC1- GigabitEthernet0/0/1]
stp edged-port enable
[ACC1- GigabitEthernet0/0/1]
quit
After completing the DHCP server configuration, configure network
adapters on terminal PCs to automatically obtain IP addresses. The
terminal PCs then can obtain IP addresses from the DHCP server and
access the Internet.
38