Link to home
Start Free TrialLog in
Avatar of eli290
eli290

asked on

VMware networking with two NIC and two networks

We have a Vmware esxi host with a single VM. We need to connect this VM to two different networks. I created two vswitches to accommodate the setup.

Vswitch 0 - 192.168.1.2
Vswitch 1 - 192.168.2.2

NIC 0 - 192.168.1.10
NIC 1 - 192.168.2.10

Vswitch 0 is connected an araknis 24 port switch which is connected to our main network. We are able to get DHCP and get to the entire network no problem

Vswitch 1 is connected to a Linksys VPN. This VPN has 2 VPN Tunnels with existing devices and are able to communicate with each other. The VM receives a DHCP address from the VPN no problem. We are able to ping the VPN gateway but unable to ping or see anything locally or through the VPN tunnels. I also disabled the NIC 0 to make sure traffic wasnt being sent over the wrong NIC.
Avatar of Jason Zondag
Jason Zondag
Flag of Canada image

When you say Linksys VPN are you referring to a local router?

On the surface I would say that if the VM is showing up on the correct switch and receiving a DHCP address then it's on the right network.  The only reason I can think of that the VM cannot communicate is because either has no gateway address or the gateway address provided is wrong.  You would be able to ping the gateway locally, but not be able to ping anything else on the other side of the tunnel.  By IP, though, you should be able to ping other objects on the 192.168.2.0 network.

Can you confirm the gateway address for the VM is pointed at the Linksys VPN and that you cannot ping by IP to other devices on the same LAN as the VM?
Also, what did you set the VMKernel gateway to for the second NIC?
host -> configure -> networking -> tcp/ip configuration

The system stack for default should show the gateway address of your VPN router...
Ok ignore that last comment, though I do think it's a gateway issue.

I have a similar setup where I have a host on one network (voice) and all the other hosts on another network (data).  In my case I actually found that the default vmkernel is set to the data network gateway.

What I did was create a second standard switch (equivalent to your vSwitch1) and assigned a NIC to it (equivalent to your NIC1).  I then edited the IPv4 settings to my vmk1 network with a static IP on the same subnet (for you it would be 192.168.2.9).  I didn't bother updating the gateway (checkbox to override default gateway for this adapter) but you can.  It didn't make any difference for me.

I then set the IP on the VM (static assignment) to your equivalent - 192.168.2.10 with the gateway on the same network 192.168.2.1 and subnet mask 255.255.255.0.
Avatar of eli290
eli290

ASKER

That is exactly how I have it setup. I also rechecked my subnet and gateways and all seem to be ok. I can ping and connect to the gateway from the VM no problem. Just cant ping or connect to anything else on that network. All firewalls are turned off as well
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eli290

ASKER

I am using E1000 should I change to the VMXNET3?
Avatar of eli290

ASKER

OK just changed it to VMXNET3 and i got a little further! I am able to see some of the network now.
Avatar of eli290

ASKER

OK i think that worked now. I have some devices that arent showing but I think that is more user error (Wrong IP's etc)... thanks! Just a quick follow up, what is the difference between the VMXNET3 and E1000?
E1000 is an emulated network interface based on the Intel E1000.

The VMXNET3 is a virtual aware network interface, high performance network interface, and it should be used in ALL your VMs.

you can also see and read about it here

https://kb.vmware.com/s/article/1001805

BUT, you have to use it for Windows OS installations (at install!), because Microsoft will not include it in their drivers by default unlike Linux distros!

So install an Windows OS using the E1000, and then add VMXNET3 and remove the E1000!
Avatar of eli290

ASKER

Thank you very much!
Avatar of eli290

ASKER

Once I installed a new NIC using the VMXNET3 and deleted the old NIC we are golden! Thank you very much
Good to know.  

Never encountered that issue - I never use the Intel E1000, not even to install the OS.  When the VM comes up after an install I mount and install the VMware Tools, which provides all the drivers for VMXNET3.  I don't see why I need network before running the tools. =)

Anyway, not important - just my 2 cents