It is currently Sun Jul 12, 2020 2:02 pm


All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Connecting VirtualBox VMs
PostPosted: Fri Jun 21, 2013 11:43 pm 
Offline

Joined: Thu Apr 04, 2013 10:37 pm
Posts: 22
Hi,

I am running GNS3 0.8.3.1 in Win7 and I am trying to connect some VB VM's (Redhat Enterprise 64bit) to a Cisco 3640 router and am hitting some issues.

My topology to start off with is simply this:

VB VM e2 --- fa0/0 Cisco 3640

I wanted to use static IP's and not DHCP so I configured the router as such:

interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
duplex auto
speed auto

When I built the VM, I made eth0 10.1.1.10/24 thinking that was the NIC that would connect to the 3640. However, I now believe it's the Host-only NIC that connects to the router yes? Therefore I need to configure the Host-only NIC within 10.1.1.0/24 yes?

Either way, I can't ping the router from the VM nor can I ping the VM from the router. I also see 0 packets input on fa0/0. There's no ARP entry on the 3640 for the VM and doing a packet capture on e2 of the VM, I also saw 0 packets. I may have a local FW issue on the VM guest, I am looking into that but perhaps I am overlooking something else too. I'm not sure yet.

So the questions I have are:
1) It is normal in Win7 to see Host-only NIC with 'No Network Access' and 'Unidentified Network'? I suspect not.
2) If my router interface is set to a static IP address, how do I set the VB VM to static too? Is it the Host-only NIC that needs to be set?
3) Once I get this VM working with this router, I then need to add a 2nd VM just like this 1st one. Basically a clone but with a different IP address. I have already built the 2nd VM but can't seem to add more than one VB VM into GNS3. I get 'All configured VMs already in use. You may add or clone additional VM's in Virtual Box'. Well, I've got the 2nd VM built but how am I supposed to add it to this same topology? I can't seem to do that.

Any help would be most appreciated.

Thank you,
-Steve




Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Sat Jun 22, 2013 12:02 am 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
ryderse wrote:
1) It is normal in Win7 to see Host-only NIC with 'No Network Access' and 'Unidentified Network'? I suspect not.

I've just had to solve that one myself too. I found this article on MS that explains it - http://support.microsoft.com/kb/2578723 - see the Fix It Myself section.

HTH,
Nick.

_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Sat Jun 22, 2013 12:34 am 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
If I understand correctly you're running your VB VMs outside of GNS3.

The VB host-only adaptor works fine between VBs and the host but in my (WIn 8) experience is next to useless connecting to GNS3 via the NIO_gen_ethernet. It's usually configured as 192.168.56.1 and has a DHCP server. You can change this in the VB configuration settings to suit your addressing scheme. If you can't get this to work then
I'd recommend adding the MS loopback adaptor to your W7 host, then configuring each VB VM to connect to this in the network interfaces section (bridged adaptor). On the GNS3 side you can connect your router to the MS Loopback via a cloud and NIO_gen_ethernet. All devices can then live happily on the same subnet, you can either configure the MS loopback with a static ip on the same subnet or set up a DHCP server on your router.

HTH,
Nick.

_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Sun Jun 23, 2013 12:26 am 
Offline

Joined: Thu Apr 04, 2013 10:37 pm
Posts: 22
Thanks Nick.

I'll take a look at the link you sent to see if that corrects my issue..

I am running the VM within GNS3.

How are you supposed to connect a VB VM to a router in GNS3 using Static IP's? Every time I see a video, it's DHCP. Doesn't anyone use these with Static IP addresses?

Thanks again,
-Steve


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Sun Jun 23, 2013 9:06 pm 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
I suggest you use the Windows loopback adaptor rather than the Virtual Box host network.

Add a loopback adaptor to your W7 host - you can use the GNS3 loopback-manager.cmd. Configure this interface with a static ip address on your VM's subnet then you'll have connectivity with your host machine. This will act as a virtual switch for your topology with your host, your GNS3 router and your VB hosts all connected to it.

In GNS3 add a router and a cloud device. Configure your cloud device to add a NIO_ethernet connection - choose the MS Loopback adaptor added above. Connect an ethernet interface on your router to the cloud device. The cloud is the connection to the virtual switch.

Attachment:
screenshot_cropped.png
screenshot_cropped.png [ 7.48 KiB | Viewed 10318 times ]


