Hi,
I'm trying to create a VM to VM network using a vSwitch. I have setup everything in ESX 5.0 U1, created the switch and connected my VMs to it. However, my VMs cannot see each other when they are connected to the same switch. The switch is not connected to any network adapter on the host. If I connect it to one of the existing adapters and then connect that adapter to an external switch, PING starts working. But when I remove the network adapter from the vSwitch it stops working. Any idea how to solve the problem?
Thanks,
Amin
I'm not a dedicated network guy, but to me this looks like a routing issue with the two NICs being in the same subnet!?
If the second network is meant to be a private network between the 2 VMs only, I'd assign an IP address like e.g. 192.168.30.10 (.11) subnet 255.255.255.0 to eth1.
André
Hi,
Could you post a screenshot of your vsphere network config? Just to be clear, you have a single ESX host, have created a vswitch attached to no physical adaptors, and have some VMs connected to that vswitch that are unable to ping each other?
Thanks,
This should work , how are you getting your IP DHCP or Static IP ? Should be static as the traffic that you are trying to send to the vms are connected on the same switch in this kind of setup the traffic doesn't leave the ESX servers.
kooltechies wrote:
This should work , how are you getting your IP DHCP or Static IP ?
I agree, it should work to ping any internal VM no matter the state of the external vmnic. However, you might be on the right track with the IP addresses. Could it be DHCP assigned addresses with a very low lease time?
All the above are right on - a screen shot would tell a lot. If you're using two different port groups in different VLANs, you woudn't be able to ping across in your setup. For what you want to do, it sounds like you only want one vSwitch and one virtual machine port group with no VLANs [set VLAN ID to None (0)], or at least in the *same* VLAN.
Cheers,
Mike
Message was edited by: VirtuallyMikeB
For whatever reason I cannot attach any files to my posts. I'm using static IP addresses on the two VMs, no DHCP, no VLAN and the two VMs are in the same port group. And yes, I don't want the traffic to leave ESX server. I just need a private connection between these two VMs.
Thanks,
Amin
What are the guest operating systems? Please provide the details of the VM's network configuration, e.g. the output of ipconfig /all in case of Windows VMs.
André
Both VMs are using 64-bit edition of Centos 6.2. Here are the details: Each VM has two network interfaces, eth0 and eth1. All interfaces are assigned static IP addresses. eth0 interfaces are connected to a switch that is connected to an actual network adapter on the host. eth1 interfaces are connected to the private switch between the two VMs (vSwitch2). Here is the output of ifconfig on both VMs
infraserver0:
eth0 Link encap:Ethernet HWaddr 00:50:56:9B:51:3B
inet addr:172.16.3.10 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fe9b:513b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:529 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17067 (16.6 KiB) TX bytes:4442 (4.3 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:9B:51:3C
inet addr:172.16.30.10 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fe9b:513c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
RX packets:270 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17599 (17.1 KiB) TX bytes:4904 (4.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:117 errors:0 dropped:0 overruns:0 frame:0
TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13508 (13.1 KiB) TX bytes:13508 (13.1 KiB)
webserver0
eth0 Link encap:Ethernet HWaddr 00:50:56:9B:51:3D
inet addr:172.16.3.11 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fe9b:513d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:588 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19527 (19.0 KiB) TX bytes:3940 (3.8 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:9B:51:3E
inet addr:172.16.30.11 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fe9b:513e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17573 (17.1 KiB) TX bytes:5340 (5.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1344 (1.3 KiB) TX bytes:1344 (1.3 KiB)
I'm trying to ping one VM from the other using eth1 and I keep getting Destination host unreachable. But if I ping it using eth0 everything works fine. In particular using infraserver0:
ping -I eth1 172.16.30.11 ---> FAILS
ping -I eth1 172.16.3.11 ---> FAILS
ping -I eth0 172.16.30.11 ---> SUCCEEDS
ping -I eth0 172.16.3.11 ---> SUCCEEDS
Aparently there is something wrong with using ping on eth1 and I can't seem to figure out what it is. I would appreciate any help regarding resolving this.
Thanks,
Amin
I'm not a dedicated network guy, but to me this looks like a routing issue with the two NICs being in the same subnet!?
If the second network is meant to be a private network between the 2 VMs only, I'd assign an IP address like e.g. 192.168.30.10 (.11) subnet 255.255.255.0 to eth1.
André
Indeed! I just found that out myself. Thanks a lot. I made subnet masks 8 bit and everything started to work correctly. Thank you so much for your kind help.
Amin
Nitpick: don't you mean 24-bit? 8-bit would be 255.0.0.0, I suspect you meant 255.255.255.0.
You're absolutely right. I made the mask 255.255.255.0, so it's technically 24-bits.
Actually, technically all subnet masks are 32 bits.
Thumbed from my Android
--
Mike Brown
573-433-0872 (Cell)
michael.b.brown3@gmail.com<mailto:michael.b.brown3@gmail.com>
Blog: http://VirtuallyMikeBrown.com
Twitter: http://twitter.com/#!/VirtuallyMikeB
LinkedIn: http://linkedin.com/in/michaelbbrown