Interface Technical Training

How to Connect GNS3 to a Valid External Host in Windows 8

 

Video Transcription:
By Mark Jacob
Cisco CCNA and CompTIA Network + Instructor

Complete Series:
Part 1 – Connect Your GNS3 Environment to VM VirtualBox
Part 2 – Connect GNS3 to a Valid External Host in Windows 8
Part 3 – Connect your Virtual Machine in GNS3 to the Internet using Windows 8


In a previous post, I showed how to connect GNS3 to an Oracle VM VirtualBox. In this post, I want to show you how to connect GNS3 to a valid external host. This allows for numerous options of connectivity, better than taking a router and connecting it as an IP Endpoint to generate pings. You can do far more testing with a real box. In this case, it even goes a step further because I want to take my GNS3 environment connected to a real network.

First thing I have to do, and I’ll show you the steps. What I need to do is I need to add a loopback adapter into my machine.

I’ll launch devmgmt.msc.

What you want to do is scroll down to your network adapters.

You will notice I already have one.

Notice this Microsoft KM‑TEST Loopback Adapter which by the way Microsoft has slightly changed the wording. It used to be Microsoft loopback adapter.

As I said, I already have one but let me show you if I didn’t, if this was a brand‑new, clean install, what I would do is come up to the top where it says MJ-Len-LPTP. Right click on it and select Add Legacy Hardware.

It brings up the wizard, and I’ll click next. And then select the option Install the hardware that I manually select from a list (Advanced)

Click Next.

I want Networks, so scroll down to Network.

You could have hit the letter N, it will get you there faster.

I’ll select Network adapter click Next.

It was going to scan around. I want to grab Microsoft. This is a little bit weird or different from what you’re used to. If you’ve done this before, there was a Microsoft loopback adapter. They have slightly changed the name. Now, it’s Microsoft KM‑TEST loopback adapter.

Here you would click Next and Finish. I’ve already done this. I’m not going to add another one. Once you do that, very important, reboot your machine before you continue. If you don’t reboot your machine, you’re not going to have good success.

Now, I have my box. I’ve rebooted my machine. I’m back in business. I need to launch GNS3. This is also very important. When you launch GNS3, I could double click this and it would launch. You don’t want that. You want to right click on that and run it as administrator.

A lot of stuff will not work correctly inside GNS3 if you don’t do that.

What I want to do now is click on My Devices. I have a Cloud Device. That’s a generic.

You can right-click on this and change the shape.

I’m going to change the symbol to a Computer.

What it’s going to be, it’s the actual laptop machine that I’m connecting to. I have my cloud.

Before I can connect to it, I have to configure. I’m going to right click on it again. Click Configure.

Click on this Cloud. If I click this drop down, remember I named my loopback? I’ll select Loopback.

I’ll add it to my list.

Then, select OK.

I’ve now configured this device.

I need one other thing at least to connect to it. I’m going to bring in another router by dragging it into my scenario.

Now I need my connectors, so I’ll pick the Loopback for the cloud.

Connect it to the Router using FastEthernet 0/0.

Close out of the Select My Connector.

I want to start the router. I’ll click the little green triangle and get it running.

Notice that my little dot turns to green. Good stuff.

Let it boot up and then I’m going to right-click on the router. I want to grab the Console connection because I want to able to see what’s going on this router.

And I’ll let it finish booting up.

In the meantime, let’s see what’s going in the Cloud 1.

I will need launch a Command prompt. I’ll go ahead and launch this as administrator.

I want to look at my configuration so I’ll type netsh int ip show address. This is one of the cools things you can do with the netsh context.

I want to find my loopback, 10.4.1.100.

I put that on there also before this started, but you can put the IP address on your loopback interface. But I needed its information because I put a router in there.

Notice here in this output, I have a default gateway set of 10.4.1.1.

That’s the address I want to put on that router. If you miss that command, and by the way you’ll notice that because it has a name, Loopback, I can slightly modify my command.

I’ll hit the up arrow to bring up my latest command and add “Loopback”. If I don’t want to see the whole thing scroll by, I have to scroll back up. Then, it only shows me exactly the loopback interface.

If you’re doing this from the Command prompt, you can add:

netsh int ip set address “loopback”

In this case because it’s a loopback, I will select that. I want a static address.

netsh int ip set address “Loopback” static

In this case, notice it’s 10. So you can see if you type this, it would make a change. I’m going to change it by one. I’m going to make it 10.4.1.101, so that you can tell something has happened.

netsh int ip set address “Loopback” static 10.4.1.101 255.255.255.0.

I also needed to follow gateway, 10.4.1.1.

netsh int ip set address “Loopback” static 10.4.1.101 255.255.255.0. 10.4.1.1

The other thing that’s important, this comes up because if you have tried to do this and you’ve gone on your search engine of choice and look stuff up, you’ll find that people get this far and they can’t ping back and forth.

There is an issue. Windows 8 does not seem to play well with this. You can do it in Windows 7. It works. What I’m going to do here is I’m going to add a metric in this. I’m going to pick a number 200 because I had 300 before.

netsh int ip set address “Loopback” static 10.4.1.101 255.255.255.0. 10.4.1.1 200

I’ve now typed this entire command and hit enter.

If I want to verify that it’s taken I’ll type:

netsh int ip, show address “Loopback”

And hit enter.

Remember it was a 400, and now it’s a 101. So far, so good.

Now let’s look at the router.

We’ll console into the Router

Here’s the router.

I’m going to go into global config mode.

Then go into interface FastEthernet 0/0

You might say, “How do I know?” If I look at this, button A, B, C, D.

If I click that, it tells me what interfaces are which.

That helps me out. Let’s go back into my console session. I want to go back into interface FastEthernet 0/0.

Since the address on my client, which is the real box, is 10.4.1.101 now, but the gateway is 10.4.1.1. That’s the address I want on this router.

IP address, 10.4.1.1 with a 24‑bit mask.

Let’s go ahead and #no shut it to bring it live.

Remember, this is a connection to a real machine. In other words, 10.4.1.101 is live on the actual physical box, it’s not a virtual machine.

I should be able to #end this.

And try to ping 10.4.1.101 and see if I get replies.

Many times, it will drop the first one, if this happens to you; it’s quite possible that it’s not a connectivity issue.

This also is the second thing that people say, “It doesn’t work. I tried…” Check your firewall settings. If Windows Firewall is active, it will be blocking this.

You can check by launching a Command prompt as administrator.

Here, what’s interesting. I’m going to try to ping from here, 10.4.1.1 and I get replies.

That’s how you know it’s more likely a firewall issue. If my client can ping the router, but the router can’t ping the client more than likely it’s been blocked.

Let’s go to the firewall settings and verify.

Turn Windows firewall on and off.

You don’t have to kill everything. But I’ll go ahead and turn it all off here so you can verify what was blocking it.

Now, if I go back to my router and Console back into it.

Now, let’s see if I can ping 10.4.1.101.

I’m getting replies.

You have connected successfully to a real host not a virtual machine. You can thereby extend your environment in GNS3.

You can set it up if you want to, to be able to get all the way out to the Internet. You can browse the Internet from a virtual machine from within GNS3. A lot of cool things you can do if you want to expand your networking knowledge using GNS3 as a tool.

Hope you found this informational.

Until next time….

Mark Jacob
Cisco and CompTIA Network + Instructor – Interface Technical Training
Phoenix, AZ

Complete Series:
Part 1 – Connect Your GNS3 Environment to VM VirtualBox
Part 2 – Connect GNS3 to a Valid External Host in Windows 8
Part 3 – Connect your Virtual Machine in GNS3 to the Internet using Windows 8