Configuring a Device as a BOOTP Client
Enabling the BOOTP Client Function
Context
Before a device can function as a BOOTP client, you must enable the BOOTP client function.
After an interface is enabled with the BOOTP client function, the interface can obtain network parameters including the IP address from the DHCP server. If the allocated IP address and IP addresses of other interfaces are on the same network segment, the interface does not use the allocated IP address and does not re-apply for an IP address. To allow the interface to re-apply for an IP address, run the shutdown and then the undo shutdown commands on the interface. Alternatively, run the undo ip address bootp-alloc and then the ip address bootp-alloc commands on the interface.
(Optional) Configuring Attributes
Procedure
- Enter the system view.
system-view
- Enter the interface view or sub-interface view.
interface interface-type interface-number [.subinterface-number ]
- Configure a hostname for the BOOTP client.
dhcp client hostname hostname
By default, no hostname is configured for a BOOTP client.
Client hostname is entered in the Option 12 field. A hostname allows access to a BOOTP client through a domain name. A domain name consists of a hostname and domain name suffix.
(Optional) Configuring Gateway Detection
Context
To enable a BOOTP client to detect the status of the gateway, enable the gateway detection function. A BOOTP client enabled with the gateway detection function sends an ARP Request packet to detect the gateway status after obtaining an IP address. If the BOOTP client receives no ARP Reply packet within the detection period, it considers the gateway address incorrect or the gateway device faulty, and then re-applies for an IP address.
Procedure
- Enter the system view.
system-view
- Enter the interface view or sub-interface view.
interface interface-type interface-number [.subinterface-number ]
- Configure the gateway detection function on the BOOTP client.
dhcp client gateway-detect period period retransmit retransmit timeout time
By default, the gateway detection function is not configured on a BOOTP client.
(Optional) Configuring a BOOTP Client to Dynamically Obtain Routing Information
Context
To allow a BOOTP client to communicate with other network devices, you need to configure a route in which the next hop address is the gateway address of the client. If the gateway address of the client is dynamically obtained from the DHCP server and the route is statically configured on the client, the static route must be manually modified when the gateway address changes. After the BOOTP client is configured to dynamically obtain routing entries through DHCP, the next hop address in the static route is automatically updated when the gateway address changes, lowering maintenance costs.
A DHCP server can allocate routing entries to BOOTP clients. On a device functioning as the BOOTP client, you can set the priorities of routing entries allocated by the DHCP server so that the BOOTP client can dynamically update its routing table.
Procedure
- Enter the system view.
system-view
- Configure the BOOTP client to obtain routing entries through DHCP.
ip route ip-address { mask | mask-length } interface-type interface-number dhcp [ preference-value ]
By default, a BOOTP client does not obtain routing entries through DHCP.
- Enter the interface view or sub-interface view.
interface interface-type interface-number [.subinterface-number ]
- Set the priority of routing entries allocated by the DHCP server to BOOTP clients.
dhcp client default-route preference preference-value
The default priority of routing entries allocated by the DHCP server to BOOTP clients is 60.