DHCP client command descriptions

The commands and parameters described in this section apply specifically to a DHCP client operating in IPv4 mode on the 7705 SAR-Hm series of routers. All other applicable commands, as listed in DHCP client configuration, show, tools, debug, and clear command hierarchies, are described in the 7450 ESS, 7750 SR, 7950 XRS, and VSR Classic CLI Command Reference Guide.

autoconfigure

Syntax

autoconfigure

Context

config>router>interface

Description

This command enables the context to autoconfigure a DHCP client.

dhcp-client

Syntax

dhcp-client

Context

config>router>interface>autoconfigure

Description

This command enables the context to configure DHCP client parameters.

class-id

Syntax

class-id [hex hex-string][string ascii-string]

no class-id

Context

config>router>interface>autoconfigure>dhcp-client

Description

This command configures the vendor class identifier (option 60) for the DHCP client.

The no form of the command deletes the vendor class identifier configuration.

Default

n/a

Parameters

hex-string

specifies the vendor class identifier for the DHCP client as a hexadecimal string

Values

0x0 to 0xFFFFFFFF (maximum of 254 hex nibbles)

ascii-string

specifies the vendor class identifier for the DHCP client as an ASCII string

Values

127 characters maximum

client-id

Syntax

client-id [hex hex-string][interface][string ascii-string][use-mac]

no client-id

Context

config>router>interface>autoconfigure>dhcp-client

Description

This command configures the identifier for the DHCP client (option 61).

The no form of the command deletes the client identifier configuration.

Default

use-mac

Parameters

hex-string

specifies the client identifier as a hexadecimal string

Values

0x0 to 0xFFFFFFFF (maximum of 254 hex nibbles)

interface

specifies the IPv4 interface name as the client identifier

ascii-string

specifies the client identifier as an ASCII string

Values

127 characters maximum

use-mac

specifies the IPv4 MAC address of the associated port as the client identifier

lease-time

Syntax

lease-time [days days] [hrs hours] [min minutes] [sec seconds] [infinite]

Context

config>router>interface>autoconfigure>dhcp-client

Description

This command configures the lease time granted by the DHCP server to the DHCP client.

Default

1 day

Parameters

days

specifies the lease time in days

Values

0 to 3650

hours

specifies the lease time in hours

Values

0 to 23

minutes

specifies the lease time in minutes

Values

0 to 59

seconds

specifies the lease time in seconds

Values

0 to 59

infinite

specifies that the lease never expires

request-options

Syntax

request-options

Context

config>router>interface>autoconfigure>dhcp-client

Description

This command configures the DHCP options for the request messages sent to the DHCP server.

Default

n/a

dns-server

Syntax

[no] dns-server

Context

config>router>interface>autoconfigure>dhcp-client>request-options

Description

This command enables the DNS server request option in the DHCP OFFER message from the DHCP server if the server supports it. If this option is enabled, it specifies a list of DNS servers available to the client.

The no form of the command disables DNS server as a request option.

Default

n/a

router

Syntax

[no] router

Context

config>router>interface>autoconfigure>dhcp-client>request-options

Description

This command enables the router request option in the DHCP OFFER message from the DHCP server if the server supports it. If this option is enabled, the default gateway is assigned by the DHCP server.

The no form of the command disables router as a request option.

Default

n/a

static-route

Syntax

[no] static-route

Context

config>router>interface>autoconfigure>dhcp-client>request-options

Description

This command enables the static route request option in the DHCP OFFER message from the DHCP server if the server supports it. If this option is enabled, it specifies a list of classless static routes (that is, the destination network addresses in these static routes include subnet masks) that a client should add to its routing table.

The no form of the command disables static route as a request option.

Default

n/a

shutdown

Syntax

[no] shutdown

Context

config>router>interface>autoconfigure>dhcp-client

Description

This command administratively disables the DHCP client.

The no form of the command enables the DHCP client.

Default

n/a

dhcp-client

Syntax

dhcp-client interface ip-int-name

dhcp-client interface ip-int-name routes

dhcp-client interface ip-int-name statistics

Context

show>router>autoconfigure

Description

This command displays DHCP client information.

Parameters

ip-int-name

displays DHCP client information associated with the specified IP interface name

routes

displays routing table information for routes received by the DHCP protocol

statistics

displays DHCP client statistics

Output

The following outputs are examples of DHCP client information:

Output example (for the specified interface name)
*A:Dut-B# show router autoconfigure dhcp-client interface "to-dhcp" 
===============================================================================
DHCP Client state
===============================================================================
Client IP address                 : 51.53.2.17/24
Client MAC address                : 90:3a:a0:f0:ba:d5
Server Identifier                 : 51.54.2.1
Router IP address                 : (Not Specified)
Primary DNS                       : 138.120.252.55
Secondary DNS                     : 138.120.252.57
Tertiary DNS                      : (Not Specified)
Lease acquired time               : 2021/05/06 23:09:46
Lease renew time                  : 2021/05/07 05:09:46
Lease rebind time                 : 2021/05/07 09:39:46
Lease end time                    : 2021/05/07 11:09:46
DHCP RFC protocol state           : bound
DHCP client user status           : established
Description                       : nexthop 51.53.2.1 is reachable (for
                                    routes 135.0.0.0/8)
