Guest

Cisco IOS Software Releases 12.3 Mainline

CNS Zero Touch

Downloads

Table Of Contents

CNS Zero Touch

Contents

Information About CNS Zero Touch

Benefits of CNS Zero Touch

How the CNS Zero Touch Feature Works

How to Create a Generic Bootstrap Configuration for the CNS Zero Touch Solution

Creating a Generic Bootstrap Configuration

Configuration Examples for CNS Zero Touch

Configuring PPP on a Serial Interface Using the CNS Zero Touch Solution: Example

Configuring PPP on an Asynchronous Interface Using the CNS Zero Touch Solution: Example

Configuring HDLC on a Serial Interface Using the CNS Zero Touch Solution: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

cli (cns)

cns config connect-intf

cns connect

cns template connect

config-cli

discover (cns)

line-cli

template (cns)


CNS Zero Touch



Note The CNS Zero Touch feature provides enhancements to the CNS Flow-Through Provisioning feature introduced in Cisco IOS Release 12.2(8)T. As part of this feature enhancement, the following commands have been replaced by new commands:

The cns config connect-intf command is replaced by the cns connect and cns template connect commands.

The config-cli and line-cli commands are replace by the cli (cns) command.


Cisco Networking Services (CNS) technology provides the infrastructure for automated configuration of large numbers of network devices. Based on CNS event and configuration agents, it eliminates the need for an onsite technician to initialize the devices. The CNS Zero Touch feature provides a zero touch deployment solution where the router contacts a CNS configuration engine to retrieve its full configuration automatically. This capability is made possible through a single generic bootstrap configuration file common across all service provider end customers subscribing to the services. Within the CNS framework, customers can create this generic bootstrap configuration without device-specific or network-specific information such as interface type, line type, or controller type (if applicable).

Feature History for the CNS Zero Touch Feature

Release
Modification

12.3(9)

This feature was introduced.


Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

Information About CNS Zero Touch

How to Create a Generic Bootstrap Configuration for the CNS Zero Touch Solution

Configuration Examples for CNS Zero Touch

Additional References

Command Reference

Information About CNS Zero Touch

To use the CNS Zero Touch feature, you should understand the following concepts:

Benefits of CNS Zero Touch

How the CNS Zero Touch Feature Works

Benefits of CNS Zero Touch

The CNS Zero Touch feature provides the following benefits:

Ensures consistent CNS commands between Cisco IOS Release 12.3 and 12.3 T.

Use of a channel service unit (E1 or T1 controller) is allowed.

How the CNS Zero Touch Feature Works


Note As part of the CNS Zero Touch feature, the following commands have been replaced by new commands:

The cns config connect-intf command is replaced by the cns connect and cns template connect commands.

The config-cli and line-cli commands are replace by the cli (cns) command.


The CNS connect functionality is configured with a set of CNS connect templates. A CNS connect profile is created for connecting to the CNS configuration engine and to implement the CNS connect templates on a CPE router. CNS connect variables can be used as placeholders within a CNS connect template configuration. These variables, such as the active DLCI, are substituted with real values before the CNS connect templates are sent to the router's parser.

To use the zero touch functionality, the router that is to be initialized must have a generic bootstrap configuration. This configuration includes CNS connect templates, CNS connect profiles, and the cns config initial command. This command initiates the CNS connect function.

The CNS connect functionality performs multiple ping iterations through the router's interfaces and lines, as well as any available controllers. For each iteration, the CNS connect function attempts to ping the CNS configuration engine. If the ping is successful, the pertinent configuration information can be downloaded from the CNS configuration engine. If connectivity to the CNS configuration engine is unsuccessful, the CNS connect function removes the configuration applied to the selected interface, and the CNS connect process restarts with the next available interface specified by the CNS connect profile.

How to Create a Generic Bootstrap Configuration for the CNS Zero Touch Solution

This section contains the following procedure:

Creating a Generic Bootstrap Configuration

Creating a Generic Bootstrap Configuration

Perform this task to create a bootstrap configuration for the CNS zero touch solution.

SUMMARY STEPS

1. enable

2. configure terminal

3. cns template connect name

4. cli config-text

5. Repeat Step 4 as needed.

6. exit

7. Repeat Step 3 to Step 6 as needed.

8. cns connect name [ping-interval interval-seconds] [retries number-retries] [timeout timeout-seconds] [sleep sleep-seconds]

9. discover {line line-type | controller controller-type | interface [interface-type]}
or
template name

10. Repeat Step 9 as needed.

