Manageability Commands

This chapter describes the commands that can be used to enable HTTP servers, enable router management through Extensible Markup Language (XML) agent services, and support the Common Object Request Broker Architecture (CORBA) infrastructure.

The XML Parser Infrastructure provides parsing and generation of XML documents with Document Object Model (DOM), Simple API for XML (SAX), and Document Type Definition (DTD) validation capabilities:

  • DOM allows customers to programmatically create, manipulate, and generate XML documents.

  • SAX supports user-defined functions for XML tags.

  • DTD allows for validation of defined document types.

For more information, see System Management Configuration Guide for Cisco NCS 5500 Series RoutersSystem Management Configuration Guide for Cisco NCS 540 Series RoutersSystem Management Configuration Guide for Cisco NCS 560 Series Routers.

iteration

To configure iteration size for large XML agent responses, use iteration command in xml agent configuration mode. To revert to the default iteration settings, use no form of this command.

iteration {off | on size iteration-size}

Syntax Description

off

Disables iteration- Entire XML response is returned, regardless of its size.

Note

 
This option is not recommended.
on

Enables iteration- Large XML responses are broken into chunks according to the iteration chunk size specified.

size iteration-size

Specifies the size of the iteration chunk, in Kbytes. Iteration-size can range from 1 to 100,000.

Command Default

Iteration is enabled; with the iteration-size as 48.

Command Modes

XML agent

TTY XML agent

SSL XML agent

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

When a XML agent returns a large response, it splits the response into chunks and returns one chunk at a time. Externally, a GetNext request is sent to obtain the next chunk. This command can be used to control the size of iteration chunks.

A larger chunk value lets you receive many chunks in a shorter time, but, makes the router busy. A smaller chunk value lets you receive only a few chunks even over long time but, does not make the router busy. The iteration can be disabled by using the off keyword in the command..


Note


It is not recommended to disable iteration because, it could result in large transient memory usage.


Examples

The following example shows how to configure the iteration chunk size to 100 Kbytes.


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml)# iteration on size 100
  

The following example shows how to disable iteration:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml)# iteration off
  

The following example shows how to turn on iteration with the default iteration size:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml)# no iteration off
  

The following example shows how to change the iteration size to the default iteration size.


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml)# no iteration on size 100
  

The following example shows how to change the iteration size of the TTY agent to 3 Kbytes:


RP/0/RP0/CPU0:router(config)# xml agent tty
RP/0/RP0/CPU0:router(config-xml-tty)# iteration on size 3
  

The following example shows how to turn off the iteration of the SSL agent:


RP/0/RP0/CPU0:router(config)# xml agent ssl
RP/0/RP0/CPU0:router(config-xml-ssl)# iteration off
  

streaming

To configure the streaming size of the response while the XML agent is retrieving data from the source, use the streaming command in the appropriate mode.

streaming on size size in kbytes

Syntax Description

size size in kbytes

Streaming size of the xml response. Range is 1 to 100000.

Command Default

Default is 48 KB.

Command Modes

XML agent mode

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

Iteration must be off. The sub-response block size is a configurable value specific to each transport mechanisms on the router (the XML agent for the dedicated TCP connection and Secure Shell (SSH), Telnet, or Secure Sockets Layer (SSL) dedicated TCP connection).

Examples

This example shows how to configure the streaming size to 100 KB:

RP/0/RP0/CPU0:router (config) # xml agent
RP/0/RP0/CPU0:router (config-xml) # streaming on size 100

show xml schema

To browse the XML schema and data, use show xml schema command in XR EXEC mode.

show xml schema

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

XR EXEC

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

This example shows how to enter the XML schema browser and the available commands:


RP/0/RP0/CPU0:router# show xml schema
Tue Dec  5 12:52:58.857 WET
Username:lab
Password:
Enter 'help' or '?' for help
xml-schema[config]:> ?
config                   oper                     action
adminconfig              adminoper                adminaction
cd                       pwd                      classinfo
list                     ls                       datalist
walk                     walkdata                 get
hierarchy                quit                     exit
help
xml-schema[config]:>
    

