|accessing external networks on Mountain Lion and later.
|Page 1 of 1|
|Author:||mhysnm [ Sat Feb 15, 2014 6:24 am ]|
|Post subject:||accessing external networks on Mountain Lion and later.|
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 GNS3.app 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.
|Author:||mhysnm [ Sun Feb 16, 2014 3:59 am ]|
|Post subject:||Re: accessing external networks on Mountain Lion and later.|
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 192.168.0.2/24
2. tap0 interface address 192.168.0.1/24
3. Mac en0 address is 192.168.1.8 and also I have defined a 2nd address of 192.168.1.210 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 192.168.1.0/24 network, the telnet session fails to establish. this doesn't matter if I use 192.168.1.8 or 192.168.1.210 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 192.168.0.2 192.168.1.210
The above didn't work. I have not yet tried the following:
$ sudo natd -interface en0 -redirect_address 192.168.0.2 192.168.1.210 -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.
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group