Cisco CCNP Enterprise 300-435 ENAUTO – Network Device Programmability Part 3
January 30, 2023

18. 44 Install Ansible Centos

You can go to the following link and you will get the instruction. That how you can install the ansible. So let me login to this particular site, let me open this URL and let’s see how we can install. No login required for this particular site means you don’t need username and password. Simply you can go and and open the URL. Once you open that, you can see here that we have the installation guide. Inside that installation guide you can see that we can install it over various Linux versions like Red Hat, Devian, Sent US, macOS, et cetera. It is very important to note that currently ansible can be run from any machine with Python version two dot seven or three dot five and higher install Windows isn’t support for the control node. So any Linux machine who having the Python version more than two seven or three five, they can run the ansible. There is no problem.

And you can see here, say step by step, you can go and check for different Linux flavors like Fedora, Red Hat, Sent to US, all these things he can see. That how you can install it. So I can do shoot yem install ansible. Because in our work station, in our lab we have Sent OS. The easiest way to install nowadays is to use the Pip command. So let me go down and show you that Pip command as well. You can see preferred variants in the macOS is the Pip command. So we can use Pip pip to install it if we are using macOS, most of the time people nowadays are using macOS. So you can install that with a Pip command, no problem. Let me scroll down so you can see other important information as well. All right? Solar is an arc and slackware. So all these options are there. Just visit that particular URL and then you can see all those things. So since we are using the Sent West and already I have installed that ansible, so we can go and use that.

But anyway, let me show you that how you can go and install over Sent to US. Mostly nowadays people are using Mac OS. So there also, even if other flavors are there, federal or other, you can see the installation, how you can install it. So here I am inside the sent to us. You can see the release sent to US Linux version seven, sent to US federal core like this. And how you can install Ansible, although it is already installed here. But we can use install Ansible. Okay, this is the way that you can go and install it. So while you are installing it, it’s very important that you check the process and all transaction checks. Exit running update. Now you can see that Python two seven, the Ancillary version also we can go and check that is two four, the latest one. And what are the other things we have here? We can see. So if I go up, it is installing the package. If I scroll down, you can see the Python packages two, four one and all the dependency on the requirements. Done.

So now what I can do here, I can go and check Ansible and say version two four two. We have the configuration file here, the configuration model, the location. You can see the user library. Python two seven side pack is ansible and related information we have. Even if you want to know more about this, you can always go to Ansible and help that. You can go and check whatever parameters we have related to Ansible and other restaurants. And finally, if you want to run, you can go and run ansible Playbook. And you can see the version. I should give playbook and the version. All right, so we are running two 40. How to install? It’s very easy. You can go and refer the site and once it is installed, then we can go and play around with this.

19. 45 Ansible IOS-XE Lab

This is the second lab video where we are going to do the ansible lab with respect to iOS XE. So let’s do it. Now, before doing that, you should install the ansible inside this operating system. This is the operating system. This is open to operating system. Now if you want to check that, you can go and check the OS release. So here you can see that this is the open to N and you should go and install the ansible. So I can go and install the ansible like this because I have already installed it. So it is showing that it is installed. Now what about the lab? Here you can see the lab section. I have my automation where I have installed the ansible. And then I have a CSR device where I want to check the configuration. This CSR device that we have here, I can go and I can show you the interface IP brief. Here you can see that we have the IP address and I should have reachability. So I should go and ping that is also there. Great. So what I have done for this demo purpose, for this lab purpose, I created one folder called Ansible. And inside that you can see that I have a certain program. So first of all I want to show you my inventory. That’s the host file. Here you can see that the host file I have switches, I have Cisco devices, cisco variable. I already enable the SSH capability inside my CSR with the username admin and password admin. The device hostname is CSR and the IP is this.

Correct? So this is very much done. Now the first lab I want to show you is how you can go and change the host name. Now here is the program, very simple one. It will go and check the host as a Cisco. Here you can see host as a Cisco where I have the CSR. Gather the fact false. The connection is local what you want. I will go and change the host name from CSR One to R one new. So how we can run this program? We can go and run the ansible playbook. Playbook and what’s the playbook name? Say change host name YML and then I can give the inventory that we have host. So now here you can see that playbook is running and here you can see that play. And then the task what is the task? Change the host name CSR. So it is changing the host name.

