Configuration procedure, Verifying the configuration, Dhcp option customization configuration example – H3C Technologies H3C S12500-X Series Switches User Manual

Page 59: Network requirements

Advertising
background image

48

Configuration procedure

1.

Specify IP addresses for interfaces on DHCP server and DHCP relay agent. (Details not shown.)

2.

Configure DHCP services:
# Enable DHCP and configure the DHCP server to handle Option 82.

<SwitchB> system-view

[SwitchB] dhcp enable

[SwitchB] dhcp server relay information enable

# Enable DHCP server on VLAN-interface10.

[SwitchB] interface vlan-interface 10

[SwitchB-Vlan-interface10] dhcp select server

[SwitchB-Vlan-interface10] quit

# Create DHCP user class tt to match client requests with Option 82.

[SwitchB] dhcp class tt

[SwitchB-dhcp-class-tt] if-match option 82

[SwitchB-dhcp-class-tt] quit

# Create DHCP address pool aa, specify the address range for the address pool and the address
range for user class tt. Specify gateway and DNS server address.

[SwitchB] dhcp server ip-pool aa

[SwitchB-dhcp-pool-aa] network 10.10.1.0 mask 255.255.255.0

[SwitchB-dhcp-pool-aa] address-range 10.10.1.2 10.10.1.100

[SwitchB-dhcp-pool-aa] class tt range 10.10.1.2 10.10.1.10

[SwitchB-dhcp-pool-aa] gateway-list 10.10.1.255

[SwitchB-dhcp-pool-aa] dns-list 10.10.1.20

Verifying the configuration

After the preceding configuration is complete, clients in a specific user class in subnet 10.10.1.0/24 can
obtain IP addresses and other configuration parameters from the DHCP server (Switch B). Use the display

dhcp server ip-in-use command to display the IP address assigned by the DHCP server.

DHCP option customization configuration example

Network requirements

As shown in

Figure 19

, the DHCP client (Switch B) obtains an IP address and PXE server addresses from

the DHCP server (Switch A). The IP address belongs to subnet 10.1.1.0/24. The PXE server addresses are

1.2.3.4 and 2.2.2.2.
The DHCP server assigns PXE server addresses to DHCP clients through Option 43, a customized option.
The format of Option 43 and that of the PXE server address sub-option are shown in

Figure 13

and

Figure

15

. The value of Option 43 configured on the DHCP server in this example is 80 0B 00 00 02 01 02 03

04 02 02 02 02. The number 80 is the value of the sub-option type. The number 0B is the value of the

sub-option length. The numbers 00 00 are the value of the PXE server type. The number 02 indicates the
number of servers. The numbers 01 02 03 04 02 02 02 02 indicate that the PXE server addresses are

1.2.3.4 and 2.2.2.2.

Advertising
This manual is related to the following products: