1 00:00:14,340 --> 00:00:18,720 In this video and lab, I'm once again using genus three. 2 00:00:18,900 --> 00:00:21,960 Genus three makes this process a very easy. 3 00:00:22,080 --> 00:00:28,170 One of the best devices to use in June three is the network automation container. 4 00:00:28,530 --> 00:00:35,340 If you don't have this device as an installed device, look under available devices in Genius three 5 00:00:35,340 --> 00:00:42,030 and drag the network automation container to your workspace to install it in S3. 6 00:00:44,020 --> 00:00:49,660 In my example, I already have the network automation container installed, so I'm going to drag it 7 00:00:49,660 --> 00:00:51,730 to the Genius three workspace. 8 00:00:52,420 --> 00:00:59,890 What I'll also do is drag an Ethernet switch to the Genie three workspace and run that on the Genie 9 00:00:59,890 --> 00:01:00,850 three VM. 10 00:01:02,340 --> 00:01:06,570 In my example, I'm running all the devices on the S3 VM. 11 00:01:10,000 --> 00:01:13,030 The network automation container boots up very quickly. 12 00:01:13,630 --> 00:01:16,360 So I want to have the Ethernet switch. 13 00:01:18,610 --> 00:01:21,040 In the topology which will allow. 14 00:01:21,980 --> 00:01:30,890 The Docker container to get an IP address from the net cloud and also have internet connectivity. 15 00:01:32,240 --> 00:01:39,590 The devices I'm going to automate, however, are Cisco Viral iOS V Layer two switches. 16 00:01:44,000 --> 00:01:47,420 And Cisco iOS V Routers. 17 00:01:48,120 --> 00:01:48,660 Cisco. 18 00:01:48,660 --> 00:01:52,890 Viral images are recommended for use in Genius three. 19 00:01:53,490 --> 00:02:02,880 You could use other devices, but please note that you may encounter issues when using dynamic images. 20 00:02:03,360 --> 00:02:09,240 So in this example, I'm going to use a viral images and a network automation container. 21 00:02:09,539 --> 00:02:14,430 Now, in this video, I'm going to build the topology from scratch. 22 00:02:14,700 --> 00:02:17,010 You don't have to do that if you don't want to. 23 00:02:17,340 --> 00:02:21,900 You can download the preconfigured topology that I've shared. 24 00:02:21,900 --> 00:02:27,690 So rather than building the topology, you can simply download it and import it into three. 25 00:02:28,830 --> 00:02:31,980 I'm going to connect the Ethernet switch to the net cloud. 26 00:02:33,490 --> 00:02:34,900 Connect the. 27 00:02:35,960 --> 00:02:39,530 Janus three is a switch to the iOS of Layer two. 28 00:02:39,530 --> 00:02:42,830 Switch and connect the switch to the router. 29 00:02:44,450 --> 00:02:47,360 So we'll start off with a simple topology. 30 00:02:48,200 --> 00:02:53,630 I'll change the switch name to switch one router name to router one. 31 00:02:54,490 --> 00:02:56,950 Very basic topology to start with. 32 00:02:58,720 --> 00:03:04,630 But we'll expand this topology and make it more complex as we go through the course. 33 00:03:06,350 --> 00:03:10,820 But initially I want to get you started automating as quickly as possible. 34 00:03:11,000 --> 00:03:13,310 You can make the topology look pretty. 35 00:03:13,460 --> 00:03:15,770 I'm not worried too much about that. 36 00:03:18,240 --> 00:03:19,950 I simply want to get started. 37 00:03:20,630 --> 00:03:25,790 So I'll start up the network devices and open up consoles to them. 38 00:03:26,720 --> 00:03:31,190 As you can see here, the iOS V player, two switches booting. 39 00:03:32,050 --> 00:03:34,720 And so is the EOS virata. 40 00:03:35,260 --> 00:03:38,110 The network automation container has already booted up. 41 00:03:38,530 --> 00:03:46,150 If config shows us that the network automation container only has an IP version six address, it doesn't 42 00:03:46,150 --> 00:03:47,950 have an IP version for address. 43 00:03:49,400 --> 00:03:53,480 We're not going to manage the Ethernet switch through the console. 44 00:03:58,040 --> 00:04:06,140 What I'm going to do initially, however, is configure the network automation container to use DHCP. 45 00:04:07,290 --> 00:04:14,520 So cat it seen network interfaces shows us that these lines have been commented out. 46 00:04:14,790 --> 00:04:26,070 So I'm going to use nano ETSI network interfaces and I'm going to uncomment these two lines and press 47 00:04:26,070 --> 00:04:31,560 control X and Y to save the file and I'm going to overwrite the file. 48 00:04:31,950 --> 00:04:40,110 So again, I've used Nano, a simple text editor, to uncomment these two lines, and I've saved the 49 00:04:40,110 --> 00:04:40,770 file. 50 00:04:41,070 --> 00:04:44,130 Now, in the prebuilt topology that I've given you. 51 00:04:45,270 --> 00:04:47,010 That's already been done for you. 52 00:04:47,430 --> 00:04:56,220 So you can simply import the topology and that configuration would have already been completed for you. 53 00:04:56,760 --> 00:05:00,780 I'm going to stop at the network automation container and start it up again. 54 00:05:01,460 --> 00:05:05,270 And open up a console to the network automation container. 55 00:05:06,180 --> 00:05:10,170 As you can see here, it's obtained an IP address. 56 00:05:10,410 --> 00:05:11,880 So if config. 57 00:05:12,730 --> 00:05:17,350 Shows us the IP address of the network automation container. 58 00:05:17,890 --> 00:05:25,390 The net cloud runs a DHCP server and has allocated an IP address to the network automation container. 59 00:05:25,660 --> 00:05:28,720 You don't have to use the net cloud if you don't want to. 60 00:05:28,990 --> 00:05:36,790 You could configure your Cisco router as a DHCP server, but to keep things simple and to get started, 61 00:05:37,240 --> 00:05:41,470 I've used the net cloud as the DHCP server. 62 00:05:43,050 --> 00:05:48,810 The net cloud also gives us internet access so I can use commands such as APT. 63 00:05:48,930 --> 00:05:54,660 Get update to update references on the network automation container. 64 00:05:58,080 --> 00:06:01,320 And I can also ping sites on the internet. 65 00:06:02,040 --> 00:06:09,540 So I would recommend the use of the net cloud and the network automation container in Janus three. 66 00:06:10,050 --> 00:06:17,820 One of the reasons for using the network automation container is that it comes preinstalled with both 67 00:06:17,820 --> 00:06:23,160 Python version 2.7 as well as Python three. 68 00:06:23,520 --> 00:06:26,040 In this case, Python 3.5. 69 00:06:27,000 --> 00:06:31,170 You could install a later release of Python if you want to. 70 00:06:32,710 --> 00:06:36,640 But for our example's python, 3.5 suffices. 71 00:06:36,670 --> 00:06:38,410 In other words, it's good enough. 72 00:06:38,710 --> 00:06:46,570 But if you want to install a later release of Python such as 3.6 or later, you can do that. 73 00:06:46,900 --> 00:06:50,650 But for our examples, Python 3.5 is good enough. 74 00:06:51,700 --> 00:06:59,770 So again, I could run Python version three and print something such as Network Automation or Hello 75 00:06:59,770 --> 00:07:03,220 World within the network automation container. 76 00:07:03,790 --> 00:07:12,340 I could do something such as X equals one, y equals to x plus y equals three. 77 00:07:12,520 --> 00:07:15,920 But that's not really the focus of this course. 78 00:07:15,940 --> 00:07:18,940 The focus of this course is network automation. 79 00:07:19,720 --> 00:07:26,020 So in Google, I'm going to do a search for Python three Telnet. 80 00:07:27,830 --> 00:07:34,130 My first hit in Google is the Telnet library on the Python org website. 81 00:07:34,670 --> 00:07:40,910 And this gives us details of the Telnet library available in Python. 82 00:07:41,270 --> 00:07:46,110 I'm going to scroll to the end of the page after the end of the page. 83 00:07:46,130 --> 00:07:49,460 We find this example Python script. 84 00:07:49,970 --> 00:07:54,110 I'm going to copy that and I'm going to open up a text editor. 85 00:07:55,110 --> 00:08:02,040 In this case, I'm using sublime text and I'm going to paste that script into Sublime text. 86 00:08:03,390 --> 00:08:11,340 Now when it comes to Python ideas, they are many integrated development environments available for 87 00:08:11,340 --> 00:08:12,150 Python. 88 00:08:13,610 --> 00:08:16,760 One of the most popular is pie charm. 89 00:08:17,060 --> 00:08:24,260 You can download a free version of Pi Chom and use that to edit your scripts. 90 00:08:24,800 --> 00:08:34,520 In these examples, I'm going to be creating scripts such as my first Python three script directly on 91 00:08:34,520 --> 00:08:36,320 the network automation container. 92 00:08:36,590 --> 00:08:45,350 However, using Nano for editing scripts isn't very easy, so you may prefer to use an ID such as pie, 93 00:08:45,350 --> 00:08:49,010 charm or sublime text. 94 00:08:51,560 --> 00:08:53,120 For doing your editing. 95 00:08:54,740 --> 00:09:01,370 So what I'm going to be doing in a lot of examples is editing the script and creating the script in 96 00:09:01,370 --> 00:09:05,870 sublime text, and then I'm going to copy it into three. 97 00:09:06,410 --> 00:09:07,820 Again, it's up to you. 98 00:09:08,660 --> 00:09:10,460 Pie charm is very popular. 99 00:09:10,490 --> 00:09:12,740 Sublime text is very popular. 100 00:09:14,610 --> 00:09:16,590 Microsoft Studio Code. 101 00:09:18,430 --> 00:09:24,850 Is another integrated development environment that you may prefer if you're used to using Microsoft 102 00:09:24,850 --> 00:09:25,720 products. 103 00:09:26,050 --> 00:09:27,520 So it's really up to you. 104 00:09:28,060 --> 00:09:37,240 You could use pie charm, sublime text, Visual Studio, or you could simply search in Google for Python 105 00:09:37,240 --> 00:09:44,920 ID and use one of the other ideas that are freely available on the Internet. 106 00:09:45,620 --> 00:09:50,060 In a lot of cases, you get free and paid versions of IDs. 107 00:09:50,450 --> 00:09:57,560 I suggest that initially you get the free version of an ID such as Petrom charm and use that. 108 00:09:57,560 --> 00:10:06,410 And once you get better at Python, you can invest in a paid version of an ID, but start out by using 109 00:10:06,410 --> 00:10:07,790 something that's free.