Step 1 | configure terminal
Example:
Switch# configure terminal
| Enters the global configuration mode.
|
Step 2 | cns template connect
name
Example:
Switch(config)# cns template connect template-dhcp
|
Enters CNS template connect configuration mode, and specifies the name of the CNS connect template.
|
Step 3 | cli
config-text
Example:
Switch(config-tmpl-conn)# cli ip address dhcp
|
Enters a command line for the CNS connect template. Repeat this step for each command line in the template.
|
Step 4 | Repeat Steps 2 to 3 to configure another CNS connect template.
|
|
Step 5 | exit
Example:
Switch(config)# exit
|
Returns to global configuration mode.
|
Step 6 | cns connect
name [retries
number] [retry-interval
seconds] [sleep
seconds] [timeout
seconds]
Example:
Switch(config)# cns connect dhcp
|
Enters CNS connect configuration mode, specifies the name of the CNS connect profile, and defines the profile parameters. The switch uses the CNS connect profile to connect to the Configuration Engine.
-
Enter the name of the CNS connect profile.
-
(Optional) For retries
number, enter the number of connection retries. The
range is 1 to 30. The default is 3.
-
(Optional) For retry-interval
seconds, enter the interval between successive
connection attempts to the Configuration Engine. The range is 1 to 40
seconds. The default is 10 seconds.
-
(Optional) For sleep
seconds, enter the amount of time before which the
first connection attempt occurs. The range is 0 to 250 seconds. The default
is 0.
-
(Optional) For timeout
seconds, enter the amount of time after which the
connection attempts end. The range is 10 to 2000 seconds. The default
is 120.
|
Step 7 | discover {controller
controller-type | dlci [subinterface
subinterface-number] | interface [interface-type]
| line
line-type}
Example:
Switch(config-cns-conn)# discover interface gigabitethernet
|
Specifies the interface parameters in the CNS connect profile.
-
For controller controller-type, enter the
controller type.
-
For dlci, enter the active data-link connection
identifiers (DLCIs).
(Optional) For subinterface
subinterface-number, specify the point-to-point
subinterface number that is used to search for active DLCIs.
-
For interface [interface-type], enter
the type of interface.
-
For line
line-type, enter the line type.
|
Step 8 | template
name [... name]
Example:
Switch(config-cns-conn)# template template-dhcp
|
Specifies the list of CNS connect templates in the CNS connect profile to be applied to the switch configuration. You can specify more than one template.
|
Step 9 | Repeat Steps 7 to 8 to specify more interface parameters and CNS connect templates
in the CNS connect profile.
|
|
Step 10 | exit
Example:
Switch(config-cns-conn)# exit
|
Returns to global configuration mode.
|
Step 11 | hostname
name
Example:
Switch(config)# hostname device1
|
Enters the hostname for the switch.
|
Step 12 | ip route
network-number
Example:
RemoteSwitch(config)# ip route 172.28.129.22 255.255.255.255 11.11.11.1
|
(Optional) Establishes a static route to the Configuration Engine whose IP address
is network-number.
|
Step 13 | cns id
interface num {dns-reverse | ipaddress |
mac-address} [event] [image]
Example:
RemoteSwitch(config)# cns id GigabitEthernet1/0/1 ipaddress
|
(Optional) Sets the unique EventID or ConfigID used by the Configuration Engine. If you enter this command, do not enter the cns id {hardware-serial | hostname |
string string |
udi} [event] [image] command.
-
For interface num, enter the type of interface. For
example, ethernet, group-async, loopback, or virtual-template. This setting
specifies from which interface the IP or MAC address should be retrieved to
define the unique ID.
-
For {dns-reverse | ipaddress |
mac-address}, enter
dns-reverse to retrieve the hostname and assign
it as the unique ID, enter ipaddress to use the IP
address, or enter
mac-address
to use the MAC address as the unique ID.
-
(Optional) Enter event to set the ID to be the
event-id value used to identify the switch.
-
(Optional) Enter image to set the ID to be the
image-id value used to identify the switch.
Note
|
If both the event and image
keywords are omitted, the image-id value is used to identify the switch.
|
|
Step 14 | cns id {hardware-serial | hostname |
string string |
udi} [event] [image]
Example:
RemoteSwitch(config)# cns id hostname
| (Optional) Sets the unique EventID or ConfigID used by the Configuration Engine. If you enter this command, do not enter the cns id
interface num {dns-reverse | ipaddress |
mac-address} [event] [image] command.-
For {
hardware-serial
|
hostname
|
string
string
|
udi
}, enter
hardware-serial
to set the switch serial number as the unique ID, enter
hostname
(the default) to select the switch hostname as the unique ID, enter
an arbitrary text string for string
string as the unique ID, or enter
udi to set the unique device identifier
(UDI) as the unique ID.
|
Step 15 | cns config initial {hostname | ip-address}
[port-number] [event] [no-persist]
[page
page] [source
ip-address] [syntax-check]
Example:
RemoteSwitch(config)# cns config initial 10.1.1.1 no-persist
|
Enables the Cisco IOS agent, and initiates an initial configuration.
-
For {hostname | ip-address}, enter the
hostname or the IP address of the configuration server.
-
(Optional) For port-number, enter the port number
of the configuration server. The default port number is 80.
-
(Optional) Enable event for configuration success,
failure, or warning messages when the configuration is finished.
-
(Optional) Enable no-persist to suppress the
automatic writing to NVRAM of the configuration pulled as a result of
entering the cns config initial global
configuration command. If the no-persist keyword
is not entered, using the cns config initial
command causes the resultant configuration to be automatically written to
NVRAM.
-
(Optional) For page
page, enter the web page of the initial configuration.
The default is /Config/config/asp.
-
(Optional) Enter source
ip-address to use for source IP address.
-
(Optional) Enable syntax-check to check the syntax
when this parameter is entered.
Note
|
Though visible in the command-line help string, the
encrypt, status
url, and inventory keywords are
not supported.
|
|
Step 16 | end
Example:
RemoteSwitch(config)# end
|
Returns to privileged EXEC mode.
|