Filters:

  • Technologies

  • Instructors

  • How to connect your Virtual Machine Inside GNS3 and Connect to the Internet in Windows

     

    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


    I want to show you a continuation of a topic I’ve already been talking about previously where I showed you how to connect a virtual machine such as Oracle’s VM VirtualBox solution, inside GNS3 so that you can have an actual client How to Connect Your GNS3 Environment to VirtualBox in Windows 8. Then I showed you how to connect a real address, external to GNS3 client How to Connect GNS3 to a Valid External Host in Windows 8, in fact out here in the real world with us, into your GNS3 environment.

    I want to combine those two into one final event.

    Now, a lot of it’s already been preconfigured because I was doing it while I was showing you the previous videos, but let me walk through what we have here.

    If I bring up my instance of GNS3.

    001-connect-GNS3-VM-VirtualBox-to-the-internet

    I’ll show you I’ve already launched it.

    002-launched-connect-GNS3-VM-VirtualBox-to-the-internet

    If you recall from my previous comments the fact that if you’re doing this from scratch, you want your VM VirtualBox to not be running because GNS3 will launch it for you when you click “go.” Anyway, that’s my virtual box.

    I also did the configuration of the cloud.

    Let’s take a look. If I right‑click on this guy and go to “configure”.

    003-cloud-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I named it “real computer” so that I’d know it was the real computer.

    004-cloud-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    You’ll notice instead of picking or selecting the loop‑back interface, which I did in a previous video, I selected one that’s just called “Ethernet,” which turns out to be the real network card of the physical workstation on which I’m connected.

    005-eithernet-cloud-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    That’s a little bit different and I had also mentioned that you could be looking up Google and trying to figure out why this doesn’t work with Windows 8. I did not anything saying to do it this way, so I thought I’d show it to you.

    Here we go.

    Inside my cloud device, I’ve selected the actual Ethernet. In other words, the wired interface connection on my physical workstation.

    You may also like:  How to extract your outside IP address-without a chicken or a monkey

    006-eithernet-cloud-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    Then on the exterior, or outside, because you’ll notice from my title here, I have NAT running as well,

    007-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I configured NAT on this router with fast Ethernet‑01 as the outside interface.

    The address that’s on this is an address that would physically exist inside, because I’m inside my company, it has to exist on my company’s network.

    008-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    This 10.1.xx address needs to be reachable.

    Next I’ll check that I have a connection to my router. It looks like I do.

    009-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    Since it’s already configured, I did the NAT already. I also have configured a default route telling my router how to get out of here. You’ll notice my static route 0.0.0.0/0 , default route that sends everything you don’t know outside FastEthernet0/1

    010-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    To test this I want to know first of all can my router get out.

    You’ll notice here’s my router.

    011-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I want to know can it get out here to the actual Internet.

    Let’s check it. I’m going to ping, a real address of 8.8.8.8.

    012-ping-router-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    Success, my router, which doesn’t really exist, can get there. Pretty cool.

    Now, if I look back at my scenario. I have this Workstation that is an Oracle VM VirtualBox so this one is not real, it’s virtual.

    013-workstation-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    This one is the physical workstation that this is all running on.

    It is real. I can even check that if I bring up a command prompt.

    Let me go ahead and launch one. My real machine, if I ping 8.8.8.8, it also can get out to the Internet.

    014-cmnd-prompt-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    A little side note, and this was the other “Gotcha” that was hampering my efforts to make this work, was if you’re on a Windows 8 box and if you think you’ve done everything right and still can’t get to your real host, take a look at your routing table inside Windows, route print -4 (I’m using “-4” because I don’t want to look at all the IPV6 stuff.

    015-cmnd-prompt-route-print-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    Anyway, I’ve got to scroll back up. What I care about is my quad‑zero route 0.0.00.

    016-cmnd-prompt-route-print-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I found that when I first tried this, and it was refusing to work, although I have VM Workstation and other things going on, I had multiple quad‑zero routes and it was interfering. In other words it was preventing this scenario in GNS3 to work.

    You may also like:  A quick look at Cisco Modeling Labs (CML)

    Check your routing table inside your Windows box if you’re still having trouble getting it to connect.

    Another caveat, as I mentioned previously, was make sure you check your Windows Firewall  How to Connect Your GNS3 Environment to VirtualBox in Windows 8 because Windows Firewall can block some of this stuff.

    Anyway, our goal was that I wanted to take a machine that doesn’t exist, which is plugged into a router that doesn’t exist, and make it connect to the Internet, which does exist.

    Let’s see if we can do it now.

    I’ll bring over my VM VirtualBox connection.

    017-vm-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    And go to a command prompt and check by pining 8.8.8.8

    018-vm-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I’m getting replies. This is pretty cool.

    In fact, if you look at my little icon down there, that looks the nice, pretty icon that it’s supposed to be.

    019-vm-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    Let’s try this ping “Google.com”

    020-vm-ping-google-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I’m pinging. It was able to resolve the address, and I might lose some. Maybe Google’s busy right now, got better things to do than to talk to me. Nevertheless, I reached it.

    I can even click Internet Explorer go out to the Internet.

    021-internet-explorer-configure-connect-GNS3-VM-VirtualBox-to-the-internet

    I have a virtual machine connected inside GNS3 which is able to browse the actual… this is not cached web pages. This really is working, and you too can do it.

    If you have any questions, please feel free to contact me. I have my blogs at www.interfacett.com/blogs/?p=. Give it a shot, see if you can make it work, and I hope you found it informative.

     

    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

    See what people are saying...

    1. Interface

      I know of nothing that would prevent your scenario from succeeding used WiFi as opposed to Wired. My suggestions reiterate some caveats mentioned in the blog. Since you did not include a topology diagram or ip address information, my responses may be somewhat vague.

      Make sure you don’t have redundant quad-zero routes in the routing table of your Windows box (admittedly unlikely, if you can hit the Internet from your real machine). route print

      If you have configured a NAT router like in the blog, verify NAT is working correctly. Try a ping from the NAT router to a publicly routable ip address, but from the rearward facing interface of the NAT router (using PING {SOURCE}).

      Check that a firewall is not blocking traffic to/from your virtual environment. wf.msc

      If this does not resolve it, feel free to follow up, but it would help if you had some more specific information regarding your topology.

    2. John

      Hi Mark,

      Great tutorial. I almost have this working, but in my case I can’t browse the internet from the windows virtualbox VM. I can ping 8.8.8.8 succesfully and I can resolve http://www.google.com sucessfully. The only thing different is that my loopback adapter is sharing my real computer’s WiFi connection and so the loopback has IP of 192.168.137.1 which Microsoft sets statically by default once you setup Internet sharing with Wifi connection. Will this only work if my real computer is hard wired to my home router? Thanks for any suggestions.

    Share your thoughts...

    Please fill out the comment form below to post a reply.