Table Of Contents
Cisco Networking Services Commands
cns config cancel
cns config connect-intf
cns config initial
cns config notify
cns config partial
cns config retrieve
cns event
cns id
cns inventory
cns mib-access encapsulation
cns notifications encapsulation
config-cli
line-cli
show cns config status
show cns config connections
show cns config outstanding
show cns config stats
show cns event connections
show cns event gateway
show cns event stats
show cns event status
show cns event subject
Cisco Networking Services Commands
This chapter describes the commands used to configure Cisco Networking Services (CNS) on Cisco IOS software-based devices.
For CNS configuration tasks and examples, see the the following 12.2 T feature guides:
•
CNS Configuration Agent, Cisco IOS Release 12.2(2)T
•
CNS Event Agent, Cisco IOS Release 12.2(2)T
•
CNS Flow-Through Provisioning, Cisco IOS Release 12.2(8)T
cns config cancel
To remove a partial CNS configuration from the list of outstanding partial configurations, use the cns config cancel command in EXEC mode.
cns config cancel queue-id
Syntax Description
queue-id
|
Indicates which partial configuration in the list of outstanding partial configurations to remove from the list. This list can be displayed by issuing the show cns config outstanding command in EXEC mode.
|
Defaults
No default behavior or values.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into Cisco IOS Release 12.0 ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
12.2(8)T
|
This command was implemented on additional platforms.
|
Usage Guidelines
Incremental (partial) configurations take place in two steps:
1.
The configuration agent receives the partial configuration. It checks the configuration commands for syntax, publishes the success or failure of the read and syntax-check operation to the sync-status subject "cisco.cns.config.sync-status," and stores the configuration.
2.
The configuration agent receives a second event message directing it to either apply or cancel the stored configuration.
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.
Examples
The following example shows the process of checking the existing outstanding CNS configurations and cancelling the configuration with the queue-id of1:
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
Command
|
Description
|
cns config partial
|
Starts the CNS configuration agent, which provides CNS configuration services to Cisco IOS clients.
|
cns event
|
Configures the CNS event gateway, which provides CNS event services to Cisco IOS clients.
|
show cns event connections
|
Displays the status of the CNS event agent connection.
|
show cns config outstanding
|
Displays information about incremental CNS configurations that have started but not yet completed.
|
cns config connect-intf
To specify the interface for connecting to the Cisco Networking Services (CNS) configuration engine, use the cns config connect-intf command 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
type number
|
Interface type and number for the connecting interface.
|
ping-interval seconds
|
(Optional) Interval between successive ping attempts. Values are from 1 to 30 seconds. The default is 10 seconds.
|
retries number
|
(Optional) Number of times that a ping will be retried. Values are from 1 to 30 seconds. The default is 5 seconds.
|
Defaults
The ping interval defaults to 10 seconds.
The number of retries defaults to 5.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use 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 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 configruation mode (config-cns-conn-if). Then use one of the following bootstrap-configuration commands to connect to the registrar for initial configuration:
•
config-cli followed by commands that, used as is, configure the interface.
•
line-cli followed by a command to configure modem lines to enable dialout and, after that, commands to configure the modem dialout line.
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 command
config-cli ip route 0.0.0.0 0.0.0.0 &
generates the command
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0.
Similarly, the command
config-cli cns id & ipaddress
generates the command
cns id FastEthernet0/0 ipaddress
Examples
In the following example, the user connects to a configuration engine using the Async 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 result in the following configuration being applied:
Related Commands
Command
|
Description
|
cns config cancel
|
Cancels an incremental two-phase synchronization configuration.
|
cns config initial
|
Starts the CNS configuration agent and initiates an initial configuration.
|
cns config notify
|
Detects CNS configuration changes and sends an event containing the previous and current configuration.
|
cns config partial
|
Starts the CNS configuration agent, which provides CNS configuration services to Cisco IOS clients.
|
cns config initial
To start the Cisco Networking Services (CNS) Configuration Agent and initiate an initial configuration, use the cns config initial command in global configuration mode. To remove an existing cns config initial command from the running configuration of the routing device, use the no version of this command.
cns config initial {ip-address | hostname} [encrypt] [port-number] [page page] [event]
[syntax-check] [no-persist] [source ip-address]
no cns config initial {ip-address | hostname} [encrypt] [port-number] [page page] [event]
[syntax-check] [no-persist] [source ip-address]
Syntax Description
ip-address
|
IP address of the configuration server.
|
hostname
|
Host name of the configuration server.
|
encrypt
|
(Optional) Uses an SSL encrypted link to the event gateway.
|
port-number
|
(Optional) Port number of the configuration service. The value is from 0 to 65535. The default is 80 with no encryption and 443 with encryption.
|
page page
|
(Optional) Web page where the configuration is located. The default is /cns/Config or /Config/config.asp.
|
event
|
(Optional) Sends an event on success, failure, or warning of the configuration when the configuration is finished. Otherwise, no event is sent out.
|
syntax-check
|
(Optional) Turns on syntax checking.
|
no-persist
|
(Optional) Suppresses the default automatic writing to NVRAM of the configuration pulled as a result of issuing the cns config initial command. If not present, issuing the cns config initial command causes the resultant configuration to be automatically written to NVRAM.
|
source ip-address
|
(Optional) IP address to use as the source of CNS communications.
|
Defaults
The port number defaults to 80 with no encryption and 443 with encryption.
Default web page of the initial configuration is /Config/config.asp.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into Cisco IOS Release 12.0 ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
12.2(2)XB
|
This command was implemented on Cisco IAD2420 series IADs.
|
12.2(8)T
|
• The source keyword was added.
• The encrypt keyword was added.
|
Usage Guidelines
Use this command to start the CNS Configuration Agent and initiate an initial configuration. The Configuration Agent gets the initial configuration for the routing device from the specified server. When this command is used with the event keyword, one of the following status messages will be displayed by the event bus:
•
cisco.cns.config.success—CNS Configuration Agent successfully applied the initial configuration.
•
cisco.cns.config.warning—CNS Configuration Agent fully applied the initial configuration, but encountered possible semantic errors.
•
cisco.cns.config.failure—CNS Configuration Agent detected a syntax error or unsupported hardware.
Related Commands
Command
|
Description
|
cns config cancel
|
Cancels an incremental two-phase synchronization configuration.
|
cns config connect-intf
|
Specifies the interface for connecting to the CNS configuration engine.
|
cns config notify
|
Detects CNS configuration changes and sends an event containing the previous and current configuration.
|
cns config partial
|
Starts the CNS configuration agent, which provides CNS configuration services to Cisco IOS clients.
|
cns event
|
Configures the CNS event gateway, which provides CNS event services to Cisco IOS clients.
|
cns config notify
To detect Cisco Networking Services (CNS) configuration changes and send an event containing the previous and current configurations, use the cns config notify command in global configuration mode. To disable event notification, use the no form of this command.
cns config notify {all | diff} [interval minutes] [no-cns-events]
no cns config notify {all | diff}
Syntax Description
all
|
Captures all configuration commands for the config-changed event output.
|
diff
|
Captures commands that change configuration for the config-changed event output.
|
interval minutes
|
(Optional) Maximum time in minutes before a config-changed event is sent. The default is 5 minutes. If you enter the end command, the config-changed event is sent immediately.
|
no-cns-events
|
(Optional) Disables event notification for configurations applied by the CNS configuration agent. No CNS events for the configuration are sent.
|
Defaults
The interval defaults to 5 minutes.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Examples
The following example detects configuration changes for all configuration commands:
Router(config)# cns config notify all
Related Commands
Command
|
Description
|
cns config cancel
|
Cancels an incremental two-phase synchronization configuration.
|
cns config connect-intf
|
Specifies the interface for connecting to the CNS configuration engine.
|
cns config initial
|
Starts the CNS configuration agent and initiates an initial configuration.
|
cns config partial
|
Starts the CNS configuration agent, which provides CNS configuration services to Cisco IOS clients.
|
cns config partial
To start the CNS Configuration Agent and initiate a partial configuration, use the cns config partial command in global configuration mode. To shut down the partial Configuration Agent, use the no version of this command.
cns config partial {ipaddress | hostname} [encrypt] [port-number] [source ip-address]
no cns config partial {ipaddress | hostname} [encrypt] [port-number]
Syntax Description
ip-address
|
IP address of the configuration server.
|
hostname
|
Host name of the configuration server.
|
encrypt
|
(Optional) Uses an SSL encrypted link to the event gateway.
|
port-number
|
(Optional) Port number of the configuration service. The value is from 0 to 65535. The default is 80 with no encryption and 443 with encryption.
|
source ip-address
|
(Optional) IP address to use for source of this device.
|
Defaults
The port number defaults to 80 with no encryption and 443 with encryption.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into Cisco IOS Release 12.0 ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
12.2(2)XB
|
This command was implemented on Cisco IAD2420 series IADs.
|
12.2(8)T
|
• The source keyword was added.
• The encrypt keyword was added.
|
Usage Guidelines
Use this command to start the CNS Configuration Agent and initiate the partial configuration process.
Configuration data can be pushed to the partial configuration agent or pulled from the CNS configuration engine by the 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.
Examples
The following example starts the partial configuration process using the CNS configuration engine at 172.28.129.22 and port number 80:
Router(config)# cns config partial 172.28.129.22 80
Related Commands
Command
|
Description
|
show cns config
|
Displays information about the CNS Configuration Agent.
|
cns config retrieve
To get the configuration of a routing device—if the partial CNS Configuration Agent is started and configured in the routing device—use the cns config retrieve command in EXEC mode.
cns config retrieve [page page] [no-syntax-check] [no-persist]
Syntax Description
page page
|
(Optional) The web page of partial configuration. The default is /Config/config.asp.
|
no-syntax-check
|
(Optional) Turns off the syntax check. The syntax is checked when this parameter is not entered.
|
no-persist
|
(Optional) Suppresses the automatic writing of the retrieved configuration to NVRAM as a result of issuing the cns config retrieve command. If not present, issuing the cns config retrieve command causes the resultant configuration to be automatically written to NVRAM.
|
Defaults
Default web page of the initial configuration is /Config/config.asp.
Command Modes
EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into Cisco IOS Release 12.0 ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
Usage Guidelines
Use this command to get the configuration of a routing device using Cisco Networking Services (CNS).
Related Commands
Command
|
Description
|
show cns config
|
Displays information about the CNS Configuration Agent.
|
cns event
To 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} [port-number] [encrypt] [backup] [init-retry retry-count]
[keepalive seconds retry-count] [source ip-address] [force-fmt1]
no cns event {hostname | ip-address} [port-number] [port-number] [encrypt] [backup] [init-retry
retry-count] [keepalive seconds retry-count] [source ip-address] [force-fmt1]
Syntax Description
hostname
|
Host name of the event gateway.
|
ip-address
|
IP address of the event gateway.
|
encrypt
|
(Optional) Uses an SSL encrypted link to the event gateway.
|
port-number
|
(Optional) Port number for the event gateway. The default is 11011 with no encryption or 11012 with encryption.
|
backup
|
(Optional) Indicates that this is the backup gateway. If omitted, indicates that this is the primary gateway. Before you can configure a backup gateway, you must already have configured a primary gateway. Optional keywords, if omitted, are set as for the primary gateway.
|
init-retry retry-count
|
(Optional) Number of retries during router bootup before the system switches to backup. The default is 3.
|
keepalive seconds retry-count
|
(Optional) Keepalive timeout in seconds and retry count. The default for each is 0.
|
source ip-address
|
(Optional) IP address to use as the source for CNS communications.
|
force-fmt1
|
(Optional) Forces use of format 1 rather than format 2. If omitted, defaults to format 2.
|
Defaults
The event gateway port number default is 11011 with no encryption or 11012 with encryption.
The number of initial retries defaults to 3.
Keepalive defaults to 0 seconds and 0 retries.
The system uses format 2.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into the Cisco IOS 12.0 ST Release.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
12.2(2)XB
|
This command was implemented on Cisco IAD2420 series IADs.
|
12.2(8)T
|
The following keywords were added:
• encrypt
• init-retry
• source
• force-fmt1
|
Usage Guidelines
Use this command to select the IP address of an event and pass it as the unique CNS ID to the CNS configuration agent, which then pulls a new configuration to the router.
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.
Specify format 1 only if you determine that format 2 does not work on your system. This is most likely to occur if your Cisco IE2100 CNS configuration engine is a very early release. Format 2 has a length field of 4 rather than 2 bytes, and can therefore handle events that are larger than 64k bytes.
Examples
The following example shows how to set the address of the primary CNS event gateway to the configuration engine software running on IP address10.1.2.3, port 11011, with a keepalive of 60 seconds and a retry count of 5:
Router(config)# cns event 10.1.2.3 11011 keepalive 60 5
Related Commands
Command
|
Description
|
cns id
|
Sets the unique event ID or config ID router identifier.
|
show cns event
|
Displays information about the CNS Event Agent.
|
cns id
To set the unique event ID or config ID router identifier used by Cisco Networking Services (CNS) services, use the cns id command in global configuration mode. To set the identifier to the router's host name, use the no form of this command.
If ID Choice Is IP Address or MAC Address
cns id type number {dns-reverse | ipaddress | mac-address} [event]
no cns id type number {dns-reverse | ipaddress | mac-address} [event]
If ID Choice Is Anything Else
cns id {hardware-serial | hostname | string string} [event]
no cns id {hardware-serial | hostname | string string} [event]
Syntax Description
type number
|
Type of interface (for example, ethernet, group-async, loopback, or virtual-template) and the interface number. Indicates from which interface the IP or MAC address should be retrieved in order to define the unique ID.
|
dns-reverse
|
(Optional) Uses DNS reverse lookup to retrieve the host name and assign it as the unique ID.
|
ipaddress
|
(Optional) Uses the IP address specified in the type number arguments as the unique ID.
|
mac-address
|
(Optional) Uses the MAC address specified in the type number arguments as the unique ID.
|
event
|
(Optional) Sets this ID to be the event ID value, used to identify the router for CNS event services. If omitted, sets it to be the config ID value, used to identify the router for CNS configuration services.
|
hardware-serial
|
(Optional) Uses the hardware serial number as the unique ID.
|
hostname
|
(Optional) Uses the host name as the unique ID. This is the system default.
|
string string
|
(Optional) Uses an arbitrary text string—typically the host name—as the unique ID.
|
Defaults
The system defaults to the host name as the unique ID.
Event defaults to set the unique ID to be the config ID value.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(2)XB
|
This command was introduced on Cisco IAD2420 series IADs.
|
12.2(8)T
|
This command was implemented in Cisco IOS Release 12.2T.
|
Usage Guidelines
Use this command to retrieve (if necessary), set, and pass the unique ID to the CNS configuration agent, which then pulls the initial configuration template to the router during bootup.
You can set either or both of two IDs: the config ID value for CNS configuration services and the event ID value for CNS event services. To set both values, use the command twice.
To set the CNS event ID to the router's host name, use the no form of this command with the event keyword. To set the CNS config ID to the router's host name, use the no form of this command without the event keyword.
Examples
The following example shows the host name of the router being passed as the config ID value:
Router(config)# cns id hostname
The following example shows the hardware serial number of the router being passed as the event ID value.
Router(config)# cns id hardware-serial event
Related Commands
Command
|
Description
|
cns event
|
Configures the CNS event gateway, which provides CNS event services to Cisco IOS clients.
|
cns inventory
To enable the Cisco Networking Services (CNS) inventory agent—that is, to send an inventory of the router's line cards and modules to the CNS configuration engine—use the cns inventory command in global configuration mode. To disable the CNS inventory agent, use the no form of this command.
cns inventory [config | event]
no cns inventory [config | event [notify oir]]
Syntax Description
config
|
(Optional) Enables inventory-configuration events. Sends the inventory to the CNS configuration engine when the cns config initial command is used but before the configuration is downloaded from the registrar.
|
event
|
(Optional) Enables inventory events.
|
notify oir
|
(Optional) On Cisco 7200 and Cisco 12000 series routers, enables notifications to be sent out on the event bus when online insertion or removal (OIR) occurs.This XML event for OIR updates is sent with the subject "cisco.cns.inventory.oir." The removal OIR event has only the slot from which the card was removed. The insertion event has all available information about the card that has been inserted.
|
Defaults
Enables both inventory configuration and inventory events.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use this command to notify the CNS configuration engine of changes to the router's port-adaptor and interface inventory.
Use the event keyword to query the inventory from the remote router using the event bus. An event needs to be sent with the subject "cisco.cns.inventory.get" to the Cisco router; the payload of the event is ignored. On receiving this query, the inventory agent sends the inventory.
Examples
The following example shows enabling of the CNS inventory agent:
Router(config)# cns inventory
Related Commands
Command
|
Description
|
cns config initial
|
Starts the CNS configuration agent and initiates an initial configuration.
|
cns mib-access encapsulation
To specify whether Cisco Networking Services (CNS) should use nongranular (SNMP) or granular (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 mib-access encapsulation {snmp | xml [size bytes]}
no cns mib-access encapsulation {snmp | xml}
Syntax Description
snmp
|
Enables nongranular (SNMP) encapsulation for MIB access.
|
xml
|
Enables granular (XML) encapsulation for MIB access.
|
size bytes
|
(Optional) Maximum size in bytes for response events. The default is 3072.
|
Defaults
For XML encapsulation, a maximum size of 3072 bytes.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced on Cisco 2600 series and Cisco 3600 series routers.
|
Examples
The following example specifies that XML be used to access MIBs:
Router(config)# cns mib-access encapsulation xml
Related Commands
Command
|
Description
|
cns notifications encapsulation
|
Specifies whether CNS notifications should be sent using nongranular (SNMP) or granular (XML) encapsulation.
|
cns notifications encapsulation
To specify whether Cisco Networking Services (CNS) notifications should be sent using nongranular (SNMP) or granular (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 notifications encapsulation {snmp | xml}
no cns notifications encapsulation {snmp | xml}
Syntax Description
snmp
|
Uses nongranular (SNMP) encapsulation to send notifications.
|
xml
|
Uses granular (XML) encapsulation to send notifications.
|
Defaults
No default behavior or values.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced on Cisco 2600 series and Cisco 3600 series routers.
|
Examples
The following example shows how to specify that granular notifications should be sent:
Router(config)# cns notifications encapsulation xml
Related Commands
Command
|
Description
|
cns mib-access encapsulation
|
Specifies whether CNS should use granular (XML) or nongranular (SNMP) encapsulation to access MIBs.
|
config-cli
To connect to the Cisco Networking Services (CNS) configuration engine using a specific type of interface, use the config-cli command in CNS Connect-interface configuration mode.
config-cli type [number]
Syntax Description
type number
|
Type of interface. Indicates from which interface the IP or MAC address should be retrieved in order to define the unique ID.
|
number
|
(Optional) Interface number. Indicates from which interface the IP or MAC address should be retrieved in order to define the unique ID.
|
Defaults
No default behavior or values.
Command Modes
CNS Connect-interface configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced on Cisco 2600 series and Cisco 3600 series routers.
|
Usage Guidelines
Begin by using the cns config connect-intf command to enter CNS Connect-interface configuration (config-cns-conn-if) submode. Then use either this or its companion CNS bootstrap-configuration command to connect to the CNS configuration engine for initial configuration:
•
config-cli connects to the registrar using a specific type of interface. You must specify the interface type but need not specify the interface number; the router's bootstrap configuration finds the connecting interface, regardless of the slot in which the card resides, by trying different candidate interfaces until it can ping the configuration engine.
•
line-cli connects to the registrar using modem dialup lines.
Immediately after either of the commands, enter additional configuration commands as appropriate.
Examples
The following example enters config-cns-conn-if submode, 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:
Related Commands
Command
|
Description
|
cns config connect-intf
|
Specifies the interface for connecting to the CNS configuration engine.
|
line-cli
|
Connects to the CNS configuration engine using a modem dialup line.
|
line-cli
To connect to the Cisco Networking Services (CNS) configuration engine using a modem dialup line, use the line-cli command in CNS Connect-interface configuration mode.
line-cli
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values.
Command Modes
CNS Connect-interface configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced on Cisco 2600 series and Cisco 3600 series routers.
|
Usage Guidelines
Use 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 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.
Enter this command to enter connect-interface-config (config-cns-conn-if) submode. Then use one of the following bootstrap-configuration commands to connect to the registrar for initial configuration:
•
config-cli followed by commands that, used as is, configure the interface.
•
line-cli followed by a command to configure modem lines to enable dialout and, after that, commands to configure the modem dialout line.
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 following is the case:
•
The command config-cli ip route 0.0.0.0 0.0.0.0 &
generates the command config ip route 0.0.0.0 0.0.0.0 FastEthernet0/0.
•
The command cns id & ipaddress
generates the command cns id FastEthernet0/0 ipaddress
Examples
The following example enters config-cns-conn-if submode, 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 rotart-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:
Related Commands
Command
|
Description
|
cns config connect-intf
|
Specifies the interface for connecting to the CNS configuration engine.
|
config-cli
|
Connects to the CNS configuration engine using a specific type of interface.
|
show cns config status
To display the status of the CNS Configuration Agent, use the show cns config status command in EXEC mode.
show cns config status
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values.
Command Modes
EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into Cisco IOS Release12.0 ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0 S.
|
Usage Guidelines
This command displays the status of the Configuration Agent. Use this option to display the following information about the Configuration Agent:
•
Status of the Configuration Agent, for example, whether it has been configured properly.
•
IP address and port number of the trusted server that the Configuration Agent is using.
•
Config ID (identity of configuration within the configuration group).
Related Commands
Command
|
Description
|
cns config cancel
|
Cancels a CNS configuration.
|
cns config initial
|
Starts the initial CNS Configuration Agent.
|
cns config partial
|
Starts the partial CNS Configuration Agent.
|
cns config retrieve
|
Gets the configuration of a routing device using CNS.
|
show cns config connections
To display the status of the Cisco Networking Services (CNS) event agent connection, use the show cns config connections command in privileged EXEC mode.
show cns config connections
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use the show cns config connections command to determine whether the CNS event agent is connecting to the gateway, connected, or active, and to display the gateway used by the event agent and its IP address and port number.
Examples
The following example displays information about outstanding incremental (partial) configurations:
Router# show cns config connections
The partial configuration agent is enabled.
Configuration server: 10.1.1.1
Connection Status: Connection not active.
Related Commands
Command
|
Description
|
show cns config outstanding
|
Displays information about incremental CNS configurations that have started but not yet completed.
|
show cns config stats
|
Displays statistics about the CNS configuration agent.
|
show cns config outstanding
To display information about incremental (partial) Cisco Networking Services (CNS) configurations that have started but not yet completed, use the show cns config outstanding command in privileged EXEC mode.
show cns config outstanding
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.2(8)T
|
This command was implemented on Cisco 2600 series and Cisco 3600 series routers.
|
Usage Guidelines
Use the show cns config outstanding command to display information about outstanding incremental (partial) configurations that have started but not yet completed, including the following:
•
Queue ID (location of configuration in the config queue)
•
Identifier (group ID)
•
Config ID (identity of configuration within the group)
Examples
The following example displays information about outstanding incremental (partial) configurations:
Router# show cns config outstanding
The outstanding configuration information:
queue id identifier config-id
1 identifierREAD config_idREAD
Related Commands
Command
|
Description
|
cns config cancel
|
Cancels an incremental two-phase synchronization configuration.
|
config-cli
|
Displays the status of the CNS event agent connection.
|
show cns config stats
|
Displays statistics about the CNS configuration agent.
|
show cns config stats
To display statistics about the Cisco Networking Services (CNS) configuration agent, use the show cns config stats command in privileged EXEC mode.
show cns config stats
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.2(8)T
|
This command was implemented on Cisco 2600 series and Cisco 3600 series routers.
|
Usage Guidelines
This command displays the following statistics on the Configuration Agent:
•
The number of configurations completed.
•
The number of configurations failed.
•
The time stamp of the last configuration received
Examples
The following example displays information about outstanding incremental (partial) configurations:
Router# show cns config stats
0 configurations completed.
Related Commands
Command
|
Description
|
config-cli
|
Displays the status of the CNS event agent connection.
|
show cns config outstanding
|
Displays information about incremental CNS configurations that have started but not yet completed.
|
show cns event connections
To display the status of the Cisco Networking Services (CNS) event agent connection, use the show cns event connections command in privileged EXEC mode.
show cns event connections
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use the show cns event connections command to display the status of the event agent connection—such as whether it is connecting to the gateway, connected, or active—and to display the gateway used by the event agent and its IP address and port number.
Examples
The following example displays the IP address and port number of the primary and backup gateways:
Router# show cns event connections
The currently configured primary event gateway:
Event-Id is Internal test1
The currently configured backup event gateway:
The currently connected event gateway:
Related Commands
show cns event gateway
To display information about the Cisco Networking Services (CNS) Event Agent, use the show cns event gateway command in EXEC mode.
show cns event gateway
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values.
Command Modes
EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into the Cisco IOS 12.0 ST Release.
|
Usage Guidelines
Use this command to display the following information about CNS gateways:
•
Primary gateway:
–
IP address
–
Port number
•
Backup gateways:
–
IP address
–
Port number
•
Currently connected gateway:
–
IP address
–
Port number
Related Commands
Command
|
Description
|
cns event
|
Configures the CNS Event Gateway.
|
show cns event stats
To display statistics about the Cisco Networking Services (CNS) event agent connection, use the show cns event stats command in privileged EXEC mode.
show cns event stats
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST, 12.0(22)S
|
This command was integrated into the Cisco IOS 12.0ST / 12.0S Release train.
|
12.2(8)T
|
This command was implemented on the Cisco 2600 series and the Cisco 3600 series.
|
Usage Guidelines
Use this command to display the following statistics for the CNS Event Agent:
•
Number of events received
•
Number of events sent
•
Number of events not processed successfully
•
Number of events in the queue
•
Time stamp of latest event received (time stamp is router time)
•
Time stamp of latest event sent
•
Number of applications using the Event Agent
•
Number of subjects subscribed
Examples
The following example displays the IP address and port number of the primary and backup gateways:
Router# show cns event stats
The time stamp of the last received event is *Jan 1 1900 00:00:00 UTC
The time stamp of the last sent event is *Mar 1 1993 00:05:42 UTC
2 applications are using the event agent.
Related Commands
show cns event status
To display information about the Cisco Networking Services (CNS) Event Agent, use the show cns event status command in EXEC mode.
show cns event status
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values.
Command Modes
EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST
|
This command was integrated into the Cisco IOS 12.0 ST Release.
|
Usage Guidelines
Use this command to display the following information about the CNS Event Agent:
•
Status of Event Agent:
–
Connected
–
Active
•
Gateway used by the Event Agent:
–
IP address
–
Port number
•
Device ID.
Related Commands
Command
|
Description
|
cns event
|
Configures the CNS Event Gateway.
|
show cns event subject
To display a list of subjects about the Cisco Networking Services (CNS) event agent connection, use the show cns event subject command in privileged EXEC mode.
show cns event subject [name]
Syntax Description
name
|
(Optional) Displays a list of applications that are subscribing to this specific subject name.
|
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(18)ST, 12.0(22)S
|
This command was integrated into the Cisco IOS 12.0ST / 12.0S Release train.
|
12.2(8)T
|
This command was implemented on the Cisco 2600 series and the Cisco 3600 series.
|
Usage Guidelines
Use the show cns event subject command to display a list of subjects of the event agent that are subscribed to by applications.
Examples
The following example displays the IP address and port number of the primary and backup gateways:
Router# show cns event subject
The list of subjects subscribed by applications.
cisco.cns.mibaccess:request
Related Commands
Command
|
Description
|
show cns event connections
|
Displays the status of the CNS event agent connection.
|
show cns event stats
|
Displays statistics about the CNS event agent connection.
|