VMware Cloud Community
boss01
Enthusiast
Enthusiast

VM with two network card

We are having Windows 2003 vm with two network card both having different ip address with different gateway (10.20.x.x & 10.10.x.x). Both the network card is NAT with external IP. One ip is for webserver(10.10.x.x). Another ip is for application. I can’t able to reach the webserver from both inside and outside. But the application is working fine.

In vm route print shows the default gateway address of 10.20.x.x(application). In physical environment the same setup is working fine. Is there any difference between physical machines network & vm virtual network.

0 Kudos
4 Replies
weinstein5
Immortal
Immortal

Are the application and webserver on the same 10.10.x.x networks? How do you have the virtual networking configured? 2 virtual switches? Can you post a screen shot of your virtual network configurations-

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
Nikhil_Patwa
Expert
Expert

Hi,

Looks like you may have configured both the networks in the same vSwitch and the physical ethernet adapter is on the application network hence only application is working.

I suggest you configure two vSwitch one each for Application and WebServer and also have 2 management networks each connected to it's own physical ethernet adapter on the host server thereby having redundancy and network separation.

Hope the information is helpful.

Nikhil

0 Kudos
kjb007
Immortal
Immortal

First, you should not configure a windows vm with multiple gateways, you will get unexpected results.  Not sure how your physical is working correctly, but I think your network bindings may be in a different order.

In a typical webserver type setup, your default gateway should route you outside, not inside to your network, but you should have a static route in place to allow you to access your intenal network services, typically through a second IP, which it would seem you have.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
FredPeterson
Expert
Expert

Normally having two gateways isn't a problem as long as you understand the traffic flow and/or the application binds itself to an IP address.

Also, check the binding order - which NIC is master for unbound outbound.

What matters is the outbound initiation.  Traffic coming in on one IP will go out the same IP as long as that socket is maintained.  But a new outbound connection will always go out the first NIC in the binding order.

If you have specific routing needs, you will have to create a new static route.

I'm doing this very setup on web server just fine that connects back, over a different NIC, to a different subnet.  Works fine.

0 Kudos