1 00:00:00,810 --> 00:00:08,640 In the previous video, we have done installing ubuntu server, now in this video, we are going 2 00:00:08,640 --> 00:00:14,310 to learn how to connecting ubuntu server with the router inside gns3. 3 00:00:14,310 --> 00:00:16,760 Let’s just start. 4 00:00:16,760 --> 00:00:30,119 Shutdown the ubuntu server first, we can just close this, and then choose power off 5 00:00:30,119 --> 00:00:38,430 Click on the ubuntu server and then click settings, in the network section, here we 6 00:00:38,430 --> 00:00:46,610 can see that we have 4 network adapter, but by default, we only have 1 active network 7 00:00:46,610 --> 00:00:48,820 adapter. 8 00:00:48,820 --> 00:00:58,120 Here adapter 2 is not active, adapter 3 is not active and adapter 4 is also not active. 9 00:00:58,120 --> 00:01:03,010 So by default, only adapter 1 is active. 10 00:01:03,010 --> 00:01:06,869 And this adapter is attached to nat. 11 00:01:06,869 --> 00:01:10,240 Nat is used to connect to internet. 12 00:01:10,240 --> 00:01:19,159 Now, we want to connecting this ubuntu server with router inside gns3, to do that, we will 13 00:01:19,159 --> 00:01:22,390 add one more adapter here. 14 00:01:22,390 --> 00:01:30,289 So click enable network adapter, for attached to, we will leave it as not attached like 15 00:01:30,289 --> 00:01:31,399 this. 16 00:01:31,399 --> 00:01:44,180 Okay, we have done here, let’s go to gns3, go to preference, in the virtualbox vms sections, 17 00:01:44,180 --> 00:01:48,799 click new to import new virtual machine. 18 00:01:48,799 --> 00:01:59,289 Here gns3 will detect all vm in the virtualbox, in this case, I just have 1 VM, which is ubuntu, 19 00:01:59,289 --> 00:02:03,999 so choose this and then finish. 20 00:02:03,999 --> 00:02:11,379 Next we need to edit this vm to add new network adapter, in the network section, here we can 21 00:02:11,379 --> 00:02:19,549 see that by default we only have 1 network adapter, let’s add this become 2. 22 00:02:19,549 --> 00:02:22,370 Okay we have done here. 23 00:02:22,370 --> 00:02:27,819 Here we can see ubuntu, let’s import this to the project. 24 00:02:27,819 --> 00:02:32,849 Let’s connecting ubuntu server with router1 and router2. 25 00:02:32,849 --> 00:02:46,530 Let’s remove the cable between router1 and router2 first, let’s import a switch, connecting 26 00:02:46,530 --> 00:02:57,610 router1 to the switch, router2 to the switch, and then from switch to ubuntu. 27 00:02:57,610 --> 00:03:01,040 Here we can choose ethernet0 and ethernet1, 28 00:03:01,040 --> 00:03:12,180 Ethernet0 is nat adapter, and ethernet1 is not attached adapter, in this case, we will 29 00:03:12,180 --> 00:03:14,000 choose ethernet1. 30 00:03:14,000 --> 00:03:22,030 Okay we have done, next, here we can see that the ubuntu is still red, this is means that 31 00:03:22,030 --> 00:03:24,390 ubuntu is not started yet. 32 00:03:24,390 --> 00:03:31,409 Let’s start it, right click and choose start. 33 00:03:31,409 --> 00:03:36,250 Wait for a minute until the ubuntu is started. 34 00:03:36,250 --> 00:03:44,400 While waiting the ubuntu for a booting, Let’s make sure the ip address on the router, 35 00:03:44,400 --> 00:03:56,909 Router1, do show ip interface brief, here we can see that in the fa0/0, the ip address 36 00:03:56,909 --> 00:03:59,579 is 10.10.10.1, 37 00:03:59,579 --> 00:04:12,150 Router2, do show ip interface brief, here we can see that the ip address of fa0/0 is 38 00:04:12,150 --> 00:04:13,150 10.10.10.2 39 00:04:13,150 --> 00:04:21,150 And then for ubuntu server, let’s say the ip address will be 10.10.10.254. 40 00:04:21,150 --> 00:04:30,160 Let’s back to the ubuntu, let’s login, 41 00:04:30,160 --> 00:04:42,290 To check the ip address on the ubuntu, the command is ip address. 42 00:04:42,290 --> 00:04:50,669 Here we can see that we have 2 interfaces, enp0s3, this 43 00:04:50,669 --> 00:04:57,930 interface is connected to internet, and then we also have enp0s8 that connected to the 44 00:04:57,930 --> 00:05:00,800 router inside gns3. 45 00:05:00,800 --> 00:05:13,000 Later, we will configure the ip address of enp0s8 become 10.10.10.254 . let’s start 46 00:05:13,000 --> 00:05:18,210 the configuration, 47 00:05:18,210 --> 00:05:24,889 nano /etc/netplan/00 and then tab, 48 00:05:24,889 --> 00:05:31,800 we can use autocomplete here, let’s try to remove this first, 49 00:05:31,800 --> 00:05:40,910 here let’s type et and then tab, here we can see that this is autocomplete, next let’s 50 00:05:40,910 --> 00:05:50,440 type net and than tab, okay this is not autocomplete, let’s type p and then tab. 51 00:05:50,440 --> 00:05:53,630 Okay this is autocomplete. 52 00:05:53,630 --> 00:05:59,330 And then 00 tab, okay this is autocomplete. 53 00:05:59,330 --> 00:06:05,889 So this is the command to configure the ip address on the ubuntu server, let’s enter 54 00:06:05,889 --> 00:06:06,889 here. 55 00:06:06,889 --> 00:06:14,789 Here we can see that by default, enp0s3 is dhcp client, so the ubuntu server is get an 56 00:06:14,789 --> 00:06:19,509 ip address automatically on enp0s3. 57 00:06:19,509 --> 00:06:28,530 Now let’s configure enp0s8 using static ip address, here let’s type enp0s8, pay 58 00:06:28,530 --> 00:06:35,740 attention here that we use 0, not o. 59 00:06:35,740 --> 00:06:45,860 And then here we can type the ip address, 10.10.10.254/24, 60 00:06:45,860 --> 00:06:54,190 Okay we have done here, to exit and save this configuration, we can use ctrl + x, and then 61 00:06:54,190 --> 00:06:57,990 y, and then enter. 62 00:06:57,990 --> 00:07:01,410 Okay here we get an error message permission denied. 63 00:07:01,410 --> 00:07:08,490 Ctrl + x again here and then choose no to exit without save. 64 00:07:08,490 --> 00:07:19,360 Here we need to use sudo command, so sudo nano /etc/netplan/00-installer-config.yml. 65 00:07:19,360 --> 00:07:22,800 enter, 66 00:07:22,800 --> 00:07:26,970 We need to type our password here, 67 00:07:26,970 --> 00:07:45,840 Now let’s configure the ip address of enp0s8 again. 68 00:07:45,840 --> 00:07:52,860 Okay we have done, ctrl + x to exit, y and then enter. 69 00:07:52,860 --> 00:08:03,009 Okay we are success now, to apply the ip address configuration, the command is netplan apply. 70 00:08:03,009 --> 00:08:09,010 Okay here we get an error message permission denied again, remember that we need to use 71 00:08:09,010 --> 00:08:10,860 sudo, 72 00:08:10,860 --> 00:08:14,460 So sudo netplan apply. 73 00:08:14,460 --> 00:08:19,990 Let’s check the ip address again, 74 00:08:19,990 --> 00:08:26,360 Ip address, here we can see that the ip address of enp0s8 is 10.10.10.254. 75 00:08:26,360 --> 00:08:36,740 Let’s try ping to router1 and router2, ping 10.10.10.1, 76 00:08:36,740 --> 00:08:37,930 Okay this is success. 77 00:08:37,930 --> 00:08:48,050 Let’s try ping to router2, ping 10.10.10.2, okay this is also success. 78 00:08:48,050 --> 00:08:53,610 Okay so now we are success to connecting ubuntu server with router inside gns3. 79 00:08:53,610 --> 00:09:00,870 I think enough for this video, in the next video, we are going to configure ssh on the 80 00:09:00,870 --> 00:09:06,529 router so we can remote the router from ubuntu server. 81 00:09:06,529 --> 00:09:09,760 Thank you for watching and see you on the next video.