cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
17767
Views
35
Helpful
18
Comments
aradford
Cisco Employee
Cisco Employee

Starting out with network automation

Many customers are asking how to get started with network automation. There is an expectation from the rest of the business that the networking team will be changing its operational model and becoming more agile. How can you get started? One easy way is automating the deployment of new devices.  Network Plug and Play (PnP) is a great way to get started. It is a foundational element of the Cisco Digital Network Architecture (DNA).

What is Plug and Play?

PnP is a mechanism to automate deployment of devices. Simply plug a device (router, switch, access point) into the network. It discovers the controller (more on how that happens later), and the automation begins.  A few minutes later, your device is upgraded and/or configured and operational.

Key Components

A PnP solution has four main components:

  1. An agent, which resides in the IOS software, that looks for a “Controller” when the device is first booted up.
  2. A PnP Server, which is an application running on APIC-EM (our free SDN controller).
  3. The PnP protocol, that allows the agent and the Controller to communicate.
  4. An optional mobile application, which runs on Android and iOS devices.

image1.png

Discovering the Controller

The first thing that needs to happen is for the device to get in contact with the controller. There are five mechanisms you can use to make this work:

  1. DHCP server, using option 43 which is set to the IP Address of the controller
  2. DHCP server, using a DNS domain name.  The device will do a dns lookup of pnpserver.<your domain>
  3. Cloud redirection, which is currently in controlled availability
  4. USB key. This can be used for routers and remote devices, where some initial configuration of the WAN connection is required (e.g. MPLS configuration).
  5. Smart Phone app (iPhone/Android).  A special console cable connects to the device and downloads the bootstrap configuration.  The app can also scan the barcode to create a rule for the device.

image2.png

Getting Started

Let us go through all the steps to get a switch up and running. The first step is to create an initial configuration file for the switch and upload it to APIC-EM. Plug and Play will require a set of device rules to map a device serial number to a configuration file and/or a software image.  To make it easier to organize these rules (there might be hundreds of them) we use a “Project”. A project is much like a folder on your computer for organizing files.  In this example the project is called Sydney.  It is created empty, without any rules, like an empty folder on your computer.

image3.png

Rules are created inside a project.  A rule defines the configuration file and potentially a software image to be sent to the device.  If you provide a software image the device will be upgraded. Devices are identified by their serial number. Bootstrap is a small piece of configuration to get the device onto the network (used with the mobile device application). It is not required in other scenarios.

image4.png

Click “add” to finish this step.  Notice “Device Certificate” has been selected. A PKI certificate will be deployed on the device for secure communication between the device and PnP server.  APIC-EM also has a built in PKI server, which is used to create and manage this device certificate.

image5.png

With the above steps completed, our rule is in place. When the device is plugged in, it contacts the controller, initiating the Plug and Play process.

image6.png

A few minutes later, the device is up and operational on the network.

image7.png

What Next?

There was still a bit of human activity in provisioning this device.  I needed to create the initial configuration file, upload it to the controller, and create a rule/project.  Oh, and I needed to plug the device in and power it on.  All except the last step I could automate.  The next blog Network Automation with Plug and Play (PnP) – Part 2 will look at how to automate those steps via the rich API in APIC-EM.

In the meantime, if you would like to learn more about this, you could visit Cisco Devnet . DevNet has further explanations about this. Also, we have a Github repository where you can get examples related to PnP.

Thanks for reading

@adamradford123

18 Comments
aradford
Cisco Employee
Cisco Employee

Hi Guninder,

Are you trying to install over a slow link?

what version of APIC-EM are you running?  there was an issue with version <1.4.1 where TCP window sizes were incorrect, which caused image files to be slow over slower links.

In addition in 1.4.1 we now have a parameter you can change which is the image timeout (default is 40mins).  See screen shot for changing this.  However, I suspect if you are running 1.4.1 the image transfer should be faster.

Screen Shot 2017-04-23 at 1.40.00 pm.png

Adam

b-yassamine
Level 1
Level 1

hello Adam

and thank you for this great explication

well my question is about the APIs that PnP mecanism use

thanks

gurindersingh81
Level 1
Level 1

Thanks Adam for your quick reply. I am using 1.4.0.1959. Let me upgrade it to 1.4.1.

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: