 We're going to go through the steps of setting up a virtual network of Linux computers. So the idea is that we'll use VirtualBox and we'll create Linux virtual machines inside that and we'll create multiple machines configured so that they can talk to each other inside a network. And we'll do this on Windows and rather than having to manually set up those machines I've created a base virtual machine which we can clone and use some scripts inside Windows to automatically set up the clones of that base machine to set that IP address so that we have one of four different topologies. We assume that you've got VirtualBox installed on your computer. This is demos running on Windows 8 but it's being tested on Windows 7 and it should run on Windows 10 as well. And importantly you've downloaded the five necessary files. You need the base virtual machine which is downloaded as base.zip. We'll uncompress that and I'll use 7zip and extract it here and as that's uncompressing the other four files you need are the Windows command scripts which we'll use to create one of four different topologies. Topology we'll call it number 1, 3, 5 and 7. There are other topologies but we'll only need one of these four. So that base virtual machine is uncompressed now and we'll go to VirtualBox and add it as a machine. So we go and find our folder where that was uncompressed to, this base folder and there should be a file called base.vbox, open that and that creates a pre-configured Linux virtual machine inside VirtualBox and it will call it base. Finally we won't open this machine, don't start it. There's no need to start the machine and you should not. We'll simply make copies of it, we'll clone it in VirtualBox and we'll start the clones. That allows us to have a standard base machine and we can make change to the copies and then we can reset back to the standard base machine when necessary. Rather than cloning it manually inside VirtualBox we've got one of the four scripts that will do it for us. The first one, vntopology01.command is a script that will create a very simple topology with just one node. Let's run it and see what happens. So we double click on that, gives us some instructions, you're about to clone the base VM. It's going to use VirtualBox to do it but not the GUI but the command line version of VirtualBox. Make sure that there are no existing nodes it's saying, currently I have no VMs called node. We'll see later what that means. If we do we'd need to delete them but I don't. So I'm going to press any key to continue and what it does is simply clones base to a new VirtualBox machine called node1. This is topology1 and in topology1 there's simply one computer we'll call node1. It's been cloned, let's continue. After we clone it we want to set it up a little bit so it's renamed to node1 inside the Linux operating system. To do that we need to start node1 so we'll click on it and start and that'll open up the VirtualBox window to boot that node. It takes a while to boot and it's running and booting up and once it's booted we'll log in and these Linux machines have been set up such that the username by default is network and the password is network and the default password for all the services is also network. Because we're running inside a virtual machine there's no need to worry about secure passwords because everyone knows it and it's only local on your computer. The Linux machine, the base configuration is set up to run an Ubuntu Linux server version 16.04 and it's cut down such that it's small in size and it doesn't take much memory to run. We only give it 256 meg of RAM. It has no graphical user interface we need to do everything on the command line. So it boots up and once it's booted if it gets there we'll log in and deploy the node. So once we log in we're going to run this command which is sudo bash vertnet binvn deploy node because we're using topology1 and we want to deploy node1 we'll use the two parameters one and one. We need sudo to perform this command as administrator so let's try it log in as user network password is also network you don't see it but I typed in network and we log in to this node and now we run this command sudo to run this as administrator bash will run a script and the script name is in the directory vertnet binvn deploy node topology1 node1 run it it asks for your password network is the password and it says reboot alright just refresh the configuration so let's reboot and that will reboot the machine and we're done we've set it up we'll see once it's booted we can press any key to continue and that closes the command script and we have a virtual network of one Linux machine called node1 as that's booting again let's explain what's happening importantly the script clones the base machine you never need to start the base machine just clone it and if you do something in node1 and you want to refresh the node then you can simply delete it and clone the base again using the script and that way everyone has the same setup of the machines by simply cloning the same base machine this network has one node it's not very exciting network it's as simple as we have and we can't communicate with other nodes so in a moment what we'll do is we'll remove this node and create another more complicated network with multiple nodes and for the demo we'll use topology 5 so node1 is now started we can log in network password network and now we have a Linux computer we can do things on so we can study computer security on this computer we're not doing anything now we'll just set up the different topology let's shut this one down power off a pseudo let's explain a different network or that shutting down we'll go and have a look at some pictures which illustrate the different topologies we have there are four different topologies provided what we just did is created topology 1 which has a single node node 1 it was set up to have a network interface referred to as ETH 1 with IP address 192.168.1.11 so that summarized in this picture here not a very interesting network we want more nodes so let's continue a demo and look at say topology 5 which will have three different nodes node 1, node 2, node 3 they'll be set up with network interfaces and the corresponding IP addresses such that there'll be two subnets node 1 and 2 will be on one subnet and node 2 and 3 on a second subnet and essentially what we'll have is a client node 1 we can have node 3 act as a server and node 2 as a router and we can do some more interesting networking things with 3 nodes topology 3 has 3 nodes on the same subnet topology 7 has 2 subnets but 2 hosts on subnet 1 and 2 hosts on subnet 2 and a single router let's try topology 5 so we'll go back to virtual box when we create topology 5 what it's going to do is clone the base and create nodes 1, 2 and 3 but before we do that let's delete node 1 that we just created remove it delete all the files don't just select remove only but delete the disk and the configuration files and node 1 is gone don't delete the base leave that there now run our script to create topology 5 double click ok we've deleted the old nodes good press our key to continue good it clones base to create nodes 1, 2 and 3 and then it gives us instructions similar to before we have nodes 1, 2 and 3 created good we're going to start each node start node 1 takes a while and when they have all started we will log in with the same username password network network and run our deploy node script noting we're using topology 5 and on the corresponding node number so we can start all of them let's start node 2 and once that gets going we'll start node 3 as well 3 different windows running so we'll have 3 different Linux computers all running inside virtual box boot up while they're booting we'll come back to the network and see the configuration that we're going to get we're doing node topology 5 so essentially what we have what we're going to create is a topology where we have a subnet with these two computers on the same subnet so node 1 would have IP address 192.168.1.11 and node 2 will be have an IP address 192.168.1.1 on the same subnet but node 2 is also configured to be a router so there's a second subnet so node 2 has a second interface eth 2 and have an address 192.168.2.1 and node 3 is on that same subnet dot 2.21 so what the command script does and the deploy node scripts in the individual nodes is sets up the names of the nodes and the IP addresses so that they are automatically set up in this network let's have a look see which ones have started node 1 is running so let's log in username network password network we needed to configure the node using the sudo bash vert net it's a bit slow the first time but once we've done this deploy node on topology 5 this node 1 says up the top node 1 once we've done it once we don't have to do that again it's just to set up the names correctly and we can reboot that one and let's do it on node 2 password network sudo bash vert net in the end deploy node topology 5 node 2 makes it set up correctly node 1 is booting and we should have node 3 as well password network sudo bash vert net in the end deploy node topology 5 node 3 this one let's reboot node 2 it can be a bit slow to start but once they're up and running essentially everything's very fast when using the command line it's just a booting that may take slow booting multiple machines at the same time node 3 and log into node 1 which is already rebooted network network and while nodes 2 and 3 are booting let's have a look at node 1 one of the commands that we'll use to look at the configuration is I have conflict to look at the configuration of the network interfaces and we set in our picture node 1 has interface ETH 1 so let's look at the configuration of ETH 1 I have conflict ETH 1 on node 1 and shows us some details about the interface of importance to us is the internet address of the IP address and we see it's 192.168.1.11 so the IP address has been set up for creating our internal Linux network it's internal to virtual box these nodes can talk to each other all inside virtual box once node 2 is booted we'll see that that has an interface login node 2 is our router and it's been set up to be a router and it has two interfaces let's look at ETH 1 which has 192.168.1.1 as an IP address it also has ETH 2 192.168.2.1 so it has two different interfaces on separate subnets and node 3 is running let's have a look I have conflict ETH 1 192.168.2.21 just to check that everything's working we can try and communicate between node 1 to node 3 and it should go by node 2 let's pin 192.168.2.21 which is from node 1 where we're running the pin command destination is node 3 and we run that and we see pins running and it's giving us a response and it's giving us some round trip time to communicate via the virtual network from node 1 to node 2 to node 3 in subsequent tasks you'll use this virtual network to look at networking and security issues