It is currently Mon Dec 17, 2018 12:57 am


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Implement a multivendor OSPF lab with GNS3 and VMware Fusion
PostPosted: Sat Feb 15, 2014 4:42 am 
Offline

Joined: Fri May 13, 2011 10:35 pm
Posts: 83
Location: Seattle, WA (USA)
For the (Mac + GNS3 + VMware) users: Interested in a detailed guide to creating a sample OSPF lab with Cisco and Juniper?

Image



_________________
http://binarynature.blogspot.com/search/label/GNS3


Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Sat Feb 15, 2014 5:07 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Awesome lab! Only the new XRv appliance is missing ;)

I will probably post another news on gns3.net pointing to your HOWTO.

Finally, I have a question. I have started to think about how we could have a better integration of VMware into GNS3 and I would like to know what is the detailed technical reason for not connecting directly to vmnet interfaces (using the NIO Generic Ethernet)?

Thanks!

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Sun Feb 16, 2014 2:24 am 
Offline

Joined: Fri May 13, 2011 10:35 pm
Posts: 83
Location: Seattle, WA (USA)
Thanks for the feedback. It's funny you should mention the XRv. I almost included it, but I figured the topology was loaded enough for a proof of concept. :)

Quote:
Finally, I have a question. I have started to think about how we could have a better integration of VMware into GNS3 and I would like to know what is the detailed technical reason for not connecting directly to vmnet interfaces (using the NIO Generic Ethernet)?


Why not direct connect via the vmnet? Simple. It doesn't work on the Mac (unlike Windows and Linux).

Image

The only method that works for me is the [bridge:tap+vmnet] combo. Even if I direct connect via the bridge interface w/ only the vmnet as a member (omitting the tap interface), it will connect but fail to pass traffic between the connected devices.

All in all, I actually prefer the decoupled aspect to this type of configuration; it minimizes the dependency between the applications:

GNS3:TAP
    Open a GNS3 project and it "attaches" the associated interfaces. Close GNS3 and it "detaches" the interfaces.
VMware:vmnet
    Open VMware Fusion and the interfaces are "created". Close VMware Fusion and they "disappear".

When I need them to "talk" to each other, I just add the specific interfaces (as members) to a logical bridge interface and bring it up. I see the bridge interface as a convenient abstraction, and more importantly, it has been very stable in regards to connectivity.

The configuration does come with some disadvantages:

    (Re)entering the required commands for lab setup (and possibly teardown). Easily scripted, so this is somewhat of a nonissue.
    Only 16 TAP interfaces are available (tap0 thru tap15). Could be a "showstopper" for elaborate GNS3 labs

_________________
http://binarynature.blogspot.com/search/label/GNS3


Last edited by mweisel on Wed Mar 12, 2014 11:05 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Sun Feb 16, 2014 7:14 am 
Offline
Site Admin

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

Quote:
Why not direct connect via the vmnet? Simple. It doesn't work on the Mac (unlike Windows and Linux).


That what I thought, I had tested on Windows and Linux, I remember it worked well. I just tested on OSX to at least understand what is wrong...

First test was to attach to a vboxnet interface (created by VirtualBox), worked ok.

Second test, tried to attach to a vmnet interface and I got exactly the same problem you have described.

Third test, started Dynamips manually on port 7200, opened a Telnet connection to it and entered the following command:

Quote:
nio create_gen_eth my_nio vmnet2


Here is the output I got from Dynamips.

Quote:
$ ./dynamips.unstable -H 7200
Cisco Router Simulation Platform (version 0.2.8-RC7-community-amd64/Darwin unstable)
Copyright (c) 2005-2011 Christophe Fillot.
Build date: Feb 15 2014 23:36:45

Local UUID: 85548A61-5379-48C3-B5EA-572C4D508C6E

ILT: loaded table "mips64j" from cache.
ILT: loaded table "mips64e" from cache.
ILT: loaded table "ppc32j" from cache.
ILT: loaded table "ppc32e" from cache.
Hypervisor TCP control server started (port 7200).
gen_eth_init: unable to open device 'vmnet2' with PCAP (vmnet2: No such device exists (BIOCSETIF failed: Device not configured))


