• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

A virtual machine: how to use a different default gateway than the physical host?

starriol

Member
I'm always doing the weirdest configurations 😀

The point here is that I need to run a service which uses a very high ammount of traffic (in WAN terms, the LAN wouldn't be affected since it's 2 MBs/sec top).

So instead of having 2 boxes, I want certain services to go out through the physical NIC's default gateway (one ISP) and all the traffic generated by the VM, through the other ISP.

How can that be done? I can use either VM Ware, Microsoft's solution or Virtual Box, since I still don't have anything set-up.

I did some testing.... using VM Ware with the VM configured as directly connected to the network, I used on the virtual NIC the secondary ISP's router address, as the default gateway, but all the traffic ended up going through the primary ISP.

Show me your ideas, please 😀
 
I would think that if both routers are on the same lan

Router1 - 192.168.1.254
Router2 - 192.168.1.1

Setting the host to .254 and the vm to .1 would make it work

never done this though, but should work
 
The easiest way, if you have the hardware, is to use 2 NICs. One NIC for the host, using that gateway, and configure the other NIC to use the other gateway. Then, when you setup VMWare (I would use VMWare server, its free, and excellent, IMO), bridge the NIC with the other gateway. Then, set up your VM with bridged networking on that vmnet and you are set. That is guaranteed to work, however what Czar posted should work. I would try it for you, but I don't have enough network gear right now.
 
I run a similiar setup. I have 2 routers in my network, 2 different ISPs. The vmware HOST machine is on one ISP and the VM's are on another router. Just set the vm's nic to bridged mode and assign it a static ip/default gateway, and there should be no problem whatsoever.
 
Back
Top