throttle

To configure XML agent processing capabilities, use throttle command in XML agent configuration mode.

throttle {memory size | process-rate tags}

Syntax Description

memory

Specifies XML agent memory size.

size

Maximum memory usage of XML agent per session in MB. Values can range from 100 to 600. The default value is 300.

process-rate

Specifies the XML agent processing rate.

tags

Number of tags that the XML agent can process per second. Values can range from 1000 to 30000.

Command Default

The process rate is not throttled; memory size is 300 MB.

Command Modes

XML agent configuration

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

Use the throttle command to control CPU time used by the XML agent when it handles large data.

Examples

This example illustrates how to configure the number of tags that the XML agent can process to 1000:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# throttle process-rate 1000
  

xml agent

To enable Extensible Markup Language (XML) requests over a dedicated TCP connection and enter XML agent configuration mode, use the xml agent command in global configuration mode. To disable XML requests over the dedicated TCP connection, use the no form of this command.


Note


This command enables a new, enhanced-performance XML agent. The xml agent tty command enables the legacy XML agent and is supported for backward compatibility.


xml agent

no xml agent

Command Default

XML requests are disabled.

Command Modes

Global configuration

Command History

Release Modification
Release 6.1.2

This command was introduced.

Usage Guidelines

There are two XML agents: a legacy XML agent and an enhanced-performance XML agent. We recommend that you use the enhanced-performance agent. The legacy agent is supported for backward compatibility. Use the xml agent command to enable the enhanced-performance XML agent. Use the xml agent tty command to enable the legacy XML agent.

Examples

This example shows how to enable XML requests over a dedicated TCP connection:


RP/0/RP0/CPU0:router(config)# xml agent
         

xml agent ssl

To enable Extensible Markup Language (XML) requests over Secure Socket Layer (SSL) and enter SSL XML agent configuration mode, use xml agent ssl command in global configuration mode. To disable XML requests over SSL, use no form of this command.

xml agent ssl

no xml agent ssl

Command Default

SSL agent is disabled by default.

Command Modes

Global configuration

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

The k9sec package is required to use the SSL agent. The configuration is rejected during commit when the security software package is not active on the system. When the security software package is deactivated after configuring SSL agent, the following syslog message is displayed to report that the SSL agent is no longer available.


xml_dedicated_ssl_agent[420]:
%MGBL-XML_TTY-7-SSLINIT : K9sec pie is not active, XML service over
SSL is not available.

Examples

This example shows how to enable XML requests over SSL:


RP/0/RP0/CPU0:router(config)# xml agent ssl
    

xml agent tty

To enable Extensible Markup Language (XML) requests over Secure Shell (SSH) and Telnet or to enter TTY XML agent configuration mode, use xml agent tty command in global configuration mode. To disable XML requests over SSH and Telnet, use no form of this command.


Note


This command enables a legacy XML agent that has been superceded by an enhanced performance XML agent and is supported only for backward compatibility. To enable the enhanced-performance XML agent, use the xml agent command.


xml agent tty

no xml agent tty

Command Default

XML requests over SSH and Telnet are disabled.

Command Modes

Global configuration

Command History

Release Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

There are two XML agents: a legacy XML agent and an enhanced-performance XML agent. We recommend you to use the enhanced-performance agent. The legacy agent is supported for backward compatibility. The xml agent tty command enables the legacy XML agent. Use the xml agent command to enable the enhanced-performance XML agent.

Examples

This example shows how to enable XML requests over Secure Shell (SSH) and Telnet:


RP/0/RP0/CPU0:router(config)# xml agent tty
                                    

ipv4 disable

To disable IPv4 XML transport, use the ipv4 disable command in XML agent configuration mode. To enable IPv4 XML transport, use the no form of this command.