We can see the exact error message from libpcap: vmnet2: No such device exists (BIOCSETIF failed: Device not configured.

I did some research and it appears the issue is with VMware fusion itself. Other software using libpcap have the exact same issue as Dynamips. The reason is that VMware Fusion vmnet interfaces have not implemented BPF (what is BPF? => http://en.wikipedia.org/wiki/Berkeley_Packet_Filter)

http://apple.stackexchange.com/question ... e-fusion-5

The issue exists since 2007 and VMware haven't done anything about it. So, I think we have a dead end here... at least we know why we cannot use vmnet interfaces directly now :)

Quote:
The only method that works for me is the [bridge:tap+vmnet] combo. Even if I direct connect via the bridge interface w/ only the vmnet as a member (omitting the tap interface), it will connect but fail to pass traffic between the connected devices.

I actually prefer the decoupled aspect to this type of configuration; it minimizes the dependency between the applications:


I like the decoupling aspect, this adds flexibility :)

Quote:
The configuration does come with some disadvantages:

(Re)entering the required commands for lab setup (and possibly teardown). Easily scripted, so this is somewhat of a nonissue.

Only 16 TAP interfaces are available (tap0 thru tap15). Could be a "showstopper" for elaborate GNS3 labs


No problem for the required commands but having only 16 TAP interfaces would indeed be a showstopper. However I found out this can be changed if the driver is recompiled.

https://github.com/bbits/tuntaposx/tree/master/tuntap

Quote:
This is an experimental IP tunnel/ethertap driver for Mac OS X/Darwin. It
provides /dev/tunX and /dev/tapX devices. The maximum number of devices can be
configured at compile time, it is currently set to 16. That should be enough in
most cases.


So I really think the Vmware integration, on OSX at least, will have to use TAP interfaces ;)

Thanks for all the info!

Cheers,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Sun Feb 16, 2014 8:52 pm 
Offline

Joined: Fri May 13, 2011 10:35 pm
Posts: 83
Location: Seattle, WA (USA)
Jeremy:

I appreciate the thorough investigation you did on this matter. It answers quite a few questions I had pertaining to the Mac/GNS3/VMware combination. At least now we know the possible methods and limitations.

The 16 TAP interfaces being just an arbitrary default value instead of a hard technical limit puts a smile on my face. :) It transforms this specific setup from being a limited solution to a complete solution IMO.

Thanks.

_________________
http://binarynature.blogspot.com/search/label/GNS3


Last edited by mweisel on Wed Mar 12, 2014 11:07 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Mon Feb 17, 2014 4:52 am 
Offline

Joined: Fri May 13, 2011 10:35 pm
Posts: 83
Location: Seattle, WA (USA)
Need to increase the maximum number of TAP interfaces for Mac OS X?

Prerequisites:
    Mac OS X 10.9 (Mavericks)
    Xcode and/or Xcode Command Line Tools

1. Remove TunTap
If TunTap is currently installed, it will need to be removed. From Terminal:
Code:
sudo rm -rf /Library/Extensions/tap.kext
sudo rm -rf /Library/Extensions/tun.kext
sudo rm -rf /Library/StartupItems/tap
sudo rm -rf /Library/StartupItems/tun

Reboot the computer. After the reboot, verify no TUN and/or TAP character device files are listed. Run the following command from Terminal:
Code:
ls /dev | egrep 'tun|tap'

2. Clone the TunTap repository from SourceForge
From Terminal:
Code:
cd $HOME/Documents
git clone git://tuntaposx.git.sourceforge.net/gitroot/tuntaposx/tuntaposx
cd tuntaposx/tuntap

3. Modify the original source code
I want to increase the number of available TAP interfaces from 16 (default) to 32, so I would run the following command from Terminal:
Code:
sed -i.orig '34s/16/32/' src/tap/tap.h

Verify the value for the max number of TAP interfaces. Run the following command from Terminal:
Code:
sed -n '34 p' src/tap/tap.h

Support for the 32-bit architecture needs to be removed before the code can compile in Mavericks. Run the following command from Terminal:
Code:
sed -i.orig 's/ -arch i386//' src/{tap,tun}/Makefile

4. Compile and install TunTap
From Terminal:
Code:
make
sudo make install
sudo kextload /Library/Extensions/tap.kext/
sudo kextload /Library/Extensions/tun.kext/

5. Reboot and verify
Reboot the computer. After the reboot, verify the TAP character device files are listed and the number is correct. Run the following command from Terminal:
Code:
ls /dev/tap* | wc -l

_________________
http://binarynature.blogspot.com/search/label/GNS3


Last edited by mweisel on Mon Feb 17, 2014 10:41 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Implement a multivendor OSPF lab with GNS3 and VMware Fu
PostPosted: Mon Feb 17, 2014 5:31 am 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Nice :) Thanks for sharing.



_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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