First Steps from CCNA R&S SDN to APIs and Programming
On the same day I posted this post, I’m also speaking in a webinar about the new CCNA R&S exams, hosted by the folks at the Cisco Learning Network (CLN). The new exams have some SDN content. And it always seems like when you talk to networkers about anything that sounds like SDN, the question comes up: should I learn programming?
Today’s question answers a similar question, one that I hope is useful for the specific audience for the webinar. If you assume that programming is a skill you should learn, and you’re currently studying for CCNA R&S, what’s a good path from CCNA learning to then learning programming? That is, what are some good steps to bridge between those Cisco CCNA R&S SDN exam topics and then learning programming?
To Program, or Not to Program
First, on the core question: should people who have networking jobs learn how to code? Should some? Should all? Well, like everyone, I have opinions, and I’m sure you do. So let me toss in my own opinion to the mix just to get things started:
- Some networkers today, and most over time, will need to be able to write and/or understand programming.
- Programming is one skill of many that networkers need. Networkers in the future still need lots of core networking skills, plus virtualization, cloud, and Linux skills, and programming.
- More networkers will use programming for automation, aka DevOps or NetOps, as compared with…
- …Fewer (percentage-wise) networkers will write code to directly control the data plane of the networking devices, as in the ONF and OpenFlow model.
But those are just my opinions. But what are your plans as a networker? When in your career development plan do you intend to take your first serious step at learning how to program? I’m writing this post primarily for those of you working towards CCNA, so I’m assuming you care about Cisco certifications in some way. If you have at least thought about what Cisco certs you plan to pursue, where in that plan do you plan to learn how to code?
Learn APIC-EM and APIs More Deeply before Programming
So, say you’re studying for CCNA R&S, and you see the new SDN-related exam topics. It increased your interest in learning programming. How do you get there?
The next bit in this post answers that question. I think there are some very useful steps you can take related to the CCNA R&S exam topics, to learn more, before learning programming. The goal here is to outline first steps that give you a good bridge from those CCNA R&S SDN exam topics over to programming, and to give you a few thoughts on how to proceed there. Not much reflection, just lots of straightforward suggestions the rest of the way.
Get Comfortable with the APIC-EM GUI from DevNet Sandbox
The new CCNA R&S exam topics mention controllers, as well as a specific function that is part of Cisco’s APIC-EM controller. (That function is the Path Analysis app’s ACL Trace function.) Overall, the exam topics include the ideas of NBI and SBI APIs, data plane and control plane, and the function of the controller. In my new ICND2 book’s chapter on SDN, it works through the basics using APIC-EM, APIC (Cisco’s datacenter SDN solution), and open SDN with OpenFlow.
Over time, you will want to get some experience with different SDN solutions. If you starting point in CCNA R&S, which now mentions APIC-EM by name, the next step is simple: use the APIC-EM GUI.
You can download APIC-EM for free, and run it for yourself. There is even a new version meant to use only 16G of RAM on your server… wait, you don’t have a server on which to run it in the first place? Well, whether you do or not, you should be using Cisco’s DevNet web site, and in this case, the always-on APIC-EM lab in the DevNet Sandbox.
Basically, you just go to the site, establish a (free) login, and use a pre-installed APIC-EM controller from your web browser. As the name “sandbox” implies, it’s a place for free play – learn how to navigate, try the apps, learn how to get around.
APIC-EM ACL Analysis with DevNet Sandbox and Hardware Lab
That same DevNet Sandbox has what they term as reservable labs that use real hardware. The always-on lab uses a background method with a database that looks like a network rather than using live routers and switches. The reservable labs (also free to use) have IOS images running. That means you can access the CLI of the devices in a lab pod, configure them, and then test with APIC-EM using that lab pod.
When you want to dig in to learn more about that one CCNA R&S exam topic about the “APIC-EM Path Trace ACL Analysis tool”:
- go to DevNet to the sandbox
- Choose a reservable APIC-EM lab
- Make sure the lab has APIC-EM 1.2 (or later) (so it has ACL Trace support)
- If available, you will be granted access for a couple of hours (right away)
Note that you get instant access, but it typically takes some time (30 minutes) for the automation to get up the lab pod.
Learn REST API Basics with DevNet LearningLabs
The CCNA exam topics include a mention of APIs, specifically the idea of a controller’s northbound interface (NBI) and southbound interface (SBI). For non-programmers, understanding the purpose of an API is relatively easy, but understanding the mechanics is hard without using them. Interestingly, you can learn the basic mechanics of APIs before even learning how to code. It is definitely worth starting out by learning about APIs now, even while wrapping up your understanding of CCNA R&S exam topics.
Of particular interest to CCNA R&S folks, Cisco’s DevNet site has a series of learning labs (learninglabs.cisco.com):
- Several labs teach APIs expecting that you do not yet know how to program.
- The basic API labs often use APIC-EM’s NBI as the API for the lab
- The web site lists a category called springboard, which organizes labs into a series of meaningful labs to do one after the other.
The springboard concept is a great tool to guide people through the right sequence of labs. Basically, the springboard lists the labs you should do, in a particular order, to learn a larger topic area. So, to my recommendation for CCNA R&S candidates who want to learn more about APIs:
- Go to cisco.com (DevNet’s Learning Lab Site)
- Select Springboards
- Choose the “Network Programmability for Network Engineers” springboard
- Depending on your comfort level, either do the labs in order, or leave out the NETCONF and RESTCONF labs in the middle of the sequence.
Now Get Started with Programming, with Python
Sometime after passing CCNA R&S, you may then decide it is time to learn programming. An obvious early decision then is simply this: which language first?
Python seems to be the best choice if programming is either new to you, or you just haven’t had to (gotten to?) program as a regular part of a job. Python is:
- Relatively simple to learn
- Popular in universities as a first programming language
- Has many great learning tools for people learning on their own.
I’ll begin with the assumption that Python is the language of choice.
Next, how should you go about learning Python? Well, the good news is that there are a large number of options for books, videos, and online courses. You can use the languages on any computer. So you do not lack for options. I’ll wrap this post with a few suggestions about what has worked well for me.
Book: “Learn Python the Hard Way” by Zed Shaw
Just last week, as a work gift to myself present for finishing the work on the CCNA books, I gave myself a treat of digging into improving my Python skills. I started with a review session of my Python notes, lots of free play, plus a review of the entire “Learn Python the Hard Way” book. Every time I use and re-use the book, I’m impressed even more.
Programming is a skill, and Zed Shaw’s “Learn Python the Hard Way” does an excellent job of helping you build the skills, rather than just tell you some facts. You read a few pages, and then go practice, and practice more. You keep revisiting old ideas in new labs while still learning a few new ideas in each lesson, so by the end of the book, the earlier topics should be well understood. In short:
- You learn partly by reading, and partly by doing.
- The style uses 50+ short chapters. You can start reading a new chapter and then be programming to learn the topic five minutes later.
While you can of course buy the book, the book’s web site offers a try-it-before-you-buy-it deal. Just go to their web site, look for the deal, try the book before you buy it. If you decide after 4-5 chapters that it’s the book for you, pay for a copy. Simple enough.
Web: Pythontutor.com: Visualizing How a Python Program Works
I found myself using this tool regularly when trying to make sense of some of the core Python features, particularly in calling functions, objects, and classes.
Python Tutor (pythontutor.com) takes your python program (you just copy/paste it into a form in their web site), and the tool teaches you python. It does so by showing you what the program does, line by line, step by step. And when I say, “show you”, that’s exactly what it does. For instance:
- It reads your program
- It shows an arrow as to what line executes next
- It lists your variables, and the changes to their values as a result of executing that next line of code
It is a little like what you read in a networking book, where you see an example and the text explains each line. In this case, though, the tool is interactive, and runs through all the steps.
App: “Learn Python Pro” from SoloLearn
I haven’t used this last tool a lot, but I like it so far.
I use Quizlet a lot when studying. Quizlet lets you create your own flashcards and then gives you different learning exercises to help you memorize the facts. It’s a great tool for learning facts in your idle moments from your phone. However, it is not a course that some knowledgable person created beforehand, and that is what I was hoping to find in a mobile app. So I went looking for mobile apps that had a course-based approach to teach Python, and found “Learn Python Pro”.
The Python Learn Pro app is a basic course taught from a mobile device. It shows a short text description about a python statement or feature. It then lets you see a demo of the idea, and you can even change the code to try it yourself. It sprinkles in multichoice questions to see if you are truly understanding, which is a great help to know if you’re learning or not.
If I were just starting out, I’d probably have worked through it entirely. So, check it out.
Come Back to Cisco’s DevNet and learninglabs.cisco.com
Once you’ve built your Python skills, go back to take another pass through Cisco’s DevNet site. You might find the Sandbox labs of interest, but if your focus is still on learning, you might prefer to the DevNet Learning Labs, and especially the springboards. I would imagine that you would ebb and flow into DevNet and back out again while you learn Python.