ipv4 disable

no ipv4 disable

Syntax Description

This command has no keywords or arguments.

Command Default

IPv4 XML transport is enabled by default.

Command Modes

XML agent configuration

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

config-services

read, write

Examples

This example illustrates how to disable IPv4 XML transport:

RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent) ipv4 disable
  

ipv6 enable (XML)

To enable IPv6 XML transport, use the ipv6 enable command in XML agent configuration mode. To disable IPv6 XML transport, use the no form of this command.

ipv6 enable

no ipv6 enable

Syntax Description

This command has no keywords or arguments.

Command Default

IPv6 XML transport is disabled by default.

Command Modes

XML agent configuration

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

config-services

read, write

Examples

This example illustrates how to enable IPv6 XML transport:

RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent) ipv6 enable
  

nvgen default-sanitize

To enable sanitizing Strings, Usernames, Passwords, Comments, or IP Addresses in the output for show running configurations command, use the nvgen default-sanitize command.

nvgen default-sanitize { strings | usernames | passwords | comments | ipaddrs }

Syntax Description

strings

Removes the description strings in the running configuration and replaces it with <removed> phrase.

usernames

Removes the usernames in the running configuration and replaces it with <removed> phrase.

password

Removes the passwords in the running configuration and replaces it with <removed> phrase.

comments

Removes the comments in the running configuration and replaces it with <comments removed> phrase.

ipaddrs

Removes the IP addresses in the running configuration and replaces it with <removed> phrase.

Command Default

The output for show running configurations command includes sensitive information such as Strings, Usernames, Passwords, Comments, or IP Addresses.

Command Modes

Configuration mode

Command History

Release

Modification

Release 7.0.1

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to sanitize show running configurations:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# nvgen default-sanitize strings
RP/0/RP0/CPU0:router(config)# nvgen default-sanitize usernames 
RP/0/RP0/CPU0:router(config)# nvgen default-sanitize passwords
RP/0/RP0/CPU0:router(config)# nvgen default-sanitize comments
RP/0/RP0/CPU0:router(config)# nvgen default-sanitize ipaddrs
RP/0/RP0/CPU0:router(config)# commit


session timeout

To configure an idle timeout for the XML agent, use the session timeout command in xml agent configuration mode. To remove the session timeout, use the no form of this command.

session timeout timeout

Syntax Description

timeout

Amount of idle time in minutes that must pass before the XML agent closes the session. Values can range from 1 to 1440.

Command Default

There is no session timeout.

Command Modes

xml agent

xml agent ssl

xml agent tty

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation
config-services

read, write

Examples

The following example illustrates how to configure the dedicated agent to close the session after 5 minutes of idle time:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# session timeout 5
  

The following example illustrates how to configure the XML TTY agent to close the session after 60 minutes of idle time:


RP/0/RP0/CPU0:router(config)# xml agent tty
RP/0/RP0/CPU0:router(config-xml-agent-tty)# session timeout 60
  

The following example illustrates how to configure the XML TTY agent to have no timeout (the default):


RP/0/RP0/CPU0:router(config)# xml agent tty
RP/0/RP0/CPU0:router(config-xml-agent)# no session timeout
  

show xml sessions

To display the status of an Extensible Markup Language (XML) session, use the show xml sessions command in EXEC mode.

show xml sessions [default | ssl | tty] [detail]

Syntax Description

default

Displays the status of the default XML agent.

ssl

Displays the status of the XML agents over secure socket layer (SSL).

tty

Displays the status of XML agents over telnet.

detail

Displays details regarding the XML sessions.

Command Default

None

Command Modes

XR EXEC

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation
config-services

read

Examples

This example illustrates sample output of the show xml sessions command with no optional keywords specified:


RP/0/RP0/CPU0:router# show xml sessions

