PnP Commands

This chapter contains the following sections:

pnp device

To define the device username and the password, use the pnp device command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

pnp device username username password password

encrypted pnp device username username password encrypted-password

no pnp device

Parameters

  • username—Specifies device user name (range: 1-64 characters).

  • password—Specifies device password (range: 1-64 characters).

  • encrypted-password—Specifies encrypted device password.

Default Configuration

N/A

Command Mode

Global Configuration mode

User Guidelines

Use the pnp device command to configure a username and a password used in each PnP message sent by the PnP agent to a PnP server.

Example

The following example configures device name and password:

switchxxxxxx(config)# pnp device username sjohn password Tan123

pnp discovery timeout

To define the PnP agent discovery timeout in seconds and the exponential factor, use the pnp discovery timeout command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

pnp discovery timeout timeout exponential-factor max-timeout

no pnp discovery timeout

Parameters

  • timeout—Specifies the time to wait, in seconds, before attempting to discovery after a discovery is failed. The range is from 1 to 2000000.

  • exponential-factor—Exponential factor value is the value that triggers the discovery attempt exponentially. The range is from 1 to 9.

  • max-timeout—Specifies the maximum value of the timeout. The range is from 1 to 2000000.

Default Configuration

timeout—60 seconds

exponential-factor—3

max-timeout—540 seconds

Command Mode

Global Configuration mode

User Guidelines

Use the pnp discovery timeout command to configure a discovery timeout in seconds and an exponential factor. The following formula is used to calculate the next timeout using the previous one:

next-timeout = (previous-timeout*exponential-factor < max-timeout) ?

previous-timeout*exponential-factor : max-timeout;

Example

The following example configures the discovery timeout and factor:

switchxxxxxx(config)# pnp discovery timeout 100 2 800

pnp enable

To enable the PnP agent, use the pnp enable command in Global Configuration mode. To disable the PnP agent, use the no form of this command.

Syntax

pnp enable

no pnp enable

Default Configuration

PnP agent is enabled.

Command Mode

Global Configuration mode

User Guidelines

Use the command to enable the PnP agent.

Example

The following example disables the PnP agent:

switchxxxxxx(config)# no pnp enable

pnp reconnect interval

To define the PnP agent interval between sequential PnP sessions, use the pnp reconnect interval command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

pnp reconnect interval timeout

no pnp reconnect interval

Parameters

  • timeout—Specifies the interval in seconds time before attempting to reconnect the session after a connection is lost. The range is from 1 to 2000000.The default is 30

Default Configuration

30 seconds

Command Mode

Global Configuration mode

User Guidelines

Use the pnp reconnect interval command to configure an interval between PnP sessions.

Example

The following example configures PnP session interval:

switchxxxxxx(config)# pnp interval reconnect interval 100

pnp resume

To resume the PnP agent, use the pnp resume command in Global Configuration mode.

Syntax

pnp resume

Default Configuration

PnP agent is enabled

Command Mode

Global Configuration mode

User Guidelines

Use the pnp resume command, to take out immediately the PnP agent from a waiting state:

  • From the Discovery Waiting state to the Discovery state OR

  • From the PnP Session Waiting state to the PnP Session state

Example

The following example resumes the PnP Server discovery:

switchxxxxxx(config)# pnp resume

pnp transport

To define the PnP transport, use the pnp transport command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

pnp transport {http | https} ip-address [port port-number]

no pnp transport

Parameters

  • http | https—Specifies the transport protocol.

  • ip-address—Specifies the IPv4 address or IPv6 address, or DNS name of the PnP server.

  • port-number—Specifies the TCP port of the PnP server. If the parameter is not defined then the following default value is applied:

    • HTTP—80

    • HTTPS—443

Default Configuration

  • DHCP Option 43

  • DNS:

    PnP Server IP Address—pnpserver

    Protocol—HTTP

    Port—80

  • Cisco Cloud (Default):

    PnP Server IP Address—devicehelper.cisco.com

    Protocol—HTTPS

    Port—443

Command Mode

Global Configuration mode

User Guidelines

Use the pnp transport command to configure a transport protocol on whoich the PnP protocol is running.

Example

The following example configures the PnP transport:

switchxxxxxx(config)# pnp transport http 145.1.3.4

pnp watchdog timeout

To define the PnP agent watchdog timeout, use the pnp watchdog timeout command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

pnp watchdog timeout timeout

no pnp watchdog timeout

Parameters

  • timeout—Specifies the time to wait a reply from a PnP or File server. The range is from 1 to 180.

Default Configuration

60 seconds

Command Mode

Global Configuration mode

User Guidelines

Use the pnp watchdog timeout command to configure a watchdog timeout in seconds.

Example

The following example configures the watchdog timeout:

switchxxxxxx(config)# pnp watchdog timeout 120

show pnp

To display the PnP agent information, use the show pnp command in Privileged EXEC mode.

Syntax

show pnp

Command Mode

Privileged EXEC mode

User Guidelines

Use the command to display information of the PnP agent.

Examples

Example 1. The following example displays PnP agent information when the PnP agent is disabled:

switchxxxxxx# show pnp
Administrative status: disabled
Operational status:
PnP Agent state:
Transport protocol: HTTP
Source Ip address:
TCP port: 80 (default)
Username:
Password’s MD5 digest:
Discovery
  Timeout: 60 seconds (default)
  Exponential Factor: 3 (default)
  Maximum Timeout: 540 seconds
PnP Session Reconnection Interval:
  Current:
 >Default: 60 sec
  Manual Configuration:
  PnP:
PnP Watchdog Timeout: 60 seconds

Example 2. The following example displays PnP agent information when the PnP agent is not ready:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: notReady (No PnP Server IP Address)
PnP Agent state:
Transport protocol: HTTP (from DHCP Option 43)
Server IP address:
Source Ip address:
TCP port: 80 (default)
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery
  Timeout: 60 seconds (default)
  Exponential Factor: 3 (default)
  Maximum Timeout: 540 seconds
PnP Session Reconnection Interval:
  Current:
 >Default: 60 sec
  Manual Configuration:
  PnP:
PnP Watchdog Timeout: 60 seconds

Example 3. The following example displays PnP agent information when the PnP agent is enabled in the PnP Session state:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: ready
PnP Agent state: PnP Session
Transport protocol: HTTP (from DHCP Option 43)
Server IP address: 176.1.1.1 (from DHCP Option 43)
Source Ip address:
TCP port: 80 (default)
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery Timeout: 60 seconds (default)
Discovery Exponential Factor: 3 (default)
Discovery Maximum Timeout: 540 seconds
PnP Session Interval Timeout: 60 (default)
PnP Watchdog Timeout: 60 seconds

Example 4. The following example displays PnP agent information when the PnP agent is enabled in the PnP Session state and the PnP server was changed:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: ready
PnP Agent state: PnP Session
Transport protocol: HTTP (from DHCP Option 43
Server IP address: 176.1.1.1 (from DHCP Option 43);
     Next session: 167.21.3.4 (from DHCP Option 43)
Source Ip address:
TCP port: 80 (default)
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery Timeout: 60 seconds (default)
Discovery Exponential Factor: 3 (default)
Discovery Maximum Timeout: 540 seconds
PnP Session Interval Timeout: 60 (default)
PnP Watchdog Timeout: 60 seconds

Example 5. The following example displays PnP agent information when the PnP agent is enabled in the PnP Session Waiting state:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: ready
PnP Agent state: PnP Session Waiting
Transport protocol: HTTPS
Server IP address: 176.1.1.1
Source Ip address: 120.10.10.10
TCP port: 180
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery Timeout: 60 seconds (default)
Discovery Exponential Factor: 3 (default)
Discovery Maximum Timeout: 540 seconds
PnP Session Interval Timeout: 180 seconds (from PnP Backoff message)
Timer Remainder: 150 seconds
PnP Watchdog Timeout: 60 seconds

Example 6. The following example displays PnP agent information when the PnP agent is in state Discovery:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: ready
PnP Agent state: PnP Session
Transport protocol: HTTP (from DHCP Option 43
Server IP address: 176.1.1.1 (from DHCP Option 43);
     Next session: 167.21.3.4 (from DHCP Option 43)
Source Ip address:
TCP port: 80 (default)
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery Timeout: 60 seconds (default)
Discovery Exponential Factor: 3 (default)
Discovery Maximum Timeout: 540 seconds
PnP Session Interval Timeout: 60 (default)
PnP Watchdog Timeout: 60 seconds

Example 7. The following example displays PnP agent information when the PnP agent is in state Discovery Waiting:

switchxxxxxx# show pnp
Administrative status: enabled
Operational status: ready
PnP Agent state: PnP Session
Transport protocol: HTTP (from DHCP Option 43
Server IP address: 176.1.1.1 (from DHCP Option 43);
     Next session: 167.21.3.4 (from DHCP Option 43)
Source Ip address:
TCP port: 80 (default)
Username:atre1234c (from DHCP Option 43)
Password’s MD5 digest: 1238af77aaca17568f1298cced165fec (from DHCP Option 43)
Discovery Timeout: 60 seconds (default)
Discovery Exponential Factor: 3 (default)
Discovery Maximum Timeout: 540 seconds
PnP Session Interval Timeout: 60 (default)
PnP Watchdog Timeout: 60 seconds