Understanding CNS

Answered Question
Jan 5th, 2009

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.

I have this problem too.
0 votes
Correct Answer by Martin Ermel about 7 years 11 months ago

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.

Correct Answer by Martin Ermel about 7 years 11 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
joemhemail Mon, 01/12/2009 - 17:22

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

Correct Answer
Martin Ermel Tue, 01/13/2009 - 08:02

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

joemhemail Tue, 01/13/2009 - 15:15

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.

joemhemail Tue, 01/13/2009 - 16:43

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.

Martin Ermel Wed, 01/14/2009 - 07:02

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

joemhemail Wed, 01/14/2009 - 16:18

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

Correct Answer
Martin Ermel Thu, 01/15/2009 - 01:30

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.

Actions

This Discussion