62
Assign PXE addresses To clients
1.2.3.4 and 2.2.2.2. Other clients.
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
14 and Figure 16. For example, the value
of Option 43 configured in the DHCP address pool 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.
Figure 22 Network diagram
Procedure
1. Specify IP addresses for the interfaces. (Details not shown.)
2. Configure the DHCP server:
# Create DHCP user class ss and configure a match rule to match DHCP requests in which the
hardware address is six bytes long and begins with aabb-aabb.
<SwitchA> system-view
[SwitchA] dhcp class ss
[SwitchA-dhcp-class-ss] if-match rule 1 hardware-address aabb-aabb-0000 mask
ffff-ffff-0000
[SwitchA-dhcp-class-ss] quit
# Create DHCP option group 1 and customize Option 43.
[SwitchA] dhcp option-group 1
[SwitchA-dhcp-option-group-1] option 43 hex 800B0000020203040503030303
# Enable the DHCP server on VLAN-interface 2.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] dhcp select server
[SwitchA-Vlan-interface2] quit
# Create DHCP address pool 0.
[SwitchA] dhcp server ip-pool 0
# Specify the subnet for dynamic address allocation.
[SwitchA-dhcp-pool-0] network 10.1.1.0 mask 255.255.255.0
# Customize Option 43.
[SwitchA-dhcp-pool-0] option 43 hex 800B0000020102030402020202
# Associate DHCP user class ss with option group 1.
[SwitchA-dhcp-pool-0] class ss option-group 1
[SwitchA-dhcp-pool-0] quit
# Enable DHCP.