Overview
Join John McGovern as he demonstrates how to build a lab environment for Network Automation.
Recommended Experience
- At least six months of Python programming experience is recommended, but not required
- An understanding of concepts taught in CCNA is recommended, but not required
Recommended Equipment
- Network emulation software, such as Cisco VIRL or EVE-NG/GNS3
Related Job Functions
- Network engineer
- DevOps engineer
John McGovern has been a CBT Nuggets trainer since 2020. His areas of expertise include Python, networking, network automation, and cybersecurity.
Introduction
In this Nugget we discuss our plans to build a network automation lab environment!
VMWare Installation
In this Nugget we walk though how to download, install and setup VMWare Workstation Player which will be used to build our virtualisation environment!
Knowledge Check
Which is the name of the virtualization software installed in this Nugget?
EVE-NG Installation
In this Nugget we install the network emulation software EVE-NG which will be used to build our network lab topologies!
Knowledge Check
Which type of Network Adapter has the EVE-NG virtual machine been configured to use?
Adding Cisco Images
In this Nugget we walk through the process of adding Cisco CML-P images to our EVE-NG virtual machine!
Knowledge Check
Which is the name of the software used in this Nugget to transfer the device images into the EVE-NG virtual machine?
Adding Arista Images
In this Nugget we walk through how to download Arista images for free and add them to our EVE-NG virtual machine!
Knowledge Check
Which type of file format was the VEOS vmdk image converted into?
Ubuntu Installation
In this Nugget we walk through how to install the Ubuntu virtual machine which will serve as our network automation workstation!
Knowledge Check
Which is the command used to install the open SSH server?
Visual Studio Code
In this Nugget we walk through how to install our IDE of choice, Visual Studio Code, on both Windows and Linux platforms!
Knowledge Check
Which is the name of the Visual Studio Code extension that allows a user to open a remote folder on a remote machine via SSH?
Device Connectivity
In this Nugget we explore how we can setup our devices to allow for Out Of Band management via our Ubuntu server!
Knowledge Check
Which network type was used to allow external access into the EVE-NG virtual machine?
DevNet Sandboxes
In this Nugget we explore how to access Cisco's DevNet Sandboxes - a free and easy-to-use alternative to building a local lab environment!
Knowledge Check
The always-on DevNet Sandboxes require a VPN connection before they can be accessed. True or false?
Conclusion
I hope this has been informative for you and I would like to thank you for consuming.
View Transcript
Introduction
0:10Hey guys, and welcome to the very first skill
0:12in the Advanced Network Automation with Cisco
0:15and Python course.
0:16I must say, I'm really quite excited about what
0:18we're going to learn together.
0:20And I really do hope you enjoy the ride.
0:22So let's discuss what we're going
0:24to be doing within this skill, and that
0:26is building our very own network automation environment.
0:29Now, what exactly is a network automation environment?
0:33OK, so let's talk about it.
0:35Now, what I will say is that if you're already
0:37confident about how to build a network automation environment,
0:41then feel free to skip this introductory skill
0:43and go straight to learning about the tools
0:45we're going to be using within this course.
0:47But even if you do know how to build a network automation
0:50environment, I'm still going to recommend that you stick around
0:52and watch this skill, because I really
0:54do believe it's going to be helpful for you.
0:56So let's talk about what we're going to be
0:58covering within this skill.
1:00Now, the very first thing which we're going to have to do
1:02is install VMware.
1:04This is going to host our virtual machines where we're
1:07going to be installing our automation system as well
1:11as the software to be able to simulate our network
1:13topologies.
1:14So we'll walk through the downloading and installation
1:16of VMware as well as how to configure the correct network
1:20in between virtual machines.
1:21Next, we're going to talk about how you can install
1:23a software called EVE-NG.
1:26Now, if you're unaware of what EVE-NG is,
1:28it is software, which is going to allow us to build
1:32our network topologies.
1:33So that is going to be very crucial for us.
1:35Next, we'll discuss how we can download and install
1:38into our EVE-NG machine our Cisco images.
1:42Now, the caveat with installing Cisco images
1:45is that you do actually have to pay for a license
1:48to be able to get these images.
1:49And we'll go through what type of license that
1:51is when we get to that Nugget.
1:53However, I'm fully aware that not everyone
1:55can afford to just go and splash money
1:57on buying a Cisco license.
1:59So I also want to provide an alternative
2:01and that is downloading the free Arista images.
2:05Now, if you're unsure what Arista is,
2:07Arista is basically another vendor, much like Cisco,
2:10just like you have Juniper or Nokia.
2:13But the good thing about the Arista images
2:15is that they're free to download,
2:17and the command line is almost identical to the Cisco command
2:21line.
2:21So all your show IP interface briefs, all your show runs,
2:25all your configure terminal commands,
2:26they're all going to be the exact same using these Arista
2:29images as you would get on the Cisco images,
2:32the difference being is that you don't have
2:33to pay for the Arista images.
2:35So we'll walk through how we can download and install the Arista
2:38images into EVE-NG also.
2:40What we're also going to cover is the installation
2:43of an Ubuntu virtual machine.
2:46Now, this virtual machine is going
2:47to act like our development environment.
2:50This is where we're going to install all of our automation
2:52tools such as Python and Python-based automation
2:56frameworks such as the Nornir framework, which
2:59we'll definitely see a lot of in this course.
3:02Now, to be able to write our code within an Ubuntu VM, what
3:05I'm going to go through is the installation
3:07of something called VS code, Virtual Studio code.
3:11This is a really exceptional cross-platform IDE,
3:15which is an integrated development environment,
3:17and it is perfect for writing codes and managing
3:20configuration text files.
3:21Now, I'm going to go through two different ways we can install
3:24VS code, that is, locally on our Windows machine,
3:27and be able to do something called Remote
3:29SSH into our Ubuntu server, or if you prefer,
3:34I'm also going to walk through how
3:36you can install VS code directly within this Ubuntu VM.
3:40Now, what we'll also cover is the very important concept
3:43of OOB.
3:45This is out-of-band management.
3:47This is going to provide us an easy way
3:50to automate our network without relying
3:52on the connectivity of our production network.
3:55This is a very, very important topic.
3:57Now, if you don't want to have to rely on things like EVE-NG
4:01and installing images, what I also want to introduce to
4:04you is how you can use the Cisco DevNet Sandboxes.
4:07Now, these Cisco DevNet Sandboxes
4:10are really, really great.
4:11And whilst they do have some limitations, which we'll
4:13talk about, they really are a great resource
4:16as a way to test your automation solutions.
4:19And the best part yet is that they're super,
4:21super easy to access.
4:22So these are some of the topics that we're
4:24going to be covering within this skill,
4:26and I really do think it's going to be valuable
4:28for you to follow along with the process
4:31as demonstrated before we dive into the fun stuff of how
4:34to actually automate these networks.
4:36OK, so enough of the talking.
4:37Let's get to action.
4:38What we're going to be doing first is installing VMware,
4:41and that is coming up in the very next Nugget.
4:43So I hope this has been informative for you,
4:45and I'd like to thank you for viewing.
VMWare Installation
0:10Hey, guys.
0:10And welcome back.
0:12So in the previous Nugget, we just laid out the rough plans
0:14that we have for the skill.
0:16And the very first thing that we decided that we want to do
0:19is to be able to install VMware.
0:21This is where it all starts.
0:23This is a crucial component to be
0:24able to getting your automation environment up and running.
0:27So let's get to it.
0:28So what I want you to do is to open up your browser of choice.
0:31I'm going to use Firefox here.
0:33And what I'm going to search for is VM Workstation Player.
0:36So we hit Enter, and we have this link at the very top here.
0:39Download VM Workstation Player, VMware.
0:42Let's go to this case.
0:43I'm just going to scroll down a little bit here.
0:45OK.
0:46So what I will say up front is that I have a Windows machine.
0:49I don't have access to any Mac.
0:50So unfortunately, I can't walk through the Mac installation
0:53for you.
0:54As best I understand, if you want to use VMware on a Mac,
0:57I think you have to use VMware Fusion.
0:59So if you're using a Mac, then be sure to check that out.
1:03So what I'm going to click here is try workstation 16.0 player
1:07for Windows, and I'm going to click Download Now.
1:09So let's do that then.
1:10Now, straight away we have this pop-up here.
1:13All I'm going to do is select Save File.
1:16So let's click Save File.
1:17And if you go to Download, that should be downloaded.
1:20So what I'm going to do is go to my Downloads
1:22and then click this link here.
1:24So what it's going to do is take me to the Setup Wizard.
1:26So what I'm going to say here is Next.
1:28And I'm going to accept the license agreement and Click
1:31Next again.
1:31Now, it's going to give you the option of where
1:33you want to install to.
1:35Now, it's going to automatically try to install in the C drive
1:38here.
1:39Now, my C drive is running a little bit low on space.
1:42So what I'm going to do is change it to my D drive,
1:44where I have plenty of space.
1:45If you want to use your C drive, then by all
1:47means leave it as is.
1:48So I'm going to click Change here.
1:50If I click on this part here, go to D drive,
1:53now I've created a folder here called New VMware Install.
1:57This is where I'm going to choose to install VMware.
2:00So I'll click this and say OK.
2:01But you can choose whatever you please.
2:03So what I'm going to say is add VMware Workstation Console
2:06Tools.
2:06Enter the system path.
2:07Say Next, and what I'm going to do is uncheck these boxes.
2:10I'm really not interested in this for now.
2:12And I'll Click Next.
2:13And I want to have the Desktop and the Start Menu shortcuts
2:16created so I'll say Next and just click Install.
2:19And now the installation is going to begin.
2:21This shouldn't take too long, maybe a few minutes at most.
2:23Perfect.
2:24So what it's saying here is that the installation has completed.
2:26I'm just going to click Finish.
2:28So I know have this icon here on my Desktop.
2:30Let me click this, and now I have VM Workstation 16.0 Player
2:34installed and ready to go.
2:36So now that we have VMware installed, what we now
2:38want to do is to install EVE-NG within VMware.
2:43Now, how do we do that?
2:44Well, that's what we're going to be covering
2:45in the very next Nugget.
2:46So I hope this has been informative for you,
2:48and I'd like to thank you for viewing.
EVE-NG Installation
0:00[MUSIC PLAYING]
0:09Hey, guys and welcome back.
0:11So in the previous Nugget, we had just
0:13installed a VM Workstation Player,
0:15and we had decided that we want to be able to install EVE-NG
0:18so that we can begin building network
0:21topologies for automation.
0:23So let's get to it.
0:24Now, the very first thing which I want to do, again,
0:26is to open my browser here.
0:28I'm going to choose Firefox.
0:29And all I'm going to do is search for EVE-NG.
0:32So If I go to the website here, and at the very top,
0:35I click Download.
0:36Then what I will say is that with EVE-NG,
0:38you do have the option to be able to install
0:40a professional edition.
0:41Now, this requires a license which you have to pay for.
0:45You do get additional features.
0:46But they're not absolutely mandatory for what
0:48we need to be able to do.
0:49So what we are going to be doing is installing the Free EVE
0:53Community Edition.
0:54So what I want to do is just scroll down a little bit here,
0:56just move down.
0:57And now we're at the section where we have the Free
1:00Community Edition.
1:01Now, you do have the option to install the ISO or the OVF.
1:05Now, the easiest way, in my opinion, is to install the OVF.
1:09So we're going to be clicking one of these links here.
1:11Now, what I'm going to choose is the MEGA mirror.
1:14So let's go and click on that just now.
1:16That should open up this link here.
1:17I'm going to accept the cookies, and all I'm going to do
1:20is click Download.
1:21And this is about a 1 gigabyte download.
1:23So it may take a little bit of time,
1:24depending on your internet connection.
1:27So what I'm going to say here is click Save File.
1:30And if I go up to my Downloads, and I right
1:32click this and open Containing folder.
1:34So what I want to do here is right
1:36click this and click Extract All.
1:38Now, what I'm going to do is click Extract again,
1:41and this is going to go through the extraction process.
1:43Perfect.
1:44So what I can now do is double click this folder.
1:46And now we can see here, we have this OVF file here.
1:50And this is what we want to be able to install
1:52into our VMware.
1:54So let's go back to VMware and import this then.
1:57OK.
1:57So I go back to VMware.
1:58I'm going to say Open a Virtual Machine.
2:01And all I'm going to do is browse to that same location.
2:04So in my case, it was in Firefox Downloads, EVE-NG COMM.
2:07And then we have this OVF file here.
2:10So click on this and choose Open.
2:12Now, what I need do it is to give my VM a name.
2:15So I'll just say EVE-COMMUNITY-VM,
2:17and then I'm going to choose the storage path.
2:19But I want to store this VM, again, like I said,
2:22my C drive is running little bit low.
2:24So I'm going to change the location to the D Drive.
2:26So I'll click Browse.
2:28I'll go into my D Drive, and I created this folder called
2:31EVE-NG-INSTALL-LOCATION.
2:32So I'll click OK and then choose Import.
2:35So we know how this VM called EVE-COMMUNITY-VM.
2:38What I want to do is select Edit Virtual Machine Settings.
2:41Now, realistically, how much memory
2:43do you want to give this VM?
2:45Well, as much memory as your computer can actually afford.
2:48If you've got a lot of memory available,
2:50then certainly give the VM as much memory as you can.
2:53This is only going to help performance when
2:54you build large topologies.
2:56In my case, I've got a 16 gigabyte laptop.
2:59I'm just going to give it 8 gig, and I'll leave the processors
3:01at 4 at the moment.
3:03Then what I'm going to do is change the network adapter.
3:06I'm going to change it to NAT.
3:07This is going to share the host IP address.
3:10So I'll click OK.
3:11And that is ultimately the only real change I'm going to make.
3:14So with those VMs selected, I'm going
3:15to choose Play Virtual Machine, click this,
3:18and this is going to turn the virtual machine on.
3:20Now it's given me this option that there are VMware
3:22tools for Linux available.
3:23Do I want to install them?
3:25I'm going to click Download and Install.
3:27And they are going to install for me.
3:29Now, the username is going to be root in lowercase,
3:32and the password is going to be the word eve in lowercase.
3:36So let's take that and then-- so I'll say, root
3:38and then I'll say, eve.
3:39Hit Enter.
3:40So I'll take eve for the root password.
3:42And then I'll repeat the same password, eve again.
3:45Now what do I want to call the host name for the system?
3:47I'm just going to leave it as EVE-NG.
3:50So just push Enter.
3:51I'm not going to be using a DNS domain name,
3:53so I'm just going to click Enter with example.com.
3:56Now, do I want to use DHCP or a static IP address
3:59for the network adapter?
4:01I'm going to leave it at DHCP and just click Enter.
4:04Do I have an NTP configured?
4:06I do not.
4:07So again, I'm just going to leave
4:08this blank and click Enter.
4:09Now, how do I want the VN to be able to connect
4:11to the internet?
4:12I'm just going to leave it at direct connection.
4:14So I'm just going to again hit Enter.
4:16And that's all we need to do.
4:18Super, super simple.
4:19So what I want you to notice here
4:20is is that it actually does tell me the IP address,
4:23but I have the browse through, and that is this one here.
4:26So in my case, that's going to be 192.168.31.128.
4:33Now, that almost certainly is going
4:34to be a different IP address than what you'll get.
4:36Basically, whatever IP address you get,
4:38this is what you want to type into your browser.
4:41OK, so again, let's open up our browser,
4:43and let me type the IP address in.
4:45So I'll say http://192.168.31.128.
4:51Hit Enter.
4:52And now its going to take me to an EVE login page.
4:55Now, the user name here is not going to be root.
4:58Instead, it's going to be the word admin.
5:00But the password is still going to be eve.
5:04So let's type in those credentials then.
5:06So I'll say admin, and the password is eve.
5:08Now, as far as this part here, we
5:10have an option to choose a native console or an HTML5
5:13console.
5:14Basically, choosing the native console,
5:17that's going to allow you to access
5:18your devices over your favorite SSH terminal client
5:21such as maybe say PuTTY or SecureCRT.
5:25However, if you choose the HTML5 client,
5:28you can actually manage your devices just
5:30via a web browser tab.
5:32Now, I personally like to use the native one,
5:34because I do like to use PuTTY myself.
5:36But if you don't have anything installed such as PuTTY
5:39or SecureCRT, using the HTML5 client
5:42is a really handy way to be able to manage your devices.
5:45So from now, let's go for the minimalist approach,
5:47and we'll just choose HTML5.
5:49And we'll sign in.
5:50OK, so we click Save.
5:52Now, if we go over to this icon here, Add a New Lab, let's
5:56click on this.
5:56And what we can do is give our lab a name,
5:58and we'll just call this one test1 and click Save.
6:01And this is going to open up a workspace where we can actually
6:04begin adding devices.
6:06The problem is, is that we only have one device,
6:09and that is a VPC.
6:10So if I right click and choose Nodes, all of these devices
6:13are grayed out, as you can see, because of not being installed.
6:16But at the very bottom, we have a virtual PC.
6:19And if we right click this, Start, we
6:21could turn that device on.
6:22And we just click on the device.
6:23As you can see, it's opened up a connection
6:25within our browser tab.
6:27But like I say, this is super limited for us right now.
6:29We want to be able to automate in devices such as Cisco.
6:32So this requires that we install those images into our EVE-NG.
6:37Now, how exactly are we going to do that?
6:38Well, that is what we're going to be talking
6:40about in the very next Nugget.
6:41So I hope this has been informative for you,
6:43and I'd like to thank you for viewing.
Adding Cisco Images
0:00[MUSIC PLAYING]
0:10Hey, guys, and welcome back.
0:12So in the previous Nugget, we had just installed EVE-NG.
0:15The big problem, however, is that we didn't have
0:18any images installed just yet.
0:20And that's not good.
0:20However, we're going to solve that problem
0:23by installing our very first accessible images into our VM.
0:27So with that said, let's get to it.
0:29So if we open up our browser again, we go to Firefox.
0:31And what I'm going to search for a Cisco CML-P.
0:34That a Cisco Modeling Labs Personal.
0:36So if we go in here, click this link, what I'm going to do
0:39is go up to the top right hand corner here and choose Login.
0:42Now, if you haven't actually created an account with Cisco,
0:45you're going to have to create an account
0:47and just follow the process there as you it directs you to.
0:49In my case, however, I actually do have an account,
0:52so I'm going to log in with this.
0:53So I'll click Log In, and I'm just going to type
0:55in my email address and login.
0:57OK, so I've typed in my email and my password,
0:59so now I have logged in.
1:01OK, so if I scroll down a little bit here-- now,
1:04like I said at the beginning of the skill,
1:06in order to use the Cisco images,
1:08you're going to have to pay for this product.
1:10So if you haven't bought CML-P yet, then what you want to do
1:13is go to the personal?
1:14Option here, and click Buy Now.
1:16Now, the price is $199.
1:18I know that is not cheap, but I certainly
1:20do believe that, if you can afford it,
1:22it certainly is worth your while to purchase.
1:24Now, again, don't worry if you can't afford this.
1:27In the next Nugget, we're going to go
1:28through how to install Arista images for free,
1:32which pretty much have almost identical command line
1:35as do Cisco.
1:36Now, once you purchase this product,
1:38you're going to have a link to download CML-P. Now,
1:41within CML-P, built in, you're going to have these images.
1:45So let me show you what this looks like
1:47once you've purchased your product
1:48and have downloaded your CML-P.
1:50OK, so I have downloaded CML-P here within this folder.
1:54These are all the files which I need.
1:56Now, you actually have the CML-P Virtual Machine.
1:59This is an alternative to EVE-NG.
2:01But I personally prefer to use EVE-NG.
2:04All I really want from CML-P is access to the built in images.
2:08So how do we get the images from those downloads
2:11so that we can extract them and put them
2:13into our EVE-NG community edition?
2:15Well, see this option here down at the very bottom?
2:17Refplat-- if you re-click this and click Mounts--
2:21and what this is going to do is mount this on your DVD E drive.
2:24Now, within here, you're going to see a folder saying
2:26virl-base-images.
2:28If you click on this here, within this folder,
2:30we have all the images which we need.
2:32We've got the ASA firewall, we've
2:33got a CSR 1000v, IOSv, IOS layer 2 images.
2:38We have NXOS, so on and so forth.
2:41So to keep things simple, let me just drag these onto my desktop
2:45here.
2:45And I'll just drag three.
2:46I'll drag the csr1000v because this
2:49is the image we're going to be using later
2:51on within the course for NETCONF and RESTCONF,
2:54and I'll also pull my IOSv.
2:56This is my layer three router image.
2:58And I'll also take the IOS layer 2 image,
3:01which is our switch image.
3:02OK, so let me just close this now.
3:03So now we have these images dragged onto our desktop.
3:06So after we click one of these, here we
3:08have the qcow file, which is the file format
3:11that we're going to use for our EVE-NG.
3:13OK, now there's a few things that we
3:15need to install to get this up and running.
3:17The first thing we're going to install
3:18is something called PuTTY.
3:19This is going to be your SSH client, so let
3:21me go and install that first.
3:23So if you do a search for PuTTY and click the top link here--
3:26and what I'm going to do is click Download it here.
3:28So click this.
3:30Now, I've got a 64-bit machine, so I'm going to choose the top
3:32one--
3:3364-bit MSI installer.
3:34So if I save the file here and I go to my Downloads--
3:38let me just click this to open the file.
3:40It tells me this is an executable file.
3:42It may contain viruses, but this is a trusted source,
3:44so I'm going to say OK.
3:45And let's just go through the installation,
3:47which it will say Next.
3:48Where do I want to save it?
3:49I'll just keep on the C drive.
3:51And then I'll just select Install.
3:54OK, perfect.
3:54If I just click Finish, the PuTTY Readme pops up.
3:57Let me just close this.
3:58And then if I go the corner and I type PuTTY,
4:00we now have our SSH client.
4:02OK, great.
4:03So that's the first thing we're going to install.
4:05The second thing is going to be something called WinSCP.
4:08Let's go and install that then.
4:10So if you Google for WinSCP, click the top link,
4:13and then just click Download Now and then Download WinSCP.
4:17Click this link here.
4:18And it's going to pop up with a Setup.exe.
4:21Let's save this file.
4:22And if we go to our downloads-- we have it.
4:24Let's click this open.
4:25Now, what I'm going to say is Install For All Users.
4:27I'm going to accept the license agreement,
4:29and I'm going to choose a typical installation.
4:31This is the recommended installation,
4:33so I'm going to click Next.
4:34User interface-- I'll say Commander, and I'll go on Next.
4:36Finally, we'll choose Install, and everything
4:39is going to install.
4:40OK, so I'll just uncheck the open Get Started page,
4:43and I'll launch WinSCP.
4:44Perfect.
4:45So next, as a client, we need to be
4:46able to transfer our images into our Virtual Machine.
4:49OK, so that's working, so let's close this down temporarily.
4:52And what we want to do is to make sure
4:54that our EVE-NG is turned on.
4:56OK, so as we can see, our EVE-NG VM is on,
4:59and we know the IP address for my VM is 192.168.31.128.
5:04OK, so what I want to do is set for PuTTY, open that up,
5:08and then I'm going to type in the address of my EVE-NG.
5:10So that's 192.168.31.128.
5:14I'm going to be connected over port 22 because it's SSH,
5:17and I'm going to choose the connection type as SSH.
5:20Now, if I click Open--
5:22now, previously, because I had an old machine which
5:24I removed so that I could demonstrate this installation,
5:28I've got an actual conflict of keys effectively saying
5:31that, this IP address SSH key is actually changed.
5:35That's fine.
5:36All I'm going to say is Accept because this is what I expect.
5:38OK, so what am I going to log in as?
5:40We know the name is root and the password is eve--
5:43E-V-E. Hit Enter, and now we've logged into the machine.
5:47And what I also want to do is do the same thing on our WinSCP.
5:52So let's click WinSCP.
5:54The host name is going to be 192.168.31.128.
5:58It will be port 22.
6:00The user name is root, and the password is eve.
6:04If I click Login, do I want to Accept the key?
6:07I'm going to say Yes.
6:08And now it's going to log in, and now we
6:10can see we've actually logged in on the right hand side.
6:13This is the EVE-NG machine.
6:14On the left-hand side, we have my actual machine.
6:17OK, perfect.
6:18So what I want to do now is to open up a web browser,
6:21and what I'm going to search for is EVE-NG virl
6:24and then click this top link here, Cisco vIOS from VIRL,
6:27and I'm going to follow this process.
6:29The first I'm going to do is install the layer three image.
6:32So what I'm going to do is just copy this command here--
6:34mkdir to make it the directory for our layer three image.
6:37Copy this.
6:38And if I go to my PuTTY and paste this in, hit enter,
6:41now I've created this directory.
6:43So now this directory exists--
6:44vios-adventerprise.
6:46What I want to do is to transfer my layer three
6:49image into this directory.
6:51So what I can do is do that on WinSCP.
6:53So remember, I moved my images onto the desktop and my layer
6:57three images-- this one here, IOS.
6:59OK, so on the right hand side, I want
7:00to move to this new directory.
7:03So the path is opt, unetlab, addons, qemu,
7:08and then the name of the folder here, vios-adventerprise.
7:12So let's follow that path.
7:13We'll go to opt, unetlab, addons, qemu,
7:17and there's this folder we just created.
7:19Let's click on this.
7:20And what I want to do is just copy these two here
7:23and drag them into this folder.
7:25And I'll just say OK.
7:26And then it's going to move these files over.
7:28So now if I go back to my directory-- and let
7:30me cd into this directory here.
7:32Enter, enter.
7:33If I do an ls--
7:34and now we can see those two files have
7:36been copied from my desktop, and I'm now within the VM.
7:39So let's go back to our browser.
7:40And what I need to do here for my Cisco vIOS
7:43images is change these file names to be virtioa qcow2.
7:47So now I'm in this directory, what
7:48I want to say is mv to move this file
7:51and change the name to virtioa.qcow2.
7:55So hit Enter.
7:57Now, if I do an LS, that file name has been changed to this.
8:00And this is crucial.
8:01And now what I want to do is fix the permissions.
8:03So if I copy this command here-- copy you-- and just paste
8:07that command and hit Enter.
8:08Perfect.
8:09So now if we go back to EVE-NG and I log in with admin eve,
8:13I can now use a native console because I have PuTTY installed.
8:16Just sign in.
8:17Now, if I right click and choose Nodes, if I scroll down,
8:20I'm going to see a blue Cisco vIOS Router.
8:23That is not grayed out anymore.
8:25It's now accessible.
8:26And if I just click Save, that device is going to be present.
8:29So let's do the same for the layer switch
8:31as well as the ciosrv router.
8:34OK, so let's go back.
8:35If we scroll on down--
8:37and what I want to do here at part two
8:40is to copy this folder.
8:42I'll say mkdir, and this is for viosl2 this time.
8:46OK, so let me just cd back to my main directory.
8:48And what I am going to do is paste this in
8:50to create this other directory.
8:52So now if I go back to WinSCP and I click here
8:54to go back out a directory, now you
8:57can see we've only still got that one folder showing up.
9:00That's because our page hasn't refreshed.
9:02So if I click this green icon here to refresh the page,
9:04do that, there's that second folder we just created,
9:06and this is for our L2 images.
9:08Let's click in here.
9:10And what I want to do is go back out a directory,
9:12and I'll go into the L2 images.
9:14And let me drag these two over--
9:16copy you.
9:16Now, again, we have to change the name from vIOS,
9:19so let's go into that now.
9:21Go back to PuTTY, and I'll just cd into this directory-- cd,
9:24and I'll copy you.
9:25OK, so we've done LS.
9:27What I want to do is change the name of this file here.
9:30So I'll say mv and take in the name of the file, tab that out,
9:33and then I'll say virtioa.qcow2.
9:38Hit Enter-- if I do an LS, that has now been changed.
9:42So now what.
9:42I want to do here is to fix the permission.
9:44So if I just up arrow to get to that same command--
9:47there it is.
9:47They're opt, unetlab, wrappers, unl wrapper, -a fixpermissions.
9:51Hit Enter.
9:51And now our layer two image should now be accessible.
9:54Let's go back to EVE-NG, right click, go to Nodes.
9:57Now we can see the vIOS switch is also in blue.
10:00That's accessible.
10:01So let's save this.
10:02And lastly, let's do the CSRv Router.
10:04So, if you see, that's for EVE-NG CSR.
10:06It's going to take you to the EVE-NG website.
10:08So let's copy this.
10:10Now what I'm going to do is scroll down to state 8,
10:12and I'm just going to copy this part here.
10:14Copy you.
10:15OK, let's cd back-- pwd.
10:18I'll just clear the screen.
10:19And what I'll do is I'll paste this in
10:21to create a new directory.
10:22Perfect.
10:22So again, let's go back to our WinSCP.
10:25R we arrow up to go out the directory
10:28and we refresh the page, we now have our third folder.
10:31Let's go back to our desktop here,
10:33and we'll go into the CSR1.
10:35And we'll go into the CSR here, and all
10:38we do is copy these and pull them over as well.
10:41So now we're transferring the CSR
10:42from our desktop into our Virtual Machine once again.
10:45So let's cd into this directory here--
10:47copy this, hit Enter.
10:48We'll do an ls.
10:50And what I want to do is mv csr1000 universal,
10:54and we'll just tab this.
10:55And again, we'll do virtioa.qcow2.
10:59Perfect.
11:00Clear you.
11:01And if we just fix permissions, just arrow up.
11:03OK, opt, unetlab, wrappers, unl wrapper, -a fixpermissions,
11:07hit Enter and bam!
11:08That should be our three devices within our EVE-NG,
11:11and they all should be able to boot up correctly.
11:13So let's go back and test these out.
11:15So I'll just right click and turn off VPC.
11:17In fact, I'll just delete this-- get this out of the road.
11:19So what I'll do is go over to the left hand side,
11:21click More Actions, and click Start All
11:23Nodes to start the switch and the regular router.
11:26Now, these should take a few minutes to actually boot up.
11:29Just give it a little bit of time.
11:30OK, so I've waited a few minutes to let them boot up.
11:32What I'm going to do it just click on one of these devices.
11:35I'll click this one.
11:36Now, if it's not naturally finding PuTTY,
11:38then you're going to have to go in and manually choose it.
11:41In my case, it's finding it OK.
11:42So what I'm going to say is just Open Link.
11:44And if I just hit Return, we now have our switch here.
11:47Enable, Show, Run.
11:49Simple as that.
11:50So that's our switch up.
11:51If we go here and click on the router--
11:54and what I'm going to do is just check this box
11:56so it always opens it with PuTTY.
11:57Choose application, PuTTY, Open Link, Hit Return--
12:01I'll just say no.
12:02And there we have a router image again.
12:04We'll just do Show Version.
12:05All our commands are available to us.
12:07So just close this down, and I'll shut these off.
12:09And the last one I'm going to check
12:10is going to be the CSR image.
12:12Now, this image is a little bit more heavy weight.
12:14It takes more resources.
12:16And this is the image we're going
12:17to using later on in the course when we're dealing with NETCONF
12:20and RESTCONF.
12:21Let's go on to Nodes, and we'll choose Cisco CSR.
12:24And I'll just do Save.
12:26Now, if I right click, go on to Start,
12:28and give this a few minutes again to boot up--
12:31OK, so a few minutes have passed.
12:32Let me click on CSR, hit Enter, just say no.
12:36Hit Enter again, hit Enter one more time, and perfect!
12:39It looks like this image is also working.
12:41So there we have it.
12:42We now have our Cisco images up and running within our EVE-NG.
12:46This is going to allow us to build
12:48Cisco topologies-- topologies which we can then later
12:51automate.
12:52But like I said, these images do have to be purchased.
12:55So perhaps you can't afford to spend
12:56$199 on this Cisco license.
12:59So what I want to do now is to present a second option
13:02to you-- an alternative.
13:03And that is what we're going to be
13:04doing in the very next Nugget.
13:05So I hope this has been informative for you,
13:07and I'd like to thank you for viewing.
Adding Arista Images
0:00[AUDIO LOGO]
0:10Hey, guys, and welcome back.
0:11So in the previous Nugget, we had just installed our Cisco
0:14images into an EVE-NG.
0:16In this Nugget, what we're going to do
0:17is to download the free Arista images and install them also.
0:22This is a really great alternative
0:23if you can't afford to buy those Cisco images.
0:26OK, so let's get to it.
0:27The first time we are going to do again
0:29is to open up our web browser.
0:30Now, if you just search for Arista login--
0:33let's go and click this top link here.
0:35Now, these images are absolutely free.
0:37They're not going to cost you anything.
0:38But you do have to create an account.
0:40If you don't have an account, then you're
0:42going to have to first specify that you need a User Account.
0:44Click this link here, and then follow all this information.
0:48Once you've done this, you will eventually
0:50receive an email with information
0:52about how to log in, which is what I've done.
0:54So what I'm going to do is go back,
0:56and I'm going to log in with my login information.
0:58OK.
0:59So now, I've logged in.
1:00It says Welcome John at the top.
1:02So what going do now is scroll down
1:04to the very bottom of this page here.
1:06And what I want to do is select Software Downloads
1:09at the very bottom here.
1:10So click this link.
1:11OK, so let's scroll down a little bit here.
1:13Now what I want to do is expand this one here, vEOS-lab.
1:17Just push the plus sign here.
1:18OK.
1:19So what I want to do is expand this Bit.
1:22And I'm going to click this one here.
1:23Aboot-veos-serial-8.0.0.iso.
1:27Lets click this.
1:28And what I want to do is save this file.
1:30So, OK.
1:30And this is going to download.
1:32Similarly, what I'm going to do is going to 4.26--
1:35expand that one.
1:36And then I want to download as the VMDK
1:39image, which is this here.
1:40So I click this one here.
1:42Again, we want to save this.
1:43And these are going to be downloaded.
1:45Case you know they've been downloaded,
1:47I've moved the Aboot image as well as the vEOS image
1:50onto my desktop for easy access.
1:53What I'm going to do is the same type of thing
1:55we did with the Cisco images.
1:56So the first thing I'll do is if I go back to my web browser,
1:59and if you search for EVE-NG Arista--
2:02let's click on this top link here.
2:04And what I'm going to do is copy this here and kit out
2:07and make that directory for the Arista images.
2:10So copy you.
2:11And then I'll open up PuTTY once again.
2:13Let me log in to my EVE-NG so 128,
2:15it's port 22, SSH and click Open.
2:19The log in is root and eve is the password.
2:22So let's paste this in to create this directory.
2:24Perfect.
2:25And now what I'm going to do is to go back to WinSCP and move
2:28these images into this folder.
2:30So WinSCP-- let's log in with address 192.168.31.128, port
2:3622, username is roots and password is eve.
2:40Let's click Login.
2:40So let's go to opt, unetlab, addons, qemu, and then
2:46go into veos--
2:47this folder we've just created here.
2:49Now, again, for easy access, I moved those images
2:51from my Downloads onto my Desktop.
2:53So what I want to do is to move these over.
2:56So I'll drag the Aboot image into this folder,
2:58and I'll say OK.
3:00And I'll drag the vEOS into the same folder,
3:03and this is going to copy on over.
3:05So what I'm going to do here--
3:06I just minimize this.
3:07And what I'm going to do is copy this part here--
3:11opt qcow.
3:12So copy here.
3:13And let's cd enter this directory.
3:15So cd/opt/unetlab/addons/qemu/veos.
3:20Now, let's paste this command.
3:22And then if I type vEOS and just tab the rest out
3:26to get the image.
3:27And then I'm going to say hda.qcow2.
3:31Hit enter.
3:32Case [INAUDIBLE] ls.
3:33OK, so now what you want to do is remove this VMDK image.
3:37We no longer need that.
3:38Now, we've created the qcow from it.
3:39So let's remove this ls.
3:41And what I want to do is mv the Aboot image,
3:45and call it cdrom.iso.
3:47So [INAUDIBLE] ls These images are now called this.
3:51And again, we want fix our permissions.
3:52So let's copy here.
3:54And we'll just paste this in.
3:55Hit Enter.
3:56And that should be it for Arista images.
3:59So if we go back to EVE-NG--
4:01let me right click.
4:02Choose Nodes.
4:03And now, we have Arista vEOS.
4:06If choose Save and if I right click and push start,
4:10that should turn on.
4:10Give it a few minutes.
4:11So once a few minutes have passed,
4:13let's click on the Arista Image.
4:15Hit Enter.
4:15OK, localhost log in.
4:17So the log in is just the word admin.
4:18Hit Enter.
4:19And now, we've logged in.
4:20And you're going to see this is super, super similar to Cisco.
4:24So if, for example, I click en, it takes me to Enable Mode.
4:27Now, the first thing I want to do
4:29is type zerotouch cancel because Arista
4:32is going to try to do something called Zero Touch Provision.
4:35If I hit this, that's going to reload the switch.
4:37And then once it comes back up, it's
4:39going to not attempt to do Zero Touch Provision.
4:41It's just going to act regularly.
4:43OK.
4:43So a few minutes have passed.
4:45Let's reload and let's type admin.
4:46And I just want to quickly highlight just
4:48how similar this image is to using Cisco.
4:51If we want to configure something, we will say enable.
4:54Then conf t.
4:55Then we can say something like router ospf 1.
4:58And then say router id 1.1.1.1.
5:01We can say network 192.168.1.0 with a welcome mask
5:06of 0.0.0.255 area 0.
5:10We can go back out and say show run.
5:12We can say show IP int brief.
5:14We can say show version.
5:15So again, if you don't have the ability
5:17to pay for the Cisco images, sign up for Arista,
5:20download these free images, and you'll
5:22be able to effectively follow on the labs no problem at all.
5:25So there you have it.
5:26There's your free alternative to be
5:28able to build a network and topologies.
5:30Topologies, which we can then use to practice our automation.
5:34OK, I hope this has been informative for you,
5:36and I'd like to thank you for viewing.
Ubuntu Installation
0:00[CBT NUGGETS JINGLE]
0:10Hey guys, and welcome back.
0:11So in the previous Nuggets, we had just installed EVE-NG,
0:13we added those Cisco images, and as an alternative,
0:17we also added the rest of the images.
0:19Now what we want to do is to focus on our development
0:22environment where we can install our automation tools.
0:25What we're going to be doing is installing an Ubuntu server
0:28within our VMware virtual machine.
0:30So let's roll up our sleeves and get going.
0:32So again, let's go to our browser,
0:33open up Firefox, and if you just search for "Ubuntu download,"
0:37click the top link here.
0:38We'll accept all and visit the site.
0:40Now, this is the version which I'm going
0:42to recommend you download--
0:43Ubuntu 20.04.2.0 Long Term Support.
0:47This is the version I'm going to be using.
0:49So this is the version I would probably
0:51recommend you go with, too.
0:53So what we want to do here is click on Downloads
0:55and just click Save File and OK.
0:58OK, so I've downloaded the image and I put into this folder
1:00called Ubuntu image.
1:02What I now want to do is to open my VMware
1:04and to create this virtual machine using this image.
1:07So let's open up VMware.
1:09What I want to do this time is to create a New Virtual
1:12Machine.
1:12And what I want to do is to browse
1:14to whatever this image is.
1:15So in my case, it's selecting the right image here,
1:18but if it isn't, just click Browse
1:19and go to the correct path.
1:20OK, so what I'm going to say here is Next.
1:23OK, so all I'm going to do is give my VM a name.
1:25I'm just going to say ipvzero, and the username,
1:28I'll just call it ipvzero again.
1:30And then give the VM a password.
1:31This will effectively be your pseudo password.
1:34And just confirm it.
1:35Click Next.
1:36So what is the VM name?
1:37Just call it anything you want.
1:38I'll just call this Automation Ubuntu.
1:41Or anything you want, really, will work.
1:43Now again, I'm running low on my C drive,
1:46so I'm going to actually install this into my D drive.
1:49So I'll go to Browse and I've actually
1:51created a folder called Automation Ubuntu,
1:53so I'm going to go to my D drive here and go into Automation
1:56Ubuntu and just click OK.
1:58OK, so I'm going to say Next.
2:00What is the maximum disk size?
2:01And if you want, I'll just give it 30
2:03to give it plenty of space.
2:04Just say Next.
2:05Now again, here is the options that's been given to me,
2:07but you can customize this if you want.
2:09If you have more memory, then you can kind of
2:12mem it up as high as you want.
2:13I'm just going to leave it at 4 gigabytes.
2:15The network adapter, again, is going
2:17to be NAT, the same as what we have for our EVE-NG.
2:20OK, let's go Close and I'll just say Finish.
2:22That looks OK to me.
2:23And what this is going to do is go
2:25through a basic automated easy installation of this Ubuntu
2:29server.
2:30So all we really need to do right now
2:31is sit back for maybe five, 10, 15 minutes,
2:34however long your computer takes, to create this image,
2:36and then once it's done, we can go in and begin
2:39setting things up.
2:40OK, now once that's done, you should see a screen just
2:42like this.
2:43What I'm going to do is just click on this.
2:45This is my username.
2:46And I'm going to type in the password which
2:48I created at the very start.
2:49Hit Enter, and it's going to log me in.
2:51All I'm going to do is click Skip here, and Next, Next,
2:54Next, and then Done.
2:56Now, the software update that has come up,
2:59I'm just going to say Remind Me Later,
3:01and then I'm going to go down to the bottom left hand
3:03corner here, click this, and then
3:05I'll just search for Terminal.
3:06Hit Enter, open my terminal up.
3:08OK, now to make this a little bit easier to read,
3:10I'm going to go here, click on Preferences.
3:13I'll go down to Unnamed, I'll choose Custom fonts.
3:17I'll maybe choose something like Noto Mono Bold
3:20and I'll auto up.
3:21And I'll use a plus sign to make the text a little bit bigger
3:24and easier to see.
3:25Hit to Select and just Exit out of this.
3:27OK, so what I want to say here is sudo apt update,
3:30and I'll type in my password, and I'll say sudo apt
3:33install openssh-server.
3:37Hit Enter and push Y. Hit Enter again.
3:41OK, now what I also want to say is sudo apt
3:43get install python3-venv.
3:48Hit Enter, push Y, hit Enter again, perfect.
3:50And for the moment, this is all we need for our Ubuntu server.
3:54So the next thing we're going to do
3:55is to be able to install a VS code, which
3:57is going to be our integrated development environments.
4:00And this is where we're going to do all of our coding
4:03for all of our network automation.
4:04That is coming up next, and I hope
4:06this has been informative for you,
4:07and I'd like to thank you for viewing.
Visual Studio Code
0:09Hey guys, and welcome back.
0:11So in the previous Nugget, we had just
0:13installed our Ubuntu server, which is going
0:15to be our automation system.
0:16And in this Nugget, what we're going to do
0:18is install VS Code, which is going
0:19to be our IDE for development.
0:22Now, I'm going to present to you two ways in which you
0:24can install VS Code.
0:26You can do it locally on the machine
0:27here and login to the VM.
0:30Or you can install VS Code directly on the VM.
0:33I'm going to show you both ways, and you can
0:35choose which way you prefer.
0:36OK.
0:37Again, so what I'm going to do is go to my browser just now.
0:39And if I go to Google and just type VS Code,
0:42let's click the top link here.
0:44And what I'm going to choose is Download for Windows.
0:47We're going to get this link.
0:48Just click Save.
0:49And now this is downloaded, let's click this to open it.
0:52And I'm going to Accept the Agreement.
0:54Click this, and choose Next.
0:56Now, where do we want to install VS Code?
0:58Again, I'm going to move onto my D drive.
1:00But if you want to leave it onto your C drive,
1:02that's perfectly OK.
1:03So I'll scroll down, go to D drive.
1:06And I've got a folder called VS Code here created.
1:08So I'll choose OK, and select Next, choose Next again.
1:12And what I'll do is I'll choose the create a desktop icon.
1:15And I'll also select these options here to open with code.
1:18Just choose Next, and click Install.
1:20And VS Code is going to be installed into your machine.
1:23And that is all, so click Finish.
1:25And now VS Code is going to launch.
1:27OK, so what I'm going to do is suggest to you
1:30some of the extensions I feel that you should install.
1:33This is just going to make your life easier,
1:35and VS Code has a ton of cool extensions.
1:37So let me show you which ones I use.
1:39So let's just maximize this for now.
1:41If you to File, go down to Preferences,
1:44and then choose Extensions.
1:46Now, here are some of the extensions
1:48which I've installed.
1:49And you can just search for them here.
1:51So the theme I'm going to choose is Monokai Pro.
1:53So just click on this.
1:54Now, I'm going to suggest that you, perhaps,
1:56also use this theme, although you don't have to.
1:58But it will make it a little bit easier,
2:00because it means you're going to have
2:02the exact same color highlighting
2:04as I have on my screen.
2:05It will just make it easier to follow that you're
2:07typing the right thing.
2:08But if you want to choose another theme, say,
2:10for example, One Dark Pro, you can click on this, and just
2:13click Install.
2:14But in my case, I'm going to choose Monokai Pro.
2:17So let me just set the color theme, and choose Monokai Pro.
2:20So let me just move this back, delete this.
2:23Now, you certainly want to search for Python,
2:25and click Python here.
2:26This is going to give you IntelliSense,
2:29which is effectively all of your auto completion.
2:31So do you know what?
2:32I'll just uninstall this so I can reinstall it for you.
2:34So all you would do would be super simple.
2:37Just search for Python, and then click Install here.
2:41That's going to install it, simple as that.
2:43Now, the other one is Better Jinja.
2:45I would suggest you get this one.
2:47Again, I'll uninstall it just to show you.
2:49Again, all you need to do is click Install,
2:51and that's going to install.
2:52And the last one is this one here, Cisco iOS Syntax.
2:56I would suggest you search for this and also install this.
2:59We'll certainly be making use of these extensions
3:01throughout the course.
3:02OK.
3:02Now, the really important one, which
3:04I'm going to suggest you install,
3:05and this is needed to be able to login to our Ubuntu VM,
3:10is something called Remote SSH.
3:11And I found this one by review in a fallacy
3:13between Ogletree and Trevor.
3:15Trevor recommends this all the time,
3:16and I must say he was bang on the money with it.
3:18So if you just go here, and click Install for Remote SSH,
3:22now we also have the Remote SSH extension.
3:26OK, so now that we have the Remote SSH extension installed,
3:29here is what we're going to do.
3:31Let's go back to our Ubuntu VM and get the IP address.
3:34I'll just minimize this, move this over a little bit,
3:37and I'll go into my Virtual Machine
3:39here, type in the password.
3:40I'll just full screen this to make it a little bit easier.
3:43Clear the screen, we'll do ip adder.
3:45And here is the IP address.
3:47Here, 192.168.31.129.
3:52So what I want to do is to be able to login to this Virtual
3:55Machine using my Remote SSH from VS Code.
3:58So let's close this again.
4:00And what I want to do is, on the left hand side here,
4:02we see a Remote Explorer.
4:03If we click on this, what I want to do is select SSH targets.
4:08Now, I've already got a target here from a previous session.
4:10I'm just going to add a new one.
4:12And all I'm going to say is, SSH,
4:14and my username is ipvzero.
4:17And I'll do @ and type in the IP address 192.168.31.129 it was.
4:23And hit Enter, and hit Enter again.
4:25And its saying host has been added.
4:27OK, so what I'm going to do is right
4:28click this and Connect to Host in Current Window.
4:32And I'm going to choose the platform as Linux.
4:34It'll show me the SSH fingerprint.
4:36I'm going to say Continue.
4:37I need to enter the password.
4:39So I type in the password I created for that VM, which
4:42is the sudo password.
4:43Type it and hit Enter.
4:44And now, look at that, we've actually logged into the VM
4:48directly from Windows.
4:49So if we do an LS, we now have access to that VM
4:52directly from our VS Code.
4:54And what I can do is develop here.
4:56So if I want to create a new file, I can just say New File.
5:00And let me just Save this As.
5:01And you'll notice that it actually saving it
5:03within the path of the VM.
5:05Look all these folders.
5:06This is my Linux environment here.
5:07So let me just create a file, just called test1.py,
5:11hit Enter.
5:11And at the bottom right, its saying,
5:13do you want to install the recommended
5:14extensions for Python?
5:15We're going to say Install.
5:17Now, we need to reload the window for py lines to work.
5:19Now, because its reloaded, I've been
5:21prompted to re-enter the password for the VM.
5:23So I'll type in that password once again at the top, hit
5:25Enter.
5:26OK, let me just move this over here.
5:28And what I can say is, for i in range.
5:31And you can see, we've got all the auto-completion good
5:33on here.
5:34Just say 0 to 11, and we'll just print i.
5:38And if I push Control S, that's going to save the file.
5:41And here's the thing, if we go down to the terminal here,
5:43we do an ls.
5:44Look at this, we now have a new file here, test1.py,
5:47that's now being created from our Windows development box,
5:51directly onto our Ubuntu VM.
5:54So on this terminal down here, I can just
5:55say python3 test1.py, hit Enter.
5:58And its going to execute that script.
6:00So this is how we can install VS Code locally on Windows
6:03and just SSH into the VM.
6:07Now, if you don't want to do it this way,
6:08you can just directly install VS Code right onto the VM.
6:12So let me show you how you can do that as well.
6:14So let me just Minimize this.
6:15Let's open up the VM, and let me just login.
6:18And again, just before we install VS Code locally,
6:20if we do an ls, look here, we've actually
6:23created that test1.py file from our Windows machine.
6:26And you can just execute it from here,
6:28and there's that code there.
6:30OK, so what we're going to do here to install VS Code,
6:32we're going to use the Snap package manager.
6:34So what I'm going to say is, sudo snap install, dash
6:37dash, classic code.
6:39And I hit Enter, type in my password.
6:41Nope.
6:42Type in the password correctly, that would help.
6:44And now, it's going to install VS Code for us.
6:46Perfect.
6:47Now, the way we can open code is just type in the word code
6:49now, hit Enter.
6:51And that is going to launch Visual Studio Code.
6:53So now, we have the exact same platform directly
6:56installed on our Ubuntu VM.
6:58And we can create files just the same way.
7:00Create New File, Save it As.
7:02And let's just call this one test2.py.
7:04And again, in the bottom here, we want to click Install.
7:07And again, we want to install all of our extensions.
7:10Now, it's seen here, no Python interpreter is selected.
7:13So if you get this problem, we need
7:15to select the Python Interpreter.
7:16So just click this, and we're going to choose,
7:18in this case, then Python3.
7:20And then I'll reload the window.
7:22Perfect.
7:23And again, just the same as before.
7:24And before I do anything, what I'm going to say
7:26is going to Settings, Preferences, Settings.
7:29And I'll change the font size to be a little bit bigger
7:31so its easier to see.
7:32Let's choose 24.
7:33OK.
7:34And again, what I want to do is use Monokai Pro for the theme.
7:38Let me just Install this, perfect.
7:40Click on this here.
7:41And again, what we can say is print, I love CBT Nuggets.
7:45Control S to Save.
7:47If we go back to our terminal, we do an ls,
7:50we have our test2.py file.
7:51Let's just run it.
7:52And there we have it.
7:54So we've seen how we can install VS Code directly onto Windows.
7:57And we can Remote SSH into our Ubuntu system.
8:00Or alternatively, if you find it easier
8:03just to install VS Code directly on the Linux box,
8:06you can do that too.
8:07Which one is better?
8:08Well, there really isn't a better one.
8:10Whatever you prefer is OK.
8:12So now that we have our Eve-NG running,
8:14we have our images installed, we have a development environment,
8:16and our Ubuntu box set up.
8:18Let's see how we can build a simple topology within Eve-NG
8:22and reach those machines from within this development
8:24box on Ubuntu.
8:25And that is what we're going to be
8:27doing in the very next Nugget.
8:28So I hope this has been informative for you,
8:30and I'd like to thank you for viewing.
Device Connectivity
0:09Hey guys, and welcome back.
0:11So in the previous Nugget, we had just
0:13installed VS Code within our automation system or Ubuntu VM.
0:17Now, what we want to do is to be able to build a topology
0:20and be able to reach those devices from that automation
0:24system.
0:25Let's see how we can do that then.
0:27OK, so let me just open back up this virtual machine.
0:30And what I'm going to do is also right click on this VMware
0:34and choose another VMware.
0:36And what I want to do here is switch on the EVE-NG.
0:38If you click on this, and Play this virtual machine.
0:41So we have both of the VMs up and running,
0:43EVE-NG on the left and our Ubuntu on the right.
0:46OK, so I'll just say root Eve, and let's go
0:48to our browser and browse to the EVE-NG address of 128.
0:52OK, so let's login.
0:53OK, so from now what I want to do here, is just right click,
0:56and I'll choose two nodes.
0:58And what I'll do is, I'll take an Arista device so you
1:00can see how that is done.
1:01And I'll also take a Cisco Router and Save here.
1:05And I'll also take a Cisco Switch.
1:07This can just be my out of band Management Switch here.
1:10I'll choose Switch, and I'll just change the icon here.
1:13You don't have to do this, but I'll just
1:14change it to another icon.
1:15So it's that out of band one, and I'll change the name
1:18to Management Switch.
1:19OK, so let me Save this.
1:21So this is going to be my Management Switch.
1:23These two devices are going to be the actual network which
1:25I'm trying to reach.
1:26So what I want to do, in the case of the Cisco device,
1:29just connect it to one of the interfaces.
1:31So in this case, I'm going to connect
1:32from g0/0 to g0/0, that's fine.
1:35Now, in the case of the Arista device,
1:37that actually has a Dedicated Management Interface,
1:40which actually saves us a little bit of configuration.
1:42It's quite cool.
1:43So connect this, and instead, we want
1:45to choose the MGMT1 interface.
1:48And let's just also connect these two devices together.
1:51Let's pretend this is the actual network.
1:52So we'll just do Eth1 here to g0/1.
1:55That'll do fine.
1:56Now, the way we can reach into this VM, what we have to do
1:59is right click, and choose Network.
2:01And we need to choose ManagementCloud0.
2:04So if we Save this and connect this to our Management
2:08Switch here, and push Save.
2:10What I'm going to do is just say More and Start All Nodes.
2:13I'll give this a few minutes to let them boot up.
2:15OK, so let's go into the Cisco device first,
2:17and I'll hit Enter.
2:18I'll say No.
2:19OK, so I'll say Enable will give our device a hostname.
2:22So I'll just say hostname and just call it CiscoRouter.
2:26I want to give a username.
2:28So I'll say username john, which is my name.
2:30I'll say it privilege 15, and I'll
2:32say the password is equal to password1.
2:35I'll create a domain name.
2:37So I'll say, ip domain-name, and I'll just go with cisco.com.
2:41I'll say ip ssh version 2.
2:43I'll say crypto key, generate rsa, modulus 1024.
2:48I'll go into my vty line.
2:50So line vty 0 4.
2:52I'll say transport inputs ssh, and I'll say login local.
2:58Now let me just exit back, and I'll say vrf definition MGMT.
3:03I'll say address family ipv4.
3:06And then what I want to do is to go
3:08into my Management Interface.
3:09So in this case, this is going to be g0/0.
3:13So I'll say int g0/0.
3:15I'll say vrf forwarding and then the name
3:18of the vrf, which is MGMT.
3:20And now what I want to do is to create
3:22an out of band management IP address.
3:24Now, the management range I'm going to choose
3:26is going to be the same that is within this range up here.
3:29So within the 192.168.31.0/24 for me.
3:34So let's say, for example, your EVE-NG was 192.168.56.119,
3:40you would want to use the IP address space 192.168.56.0/24.
3:46Mine says 31, so I'm going to be using
3:48that for my management range.
3:50So I'll do ip address, 192.168.31,
3:53and I'll just say 101, and give it a slash 24 mask,
3:57and then say no shut.
3:59And if I just do wr to save this, that should be me there.
4:02So what I could do now is to ssh into this device from my Ubuntu
4:06machine.
4:07So again, you've got two options.
4:08You can use your remote ssh here to login
4:11or connect to host, type in the password for the Ubuntu
4:14machine.
4:14And now I'm inside the Ubuntu VM.
4:17I'll just login this way and use the terminal directly
4:19from the box.
4:20Whatever way you prefer is OK.
4:22So for simplicity, I'll just go directly to the machine here,
4:25and I'll maximize this to make it a little bit easier to see.
4:28Now, what I want to do is try to ping that machine.
4:30Now remember, if I do my IP address,
4:32we actually are on the same network.
4:34Can you see that?
4:35We're in the 192.168.31/24.
4:39This address happens to be 129, whereas my EVE-NG machine
4:43happens to be 128, and the Cisco box is 101.
4:48So if I do ssh, and the Cisco device has a username of john.
4:51And I'll do 192.168.31.101, hit Enter.
4:56Now look at this.
4:57This is a very common problem when using Cisco devices,
5:01because they use out of date ciphers.
5:03So the way we can fix this is say,
5:05sudo nano /etc/ssh/ssh_config, type in the passwords.
5:11And what I'm going to do here, I'm
5:13going to uncomment StrictHostKeyChecking.
5:16And I'll change this to No.
5:17These are some settings I like.
5:19I'll uncomment out these ciphers here and at the very bottom.
5:23Now, what I'm going to say down here is KexAlgorithms space,
5:27and then a +diffie-hellman-group14-shar1.
5:34And then if I press Control-O to write out
5:36and then Control-X to escape, clear here.
5:39Now if I try to login ssh john@192.168.31.101.
5:46Now, if I just take the password, which is password1,
5:49we have successfully logged into the device
5:51through ip int brief, and now we can reach our topology
5:54from our automation system, which means we can run scripts
5:58against our topology.
5:59So that was the Cisco device.
6:01How do we get access to the Arista device?
6:03Well, let's quickly do that as well.
6:05So I'll just exit out here.
6:06Now, Arista make it really, really easy.
6:08We don't have to configure a VRF because the management
6:11interface here is already within its own VRF.
6:14And the good news is, is the ssh is already enabled.
6:17The only thing we have to worry about here, is if we say admin,
6:20again we're going to say enable, and for the first time
6:23we're going to say zerotouch cancel, again.
6:25This is going to reboot the box.
6:27Once it comes back up, though, we're
6:28not going to have this issue.
6:30Just give us a minute or two to reload.
6:32OK, perfect.
6:32So I want to say admin again.
6:34To login, I'll just say enable, conf t,
6:37and we'll just say hostname.
6:39And we'll just call this one AristaRouter.
6:40Now again, we don't have to configure a VRF within Arista,
6:44and we don't have to enable ssh.
6:46All I'm going to do is create a username.
6:47So I'll say username john, privilege 15,
6:51and I'll say secret password1.
6:54There we go.
6:54And then what I want to do is to go
6:56into interface management 1, which
6:58is the management interface.
7:00And again, I want to give that an address
7:02within that same range.
7:03So my range is going to be 192.168.31, and then
7:07just choose an IP address.
7:09I'll say 102 for this one, and give it a slash 24 mask,
7:12and no shut it.
7:13And then what I can do is just Save this with the wr,
7:16and this has been successfully saved.
7:18Now again, if we go back to our Ubuntu VM,
7:21go back here, and just clear the screen.
7:23And if we just say ssh john, and then we do 192.168.31.102,
7:28hit Enter.
7:29Type in the password of password1.
7:31Now we have access to the Arista device.
7:33So show ip int brief.
7:35There we go.
7:36Show run.
7:37No problem at all.
7:38So because we have ssh access to these devices,
7:41we can now target them for automation, no problem at all.
7:44So this is how we can set up our configuration locally,
7:46where we can have devices local on a machine and our EVE-NG VM.
7:51However, but also as another option available to us,
7:54and that is in the form of the Cisco DevNet Sandboxes.
7:57And that is what we're going to be looking at next.
8:00So I hope this has been informative for you,
8:01and I'd like to thank you for viewing.
DevNet Sandboxes
0:10Hey, guys, and welcome back.
0:11So in the previous Nugget, we had just
0:13set up our EVE-NG Topology on our local machine.
0:16Now, what we want to do is to be able to explore
0:19how we can access devices via the internet.
0:22So let's check it out.
0:23Let's open up a new tab here, and you just
0:25Google Cisco DevNet Sandbox.
0:28And just click this top link here.
0:30Now, you're going to have to sign up
0:31to be able to access these.
0:33I've already signed up, so I'm going to click login.
0:35But if you haven't, sign up for free here.
0:37So click login, and I'm just going
0:39to log in with my IP Visio GitHub accounts.
0:42OK, so what I'm going to do is get started by Sandbox.
0:44OK, now, here's the thing.
0:45There are two types of Sandbox.
0:47We have the Always-ON Sandbox, and we have Reservable Sandbox.
0:52The one we going to be exploring as Always-ON.
0:55The good news about this one is that it's always on.
0:57It requires no reservation at all.
1:00Anyone can access it at anytime.
1:02You don't have to book anything.
1:03You don't have to have a VPN connection.
1:06Your simple internet connection will
1:07be able to get you into the device quite [INAUDIBLE]..
1:09The limitation of using an Always-ON Sandbox
1:12is that you're just getting access to one device.
1:14So it's OK in a limited form.
1:16You can test out pushing some configurations to a device.
1:19Feel your automation system.
1:20But if you really want to automate it
1:22to a large topology, you're going
1:23to be want to use something, like EVE-NG,
1:26or perhaps, reserve an actual Sandbox.
1:29Because when you reserve a Sandbox,
1:30what you're going to be able to do
1:32is to access multiple devices.
1:33But for now, all we're going to be
1:35doing as looking at the easily accessible Always-ON Sandbox.
1:39So dependent on the type of device
1:40you want, you can look for an XE device.
1:43You can look for an XR device, or maybe, perhaps, you
1:45can look for an NX device.
1:47This is our Nexus devices for the data center.
1:50The reality is you can just browse through the Sandbox
1:52and find what you like.
1:54For an example, let me access an XE Sandbox.
1:57So I will just search for XE.
1:58These ones here are Reservable Sandboxes.
2:01This means you're going to have to download the Cisco VPN,
2:05and connect 10 via a VPN, and book a time slot.
2:08But in the case of the Always-ON,
2:09we can just access it directly from an internet connection.
2:12So let's just choose one of these
2:13then, so we'll choose the iOS XE CSR recommended Always-ON.
2:17Click this.
2:18And if we scroll down here, it's going
2:20to tell us the login details.
2:22So as opposed to typing a numerical IP address, if we
2:25just take this address here, and as opposed
2:28to accessing it over port 22, we're
2:30going to access over SSH 8181.
2:33If we log in with the name, developer,
2:35and the password, C1sco12345, with the number one as the I,
2:40we can access this Always-ON Sandbox.
2:43So let me show you this, so all I'm going to do
2:45is get out my virtual machine.
2:47OK, so let's clear here.
2:49And what I'm going to do is copy this address here, so
2:51copy here.
2:52And I'm going to say, SSH, and the login name
2:56is Developer, here.
2:57And just paste the address.
2:58And because it's not on the default port, or port 22,
3:01I'm going to have say, P8181.
3:04So if I hit enter, and I type in the password
3:07of C1sco12345 with a one for the I, so C1sco12345.
3:14Hit enter.
3:15Now, I've logged into this device,
3:17so I can say show IP int brief.
3:19I can say, show run.
3:20Scroll on through, and I can also configure things,
3:22like, say, router ospf 46.
3:25And if I just do a show run, that's
3:27now going to be configured on the box.
3:28Scroll on down.
3:30There, we can see a router ospf 46 is actually been configured.
3:33So this is a real easy way, where
3:35we can access to the device online and push our automation
3:38scripts to that device.
3:39And this requires no more setup than simply getting the login
3:43details and just ssh into that box.
3:46Now, all I will say is that not every box has
3:48the same credentials, so what you should do
3:50is look for each box individually.
3:52So if you go into an XR box, this
3:54is going to have a different login than, for example,
3:57this XE box.
3:58Same way with the Nexus devices.
4:00Okie doke, so I do think we now have some viable options
4:03to set up labs.
4:04We have all the building blocks in place
4:06to begin automating networks.
4:08So from now on, how about we start doing the fun stuff
4:10and begin automating?
4:12Well, step on ahead to the next skill.
4:13That's what we're going to be doing,
4:14and I hope this has been informative for you.
4:16And I'd like to thank you for viewing.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
$708
seat / year