It is currently Tue Oct 27, 2020 9:07 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: accessing external networks on Mountain Lion and later.
PostPosted: Sat Feb 15, 2014 6:24 am 

Joined: Sat Feb 15, 2014 5:44 am
Posts: 2

I have been searching on the net for over 2 days now with no success in finding out how to make my external USB to Ethernet device work with Dynamips or GNS3. I want to do everything from the command line since I cannot use the GUI of GNS3 due to being blind and the voice-over software does not work with it.

I have tried to use the tuntap_20111101.tar.gz file from source forge and it seemed to install fine. But the tap devices do not appear in the ifconfig output. We see the kernel extentsion load. You cannot create a new interface with ifconfig, it keeps complaining that there is no tap0 device. I have changed the permissions on dynamips-0.2.8-RC3-community-OSX.intel64.bin found in the directory. The devices are in /dev such as tap0, etc. I have manually loaded and unloaded the kernel extentsion.

If I use the Mac dynamip latest build and define nio_gen_eth:en4 to an interface. The .net file loads fine. But once I load the switch or router, it complains that there is no device.

I have been doing all this at root level for all the work. I have read just about everything on the net on this topic with no success. Can anyone help or is the Mac a lost cause with external networks access to GNS3 or dynamips?

My second question is:

Can you load dynamips-0.2.8-RC3-community-OSX.intel64.bin with command line parameters? Is it possible to load a dynamip .net file via this binary? Can you use GNS3 totally form the command line? That is, load the hypervisa and then load the .net files? If so, how? Does GNS3 take command line parameters?

I have looked for documentation and didn't find anything helpful at all.

 Post subject: Re: accessing external networks on Mountain Lion and later.
PostPosted: Sun Feb 16, 2014 3:59 am 

Joined: Sat Feb 15, 2014 5:44 am
Posts: 2
Hello everyone.

I have resolved the tap0 problem. I found a really good article link shown below which resolved majority of my issues.

From the above article, I managed to get TAP0 to work. could ping from the terminal shell of Mac to the router and back to the external IP address of the Mac. I still cannot ping the gateway address of my home gateway. This is an outstanding problem which I will outline later. I am using the Dynamip program to do all this, not GNS3. GNS3 would still work by the way if it can be executed from the command line which is still an outstanding question.

TIP: all the docs state that you have to run the dynamips as root which is correct. But what no one other then the above link hints at is that you have to start the device which has the external port on. In my case it is switch1 on f0/1. The tap0 does not come up until the device is running or you have the .net file loaded. I haven't verify this bit of the puzzle.

What I am trying to do now is to get external connections from my Mac to access the router. I used the above link heavily to try and resolve this and some of my own playing. It doesn't want to work. Actions done:

1. Router f0/1 ip address is
2. tap0 interface address
3. Mac en0 address is and also I have defined a 2nd address of which is static.
4. Turn on ip.forwarding.

$ sudo sysctl -w net.inet.ip.forwarding=1 

5. Created ahe following nat rule:

$ sudo natd -interface en0 -use_sockets -same_ports -unregistered_only -dynamic -clamp_mss

6. Added the Nat to the firewall.

$ sudo ipfw add divert natd ip from any to any via en0 

if I try and establish an incoming telnet from another host on the network, the telnet session fails to establish. this doesn't matter if I use or addresses. I have tried to place a static nat in and this didn't work. I am not sure if I am doing the natting correctly. For example I only used:

$ sudo natd -interface en0 -redirect_address

The above didn't work. I have not yet tried the following:

$ sudo natd -interface en0 -redirect_address -red-use_sockets -same_ports -unregistered_only -dynamic -clamp_mss

The purpose of using the 2nd IP address is to create a static NAT that performs a PAT on the external address to the internal address using all ports and protocols. If anyone knows how to do this, please let me know. also should I be using pfctl instead of ipfw? I have mountain lion and shortly going to 10.9.

Still wish to know why a physical interface doesn't work with Dynamips. also should the tap0 have a unique IP address or the same as the switch interface address? I am assuming a unique, so if this is in correct, please let me know.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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