11. Repeat Step 8 to Step 10 as needed.

12. cns config initial {ip-address | host-name} [encrypt] [port-number] [page page] [syntax-check] [no-persist] [source ip-address] [event] [inventory]

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

cns template connect name

Example:

Router(config)# cns template connect template-1

Enters CNS template connect configuration mode and defines the name of a CNS connect template.

Step 4 

cli config-text

Example:

Router(config-templ-conn)# cli commnand-1

Specifies the command lines of a CNS connect template.

Step 5 

Repeat Step 4 as needed.

Step 6 

exit

Example:

Router(config-templ-conn)# exit

Exits CNS template connect configuration mode and completes the configuration of a CNS connect template.

Note Entering exit is required. This requirement was implemented to prevent accidentally entering a command without the cli command.

Step 7 

Repeat Step 3 to Step 6 as needed.

Step 8 

cns connect name [ping-interval interval-seconds] [retries number-retries] [timeout timeout-seconds] [sleep sleep-seconds]

Example:

Router(config)# cns connect profile-1

Enters CNS connect configuration mode and defines the parameters of a CNS connect profile for connecting to the CNS configuration engine.

Step 9 

discover {line line-type | controller controller-type | interface [interface-type]}


or

template name

Example:

Router(config-cns-conn)# discover interface serial
Router(config-cns-conn)# template template-1

The discover command defines the interface parameters within a CNS connect profile for connecting to the CNS configuration engine.

The template command specifies a list of CNS connect templates within a CNS connect profile to be applied to a router's configuration.

Step 10 

Repeat Step 9 as needed.

Step 11 

Repeat Step 8 to Step 10 as needed.

Step 12 

cns config initial {ip-address | host-name} [encrypt] [port-number] [page page] [syntax-check] [no-persist] [source ip-address] [event] [inventory]

Example:

Router(config)# cns config initial 10.1.1.1

Initiates the CNS connect functionality.

Configuration Examples for CNS Zero Touch

This section provides the following configuration examples:

Configuring PPP on a Serial Interface Using the CNS Zero Touch Solution: Example

Configuring PPP on an Asynchronous Interface Using the CNS Zero Touch Solution: Example

Configuring HDLC on a Serial Interface Using the CNS Zero Touch Solution: Example

Configuring PPP on a Serial Interface Using the CNS Zero Touch Solution: Example

The following example shows the bootstrap configuration for configuring Point-to-Point Protocol (PPP) on a serial interface:

cns template connect ppp-serial
 cli ip address negotiated
 cli encapsulation ppp
 cli ip directed-broadcast
 cli no keepalive
 exit

cns template connect ip-route
 cli ip route 0.0.0.0 0.0.0.0 ${next-hop}
 exit

cns connect serial-ppp ping-interval 1 retries 1
 discover interface serial
 template ppp-serial
 template ip-route

hostname 26ML
cns config initial 10.1.1.1 no-persist inventory

Configuring PPP on an Asynchronous Interface Using the CNS Zero Touch Solution: Example

The following example shows the bootstrap configuration for configuring Point-to-Point Protocol (PPP) on an asynchronous interface:

cns template connect async
 cli modem InOut
 .
 .
 .
 exit

cns template connect async-interface
 cli encapsulation ppp
 cli ip unnumbered FastEthernet0/0
 cli dialer rotary-group 0
 exit

cns template connect ip-route
 cli ip route 0.0.0.0 0.0.0.0 ${next-hop}
 exit

cns connect async
 discover line Async
 template async
 discover interface
 template async-interface
 template ip-route

hostname async-example
cns config initial 10.1.1.1 no-persist inventory

Configuring HDLC on a Serial Interface Using the CNS Zero Touch Solution: Example

The following example shows the bootstrap configuration for configuring High-Level Data Link Control (HDLC) on a serial interface:

cns template connect hdlc-serial
 cli ip address slarp retry 1
 exit

cns template connect ip-route
 cli ip route 0.0.0.0 0.0.0.0 ${next-hop}
 exit

cns connect hdlc-serial ping-interval 1 retries 1
 discover interface serial
 template hdlc-serial
 template ip-route

hostname tira-36V
cns config initial 10.1.1.1 no-persist inventory

Additional References

The following sections provide references related to the CNS Zero Touch feature.

Related Documents

Related Topic
Document Title

Commands for CNS

Cisco IOS Configuration Fundamentals and Network Management Command Reference, Release 12.3 T

CNS Flow-Through Provisioning feature

