Configuring a DHCP Client on ACX Series
Minimum DHCP Client Configuration
The following sample output shows the minimum configuration you must use to configure an ACX Series router as a DHCP client. In this output, the interface is ge-0/0/0 and the logical unit is 0.
To configure a DHCP client in a routing instance, add the interface in a routing instance using the [edit routing-instances] hierarchy.
Configuring Optional DHCP Client Attributes
For an ACX Series router to operate as a DHCP client, you configure a logical interface on the router to obtain an IP address from the DHCP local server in the network. You can then set the client-identifier, lease time, retransmission attempts, retransmission interval, preferred DHCP local server address, vendor class ID, and update server.
To configure optional DHCP client attributes:
- Configure the DHCP client identifier as the routing instance
name.
DHCP client identifier as a user ID.
content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set client-identifier user-id {ascii ascii | hexadecimal hexadecimal}DHCP client identifier as the description of an interface.
content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set client-identifier use-interface-description {logical | device}DHCP client identifier as a prefix:
content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set client-identifier prefix [host-name logical-system-name routing-instance-name]
- Configure the DHCP client identifier prefix as the routing
instance name.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set client-identifier prefix [host-name logical-system-name routing-instance-name]
- Set the DHCP lease time.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set lease-time 86400
- Set the number of attempts allowed to retransmit a DHCP
packet.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set retransmission-attempts 6
- Set the interval (in seconds) allowed between retransmission
attempts. The range is 4 through 64. The default is 4 seconds.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set retransmission-interval 5
- Set the IPv4 address of the preferred DHCP local server.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set server 10.1.1.1
- Set the vendor class ID for the DHCP client.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set vendor-id ether
- Propagate DHCP options received from an external DHCP
server to a local DHCP server. By default, this option is not turned
on.content_copy zoom_out_map[edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set update-server
To configure the DHCP client in a routing instance, configure the interface in the [edit routing-instances] hierarchy.
Verifying and Managing DHCP Client Configuration
You can view or clear information about client address bindings and statistics for the DHCP client.
To display the address bindings in the client table on the DHCP client:
content_copy zoom_out_mapuser@host> show dhcp client bindingTo display DHCP client statistics:
content_copy zoom_out_mapuser@host> show dhcp client statisticsTo clear the binding state of a DHCP client from the client table on the DHCP client:
content_copy zoom_out_mapuser@host> clear dhcp client bindingTo clear all DHCP client statistics:
content_copy zoom_out_mapuser@host> clear dhcp client statisticsTo renew a DHCP client lease time:
content_copy zoom_out_mapuser@host> request dhcp client renew interface-name
To clear or view information about client bindings and statistics in a routing instance, run the following commands:
show dhcp client binding routing-instance routing-instance name
show dhcp client statistics routing-instance routing-instance name
clear dhcp client binding routing-instance routing-instance name
clear dhcp client statistics routing-instance routing-instance name