cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1858
Views
5
Helpful
8
Replies

Understanding CNS

joemhemail
Level 1
Level 1

I am having a trouble understanding the Cisco documentation on CNS

From my understanding there are 3 major Cisco components to CNS:

1) A "configuration agent" - this is a new router that Cisco did minor

initial configurations on and has been shipped out to a remote location.

A "configuration agent" can have the added attribute of being an "inventory agent." This router will send out a request for another router to get him a configuration file from some file server.

2) An "image agent" - which is a currently working cisco router that will process the request from the configuration agent and request the configuration file from file server. An image agent must also be an "event agent."

3) An event agent - which is a currently working cisco router that is not necessarily an image agent. If the event agent is not an image agent, it just listens for the request from the image agent and pass the request on to the file server.

There can be a minimum of 2 routers in this setup:

configuration agent (1 router) and a event agent/image agent (2nd router)

If there are any routers between the image agent and the file server, then

they must all be event agents in order for the process to work.

Is this correct????

Thanks in any advance for any help.

2 Accepted Solutions

Accepted Solutions

it is a while ago that I did some test with CNS, but this is a bit what I remember (and I hope it is correct..)

CNS configuration can be used in a 'Zero Touch Deployment' where you have a central server (like the 'Cisco Configuration Engine') that has a database where each device is uniquely identified and has additional information about the config and operating system of the device. The idea behind is that you can replace or rollout devices with a minimal configuration (CNS config) and the rest will be done automatically.

Before a new device is connected to the network it is 'tagged' with an ID from a device in the database and has just its initial CNS configuratio - no other configuration. When this new device connects to the network it can get all its configuration and operating system automatically - based on the information stored in the database.

The different kind of agents on a device (image agent, config agent, event agent) control which information or which tasks can be done and controlled on the device.

E.g the event agent can be used to communicate with the CNS Server (Configuration Engine) to get a new config.

The 'cns config partial' allows the device to get partial config updates.

If I remeber well in an CNS scenario config updates must be initiated from the device in the network. So the CNS Server (Configuration Engine) sends a data packet to the device to tell him it shall ask for a new config. The 'cns event' tells the device it is allowed to receive such packets from the CNS Server.

Here you can find more info about the Cisco Configuration Engine- which can give you a clue how to use the CNS configuration:

http://www.cisco.com/en/US/products/sw/netmgtsw/ps4617/tsd_products_support_series_home.html

View solution in original post

If a device is just configured with the 2 lines I mentioned in my previous post the CNS config agent is active. This means, if you connect this device to a network and power it on it boots, sends a DHCP request to get an IP address and if this is successfull it trys to contact the Config Server to get its initial config.

This process is driven by the device (ok the config agent on the device) and does not need to communicate over the Event Bus. But when a device should get partial config updates it needs to communicate over the Event Bus to trigger the partial config download. For this (partial config download) it needs the CNS event agent.

read this for 'cns config initial'

http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_02.html#wp1159407

for 'cns config partial' read here:

http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_02.html#wp1122718

for both links the 'Usage Guidelines' gives a good explanation.

View solution in original post

8 Replies 8

carenas123
Level 5
Level 5

Here is the URL for the CNS Configuration Agent follow the below guide it may help you for the further description

http://www.cisco.com/en/US/docs/ios/12_2t/12_2t2/feature/guide/ftcns_ca.html

That link actually sustains the confusion I have:

Router(config)# cns event

!...This is required for the router to request or receive incremental updates.

Router(config)# cns config partial

!...This is required for the router to request or receive updates.

I do not understand why the cns event command is required.

But the url is helpful in explaining some things.

Thank you

it is a while ago that I did some test with CNS, but this is a bit what I remember (and I hope it is correct..)

CNS configuration can be used in a 'Zero Touch Deployment' where you have a central server (like the 'Cisco Configuration Engine') that has a database where each device is uniquely identified and has additional information about the config and operating system of the device. The idea behind is that you can replace or rollout devices with a minimal configuration (CNS config) and the rest will be done automatically.