CNS Flow-Through Provisioning, Cisco IOS Release 12.2(8)T feature module

CNS Frame Relay Zero Touch feature

CNS Frame Relay Zero Touch, Cisco IOS Release 12.3(8)T feature module


Standards

Standards
Title

None


MIBs

MIBs
MIBs Link

None

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFCs
Title

None


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents only modified commands.

cli (cns)

cns config connect-intf

cns connect

cns template connect

config-cli

discover (cns)

line-cli

template (cns)

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.

cli config-text

no cli config-text

Syntax Description

config-text

Command line to be included in a CNS connect template.


Defaults

No command lines are specified in the CNS connect template.

Command Modes

CNS template connect configuration

Command History

Release
Modification

12.3(2)XF

This command was introduced.

12.3(8)T

This command was integrated into Cisco IOS Release 12.3(8)T.

12.3(9)

This command was integrated into Cisco IOS Release 12.3(9). The CNS connect variable ${dlci} is not supported in this release.


Usage Guidelines

First 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.


Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the config-cli and line-cli commands are replaced by the cli (cns) command.


The command lines specified using the cli command can include CNS connect variables (see Table 1). 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.


Note When creating a CNS connect template, you must enter the exit command to complete the configuration of the template and exit from CNS template connect configuration mode. This requirement was implemented to prevent accidentally entering a command without the cli command.


Table 1 Summary of the CNS Connect Variables

Variable
Description

${line}

The line type defined by the associated discover line line-type command.

${controller}

The controller type defined by the associated discover controller controller-type command.

${interface}

The interface type defined by the associated discover interface command.

${dlci}

The active DLCI defined by the associated discover dlci command.

${next-hop}

The next hop interface. This variable is identical to the ${interface} variable unless the discover dlci command has been configured. In this case, the ${next-hop} variable is identical to the ${interface}.{subinterface} variable, where the {subinterface} variable is specified by the discover dlci command.

The ${next-hop} variable should only be used in the CNS connect templates after the last discover command has been entered.

A typical use of this variable is to allow the default IP route to be configured to send traffic towards the CNS configuration engine. Note that the CNS configuration engine may not be on the same LAN as the router. Therefore, configuring a route to the CNS configuration engine may require deployment-specific knowledge. Common practice is to define a default route to the interface using the ip route command (for example, cli ip route 0.0.0.0 0.0.0.0 ${next-hop}).

$$

A literal substitution of the $ symbol.



Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the & variable is replaced by the ${interface} variable.


Examples

The 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

Command
Description

cns connect

Enters CNS connect configuration mode and defines the parameters of a CNS connect profile for connecting to the CNS configuration engine.

cns template connect

Enters CNS template connect configuration mode and defines the name of a CNS connect template.

discover (cns)

Defines the interface parameters within a CNS connect profile for connecting to the CNS configuration engine.

template (cns)

Specifies a list of CNS connect templates within a CNS connect profile to be applied to a router's configuration.


cns config connect-intf


Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the cns config connect-intf command is replaced by the cns connect and cns template connect commands. See the cns connect and cns template connect commands for more information.


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.

12.3(8)T

This command was replaced by the cns connect and cns template connect commands.

12.3(9)

This command was replaced by the cns connect and cns template connect commands.


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 configuration 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 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 & ipaddress command generates the cns id FastEthernet0/0 ipaddress command.

Examples

In the following example, the user connects to a configuration engine using the 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
.
.
.
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

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 connect

To 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 [ping-interval interval-seconds] [retries number-retries] [timeout timeout-seconds] [sleep sleep-seconds]

no cns connect name [ping-interval interval-seconds] [retries number-retries] [timeout timeout-seconds] [sleep sleep-seconds]

Syntax Description

name

The name of the CNS connect profile to be configured.

ping-interval interval-seconds

(Optional) Sets the interval (in seconds) between each successive attempt to ping the CNS configuration engine. The default value is 10 seconds.

retries number-retries

(Optional) Sets the number of times the CNS connect function will try to ping the CNS configuration engine. The default value is 3.

timeout timeout-seconds

(Optional) Sets the amount of time (in seconds) after which an interface is no longer used for ping attempts. The default value is 120 seconds.

sleep sleep-seconds

(Optional) Sets the amount of time (in seconds) before which the first ping is attempted for each interface. This option provides time for the far end of a link to stabilize. The default value is 0 seconds.


Defaults

No CNS connect profiles are defined.

Command Modes

Global configuration

Command History