This is okay, change equal to one. That means it is successful and it changed the name to one because change counter is one now because already the name has changed. So now the change is zero. Correct? If I go to the CSR and if I press Enter, you can see the name from CSR one it got changed to R new. Correct? So that was the configuration. And here we have taken just one small example related to configuration. Let me show you few more examples. So for example if you want to gather the fact then again you can go and do the ansible. So let me run the playbook facts and then I want to use host. Now you can run this program will not see much information because this is executed and it’s done. But suppose if you want to see more and more information so you can go and check the verbose output. Now I’m running the verbose output and you are seeing this output in this format where you have the output that is actually very difficult to read but you can see the output here you can go and use two times V as well and three times V as well. So in this case what we can do that, we can go and check what options we have related to checking the output. So now when I have used V three times then you can see that the output we can read is very much that we can understand as well, correct? So here you can see that the ancillary facts, the IPV four address that’s correct. These are the IPV four addresses and IPV six we are not using. Then I can go scroll down, you can see the other informations as well, the file system info, the IPV four address to the gig one interface then I can scroll down and you can see the protocol line protocol then gig to interface. Now we are getting the output in the correct format. Now how you can check this help? So you can go to Ancient doc and then you can check the help function.

 Here you can see this help is actually small minus H. Now you can see that you have multiple options here as well. So here you can see that verbose like that you can go and verify if you are looking for the version of sybil you can go and check the version as well which is 2910 and the Python version. Also you can see here all the locations. Also you can go and check okay, so these are very important aspects related to Ancient that we are checking and verifying here. And if I go back again so we have checked our lab related to change the host name and gather facts as well. We have the host file as well. Then I have two more, one is to see the version. So let me show you the version command. If you want to check the version again, I can go and run the playbook version for hosts and correct. So now you will get the output and here we have this output.

This is simply telling show version in the device and then you have the output that we are getting in the show version output. Okay, great. Now finally I have one more program I want to show you that if you want to do certain configuration changes as well. You can do it. For example, I have SNMP program that will go and run these things. I’ll do small edit here so you can understand how you can do the edit as well. I can go here and I can go to this particular file that is SNMP YML and these commands that we are giving here has a hansable public and private. I can go and give my public and my private. Let’s save this and then we’ll run this program. So this sensible playbook and then the SNMP YML we are giving host and enter. Now what is happening that it will go and do the SNMP related configuration.

That is one time. Now, if I go back to my CSI device, if I go and check your end section SNMP, you can see that my public, my private. So this is the way that you can go and execute the command. You can see that we have done various operations. So for example, doing the configuration, changing the host name, checking the version, the facts, etc, etc. So it’s easy to use. And this particular playbook, as per our host, whatever list of host we have, it will go and execute all the command, all the host in the parallel manner at the same time. Okay? All right, so let’s stop here.

20. 3.5 Model Driven Telemetry

Now we reach to three five till three seven. We have same type of concept that we need to understand. In three five we have to understand the subscription for modeldriven telemetry. In this example we have IO 60, but that’s true for iOS XR and other products as well. CLI, NETCONF RESTCONF questions, compare publication and subscription for telemetry model, what is periodic, what is on change? And finally that while we are using the telemetry value, we are using the model driven programming, then how it is going to help us in the troubleshooting? All these topics are interrelated. So I have planned to cover it in same series of videos that we are going to follow up. So let’s start with the model driven telemetry. Inside is XE. Now, before that if you want to know about the history that already we have the SNMP method to get the network related information. But still why we are preferring the model driven structured programming environment or programming related option to get all those information. We’ll see that in upcoming slides. You’ll understand what’s the actual advantage we have with the model driven telemetry. Now, what is happening in case of SNMP? You can see that SNMP MIPS, they are quite fixed, means it’s very difficult to write your own map because they are vendor locked. First of all. Second thing that they are lacking security, they are lacking a scale and again they are not complete means they are not giving all the outputs that we are looking for.

Now, when we are talking about SNMP pool, you can see here that the polling method in SNMP is that we have several servers and then inside the box itself we have SNMP MIB that is with the operating system. And then whenever you’re requiring, you are sending the request and then the device they are processing that and giving the response, correct? Now you’ll find that some places if you have so many SNMP servers configured for a given device and all the time device is busy sending all the responses for all the requests. So you may have high CPU due to SNMP and there are chances that high congestion, say for example in high congestion network where you want to use your bandwidth for your data transfer, not only for your management. Correct. So these are the cases you have. First of all, you have restriction, you are locked. And second thing that inefficient use of bandwidth as well. Now again, the push versus pull method, that SNMP pull method is bit traditional and the telemetry is push method that is very much fast.

We’ll see that the timer even improves drastically. Where you have the telemetry timer there’s 5 seconds SNMP that may go to 300 seconds or five minutes. So there is a huge difference in the timing. Now why we want this new module speed and scale it’s really fast. We’ll see later on when we’ll go and run the API. The result that we’ll get from the API. It will be faster if you want to do the same thing even with the CLI, it will take time because you’re writing some command. Again, it will go to the processor, then it will send the request inside and then the output will come. So it’s actually fast and scale is there. It has quick fault isolation, open source appliances, near real time data ability. Now, the summary of this is that we are moving to digital world where the speed is very important first thing, second thing the data, the amount of data. So now you have to process the volume of data and that much volume of data if you use the traditional method to get the result or get the troubleshooting options or get the devices specific alerts, it is time consuming and it’s not scalable.