===============================================================================
Output example (for DHCP client routing table information)
*A:Dut-B# show router autoconfigure dhcp-client interface "to-dhcp" routes 
===============================================================================
DHCP client interface route table
===============================================================================
Prefix                                                  Status
  Next-hop                                              
    (Reason)                                            
-------------------------------------------------------------------------------
135.0.0.0/8                                             installed
  51.53.2.1                                             
-------------------------------------------------------------------------------
No. of routes: 1
===============================================================================
Output example (for DHCP client statistics)
*A:Dut-B# show router autoconfigure dhcp-client interface "to-dhcp" statistics 
===============================================================================
DHCP Client statistics
===============================================================================
DHCPDISCOVER messages                                    : 10
DHCPREQUEST messages                                     : 8
DHCPRELEASE messages                                     : 7
DHCPDECLINE messages                                     : 0
DHCPOFFER messages                                       : 8
DHCPACK messages                                         : 8
DHCPNAK messages                                         : 0
messages dropped                                         : 0
Statistics last cleared time                             : N/A
===============================================================================

autoconfigure

Syntax

autoconfigure

Context

tools>dump>router

Description

This command enables the context to display autoconfiguration information for debugging purposes.

dhcp-client

Syntax

dhcp-client interface ip-int-name offer

dhcp-client interface ip-int-name offer config-apply-status

dhcp-client interface ip-int-name offer raw

Context

tools>dump>router>autoconfigure

Description

This command displays IPv4 DHCP client information for debugging purposes.

Parameters

ip-int-name

the IP interface name associated with the DHCP client

offer

displays the contents of the OFFER message

config-apply-status

displays the configured DHCP options from the DHCP server OFFER message that are applied to the DHCP client and the status of these options

offer raw

displays the contents of the OFFER message in hexadecimal format

autoconfigure

Syntax

autoconfigure

Context

tools>perform>router

Description

This command enables the context to perform autoconfiguration operations.

dhcp-client

Syntax

dhcp-client interface ip-int-name lease-renew

dhcp-client interface ip-int-name restart

Context

tools>perform>router>autoconfigure

Description

This command performs IPv4 DHCP client lease operations.

Parameters

ip-int-name

the IP interface name associated with the DHCP client

lease-renew

performs DHCP client operations associated with lease renewals

restart

performs DHCP client operations associated with lease restarts

autoconfigure

Syntax

autoconfigure

Context

debug>router

Description

This command enables the context to perform autoconfiguration debugging operations.

dhcp-client

Syntax

dhcp-client interface ip-int-name

Context

debug>router>autoconfigure

Description

This command enables debugging for an IPv4 DHCP client.

Parameters

ip-int-name

the IP interface name associated with the DHCP client

events

Syntax

[no] events

Context

debug>router>autoconfigure>dhcp-client

Description

This command enables or disables debugging for all DHCP client events.

packet

Syntax

[no] packet

Context

debug>router>autoconfigure>dhcp-client

Description

This command enables or disables debugging for all DHCP client packets.

detail-level

Syntax

detail-level {low | medium | high}

no detail-level

Context

debug>router>autoconfigure>dhcp-client>packet

Description

This command sets the level of detail for packet tracing.

Parameters

low

specifies a low tracing detail level

medium

specifies a medium tracing detail level

high

specifies a high tracing detail level

mode

Syntax

mode {dropped-only | ingr-and-dropped | egr-ingr-and-dropped}

no mode

Context

debug>router>autoconfigure>dhcp-client>packet

Description

This command specifies the types of packets to be debugged.

Parameters

dropped-only

specifies to debug dropped packets only

ingr-and-dropped

specifies to debug ingress packets and dropped packets

egr-ingr-and-dropped

specifies to debug egress packets, ingress packets, and dropped packets

rtm

Syntax

[no] rtm

Context

debug>router>autoconfigure>dhcp-client

Description

This command enables or disables debugging for the addition, removal, and modification of DHCP client routes to the system Route Table Manager.

autoconfigure

Syntax

autoconfigure

Context

clear>router

Description

This command enables the context to clear autoconfigured DHCP client information.

dhcp-client

Syntax

dhcp-client interface ip-int-name statistics

Context

clear>router>autoconfigure

Description

This command clears IPv4 DHCP client statistics.

Parameters

ip-int-name

the IP interface name associated with the DHCP client

statistics

clears DHCP client statistics