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