Release
Modification

12.3(2)XF

This command was introduced.

12.3(8)T

This command was integrated into Cisco IOS Release 12.3(8)T.

12.3(9)

This command was integrated into Cisco IOS Release 12.3(9).


Usage Guidelines

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:

discover

template

A CNS connect profile specifies the discover commands and associated template commands that are to be applied to a router's configuration. When multiple discover and template commands are configured in a CNS connect profile, they are processed in the order in which they are entered.


Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the cns config connect-intf command is replaced by the cns connect and cns template connect commands.


Examples

The 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
Router (config)#

In this example, the following sequence of events occurs for each serial interface when the cns connect profile-1 command is processed:

1. Enter interface configuration mode and apply all commands in the template-1 template to the router's configuration.

2. Try to ping the CNS configuration engine.

3. If the ping is successful, then download pertinent configuration information from the CNS configuration engine and exit. The cns connect profile-1 command has completed its process.

4. If the ping is unsuccessful, enter interface configuration mode and remove all commands in the template-1 template from the router's configuration. The cns connect profile-1 command has failed to retrieve any configuration information from the CNS configuration engine.

Related Commands

Command
Description

cli (cns)

Specifies the command lines of a CNS connect template.

cns template connect

Enters CNS template connect configuration mode and defines the name of a CNS connect template.

discover (cns)

Defines the interface parameters within a CNS connect profile for connecting to the CNS configuration engine.

template (cns)

Specifies a list of CNS connect templates within a CNS connect profile to be applied to a router's configuration.


cns template connect

To 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.

cns template connect name

no cns template connect name

Syntax Description

name

The name of the CNS connect template to be configured.


Defaults

No CNS connect templates are defined.

Command Modes

Global configuration

Command History

Release
Modification

12.3(2)XF

This command was introduced.

12.3(8)T

This command was integrated into Cisco IOS Release 12.3(8)T.

12.3(9)

This command was integrated into Cisco IOS Release 12.3(9).


Usage Guidelines

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.


Note When creating a CNS connect template, you must enter the exit command to complete the configuration of the template and exit from CNS template connect configuration mode. This requirement was implemented to prevent accidentally entering a command without the cli command.



Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the cns config connect-intf command is replaced by the cns connect and cns template connect commands.


Examples

The 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

Command
Description

cli (cns)

Specifies the command lines of a CNS connect template.

cns connect

Enters CNS connect configuration mode and defines the parameters of a CNS connect profile for connecting to the CNS configuration engine.

discover (cns)

Defines the interface parameters within a CNS connect profile for connecting to the CNS configuration engine.

template (cns)

Specifies a list of CNS connect templates within a CNS connect profile to be applied to a router's configuration.


config-cli


Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the config-cli command is replaced by the cli (cns) command. See the cli (cns) command for more information.


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 command lines are specified to configure the interface.

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.

12.3(8)T

This command was replaced by the cli (cns) command.

12.3(9)

This command was replaced by the cli (cns) command.


Usage Guidelines

Begin 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:

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 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
.
.
.
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

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.


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

line line-type

Line type to be used for connecting to the CNS configuration engine.

When the line line-type keyword and argument are specified, all the lines that create an interface that match the specified line-type argument are discovered.

The CNS connect templates associated with the discover line line-type command are applied in line configuration mode.

controller controller-type

Controller type to be used for connecting to the CNS configuration engine.

When the controller controller-type keyword and argument are specified, all the controllers that create an interface that match the specified controller-type argument are discovered.

The CNS connect templates associated with the discover controller controller-type command are applied in controller configuration mode.

interface [interface-type]

Interface type to be used for connecting to the CNS configuration engine.

If the discover interface interface-type command is the first discover command configured in a CNS connect profile, then the interfaces that match the specified interface-type argument are discovered.

If the discover interface interface-type command is configured after the discover line line-type or discover controller controller-type commands in a CNS connect profile, then the specified interface-type argument is ignored. Instead, the CNS connect templates associated with the discover interface command are applied to all the interfaces associated with the preceding discover line line-type or discover controller controller-type commands.

The CNS connect templates associated with the discover interface interface-type command are applied in interface configuration mode.

dlci

Active DLCIs to be used for connecting to the CNS configuration engine.

When this keyword is defined, all the active DLCIs are discovered on the interface specified by the preceding discover interface interface-type command. A Frame Relay LMI message will return a list of active DLCIs.

