[c-nsp] Cisco CNS initial configuration

Eddie.Lindsay at synetrix.co.uk Eddie.Lindsay at synetrix.co.uk
Tue Dec 22 07:24:01 EST 2009


Hi,

I tried to do something similar a while ago and hit a brick wall on API documentation.  It would be nice to see some if available.

Regards,

Eddie
On 22 Dec 2009, at 12:04, Brett Wooldridge wrote:

> Hello list,
> 
> I am trying to build a provisioning solution that uses Cisco CNS' initial
> configuration facility.  Initial configuration is a facility by which a
> device, when booted with a minimal bootstrap obtains it's configuration via
> HTTP(S).  However, it seems there is scant documentation available on doing
> so.  Cisco provides documentation on how to configure a device's CNS agent
> for initial configuration, but no documentation on the internals of how that
> configuration is delivered.  The only solutions that seem capable of
> delivering initial configuration are Cisco's own products.  However, CNS and
> it's netconf-based XML schemas was meant to provide an "open" API to
> developers, provisioners, and engineers.
> 
> I have a device (a Cisco 3640) that is configured with an initial bootstrap,
> like so:
> 
> !
> Version 12.4
> !
> cns config connect-intf FastEthernet ping-interval 30 retries 3
> config-cli description Deployment test
> config-cli ip address dhcp
> config-cli no shutdown
> config-cli ip route 0.0.0.0 0.0.0.0
> exit
> !
> cns id string 12345678
> cns config initial 192.168.0.111 page /ciscocns
> !
> end
> 
> And when the device boots, it does indeed hit my web server running at
> 192.168.0.111 at the appropriate URL.  However, when I try to deliver an
> initial configuration, I get an error on the device saying that the XML is
> invalid.  Which is not surprising given that I've had to try to make an
> educated guess as to what the device is expecting.
> 
> What I'd like to do is blast a standard "startup-config", in standard form
> (same as obtained from 'show startup-config'), down to the device.  I am
> aware that the device is expecting netconf-like XML.  However, how exactly
> to encapsulate the configuration text in XML is where I seem to be failing.
> And therefore, I'm asking for some help here from anyone with CNS
> experience.
> 
> What I'm currently sending the device is this:
> 
> <?xml version=\"1.0\" encoding=\"UTF-8\"?>
> <rpc message-id="123" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
>    "xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <edit-config>
>        <target><startup/></target>
>        <default-operation>replace</default-operation>
>        <test-option>test-then-set</test-option>
>        <error-option>stop-on-error</error-option>
>        <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"
> xc:operation="replace">
>             <cli-config-data-block>
>                    ... config text here ...
>             </cli-config-data-block>
>    </edit-config>
> </rpc>
> 
> I know this is a rather esoteric question, that's why I'm dipping deep into
> the well of Cisco knownledge here.  Any ideas or suggestions?
> 
> TIA,
> Brett
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/

----------------------------------------------------------------------------------------------------------
Synetrix Holdings Limited
Tel: +44 (0)1252 405 600
www.synetrix.co.uk

Synetrix (Holdings) Limited is a limited company registered in England and Wales. Registered number: 0349 1956. VAT number: GB776 1259 07. Registered office: Synetrix House, 49-51 Victoria Road, Farnborough, Hampshire, GU14 7PA.

IMPORTANT NOTICE:
This message is intended solely for the use of the Individual or organisation to whom it is addressed. It may contain privileged or confidential information. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you should not use, copy, alter, or disclose the contents of this message. All information or opinions expressed in this message and/or any attachments are those of the author and are not necessarily those of Synetrix Holdings Limited. Synetrix Holdings Limited accepts no responsibility for loss or damage arising from its use, including damage from virus. 


More information about the cisco-nsp mailing list