Hi,
I'm running Vmware Fusion 1.1 on Leopard. My virtual machine is configure as host-only using vmnet1. I add a default route in the vm to default route to that address of vmnet1. How can I activate the macbook to route between is real ethernet interface and that vmnet1? I want a network device from the real network who have a route to reach that virtual subnet going to the macbook to be able to reach the vm.
I cannot use bridged, because I want to be able to move my macbook in any network and always have the same IP on my vm.
Any idea...? how can I route between interface on the mac?
Thanks,
Darktech
The whole purpose of Host-Only is to contain the Virtual Machine. Have you tried doing what you want to do with the Virtual Machine's Network set to NAT?
Also you may want to have a look at:
Otherwise it will require modifying some of VMware's program files in the "/Library/Application Support/VMware Fusion" folder and or the Virtual Machine's .vmx configuration file.
This and related topics have been addressed many times in the Forum so if you search the forum you should be able to find explicit information or someone else may post addition information.
Yes, I tried NAT.... but that put my VM in the back of a firewall and my VM is a radius/tacacs+ server.... I need a direct access without being filter my a firewall. But in the same time I need to keep always the same IP even if I move my laptop from one subnet to another one....
I looked old post and I didn't find anything explaining me how to route between eth0 and vmnet1....
You may wish to rethink what you're trying to accomplish here.
A bigger concern is how your network is going to reach your VM if you should change subnets on your Mac. If somehow you were able to configure your Mac and VM the way you want, it's important to note that the subnet that your VM is on does not exist in isolation - the rest of the network would have to adjust its routing tables whenever you move your Mac.
For example, if your Mac's network is 192.168.1, your mac is 192.168.1.1 and your Vm's network is 10.1.1, the network's routing tables would have to be configured to route a packet destined for network 10.1.1.x to your machine. Move your machine to the 192.168.2 network, and now the network's routing tables would have to be adjusted to route the packets for 10.1.1.x to your Mac on the 192.168.2 network. Same thing happens if you change your Mac's IP address on the 192.168.1 network - the network would have to be told to re-route packets to your machines new IP address. Usually endpoints are not given the ability to dynamically change the network's routing tables.
Second, the Mac's IP stack would have to be configured as a router (or IP forwarding) to forward these packets to another internal interface. While I can't speak for how or if the MacOS X implementation could do this, in most other platforms, this ability is turned off by default.
Also note that some networks are, by RFC 1597, for private network use and therefore non-routable. Fusion's host-only network and NAT network are built on these non-routable segments. Therefore they were not designed for direct external communications, as Woody has noted. Therefore, "direct access" to the network is provided with Fusion by a Bridged network configuration.
Thanks for your answer. I'm exactly aware of the modification that I need to do to the routing table of the others devices that want to reach that VM, and that is ok. I'm ready to do those change, it's not complicate.
And to configure my mac as a router or ip fowarding is exactly what I looking for....
I'm only using private address (rfc 1597) and those address can be routable in a internal network.... that is what I'm doing.
Thanks,
Darktech
I think I understand what you're asking...
You've taught the VM to use the Mac's IP address on the hostonly subnet as its gateway, and you've taught the other devices on your network to use the Mac's external address (even when it changes) for RADIUS services, and now you want to teach the Mac to route between en0 and vmnet1. Do you have this working in one direction and not the other, or do you need to get it working in both directions?
I assume you've looked at the "route" command (try "man route" and "man routed") in Terminal?
Exactly what I'm looking for.... I need it in both direction..

Here is the detail of my network...:
macbook eth0 : 192.168.88.103 /24
macbook vmnet1 : 172.16.221.1 /24
srv1 : 192.168.88.10 /24 w/ a route for 172.16.221.0 /24 to 192.168.88.103
vm : 172.16.221.50 /24 w/ a default route to 172.16.221.1
srv1 is able to ping eth0 and vmnet1 but not vm
vm is able to ping vmnet1 and eth0 but not srv1
So, my conclusion is that I need to enable a king of ip routing or ip fowarding on the mac to let the mac foward packet outside is interface coming from another of his interface. It's normal that I can reach the other interface because it's local only and I doesn't have to foward the packet outside....
I looked at "routed" but it's only for running rip... and I don't have any other device who run rip...
Thanks,
Darktech
I think I found the magic incantation you're going to need. By default IP forwarding in the Mac's IP stack is turned off. To enable it :
sysctl -w net.inet.ip.forwarding=1
See if that then gets the packet routed to your VM on the vmnet1 network.
You are the man!!!!!!! :smileygrin:
Now that is working! The packet are route between the real ethernet and vmnet1.
By any chance.... the you know drawback of using that command? and do you know if it will be always "on" are if a restart I need to reenter the command?
Thanks,
Darktech
and do you know if it will be always "on" are if a restart I need to reenter the command?
I believe it survives a reboot although it's easy enough to find out, just reboot and see.
You can toggle the state by changing 1 to 0 e.g sudo sysctl -w net.inet.ip.forwarding=0 turns off forwarding.
Although your not using OS X Server have a look at the following URL as it has information pertaining to what you're doing.
http://www.macos-x-server.com/wiki/index.php?title=Enable_NAT_routing
Yeah, I just test it... and the value is reset after a reboot.... but I find on the internet how to make it permanent...
You just have to write into /etc/sysctl.conf the line "net.inet.ip.forwarding=1" and the value stay there after a reboot...
Thanks everyone for your help!
Darktech
