4-2
To do… Use the command… Remarks
Configure the VLAN
interface to obtain IP
address through DHCP or
BOOTP
ip address { bootp-alloc |
dhcp-alloc }
Required
By default, no IP address is
configured for the VLAN
interface.
Currently, the device operating as a DHCP client can use an IP address for no more than 24 days; that
is, it can obtain a lease with 24 days at most even if the DHCP server assigns a lease with more than 24
days.
DHCP Client Configuration Example
Network requirements
As shown in Figure 4-1, using DHCP, VLAN-interface 1 of Switch A is connected to the LAN to obtain an
IP address from the DHCP server.
Figure 4-1 A DHCP network (Switch A serving as a DHCP client)
WINS serverDHCP Client
DNS server
Vlan-interface1
Switch A
DHCP Client
DHCP Server
Configuration procedure
The following describes only the configuration on Switch A serving as a DHCP client.
# Configure VLAN-interface 1 to dynamically obtain an IP address by using DHCP.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address dhcp-alloc