Active DLCIs can only be discovered on interfaces configured with Frame Relay. Therefore, the location of the discover dlci command in a CNS connect profile is important. It must be entered after the interfaces have been configured with Frame Relay.

The CNS connect templates associated with the discover dlci command are applied in subinterface (point-to-point) configuration mode.

Defines the CNS connect variable ${dlci} and ${next-hop}.

Note Any Cisco IOS command that requires knowledge of the active DLCIs must be configured after the discover dlci command.

subinterface subinterface-number

(Optional) Point-to-point subinterface number used to perform a search for active DLCIs. If the number is not specified, the default value is 9999.


Defaults

No interface parameters within a CNS connect profile are defined.

Command Modes

CNS connect configuration

Command History

Release
Modification

12.3(2)XF

This command was introduced.

12.3(8)T

This command was integrated into Cisco IOS Release 12.3(8)T.

12.3(9)

This command was integrated into Cisco IOS Release 12.3(9). The dlci subinterface subinterface-number keywords and argument, and the CNS connect variable ${dlci} are not supported in this release.


Usage Guidelines

First 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:

discover

template

A CNS connect profile specifies the discover commands and associated template commands that are to be applied to a router's configuration. The first discover command in a CNS connect profile defines the scope of the interfaces for which to search and use 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 template commands are configured in a CNS connect profile, they are processed in the order in which they are entered.

Table 2 provides a summary of the interface parameters that can be defined using the discover command.

Table 2 Summary of the discover Commands

discover Command
Description
Associated CNS Connect Variable
Configuration Mode in Which CNS Connect Templates Are Applied
Prerequisite discover Command
Required Subsequent discover Command

discover line line-type

Discovers all the lines that create an interface that match the specified line-type argument.

${line}

Line

discover interface interface-type

discover controller controller-type

Discovers all the controllers that create an interface that match the specified controller-type argument.

${controller}

Controller

discover interface interface-type

discover interface [interface-type]

If this is the first discover command configured, then all the interfaces that match the specified interface-type argument are discovered.

If configured after the discover line line-type or discover controller controller-type commands, then the specified interface-type argument is ignored.

${interface}

${next-hop}

Interface

discover dlci [subinterface subinterface-number]

Discovers all active DLCIs on the interface specified by the preceding discover interface command.

${dlci}

${next-hop}

Subinterface (point-to-point)

discover interface interface-type


CNS connect variables can be used as placeholders within a CNS connect template configuration. Each variable is defined by an associated discover command (see Table 2 and Table 3). 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.

Table 3 Summary of the CNS Connect Variables

Variable
Description

${line}

The line type defined by the associated discover line line-type command.

${controller}

The controller type defined by the associated discover controller controller-type command.

${interface}

The interface type defined by the associated discover interface command.

${dlci}

The active DLCI defined by the associated discover dlci command.

${next-hop}

The next hop interface. This variable is identical to the ${interface} variable unless the discover dlci command has been configured. In this case, the ${next-hop} variable is identical to the ${interface}.{subinterface} variable, where the {subinterface} variable is specified by the discover dlci command.

The ${next-hop} variable should only be used in the CNS connect templates after the last discover command has been entered.

A typical use of this variable is to allow the default IP route to be configured to send traffic towards the CNS configuration engine. Note that the CNS configuration engine may not be on the same LAN as the router. Therefore, configuring a route to the CNS configuration engine may require deployment-specific knowledge. Common practice is to define a default route to the interface using the ip route command (for example, cli ip route 0.0.0.0 0.0.0.0 ${next-hop}).

$$

A literal substitution of the $ symbol.



Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the & variable is replaced by the ${interface} variable.


Examples

The 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 EG command is processed:

1. Enter controller configuration mode and apply all commands in the timeslot-1 template to the router's configuration.

2. For each interface associated with each T1 controller:

a. Enter interface configuration mode and apply all commands in the frame template to the router's configuration.

b. Try to ping the CNS configuration engine.

c. If the ping is successful, then download pertinent configuration information from the CNS configuration engine and exit. The cns connect EG command has completed its process.

d. If the ping is unsuccessful, enter interface configuration mode and remove all commands in the frame template from the router's configuration.

3. Enter controller configuration mode and remove all commands in the timeslot-1 template from the router's configuration. The cns connect EG command has failed to retrieve any configuration information from the CNS configuration engine.

Related Commands

Command
Description

cli (cns)

Specifies the command lines of a CNS connect template.

cns connect

Enters CNS connect configuration mode and defines the parameters of a CNS connect profile for connecting to the CNS configuration engine.

