Self-Defined Dhcp Option Configuration Example - H3C MSR 2600 Configuration Manual

Layer 3
Hide thumbs Also See for MSR 2600:
Table of Contents

Advertisement

Configuration procedure
1.
Specify IP addresses for the interfaces on DHCP server. (Details not shown.)
2.
Configure DHCP:
# Enable DHCP and configure the DHCP server to handle Option 82.
<RouterB> system-view
[RouterB] dhcp enable
[RouterB] dhcp server relay information enable
# Enable the DHCP server on the interface Ethernet1/1.
[RouterB] interface Ethernet 1/1
[RouterB-Ethernet1/1] dhcp select server
[RouterB-Ethernet1/1] quit
# Create DHCP user class tt to match DHCP requests that contain Option 82.
[RouterB] dhcp class tt
[RouterB-dhcp-class-tt] if-match option 82
[RouterB-dhcp-class-tt] quit
# Create DHCP address pool aa, specify the address range of the address pool and the address
range of the user class tt, specify the gateway and the DNS server.
[RouterB] dhcp server ip-pool aa
[RouterB-dhcp-pool-aa] network 10.10.1.0 mask 255.255.255.0
[RouterB-dhcp-pool-aa] address-range 10.10.1.2 10.10.1.100
[RouterB-dhcp-pool-aa] class tt range 10.10.1.2 10.10.1.10
[RouterB-dhcp-pool-aa] gateway-list 10.10.1.255
[RouterB-dhcp-pool-aa] dns-list 10.10.1.20
Verifying the configuration
After the preceding configuration is complete, clients matching the DHCP user class can obtain IP
addresses in the specified range and network configuration parameters from DHCP server (Router B).
You can use the display dhcp server ip-in-use command to view the IP addresses assigned to the clients.

Self-defined DHCP option configuration example

Network requirements
As shown in
the DHCP server (Router A). The client 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 self-defined option.
The formats of Option 43 and PXE server address sub-option are shown in
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.
Figure
19, the DHCP client (Router B) obtains its IP address and PXE server addresses from
52
Figure 14
and
Figure
15. The

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents