01 August 2018

Day 3.1 - Customizing GNS3

Introduction

In the last entry, after some VMware headaches, I got GNS3 up and running. Next step: add the customization I need to build my virtual LAN.

VND Templates

If you recall, I said I was going to refer to virtual network devices running in GNS3 as VNDs to avoid confusing them with virtual traditional machines running in VMWare.

When it comes to VNDs, GNS3 operates from "templates," which are a collection of hardware settings and the specification of what IOS ROM image to use for the VND. VNDs are instantiated using this template, and then configured like a standard hardware device.

When I left off, GNS3 had just asked me what kind of template I wanted to create first:


I'm going to start by creating a basic IOS router template, which will work for now.

First question is whether I want to run the VND inside the GNS3 VM, or on my local computer. I went with the GNS3 VM.

Next I was prompted for an IOS image. I selected the image file I had on hand (Very basic Cisco 2691, with Enterprise Base feature set.)

At this point, suddenly, GNS3 found itself unable to talk to the VM again.

I noticed that it was trying to connect to an IP address on my home LAN... which the GNS3 server does not have, since it's operating inside a host-only network.

I went into Preferences and specified for the GNS3 server to bind to my VMware virtual NIC assigned to the host-only network. When I did this, the GNS3 VM rebooted. After it came back up, I noticed the VM was now showing green in GNS3, which it wasn't before. Good sign.


I went back to add the IOS image and this time it worked perfectly.

Next I was prompted to name my template and specify the platform (2691.)

Next, I was prompted for the default RAM. I checked Cisco's website and found the minimum RAM for this image was 128MB so I went with that.

Next was selecting what network adapters should be attached by default to new instantiations of this template. I only planned to use 1 slot, so I used the default.

Next was selecting a default WAN interface card for new instantiations. I don't need one, so I left it alone.

Next I was prompted for an "idle-pc" value, which is apparently necessary to keep IOS from using up 100% of a CPU core. Helpfully, there was a button to find it, which took about 30 seconds.

I now had a ready-to-use Cisco 2691 template, ready to go.

Adding in VMWare VMs

For some reason, GNS3 also refers to VMWare VMs as "templates." I'm not really sure why this is, because there's only ever one instance of a particular VM. Regardless.

Anyways. Essentially, I followed the steps in this document to add my existing Windows 2016 Server VM as a template.

One problem I have with GNS3's documentation is that it's written almost entirely in the form of tutorials, and is pretty light on the explanations of why you're doing what you're doing.

Mainly, when I get to the part telling me what to do on the Network settings tab:



Well, a few things. For one, my screenshot doesn't match theirs - I only have one checkbox, they have two. Second, I don't know what any of those boxes mean (aside from Type) and whether they might be important.

Regardless...

On the "VMware Preferences/Advanced local settings" tab, the document says to have GNS3 manage VMnets 2-8. I'm just going to have it manage VMnet 2, since that's the one I assigned for my lab experiments.

After clicking "Configure" on that screen, GNS3 runs some commands to assert control of VMnet2.

Testing it out

At this point, I don't want to go through the trouble of configuring a Cisco router just yet - I just want to make sure I configured everything correctly.

First things first: create a new project in GNS3, and obtain a blank canvas:


Note that over on the left, I have the "End Devices" section open and you can see my VM (and a few other things that will be useful later) available for placement. If I opened up the "Routers" section, you would see my 2691 router template available for placement.

I'm gonna do a couple things: drag my VM over and drop it on the canvas to add it to my network, and drag a "Cloud" object over to the canvas as well.

When I do the second one, I get this question:


Before I answer this, let me try and explain what I think a Cloud object is. (I'm not 100% sure because of the way GNS3's documentation is written.)

As best I can tell, a Cloud can do a handful of things. The main one - at least, the main one I'm concerned with for now - is the ability to make a network interface on a machine (physical or virtual) act as a "proxy" for an interface attached to a VND/VM.

It'll probably make more sense if I demonstrate. But long story short, I choose Amateria (my local physical machine) because I want traffic to flow through my home LAN, which my GNS3 VM is not directly connected to.

After that, I have to configure the Cloud before I can use it.


Essentially, at this point, I've configured Cloud 1 so that it can "proxy" traffic out through my physical machine's Local Area Connection, onto my home LAN.

Next step is to create a link between my Windows VM and Cloud-1, using the "Add a link" button on the left. When I click the Windows VM, I'm prompted to select an interface on the VM, and the same when I click the Cloud. (Each only has one option right now, but I could add more.)

Once it's done, it looks like this.


On the right, you can see a list of connected GNS servers, and what's running on them. At this point, I don't have anything running on the GNS VM, because both the Windows Server VM and Cloud-1 are hosted on my physical machine. Note that anywhere Windows Server appears, it's with a red square at this point, because the VM is turned off.

Now. What I've done by connecting the network interface on Windows Server, to my physical interface through the Cloud, is created a "link" where Windows uses its virtual network interface, and GNS3 transparently takes that traffic and routes it out through the physical interface. When traffic comes back, it works in reverse - GNS3 takes it from the physical interface, and passes it to the VM, and as far as the VM's concerned that traffic came straight from its virtual interface.

All right. The green "Play" button up top will start up all the virtual nodes on the network...

After hitting Play, GNS3 starts up the Windows 2016 Server VM for me.

Moment of truth...


Well. I wasn't expecting it to come back in IPv6, but if I ping an IPv4 address, I get a response back. My VM's connected to the Internet through GNS3!

Next step

Next step's going to be adding a virtual Cisco router into the mix and confirming that GNS3 is fully working.

But for now, Heroes of the Storm calls...

No comments:

Post a Comment

I fought FreeRADIUS and FreeRADIUS won

Back to work So...  last I had written, several months ago,  I had managed to add my CentOS server to my domain and was going to work on ...