Using the Virtual Box manager, configure the network adaptor on each VM to use a bridged adaptor - MS Loopback. Under advanced properties, set Promiscous to Allow All.

Once you've configured networking on each device you should find you have connectivity between everything.

This is what works for me.
HTH,

Nick.

_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Mon Jun 24, 2013 4:26 pm 
Offline

Joined: Thu Apr 04, 2013 10:37 pm
Posts: 22
Thanks Nick.

Sorry for so many questions but this is helping a lot. I just need to understand a few more things.

I don't need connectivity to my Host OS (Win7) but simply connectivity between the VB VM and the directly connected router.

So the cloud device that's added actually takes the place of the VB guest once configured yes?

I assume I need a separate cloud device and separate loopback address for each VB VM yes?

If my VB VM's were to use DHCP, I couls the VB Guest within GNS3 and not need to use the Cloud device yes?

Thanks again,
Steve


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Mon Jun 24, 2013 7:40 pm 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
ryderse wrote:
I don't need connectivity to my Host OS (Win7) but simply connectivity between the VB VM and the directly connected router.

That is just an additional benefit of using the MS loopback. If you don't want any ip or other network services you can disable them under the adapater properties check boxes.
Quote:
So the cloud device that's added actually takes the place of the VB guest once configured yes?

It actually takes the place of the VB host-only network adaptors. Your VB guests are your Linux virtual machines.
Quote:
I assume I need a separate cloud device and separate loopback address for each VB VM yes?

No, they can all share the same MS loopback network adaptor.
Quote:
If my VB VM's were to use DHCP, I couls the VB Guest within GNS3 and not need to use the Cloud device yes?

If you mean configure them as DHCP clients then you woud need a DHCP server to assign them ip addresses which I'm presuming would be the router in GNS3. You would still need the cloud as it allows the router in GNS3 to talk the world outside of GNS3 - in your case two VB VMs.

The cloud and NIO_ethernet in GNS3 is equivalent to a bridged adaptor in VB.

HTH,
Nick.

_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Wed Jun 26, 2013 12:13 am 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

I wrote a tutorial how to use GNS3 with VirtualBox -> http://www.gns3.net/documentation/gns3/ ... emulation/

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Wed Jun 26, 2013 6:24 pm 
Offline

Joined: Thu Apr 04, 2013 10:37 pm
Posts: 22
Thanks for the info.

I need to sift through all this and see where I get. I'll update this post afterwards.


Top
 Profile  
 
 Post subject: Re: Connecting VirtualBox VMs
PostPosted: Wed Jun 26, 2013 9:25 pm 
Offline

Joined: Thu Apr 04, 2013 10:37 pm
Posts: 22
FWIW, I followed the official video from GNS3 on connecting VB on Win7 to GNS3 and still can not get connectivity between the VM and the router.

http://www.youtube.com/watch?v=l6BjEIin2Jw

I followed this exactly and I can't get the VM to ping the router no matter what I do. My VM appears to be getting DHCP from VB itself since it's getting an address in the same subnet as the Host Only adapter. My HO adapter is 192.168.164.1 and the VM is getting 192.168.164.101. I also must use the 'Cable Connected' option otherwise I will never get an IP. This is exactly opposite of what the video tells you to do. What's also different in the 'official' video is the version of GNS3. Khaled is using an older version of GNS3. It shouldn't matter but my behavior is not the same as what he's seeing.

In VB >> File >> Preferences >> Network, I then disabled the DHCP Server for the HO Adapter and restarted VB and GNS3, Still I get the same IP address. I then rebooted the Host PC and after that, the VM failed to get any IP address at all. Debug DHCP packets on the router shows no DHCP requests coming in.

The only way I can seem to get an IP in the VM (eth0) is to use the DHCP server in VB itself. But even in that case, I still have no connectivity between the router and the VM.

One thing I don't understand is the fact that the VM has only eth0 (and a loopback) but GNS3 uses e2 for this VM. Is there anyway to configure e2 directly or is that really eth0 or is it the the HO adapter?

VB VM e2 <---> fa0/0 3640

I'm going to try this again with a different guest OS to see if there might potentially be an issue with the image I am using.

Host PC Win7 64bit
VB 4.2.12
GNS3 0.8.3.1
VM is Red Hat Enterprise 6.3 64bit




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO