Dhcp client configuration example – H3C Technologies H3C WX3000 Series Unified Switches User Manual

Page 328

Advertising
background image

31-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 35-1

, using DHCP, VLAN-interface 1 of Switch A is connected to the LAN to obtain

an IP address from the DHCP server.

Figure 35-1

A DHCP network (Switch A serving as a DHCP client)

WINS server

DHCP 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

Displaying and Maintaining DHCP/BOOTP Client Configuration

To do…

Use the command…

Remarks

Display related information on a
DHCP client

display dhcp client

[ verbose ]

Available in any view

Advertising