![]() |
Cisco IOS Cisco Networking Services Command Reference
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A through E Commands
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents
A through E Commands announce configTo specify that an unsolicited configuration inventory is sent out by the CNS inventory agent at bootup, use the announce config command in CNS inventory configuration mode. To disable the sending of the configuration inventory, use the no form of this command. Command History
Usage GuidelinesUse this command to limit inventory requests by the CNS inventory agent. When configured, the routing device details will be announced on the CNS event bus, but the routing device will not respond to any queries from the CNS event bus. clear netconfTo clear network configuration protocol (NETCONF) statistics counters or NETCONF sessions and to free associated resources and locks, use the clear netconfcommand in privileged EXEC mode. Command DefaultNETCONF statistics counters are incremented and configured NETCONF sessions remain active. Usage GuidelinesUse this command to clear NETCONF statistics counters to zero, to clear all or specified NETCONF sessions and to disconnect and free associated resources and locks. ExamplesThe following example shows how to clear all NETCONF counters:
Router# clear netconf counters
Related Commands
cli (cns)To specify the command lines of a Cisco Networking Services (CNS) connect template, use the cli command in CNS template connect configuration mode. To disable this configuration, use the no form of this command. Command History
Usage GuidelinesFirst use the cns template connect command to enter CNS template connect configuration mode and define the name of the CNS connect template to be configured. Then use the cli command to specify the command lines of the CNS connect template.
The command lines specified using the cli command can include CNS connect variables (see the table below). These variables act as placeholders within the command lines of a CNS connect template. Each variable is defined by an associated discover command. Before a CNS connect template that contains these variables is applied to a routerâs configuration, the variables are replaced by the values defined by their associated discover command. For example, if the discover interface serial command was configured, and you were able to connect to the CNS configuration engine using Serial0/0, then the cli ip route 0.0.0.0 0.0.0.0 ${interface} command would generate the cli ip route 0.0.0.0 0.0.0.0 serial0/0 command.
ExamplesThe following example shows how to configure a CNS connect template named template1: Router(config)# cns template connect template-1 Router(config-templ-conn)# cli command-1 Router(config-templ-conn)# cli command-2 Router(config-templ-conn)# cli no command-3 Router(config-templ-conn)# exit Router(config)# When the template1 template is applied, the following commands are sent to the routerâs parser: command-1 command-2 no command-3 When the template1 template is removed from the routerâs configuration after an unsuccessful ping attempt to the CNS configuration engine, the following commands are sent to the routerâs parser: no command-1 no command-2 command-3 Related Commands
cns aaa authenticationTo enable Cisco Networking Services (CNS) Authentication, Authorization, and Accounting (AAA) options, use the cns aaa authenticationcommand in global configuration mode. To explicitly disable CNS AAA options, use the no form of this command. Usage GuidelinesUse the cns aaa authenticationcommand to enable AAA when using CNS. When the cns aaa authenticationcommand is configured, CNS notification messages sent to the device are rejected if they do not have sender credentials. By default, no authentication is enabled. This command must be enabled to configure AAA authentication for CNS messages. Use the no cns aaa authentication command to explicitly disable AAA support when using CNS. For more information about AAA authentication methods, see the â AAA Authentication Methods Configuration Task List â section in the â Configuring Authentication â chapter of the Cisco IOS Security Configuration Guide, Release 12.4. cns config cancelTo remove a partial Cisco Networking Services (CNS) configuration from the list of outstanding partial configurations, use the cns config cancel command in privileged EXEC mode. Command History
Usage GuidelinesIncremental (partial) configurations take place in two steps:
Use the cns config cancel command in error scenarios where the second event message is not received and you need to remove the configuration from the list of outstanding configurations. Currently the maximum number of outstanding configurations is one. ExamplesThe following example shows the process of checking the existing outstanding CNS configurations and canceling the configuration with the queue-id of 1: Router# show cns config outstanding The outstanding configuration information: queue id identifier config-id 1 identifierREAD config_idREAD Router# cns config cancel 1 Router# show cns config outstanding The outstanding configuration information: queue id identifier config-id Related Commands
cns config connect-intfTo specify the interface for connecting to the Cisco Networking Services (CNS) configuration engine, use the cns config connect-intfcommand in global configuration mode. To disable this interface for the connection, use the no form of this command.
cns
config
connect-intf
type
number
[ping-interval seconds]
[retries number]
no
cns
config
connect-intf
type
number
Syntax Description
Command History
Usage GuidelinesUse this command to connect to the CNS configuration engine using a specific type of interface. You must specify the interface type but need not specify the interface number; the routerâs bootstrap configuration on the router finds the connecting interface, regardless of the slot in which the card resides or the modem dialout line for the connection, by trying different candidate interfaces or lines until it successfully pings the registrar. Use this command to enter CSN Connect-interface configuration mode (config-cns-conn-if). Then use one of the following bootstrap-configuration commands to connect to the registrar for initial configuration:
The config-cli command accepts the special directive character â&,â which acts as a placeholder for the interface name. When the configuration is applied, the & is replaced with the interface name. Thus, for example, if we are able to connect using FastEthernet0/0, the config-cli ip route 0.0.0.0 0.0.0.0 & command generates the ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 command. Similarly, the config-virtual terminal line (vty) cns id & ipaddresscommand generates the cns id FastEthernet0/0 ipaddress command. ExamplesIn the following example, the user connects to a configuration engine using the asynch interface and issues several commands: Router(config)# cns config connect-intf Async Router(config-cns-conn-if)# config-cli encapsulation ppp Router(config-cns-conn-if)# config-cli ip unnumbered FastEthernet0/0 Router(config-cns-conn-if)# config-cli dialer rotary-group 0 Router(config-cns-conn-if)# line-cli modem InOut Router(config-cns-conn-if)# line-cli ...<other line commands>.... Router(config-cns-conn-if)# exit These commands result in the following configuration being applied: line 65 modem InOut . . . interface Async65 encapsulation ppp dialer in-band dialer rotary-group 0 Related Commands
cns config initialTo enable the Cisco Networking Services (CNS) configuration agent and initiate a download of the initial configuration, use the cns config initialcommand in global configuration mode. To remove an existing cns config initial command from the running configuration of the routing device, use the no form of this command.
cns
config
initial
{host-name | ip-address}
[encrypt]
[port-number]
[page page]
[syntax-check]
[no-persist]
[source interface name]
[status url]
[event]
[inventory]
no
cns
config
initial
Syntax Description
Command DefaultThe port number defaults to 80 with no encryption and 443 with encryption. Default web page of the initial configuration is /cns/config.asp. Command History
Usage GuidelinesUse this command when a basic configuration--called a bootstrap configuration--is added to multiple routers before being deployed. When a router is initially powered (or each time a router is reloaded when the no-persistkeyword is used) the cns config initial command will cause a configuration file--called an initial configuration--for the router to be downloaded from the configuration server. The initial configuration can be unique for each router. When the configuration has been received by the router, each line of the configuration will be applied in the same order as it was received. If the Cisco IOS parser has an error with one of the lines of the configuration, then all the configuration up to this point will be applied to the router, but none of the configuration beyond the error will be applied. If an error occurs, the command will retry until it successfully completes. Once the configuration has successfully completed the cns config initial command will be removed from the running configuration. By default, NVRAM will be updated except when the no-persistkeyword is configured. When this command is used with the event keyword, a single message will be published on the event bus after the configuration is complete. The event bus will display one of the following status messages:
When this command is used with the statuskeyword, a single message will be published to the URL specified after the configuration is complete. ExamplesThe following example shows how to enable the CNS configuration agent and initiate an initial configuration:
Router(config)# cns config initial 10.19.4.5 page /cns/config/first.asp
Related Commands
cns config notify
To notify Cisco Networking Services (CNS) agents of configuration changes on Cisco IOS devices, use the cns config notify command in global configuration mode. To disable notifications, use the no form of this command.
cns
config
notify
{all | diff}
[interval minutes]
[no_cns_events]
[old-format]
no
cns
config
notify
{all | diff}
[interval minutes]
[no_cns_events]
[old-format]
Cisco IOS Release 12.4(9)T or Later Releases
cns
config
notify
diff
[interval minutes]
[no_cns_events]
[qlen number]
no
cns
config
notify
diff
[interval minutes]
[no_cns_events]
[qlen number]
Syntax DescriptionCommand History
Usage GuidelinesWhen the cns config notify command is enabled, commands entered in configuration mode are detected. If the all keyword is specified, the command is stored for future notification. If the diff keyword is specified, the command is stored for future notification if the software determines that the command will cause a configuration change. The diff keyword also allows the software to store information about the command including previous configuration states, source of the change (for example, a telnet user), and the time of configuration. The stored information is formatted in XML and sent as part of a CNS config agent change notification event. A CNS configuration agent change notification event is sent to the CNS event bus when configuration mode is exited or no activity from that source has occurred for the configured interval time. You must enable the CNS event agent using the cns event command before configuring this command. If the CNS event agent is not configured, the notification event will be queued and sent when the CNS event agent is enabled. If the CNS configuration notify queue is full, subsequent events are dropped and a âlostâ CNS configuration change notification is sent when the CNS event agent is enabled. Use the no_cns_events for applications that already record configuration changes sent to the routing device through the CNS event bus. Use the old-format keyword to generate XML output--only the entered command and previous configuration state--that is compatible with the versions of this commands when the diff keyword was removed. Use the qlen number keyword/argument pair to send configuration changes to the CNS agent only after the specified number of changes has occurred. ExamplesThe following example shows how to configure the CNS agent to receive configuration change notifications for all configuration commands:
Router(config)# cns config notify all
The following example shows how to configure the CNS agent to receive configuration change notifications only after 50 changes have been made:
Router(config)# cns config notify diff qlen 50
Related Commands
cns config partialTo start the Cisco Networking Services (CNS) configuration agent and accept a partial configuration, use the cns config partialcommand in global configuration mode. To shut down the CNS partial configuration agent, use the no form of this command.
cns
config
partial
{host-name | ip-address}
[encrypt]
[port-number]
[source interface name]
[inventory]
no
cns
config
partial
Syntax Description
Command DefaultThe CNS configuration agent is not enabled to accept a partial configuration and the router does not request or receive updates. Command History
Usage GuidelinesUse this command to start the CNS partial configuration agent. You must enable the CNS event agent using the cns event command before configuring this command. The CNS event agent sends an event with the subject âcisco.mgmt.cns.config.loadâ to specify whether configuration data can be pushed to the CNS partial configuration agent or pulled from a configuration server by the CNS partial configuration agent. In the push model, the event message delivers the configuration data to the partial configuration agent. In the pull model, the event message triggers the partial configuration agent to pull the configuration data from the CNS configuration engine. The event message contains information about the CNS configuration engine, not the actual configuration data. The host name or IP address is the address of the CNS configuration engine from which the configuration is pulled. Use the cns trusted-server command to specify which CNS configuration engines can be used by the CNS partial configuration agent. When the configuration has been received by the router, each line of the configuration will be applied in the same order as it was received. If the Cisco IOS parser has an error with one of the lines of the configuration, then all the configuration up to this point will be applied to the router, but none of the configuration beyond the error will be applied. If an error occurs, the command will retry until the configuration successfully completes. In the pull mode, the command will not retry after an error. By default, NVRAM will be updated except when the no-persistkeyword is configured. A message will be published on the CNS event bus after the partial configuration is complete. The CNS event bus will display one of the following status messages:
In Cisco IOS Releases 12.4(4)T, 12.2 (33)SRA, and later releases, a second message is sent to the subject âcisco.cns.config.resultsâ in addition to the appropriate message above. The second message contains both overall and line-by-line information about the configuration that was sent and the result of the action requested in the original message. If the action requested was to apply the configuration, then the information in the results message is semantic in nature. If the action requested was to check syntax only, then the information in the results message is syntactical in nature. ExamplesThe following example shows how to configure the CNS partial configuration agent to accept events from the event gateway at 172.28.129.22. The CNS partial configuration agent will connect to the CNS configuration server at 172.28.129.22, port number 80. The CNS partial configuration agent requests are redirected to a configuration server at 172.28.129.40, port number 80. Router(config)# cns event 172.28.129.22 Router(config)# cns trusted-server config 172.28.129.40 Router(config)# cns config partial 172.28.129.22 The following example shows an enhanced error message sent to the subject âcisco.mgmt.cns.config.resultsâ: [2005-09-08 14:30:44]: subject=cisco.mgmt.cns.config.results.dvlpr-7200-6, message= <?xml version="1.0" encoding="UTF-8"?> <SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope"> <SOAP:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext" SOAP:mustUnderstand="true"> <wsse:UsernameToken> <wsse:Username>user1</wsse:Username> <wsse:Password>password1</wsse:Password> </wsse:UsernameToken> </wsse:Security> <CNS:cnsHeader Version="2.0" xmlns:CNS="http://www.cisco.com/management/cns/envelope"> <CNS:Agent>CNS_CONFIG</CNS:Agent> <CNS:Response> <CNS:correlationID>SOAP_IDENTIFIER</CNS:correlationID> </CNS:Response> <CNS:Time>2005-09-13T08:34:36.523Z</CNS:Time> </CNS:cnsHeader> </SOAP:Header> <SOAP:Body xmlns="http://www.cisco.com/management/cns/config"> <configResults version="2.0" overall="Success"> <configId>AAA</configId> </configResults> </SOAP:Body> </SOAP:Envelope> Related Commands
cns config retrieveTo enable the Cisco Networking Services (CNS) configuration agent and initiate a download of the initial configuration, use the cns config retrieve command in privileged EXEC mode.
cns
config
retrieve
{host-name | ip-address}
[encrypt]
[port-number]
[page page]
[overwrite-startup]
[retry retries interval seconds]
[syntax-check]
[no-persist]
[source interface name]
[status url]
[event]
[inventory]
Syntax Description
Command DefaultThe port number defaults to 80 with no encryption and 443 with encryption. Default web page of the initial configuration is /cns/config.asp. Command History
Usage GuidelinesUse this command to request the configuration of a device from a configuration server. Use the cns trusted-server command to specify which configuration server can be used (trusted). When the configuration has been received by the router, each line of the configuration will be applied in the same order as it was received. If the Cisco IOS parser has an error with one of the lines of the configuration, then all the configuration up to this point will be applied to the router, but none of the configuration beyond the error will be applied. If an error occurs, the command will not retry. A single message will be published on the event bus after the partial configuration is complete. The event bus will display one of the following status messages:
The cns config retrieve command can be used with Command Scheduler commands (for example, kron policy-list and cli commands) in environments where it is not practical to use the CNS event agent and the cns config partial command. Configured within the clicommand, the cns config retrieve command can be used to poll the configuration server to detect configuration changes. You can use the optional retry and interval keywords to specify an amount of time in seconds to wait before attempting to retrieve a configuration from a trusted server. The number of retries is restricted to 100 to prevent the configuration agent from indefinitely attempting to reach an unreachable server. Use the keyboard combination Ctrl-Shift-6 to abort this command. ExamplesThe following example shows how to request a configuration from a trusted server at 10.1.1.1: Router(config)# cns trusted-server all 10.1.1.1 Router(config)# exit Router# cns config retrieve 10.1.1.1 The following example shows how to request a configuration from a trusted server at 10.1.1.1 and to configure a CNS configuration retrieve interval: Router(config)# cns trusted-server all 10.1.1.1 Router(config)# exit Router# cns config retrieve 10.1.1.1 retry 50 interval 1500 CNS Config Retrieve Attempt 1 out of 50 is in progress Next cns config retrieve retry is in 1499 seconds (Ctrl-Shft-6 to abort this command). .. 00:26:40: %CNS-3-TRANSPORT: CNS_HTTP_CONNECTION_FAILED:10.1.1.1 -Process= "CNS config retv", ipl= 0, pid= 43 00:26:40: %CNS-3-TRANSPORT: CNS_HTTP_CONNECTION_FAILED -Process= "CNS config retv", ipl= 0, pid= 43...... Related Commands
cns connectTo enter Cisco Networking Services (CNS) connect configuration mode and define the parameters of a CNS connect profile for connecting to the CNS configuration engine, use the cns connect command in global configuration mode. To disable the CNS connect profile, use the no form of this command.
cns
connect
name
[retry-interval interval-seconds]
[retries number-retries]
[timeout timeout-seconds]
[sleep sleep-seconds]
no
cns
connect
name
[retry-interval interval-seconds]
[retries number-retries]
[timeout timeout-seconds]
[sleep sleep-seconds]
Syntax Description
Command History
Usage GuidelinesUse the cns connect command to enter CNS connect configuration mode and define the parameters of a CNS connect profile for connecting to the CNS configuration engine. Then use the following CNS connect commands to create a CNS connect profile:
A CNS connect profile specifies the discover commands and associated template commands that are to be applied to a routerâs configuration. Multiple discover and templatecommands configured in a CNS connect profile are processed in the order in which they are entered.
ExamplesThe following example shows how to create a CNS connect profile named profile-1: Router(config)# cns connect profile-1 Router(config-cns-conn)# discover interface Serial Router(config-cns-conn)# template template-1 Router(config-cns-conn)# exit In this example, the following sequence of events occurs for each serial interface when the cns connect profile-1command is processed:
Related Commands
cns dhcpTo enable a Cisco Networking Service (CNS) with permission to process the incoming DHCP Option 43 message, use the cns dhcp command in global configuration mode. To disable this permission, use the no form of this command. Usage GuidelinesIf you need to pass CNS configuration commands to the router via the DHCP option 43 message, the cns dhcpcommand enables the DHCP option 43 message that the CNS processes. For more information, see the â Configuring Cisco Networking Services â module in the Cisco IOS Network Management Configuration Guide . cns eventTo configure the Cisco Networking Services (CNS) event gateway, which provides CNS event services to Cisco IOS clients, use the cns event command in global configuration mode. To remove the specified event gateway from the gateway list, use the no form of this command.
cns
event
{hostname | ip-address}
[encrypt]
[port-number]
[backup]
[failover-time seconds]
[keepalive seconds retry-count]
[source {ipv4-address | ipv6-address | interface-name}]
[clock-timeout time]
[reconnect-time time]
no
cns
event
[hostname | ip-address]
[port-number]
[encrypt]
[backup]
[failover-time seconds]
[keepalive seconds retry-count]
[source {ipv4-address | ipv6-address | interface-name}]
[clock-timeout time]
[reconnect-time time]
Syntax Description
Command History
Usage GuidelinesThe CNS event agent must be enabled before any of the other CNS agents are configured because the CNS event agent provides a transport connection to the CNS event bus for all other CNS agents. The other CNS agents use the connection to the CNS event bus to send and receive messages. The CNS event agent does not read or modify the messages. The failover-time keyword is useful if you have a backup CNS event gateway configured. If the CNS event agent is trying to connect to the gateway and it discovers that the route to the backup is available before the route to the primary gateway, the seconds argument specifies how long the CNS event agent will continue to search for a route to the primary gateway before attempting to link to the backup gateway. Unless you are using a bandwidth-constrained link, you should set a keepalive timeout and retry count. Doing so allows the management network to recover gracefully should a Cisco IE2100 configuration engine ever fail. Without the keepalive data, such a failure requires manual intervention on every device. The value of the seconds argument multiplied by the value of the retry-count argument determines the length of the idle time before the CNS event agent will disconnect and attempt to reconnect to the gateway. We recommend a minimum retry-count of two. If the optional source keyword is used, the source IP address might be a secondary IP address of a specific interface to allow a management network to run on top of a production network. If network connectivity between the Cisco IOS router running the CNS event agent and the gateway is absent, the event agent goes into an exponential backoff retry mode and gets stuck at the maximum limit (which may be hours). The reconnect-time keyword allows a configurable upper limit of the maximum retry timeout. If you configure CNS passwords using the cns password command, existing event connections will be closed and reopened. cns execTo enable and configure the Cisco Networking Services (CNS) exec agent, which provides CNS exec agent services to Cisco IOS clients, use the cns exec command in global configuration mode. To disable the use of CNS exec agent services, use the no form of this command.
cns
exec
[encrypt]
[port-number]
[source {ipv4-address | ipv6-address | interface-type number}]
no
cns
exec
[encrypt]
[port-number]
[source {ipv4-address | ipv6-address | interface-type number}]
Syntax Description
Command History
Usage GuidelinesThe CNS exec agent allows a remote application to execute an EXEC mode command-line interface (CLI) command on a Cisco IOS device by sending an event message containing the command. A restricted set of EXEC CLI commands--show commands--is supported. In previous Cisco IOS releases, the CNS exec agent was enabled when the CNS configuration agent was enabled through the cns config partial command. cns idTo set the unique event ID, config ID, or image ID used by Cisco Networking Services (CNS), use the cns id command in global configuration mode. To set the identifier to the hostname of the Cisco IOS device, use the no form of this command.
cns
id
{type number {ipaddress | mac-address} | hardware-serial | hostname | string string | udi}
[event | image]
no
cns
id
{type number {ipaddress | mac-address} | hardware-serial | hostname | string string | udi}
[event | image]
Syntax Description
Command History
Usage GuidelinesUse this command to set the unique ID for the CNS configuration agent, which then pulls the initial configuration template to the Cisco IOS device during bootup. You can set one or all three IDs: the config ID value for CNS configuration services, the event ID value for CNS event services, and the image ID value for CNS image agent services. To set all values, use the command three times. An IP address can be assigned to an interface, and cns id global configuration command can use this IP address as the CNS ID string. When CNS ID configuration fails, the system defaults to the hostname of the Cisco IOS device as the unique ID. To set the CNS event ID to the hostname of the Cisco IOS device, use the no form of this command with the event keyword. To set the CNS config ID to the hostname of the Cisco IOS device, use the no form of this command without the event keyword. To set the CNS image ID to the hostname of the Cisco IOS device, use the no form of this command with the image keyword. Unique Device Identifier Each identifiable Cisco product is an entity, as defined by the Entity MIB (RFC 2737) and its supporting documents. Some entities, such as a chassis, will have subentities like slots. An Ethernet switch might be a member of a superentity, such as a stack. Most Cisco entities that are orderable products will leave the factory with an assigned UDI. The UDI information is printed on a label that is affixed to the physical hardware device, and it is also stored electronically on the device in order to facilitate remote retrieval. To use UDI retrieval, the Cisco product in use must be UDI-enabled. A UDI consists of the following elements:
The PID is the name by which a product can be ordered; historically, it has been called the âProduct Nameâ or âPart Number.â This identifier is the one to use to order an exact replacement part. The VID is the version of the product. When a product is revised, the VID is incremented according to a rigorous process derived from Telcordia GR-209-CORE, an industry guideline that governs product change notices. The SN is the vendor-unique serialization of the product. Each manufactured product carries a unique serial number assigned at the factory, which cannot be changed in the field. The serial number is used to identify an individual, specific instance of a product.
ExamplesThe following example shows how to pass the hostname of the Cisco IOS device as the config ID value: Router(config)# cns id hostname The following example shows how to pass the hardware serial number of the Cisco IOS device as the event ID value:
Router(config)# cns id hardware-serial event
The following example shows how to pass the UDI as the event ID value:
Router(config)# cns id udi event
The following example shows how to pass the IP address of Ethernet interface 0/1 as the image ID value:
Router(config)# cns id ethernet 0/1 ipaddress image
cns imageTo configure the CNS image agent services, use the cns imagecommand in global configuration mode. To disable the use of CNS image agent services, use the no form of this command.
cns
image
[server server-url [status status-url]]
no
cns
image
[server server-url [status status-url]]
Syntax Description
Command DefaultWhen configured, the CNS image agent always listens for image events on the CNS Event Bus server. Command History
Usage GuidelinesUse the cns image command to start the CNS image agent process and to listen for image-related events on the CNS Event Bus. If the optional server details are specified, the CNS image agent uses the server URL to contact the image management server. If no server details are specified, the URL for the image server must be supplied using one of the following three methods. The first method is to specify the image server using the server options on the cns image retrieve command. The second method is to use the server configured by the CNS event agent and stored as an image server event that can be received from the CNS Event Bus. The third method does not require a server URL because it uses CNS Event Bus mode. If the optional status details are not specified, the status messages are sent as events on the CNS Event Bus. cns image passwordTo configure a password to use with the Cisco Networking Services (CNS) image agent services, use the cns image password command in global configuration mode. To disable the use of a password, use the no form of this command. Command History
Usage GuidelinesUse this command to create a password that is sent with the image ID in all CNS image agent messages. The recipient of these messages can use this information to authenticate the sending device. This password may be different from the username and password used for HTTP basic authentication configured with other CNS image agent commands. cns image retrieveTo contact a Cisco Networking Services (CNS) image distribution server and download a new image if a new image exists, use the cns image retrievecommand in privileged EXEC mode. Syntax Description
Command DefaultAn error occurs when a cns image server has not previously been configured in global configuration mode. Usage GuidelinesWhen the cns image retrieve command is issued in privileged EXEC mode without the server keyword and server-url argument, an error occurs. When a cns image server has been configured and the cns image retrieve command is issued with no server keyword and server-url argument, the server path configured in the cns image command is used. When the cns imagecommand is issued in global configuration mode with the optional server keyword, no keywords are required and no error occurs when you issue the cns image retrieve command in privileged EXEC mode. Command History
Usage GuidelinesYou must enable the CNS image agent services using the cns image command before configuring this command. Use this command to poll an image distribution server and download a new image to the Cisco IOS device if a new image exists. ExamplesThe following example shows how to configure the CNS image agent to access the image distribution server at 10.19.2.3 and download a new image if a new image exists: Router# cns image retrieve server https://10.20.2.3:8080/cns/imageserver/ status https://10.20.2.3:8080/cns/imageserver/messages / cns image retryTo set the Cisco Networking Services (CNS) image upgrade retry interval, use the cns image retrycommand in global configuration mode. To restore the default value, use the no form of this command. Command History
Usage GuidelinesUse this command to set an interval after which the CNS image agent will retry an image upgrade operation if the original upgrade attempt failed. cns inventoryTo enable the CNS inventory agent--that is, to send an inventory of the routerâs line cards and modules to the CNS configuration engine--and enter CNS inventory mode, use the cns inventory command in global configuration mode. To disable the CNS inventory agent, use the no form of this command. Usage GuidelinesUse this command with the announce config and transport event CNS inventory configuration mode commands to specify when to notify the CNS configuration engine of changes to the routerâs port-adaptor and interface inventory. A transport must be specified in CNS inventory configuration mode before any of the CNS inventory commands are executed. ExamplesThe following example shows how to enable the CNS inventory agent and enter CNS inventory configuration mode:
Router(config)# cns inventory
Router(cns_inv)#
Related Commands
cns message format notificationTo configure the message format for notification messages from a Cisco Networking Services (CNS) device, use the cns message format notificationcommand in global configuration mode. To unconfigure a configured message format for notification messages from a CNS device, use the no form of this command.
cns
message
format
notification
{version 1 | version 2}
no
cns
message
format
notification
{version 1 | version 2}
Usage GuidelinesUse this command to configure a CNS agent to use the SOAP format for CNS notification messages. SOAP message formats are supported by default. If the Cisco IOS device receives a request in the non-SOAP message format, the response will be sent in the non-SOAP format. If the Cisco IOS device receives a request in the SOAP format, the response will be sent in the SOAP format. By default, notification messages that are sent without any corresponding request messages will be sent in both SOAP and non-SOAP formats. When this command is configured, received CNS notification messages that do not conform to the configured message format are rejected. If the cns aaa authentication notificationcommand is already configured, then the senderâs credentials will be authenticated. If the cns message format notificationcommand is configured, then the notification messages will be sent as per the configured version number. The default configuration is the legacy non-SOAP format. cns mib-access encapsulationTo specify whether Cisco Networking Services (CNS) should use nongranular (Simple Network Management Protocol [SNMP]) or granular (Extensible Markup Language [XML]) encapsulation to access MIBs, use the cns mib-access encapsulation command in global configuration mode. To disable the currently specified encapsulation, use the no form of this command. cns notifications encapsulationTo specify whether Cisco Networking Services (CNS) notifications should be sent using nongranular (Simple Network Management Protocol [SNMP]) or granular (Extensible Markup Language [XML]) encapsulation, use the cns notifications encapsulation command in global configuration mode. To disable the currently specified encapsulation, use the no form of this command. cns passwordTo configure a Cisco Networking Services (CNS) password, use the cns password command in global configuration mode. To disable the CNS password, use the no form of this command. Usage GuidelinesYou must configure the CNS password the first time a router is deployed, and the CNS password must be the same as the bootstrap password set on the Configuration Engine (CE). If both the router and the CE bootstrap password use their default settings, a newly deployed router will be able to connect to the CE. Once connected, the CE will change the CNS password from the bootstrap password to a random password. Network administrators must ensure not to change the CNS password. If the CNS password is changed, connectivity to the CE will be lost. cns template connectTo enter Cisco Networking Services (CNS) template connect configuration mode and define the name of a CNS connect template, use the cns template connect command in global configuration mode. To disable the CNS connect template, use the no form of this command. Command History
Usage GuidelinesUse the cns template connect command to enter CNS template connect configuration mode and define the name of the CNS connect template to be configured. Then use the cli command to specify the command lines of the CNS connect template.
ExamplesThe following example shows how to configure a CNS connect template named template1: Router(config)# cns template connect template1 Router(config-templ-conn)# cli command-1 Router(config-templ-conn)# cli command-2 Router(config-templ-conn)# cli no command-3 Router(config-templ-conn)# exit When the template1 template is applied, the following commands are sent to the routerâs parser: command-1 command-2 no command-3 When the template1 template is removed from the routerâs configuration after an unsuccessful ping attempt to the CNS configuration engine, the following commands are sent to the routerâs parser: no command-1 no command-2 command-3 Related Commands
cns trusted-serverTo specify a trusted server for Cisco Networking Services (CNS) agents, use the cns trusted-server command in global configuration mode. To disable the use of a trusted server for a CNS agent, use the no form of this command.
cns
trusted-server
{all-agents | config | event | exec | image}
name
no
cns
trusted-server
{all-agents | config | event | exec | image}
name
Syntax Description
Command DefaultBy default, only the implicit server strings are trusted. The configuration of the CNS event agentâs server string through the command-line interface (CLI) results in an implicit trust by all CNS agents. For the other CNS agents, the configuration of a server string using the CLI results in an implicit trust of the server for the specified agent. For example, cns exec 10.2.1.2 implies the string 10.2.1.2 is implicitly trusted by the exec agent, and specifying cns event 10.4.2.2 implies the string 10.4.2.2 is implicitly trusted by all the CNS agents. Command History
Usage GuidelinesUse the cns trusted-server command to specify a trusted server for an individual CNS agent or all the CNS agents. In previous Cisco IOS Releases, CNS agents could connect to any server and this could expose the system to security violations. An attempt to connect to a server not on the list results in an error message being displayed and an authentication failure reply extensible markup language (XML). For backwards compatibility the configuration of a server address using the configuration CLI for a CNS agent results in an implicit trust of the server for the specified agent. Use this command when a CNS agent will redirect its response to a server address that is not explicitly configured on the command line for the specific CNS agent. For example, the CNS exec agent may have one server configured but receive a message from the CNS Event Bus that overrides the configured server. The new server address string has not been explicitly configured so the new server address is not a trusted server. An error will be generated when the CNS exec agent tries to respond to this new server address unless the cns trusted-server command has been configured for the new server address string. The cns trusted-server command does not use Domain Name System (DNS). Instead a string comparison is done between the configured and implicit trusted servers and requested redirected server address. ExamplesThe following example shows how to configure server 10.19.2.5 as a trusted server for the CNS event agent:
Router# cns trusted-server event 10.19.2.5
The following example shows how to configure server 10.2.2.8, which maps though DNS to host.somedomain.com as a trusted server for all CNS agents: Router# cns trusted-server all-agents 10.2.2.8 Router# cns trusted-server all-agents host Router# cns trusted-server all-agents host.somedomain.com The following example shows how to configure the string 10.2.2.8 as an implicit trusted server for the CNS image agent:
Router# cns image server 10.2.2.8 status 10.2.2.8
config-cli
To connect to the Cisco Networking Services (CNS) configuration engine using a specific type of interface, use the config-clicommand in CNS Connect-interface configuration mode. Syntax Description
Command History
Usage GuidelinesBegin by using the cns config connect-intf command to enter CNS Connect-interface configuration (config-cns-conn-if) mode. Then use either this or its companion CNS bootstrap-configuration command to connect to the CNS configuration engine for initial configuration:
Immediately after either of the commands, enter additional configuration commands as appropriate. ExamplesThe following example enters CNS Connect-interface configuration mode, connects to a configuration engine using an asynchronous interface, and issues a number of commands: Router(config)# cns config connect-intf Async Router(config-cns-conn-if)# config-cli encapsulation ppp Router(config-cns-conn-if)# config-cli ip unnumbered FastEthernet0/0 Router(config-cns-conn-if)# config-cli dialer rotary-group 0 Router(config-cns-conn-if)# line-cli modem InOut Router(config-cns-conn-if)# line-cli ...<other line commands>.... Router(config-cns-conn-if)# exit These commands apply the following configuration: line 65 modem InOut . . . interface Async65 encapsulation ppp dialer in-band dialer rotary-group 0 discover (cns)To define the interface parameters within a Cisco Networking Services (CNS) connect profile for connecting to the CNS configuration engine, use the discover command in CNS connect configuration mode. To disable this functionality, use the no form of this command.
discover
{line line-type | controller controller-type | interface [interface-type] | dlci [subinterface subinterface-number]}
no
discover
{line line-type | controller controller-type | interface [interface-type] | dlci [subinterface subinterface-number]}
Syntax Description
Command History
Usage GuidelinesFirst use the cns connect command to enter CNS connect configuration mode and define the parameters of a CNS connect profile for connecting to the CNS configuration engine. Then use the following CNS connect commands to create a CNS connect profile: A CNS connect profile specifies the discover commands and associated template commands to apply to a routerâs configuration. The first discover command in a CNS connect profile defines the scope of interfaces to be searched and used to perform the ping iterations for connecting to the CNS configuration engine. Subsequent discover commands limit this scope. The search is based on discovering all the interfaces that match the specified line, controller, or interface type. The search is case-insensitive and allows for abbreviations. For example, the discover interface Serial, discover interface Ser, discover interface serial, and discover interface ser commands all match the serial interface. Each discover command must have at least one unique CNS connect template associated with it. Specifically, the template command must be configured after configuring the discover command. The discover command specifies the configuration mode in which the CNS connect templates (specified by the template command that is associated with the discover command) are to be applied. When multiple discover and templatecommands are configured in a CNS connect profile, they are processed in the order in which they are entered. The table below provides a summary of the interface parameters that can be defined using the discover command.
CNS connect variables can be used as placeholders within a CNS connect template configuration. Each variable is defined by an associated discover command (see the table above and the table below). Before a CNS connect template that contains these variables is applied to a routerâs configuration, the variables are replaced by the values defined by their associated discover command. For example, if the discover interface serial command was configured, and you were able to connect to the CNS configuration engine using Serial0/0, the cli ip route 0.0.0.0 0.0.0.0 ${interface} command would generate the cli ip route 0.0.0.0 0.0.0.0 serial0/0 command.
ExamplesThe following example shows how to create a CNS connect profile named EG: Router (config)# cns connect EG Router (config-cns-conn)# discover controller T1 Router (config-cns-conn)# template timeslot-1 Router (config-cns-conn)# discover interface Router (config-cns-conn)# template frame Router (config-cns-conn)# exit Router (config)# In this example, the following sequence of events occur for each T1 controller when the cns connect EGcommand is processed:
Related Commands
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|