Session  Client                  Agent    User  Date                     State
00000001 192.168.10.85 (default) tty      cisco Fri Jun 19 22:42:29 2009 idle
10000001 10.12.24.15 (VRF1)      default  lab   Fri Jun 19 22:32:12 2009 busy
  

This example illustrates sample output of the show xml sessions command with the tty keyword:


RP/0/RP0/CPU0:router# show xml sessions tty

Session  Client                  Agent User  Date                     State
00000001 192.168.10.85 (default) tty   cisco Fri Jun 19 22:42:29 2009 idle
00000002 10.12.24.15 (VRF1)      tty   lab   Fri Jun 19 22:32:12 2009 busy
  

This example illustrates sample output of the show xml sessions command with the detail keyword:


RP/0/RP0/CPU0:router# 
show xml sessions detail
 

Session: 00000001
  Client:                  192.168.10.85 (default)
  Agent type:              tty
  User:                    cisco
  State:                   idle
  Config session:          -
  Alarm notification:      Registered
  Start Date:              Tue Aug 24 18:21:29 2010
  Elapsed Time:            00:00:27     
  Last State Changed:      00:00:27     
Session: 10000001
  Client:                  10.12.24.15 (VRF1)
  Agent type:              default
  User:                    lab
  State:                   busy
  Config session:          00000010-0005b105-00000000
  Alarm notification:      Not registered
  Start date:              Tue Aug 24 18:21:29 2010
  Elapsed Time:            00:01:10     
  Last State Changed:      00:01:10 
  

shutdown (VRF)

To configure the dedicated XML agent to not receive or send messages via the default VRF, use the shutdown command in xml agent vrf configuration mode. To enable the dedicated XML agent to receive or send messages via the default VRF, use the no form of this command.

shutdown

no shutdown

This command has no keywords or arguments.

Command Default

The default VRF instance is enabled by default.

Command Modes

xml agent vrf configuration

xml agent ssl vrf configuration

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation
config-services

read, write

Examples

The following example illustrates how to configure the XML dedicated agent to send and receive messages via VRF1 only:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# vrf VRF1
RP/0/RP0/CPU0:router(config-xml-agent)# vrf default
RP/0/RP0/CPU0:router(config-xml-agent-vrf)# shutdown
  

The following example illustrates how to configure the XML SSL agent to send and receive messages via VRF1 only:


RP/0/RP0/CPU0:router(config)# xml agent ssl
RP/0/RP0/CPU0:router(config-xml-agent-ssl)# vrf VRF1
RP/0/RP0/CPU0:router(config-xml-agent-ssl)# vrf default
RP/0/RP0/CPU0:router(config-xml-agent-ssl-vrf)# shutdown
  

The following example illustrates how to enable the default VRF after it has been disabled:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# vrf default
RP/0/RP0/CPU0:router(config-xml-agent-vrf)# no shutdown
  

vrf (XML)

To configure a dedicated agent to receive and send messages via the specified VPN routing and forwarding (VRF) instance, use the vrf command in one of the xml agent configuration mode. To disable the receiving and sending of messages via a specific VRF instance, use the no form of this command.

vrf {default | vrf-name}

Syntax Description

default

Configures the default VRF instance.

vrf-name

Configures the specified VRF instance.

Command Default

The default VRF is enabled by default.

Command Modes

XML agent configuration

XML agent SSL configuration

Command History

Release Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The default VRF is enabled by default. To disable the default VRF, use the shutdown command.

Task ID

Task ID Operation
config-services

read, write

Examples

This example shows how to configure the dedicated XML agent to receive and send messages via VRF1, VRF2 and the default VRF:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# vrf VRF1
RP/0/RP0/CPU0:router(config-xml-agent)# vrf VRF2
  

This example shows how to remove access to VRF2 from the dedicated agent:


RP/0/RP0/CPU0:router(config)# xml agent
RP/0/RP0/CPU0:router(config-xml-agent)# no vrf VRF2