Step 1 |
enable
|
Enables privileged EXEC mode.
|
Step 2 |
configure
terminal
SwitchDevice# configure terminal
|
Enters global configuration mode.
|
Step 3 |
cns template connect
name
SwitchDevice(config)# cns template connect template-dhcp
|
Enters CNS
template connect configuration mode, and specifies the name of the CNS connect
template.
|
Step 4 |
cli
config-text
SwitchDevice(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 5 |
Repeat Steps 3
to 4 to configure another CNS connect template.
|
|
Step 6 |
exit
SwitchDevice(config)# exit
|
Returns to
global configuration mode.
|
Step 7 |
cns connect
name
[retries
number] [retry-interval
seconds] [sleep
seconds] [timeout
seconds]
SwitchDevice(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 8 |
discover {controller
controller-type |
dlci
[subinterface
subinterface-number] |
interface [interface-type] |
line
line-type}
SwitchDevice(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 9 |
template
name
[...
name]
SwitchDevice(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 10 |
Repeat Steps 8
to 9 to specify more interface parameters and CNS connect templates in the CNS
connect profile.
|
|
Step 11 |
exit
SwitchDevice(config-cns-conn)# exit
|
Returns to
global configuration mode.
|
Step 12 |
hostname
name
SwitchDevice(config)# hostname device1
|
Enters the
hostname for the
switch.
|
Step 13 |
ip route
network-number
RemoteSwitchDevice(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 14 |
cns id
interface
num {dns-reverse |
ipaddress |
mac-address} [event] [image]
RemoteSwitchDevice(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 15 |
cns id {hardware-serial |
hostname |
string
string |
udi}
[event] [image]
RemoteSwitchDevice(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 16 |
cns config initial
{hostname |
ip-address} [port-number] [event] [no-persist] [page
page] [source
ip-address] [syntax-check]
RemoteSwitchDevice(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 17 |
end
SwitchDevice(config)# end
|
Returns to
privileged EXEC mode.
|
Step 18 |
show running-config
SwitchDevice# show running-config
|
|
Step 19 |
copy running-config
startup-config
SwitchDevice# copy running-config startup-config
|
(Optional) Saves your entries
in the configuration file.
|