cns template connect

Enters CNS template connect configuration mode and defines the name of a CNS connect template.

template (cns)

Specifies a list of CNS connect templates within a CNS connect profile to be applied to a router's configuration.


line-cli


Note Effective with Cisco IOS Releases 12.3(8)T and 12.3(9), the line-cli command is replaced by the cli (cns) command. See the cli (cns) command for more information.


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 command lines are specified to configure modem lines.

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.

12.3(8)T

This command was replaced by the cli (cns) command.

12.3(9)

This command was replaced by the cli (cns) command.


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 CNS Connect-interface configuration (config-cns-conn-if) mode. 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 config-cli ip route 0.0.0.0 0.0.0.0 & command generates the config ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 command.

The cns id & ipaddress command generates the cns id FastEthernet0/0 ipaddress command.

Examples

The 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 rotart-group 0
Router(config-cns-conn-if)# line-cli modem InOut
Router(config-cns-conn-if)# line-cli
.
.
.
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

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.


template (cns)

To specify a list of Cisco Networking Services (CNS) connect templates within a CNS connect profile to be applied to a router's configuration, use the template command in CNS connect configuration mode. To disable this CNS connect template, use the no form of this command.

template name [...name]

no template name [...name]

Syntax Description

name

Name of the CNS connect template to be applied to a router's configuration.

The ellipsis (...) in the command syntax indicates that the command input can include multiple name arguments. Multiple name arguments are delimited by a single space.


Defaults

No CNS connect templates are specified.

Command Modes

CNS connect configuration

Command History

Release
Modification

12.3(2)XF

This command was introduced.

12.3(8)T

This command was integrated into Cisco IOS Release 12.3(8)T.

12.3(9)

This command was integrated into Cisco IOS Release 12.3(9).


Usage Guidelines

First 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:

discover

template

A CNS connect profile specifies the discover commands and associated template commands that are to be applied to a router's configuration. The template command specifies the list of CNS connect templates that is to be applied to a router's configuration. The templates in the list are applied one at a time. That is, when the template command is processed, the first template in the list is applied to the router's configuration. The router then tries to ping the CNS configuration engine. If the ping fails, then the first template in the list is removed from the router's configuration and the second template in the list is applied and so on.

The configuration mode in which the CNS connect templates are applied is specified by the immediately preceding discover command. (If there are no preceding discover commands, the templates are applied in global configuration mode.) When multiple discover and template commands are configured in a CNS connect profile, they are processed in the order in which they are entered.

Examples

The 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 temp-A1 temp-A2
Router (config-cns-conn)# template temp-B1 temp-B2
Router (config-cns-conn)# exit
Router (config)#

In this example, the following sequence of events occur for all serial interfaces when the cns connect profile-1 command is processed. Assume all ping attempts to the CNS configuration engine are unsuccessful.

1. Enter interface configuration mode and apply all commands in the temp-A1 template to the router's configuration.

2. Enter interface configuration mode and apply all commands in the temp-B1 template to the router's configuration.

3. Try to ping the CNS configuration engine.

4. Enter interface configuration mode and remove all commands in the temp-B1 template from the router's configuration.

5. Enter interface configuration mode and apply all commands in the temp-B2 template to the router's configuration.

6. Try to ping the CNS configuration engine.

7. Enter interface configuration mode and remove all commands in the temp-B2 template from the router's configuration.

8. Enter interface configuration mode and remove all commands in the temp-A1 template from the router's configuration.

9. Enter interface configuration mode and apply all commands in the temp-A2 template to the router's configuration.

10. Enter interface configuration mode and apply all commands in the temp-B1 template to the router's configuration.

11. Try to ping the CNS configuration engine.

12. Enter interface configuration mode and remove all commands in the temp-B1 template from the router's configuration.

13. Enter interface configuration mode and apply all commands in the temp-B2 template to the router's configuration.

14. Try to ping the CNS configuration engine.

15. Enter interface configuration mode and remove all commands in the temp-B2 template from the router's configuration.

16. Enter interface configuration mode and remove all commands in the temp-A2 template from the router's configuration.

Related Commands

Command
Description

cli (cns)

Specifies the command lines of a CNS connect template.

cns connect

Enters CNS connect configuration mode and defines the parameters of a CNS connect profile for connecting to the CNS configuration engine.

cns template connect

Enters CNS template connect configuration mode and defines the name of a CNS connect template.

discover (cns)

Defines the interface parameters within a CNS connect profile for connecting to the CNS configuration engine.