The dhcp relay release command configures a DHCP relay agent to send a release message to a DHCP server for releasing the IP address assigned to a DHCP client.
In the system view:
dhcp relay release client-ip-address mac-address [ vpn-instance vpn-instance-name ] [ server-ip-address ]
In the interface view:
dhcp relay release client-ip-address mac-address [ server-ip-address ]
Parameter |
Description |
Value |
---|---|---|
client-ip-address |
Specifies the IP address of a DHCP client. |
The value is in dotted decimal notation. |
mac-address |
Specifies the MAC address of a DHCP client. |
The value is in H-H-H format. H is a hexadecimal number of 1 to 4 digits. |
server-ip-address |
Specifies the IP address of a DHCP server. If this parameter is specified, a DHCP relay agent sends a release message to the specified DHCP server for releasing the IP address assigned to a DHCP client. |
The value is in dotted decimal notation. |
vpn-instance vpn-instance-name |
Specifies the name of the VPN instance to which the specified DHCP server releasing IP addresses belongs. |
The value must be an existing VPN instance name. |
Usage Scenario
This command applies to DHCP relay agents. In some situations, for example, a user is forced to go offline, the user's IP address is no longer used. However, the user cannot access the network, and will not send a DHCP release message to the DHCP server to release the IP address assigned by the DHCP server. Before the IP address lease expires, the DHCP server will not assign the user's IP address to another client, wasting IP addresses. In this case, you can run the dhcp relay release command to configure a DHCP relay agent to send a DHCP release message to the DHCP server. After receiving the message, the DHCP server sets the status of the IP address to idle. The DHCP server then can assign the released IP address to another client.
Precautions
The dhcp relay release command only releases the IP addresses dynamically assigned by DHCP servers.
When multiple DHCP relay agents are connected between the DHCP client and server, this command must be executed on the first DHCP relay agent.