Filters:

  • Technologies

  • Instructors

  • 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.

    Devmngmnt Connect GNS3 to a Valid External Host Win8

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

    You will notice I already have one.

    Microsoft KM Loopback Connect GNS3 to a Valid External Host Win8

    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.

    003-add-legacy-hardware-Connect-GN3-to-a-Valid-External-Host

    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)

    add legacy hardware Connect GNS3 to a Valid External Host Win8

    Click Next.

    I want Networks, so scroll down to Network.

    Neworks Connect GNS3 to a Valid External Host Win8

    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.

    Networks Connect GNS3 to a Valid External Host Win8

    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.

    007-GNS3-run-as-administrator-Connect-GN3-to-a-Valid-External-Host

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

    Run as Administrator Connect GNS3 to a Valid External Host Win8

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

    009-cloud-GNS3-Connect-GN3-to-a-Valid-External-Host

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

    Cloud Connect GNS3 to a Valid External Host Win8

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

    011-change-symbol-cloud-GNS3-Connect-GN3-to-a-Valid-External-Host

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

    012-change-symbol-cloud-GNS3-Connect-GN3-to-a-Valid-External-Host

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

    013-configure-cloud-Connect-GN3-to-a-Valid-External-Host

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

    You may also like:  How to Make your Linux Box a DHCP Server

    Configure Cloud Connect GNS3 to a Valid External Host Win8

    I’ll add it to my list.

    015-configure-cloud-Connect-GN3-to-a-Valid-External-Host

    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.

    Add Router Connect GNS3 to a Valid External Host Win8

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

    Connectors Connect GNS3 to a Valid External Host Win8

    Connect it to the Router using FastEthernet 0/0.

    Router Connect GNS3 to a Valid External Host Win8

    Close out of the Select My Connector.

    018-router-connectors-Connect-GN3-to-a-Valid-External-Host

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

    Star Router Connect GNS3 to a Valid External Host Win8

    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.

    Console Connect Connect GNS3 to a Valid External Host Win8

    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.

    021-Console-Connect-GN3-to-a-Valid-External-Host

    022-cmnd-prompt-Connect-GN3-to-a-Valid-External-Host

    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.

    023-cmnd-prompt-Connect-GN3-to-a-Valid-External-Host

    I want to find my loopback, 10.4.1.100.

    Loppback cmnd prompt Connect GNS3 to a Valid External Host Win8

    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.

    Default Gateway cmnd Connect GNS3 to a Valid External Host Win8

    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.

    Default Gateway cmnd prompt

    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.

    You may also like:  CompTIA Security+ What Motivates People to Take Your Intellectual Property?

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

    netsh int ip, show address “Loopback”

    And hit enter.

    027-default-gateway-cmnd-prompt-Connect-GN3-to-a-Valid-External-Host

    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

    028-default-gateway-cmnd-prompt-Connect-GN3-to-a-Valid-External-Host

    Here’s the router.

    Router cmnd prompt

    I’m going to go into global config mode.

    Global Config mode Connect GNS3 to a Valid External Host Win 8

    Then go into interface FastEthernet 0/0

    Global COnfig mode in GNS 3

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

    032-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    033-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    034-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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.

    035-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    036-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    037-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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.

    038-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    039-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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.

    040-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    041-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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.

    042-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    Turn Windows firewall on and off.

    043-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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.

    044-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    045-global-config-mode-Connect-GN3-to-a-Valid-External-Host

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

    046-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    I’m getting replies.

    047-global-config-mode-Connect-GN3-to-a-Valid-External-Host

    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

    See what people are saying...

    1. Mark Jacob

      Here is a sample topology which seems to match your question:

      If R1 is running NAT, then PC can ping targets in 10.1.10.x.

      You could configure NAT (PAT) on R1 like this:

      access-list 1 permit 10.4.1.0 0.0.0.255
      !
      int f0/1
      ip nat outside
      int f0/0
      ip nat inside
      !
      ip nat inside source list 1 int f0/1 overload

      With that configuration in place, pings could happen as you mention in your question.

      As to the last part of your question: Also how a windows 10 pc with ip say 10.1.10.70 will ping 10.4.1.1

      This could be accomplished with a static NAT mapping from, for example, 10.1.10.2 < -> 10.4.1.1

      If the Windows 10 box you mention is “the cloud” in the topology above, (like in the video) then it should be configured with the address you mention and a default gateway of 10.1.10.1. Then, with the above static NAT in place, if the Windows PC pings 10.1.10.2 (not 10.1.10.1) the router will send that to 10.4.1.1 per the static NAT rule, and 10.4.1.1 will reply. HTH

    2. Rajesh Nagarkar

      Hi, Mark. In your demo, can you please explain what do I need to do to ping from GNS3 router ( 10.4.1.1) to Ethernet port ( 10.1.10.63) and all devices connected to Ethernet network which is on 10.1.10. x network and vice versa

      GNS3 router and loopback are on same network which is 10.4.1.X / 24 but not sure how GNS3 router will connect to 10.1.10.x/24 network ( connected to Ethernet). Also how a windows 10 pc with ip say 10.1.10.70 will ping 10.4.1.1

      Kind Rregards
      Rajesh…

    3. Interface

      On your Windows box, what is the output of route print -4? It should show a route to a network (the one you mention in your question – 172.20.20.1) and it should show a default gateway of 172.20.20.254. I am not sure what you mean when you say “ping is done from 172.20.20.1 to all network into the design” but if you are saying you can’t ping the far side of R2 (from the perspective of the MS Loopback address) then it is likely because your Windows machine has no route to that destination. For example, if I place some arbitrary network information into your topology, it might look like this:

      (MS Loopback-Windows box)———–Net 172.20.20.0/24——–(R1)———-(some network address)———(R2)——-(another network)——(R3)

      In this situation, a ping generated from the MS Loopback source will fail if there is no route to ‘some network address’ or ‘another network’ because without a specific route present, the default route on the Windows box hosting the MS Loopback interface will push the ping to the target of the default route, and not in the direction you want it to go. Let’s try something. If we put in an ip address to my picture above, it might look like this:

      (MS Loopback-Windows box)———–Net 172.20.20.0/24——–(R1)—172.25.1.0/24—–>

      From a command prompt, try adding this:
      route add 172.25.1.0 mask 255.255.255.0 172.20.20.254

      You can do the same thing to whatever network is between R2 and R3. Then you should have a specific route from your Windows box to the networks in your virtual topology and pings should then succeed. You might also verify that you don’t inadvertently have two quad-zero routes in the routing table of your Windows box. If so, delete the unnecessary one for your particular topology. This has bitten me a few times in my experimentations.

      Let me know if this helps.

      Mark

    4. MZI John

      Hello Sir,

      My design has 3 router, R1,R2 & R3.
      connectivity establish R1 to R2 & R2 to R3. (R1 —– R2 ——–R3)
      I am connect MS Loopback (172.20.20.1) to R1 (172.20.20.254)
      Routing is enable on 3 Routers.
      When i try to R2/R3 to ping 172.20.20.1 don’t ping occur,
      but ping is done from 172.20.20.1 to all network into the design

      what can i do for it,

      please give me the way!

      Regards,
      John

    5. Pingback: Video - How to Connect GNS3 to VirtualBox in Windows 8

    6. Pingback: Video - Connect your Virtual Machine in GNS3 to the Internet

    Share your thoughts...

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