Now, for the digital environment you need something which is capable enough, something which can understand machine to machine interaction rather than any third vendor in between that. And it should be very fast, automated and it should be very light actually in the operating system or in the CPU. So while sending a number of requests still your load in the CPU should be less and you can send parallel request as well. Now, here in the diagram you can see that you have Gravana, you have Elastic, you have big data, means you can connect. So you can take the input from the device and we’ll see that later on. And then you can send for further processing, further analytics to these type of maybe cloud hosted or maybe in premises analyzing tools. If you want to use Elastic they are giving 14 days trial version. It’s free, you don’t need to give your credit card information.

You can go and use Elastic inside that. Again, you can get cabana and there are so many other plugins that you can enable and check. All right, so what’s the benefit we have with the model driven programming we can get either periodic or on change alerts or information. It is a structure data because it is going to use model driven young model behind the scene. So it’s a structure, it’s scalable and less load on CPU. Correct. Now, we have the methods say for example SNMP, syslog NetFlow but if you go and compare you’ll find that they don’t have any structured data model first of all and they are not capable that the young models are within young model you can do each and everything, there’s no restriction. Again, this model driven programming here you can see and this is actually very important slide that we have and let’s learn more in this slide. So if you go and check this slide, we’ll find that model driven programming you have your network devices in the bottom and then you have the programmable interface. You can think this as an API application programmable interface and then you have the telemetry engine now you are sending this to the collector. Later we will discuss more about the subscription and the collector. Now this collector, you can send this over, the elastic over grafana, cabana, Splunk, ganglia, et cetera.

So there are so many good collectors where you can send your real time information, real time data. They can do the analysis and they can give you the nice graph as well. For example, you can send the data to the elastic and then Kibana, you can go and check the graphs. Correct. Now again you can see that while we are doing the model driven programming, still we have option for SNMP. SNMP, you can use it and slowly if you want to move from SNMP to the latest elementary model, you can move, correct. So here you can see that we have the open native operational young model net confused protocol. And then you have the external plugin. Okay, so far we have discussed that what’s the advantage we have with the model driven programming? It’s actually advantageous. And then we are going to plug in this data model. So here you can see the data model with the NETCONF. One of the best example for NETCONF plus data model is the Cisco SDWAN. So SDWAN uses NETCONF behind the scene. If you go and check the programmable things, you’ll find that they are following the format. So we have the format options. For example, the encoding methodology is JSON, the protocol is NETCONF, the transportation protocol is SSH. Correct. Now here you can see that how this program looked like. So we have this model driven programming. Or you can think that MDT is a model driven telemetry.

So you are importing some definitions from MDT. Then you’re importing and then you have the organization, content description, et cetera. I will point you the link where you will get all the young data models program that is combined in a single place. Cisco is putting all those information publicly inside the GitHub. We can go and have a reference. Again, you can just check the definition how this program looks like. So here the RPC we have. And then if you go and read this, you have the Xmlns and then you have the net confess program. Then establish the subscription. What subscription will learn in upcoming session event notification yang push. So the structure is something that you have the model event program. Then you may have encoding, you may have transport, you may have protocol, a protocol NETCONF. Then transport can be SSH or any other, maybe TLS. The encoding is XML and JSON model is young and there are so many, not so many, but there is a number that we can count for the young model. Cisco has their own structure, or Cisco can use their own structure, or Cisco can borrow from the standard one as well. Both options are there.

So what Cisco has done in Cisco ACI that Cisco hasn’t used whatever standard is there, for example, industry standard young model rather than Cisco has used their own model driven program in Cisco ACI. Okay, so let me quickly go to the next slide so I can show you a few more. Here you can see that you have young model data. And then you have the XML payload. Somewhere you will find this payload as a JSON. Here you can see the standard body. We have open config ietfit. Cisco. Again in cisco. ACI. Cisco has used their own data model, but Cisco can use Open Config IETF Italy. It’s up to the vendors. That what they want to use. I told you that you can go and check the data models here. So you can go to this GitHub. You can go and check the Yang model. You can go and check the Open config as well. Again, how within the box it is working. So now with the new operating system in the Cisco iOS XE, you’ll find this young models are embedded, that is their build.

But suppose if it is not there, then you can go and update or upload as well. Okay, so best option is that you upgrade the image and you will get all these options inside the operating system. If you want to learn understand more about the young hierarchy, then you can go and use this software suitable for MacBook Omni graph. Now here you can see that you have the model event elementary operational data. Then the connection, subscription, stream, sub connection, receivers, containers and like that, this is again the structure. And we need not worry to memorize that. What is the hierarchy and the structure, what we should do, that how we can go and enable the telemetry in my box. Then how I can send those information to the engine or to the analytic engine, say for example Elastic or others, where they can go and analyze my data. So how we can enable the feature on your box and how we can send those data to the collector to do the further analysis. That’s the important thing that we should be doing. Bye.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!