Before a new device is connected to the network it is 'tagged' with an ID from a device in the database and has just its initial CNS configuratio - no other configuration. When this new device connects to the network it can get all its configuration and operating system automatically - based on the information stored in the database.

The different kind of agents on a device (image agent, config agent, event agent) control which information or which tasks can be done and controlled on the device.

E.g the event agent can be used to communicate with the CNS Server (Configuration Engine) to get a new config.

The 'cns config partial' allows the device to get partial config updates.

If I remeber well in an CNS scenario config updates must be initiated from the device in the network. So the CNS Server (Configuration Engine) sends a data packet to the device to tell him it shall ask for a new config. The 'cns event' tells the device it is allowed to receive such packets from the CNS Server.

Here you can find more info about the Cisco Configuration Engine- which can give you a clue how to use the CNS configuration:

http://www.cisco.com/en/US/products/sw/netmgtsw/ps4617/tsd_products_support_series_home.html

That is what I was looking for, "the cns event tells the device it is allowed to receive such packets from the CNS Server."

And reading various documentation over and over and seeing that the cns event agent must be configured before any other cns agent.

Just a clarification, from my original post this statement is incorrect:

"If there are any routers between the image agent and the file server, then

they must all be event agents in order for the process to work. "

Cisco never says it to be true and the obvious scenario is if there was a non-Cisco device between the config engine and the config agent, then it would not work.

The Cisco documentation about the config agent does not always include the "cns event" command. But the Cisco documentation explicitly states that the event agent must be configured before any other cns agent.

You are correct, the config agent does not necessarily needs the event agent.

here is a link to see how CNS integrates in an environment with a 'Cisco Configuration Engine'

http://www.cisco.com/en/US/partner/docs/net_mgmt/configuration_engine/2.0/administration/guide/intro.html#wp1018277

the Config Server (e.g. Cisco Configuration Engine) has an 'Event Service' running - it is not listed in the above mentioned Figure but I would say it is in place where the 'Cisco Event Agent' is listed inside the block for the 'Config Server'. The Event Service works together with an 'Event Gateway' which enables event-based *communication* between Config Server and an event agent enabled device.

But

To have a device getting its initial config from a Config Server the minimal CNS config is a 2 liner (and does *not* need the event agent):

cns id hostname

cns config initial

where line 1 let the device identify itself on the Config Server with its hostname and line 2 tells the device to contact the Config Server to get its initial config.

In this scenario you do not need to have the cns event agent enabled - but when you want to do tasks that needs communication between the Config Server and the device it is necessary.

another link for CNS:

http://www.cisco.com/en/US/docs/ios/12_2sr/12_2sra/feature/guide/sr_cns.html#wp1050866

http://www.cisco.com/en/US/docs/ios/12_2sr/12_2sra/feature/guide/sr_cns.html#wp1050866

says:

CNS Event Agent

Although other CNS agents may be configured, no other CNS agents are operational until the cns event command is entered

but u say:

"In this scenario you do not need to have the cns event agent enabled"

I am confused, any help you can provide in this matter is greatly appreciated.

Best regards,

Joseph

If a device is just configured with the 2 lines I mentioned in my previous post the CNS config agent is active. This means, if you connect this device to a network and power it on it boots, sends a DHCP request to get an IP address and if this is successfull it trys to contact the Config Server to get its initial config.

This process is driven by the device (ok the config agent on the device) and does not need to communicate over the Event Bus. But when a device should get partial config updates it needs to communicate over the Event Bus to trigger the partial config download. For this (partial config download) it needs the CNS event agent.

read this for 'cns config initial'

http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_02.html#wp1159407

for 'cns config partial' read here:

http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_02.html#wp1122718

for both links the 'Usage Guidelines' gives a good explanation.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco