I have an issue with the internet in my VMWare guest machine working very randomly (mostly not working) and I am not sure what the issue might be.
Sometimes the internet works (this also includes possibility to ssh to the host), but most of the time it doesn't.
Restarting `networking` doesn't help, nor any `ifdown`/`ifup`'s. The only situation when it might start working is restarting the whole VM. And even then it starts working perhaps one time in 10.
The only potential issue I have noticed so far is that when it doesn't work, VM network adapters' MAC addresses are swapped - while if it works, they are as configured.
Details:
- host: OS X El Capitan 10.11.4 running VMWare Fusion 8.0.1
- guest: Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux
VMWare virtual machine network settings:
- Network Adapter 1 - NAT - static MAC address `00:50:56:38:CC:21`
- Network Adapter 2 - Host only - static MAC address `00:50:56:38:CC:22`
In my virtual machine `.vmx` configuration file I have this (related to the interfaces):
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "static"
ethernet0.linkStatePropagation.enable = "FALSE"
ethernet0.pciSlotNumber = "33"
ethernet0.address = "00:50:56:38:CC:21"
ethernet0.startConnected = "TRUE"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "en0"
ethernet0.displayName = "Wi-Fi"
...
ethernet1.present = "TRUE"
ethernet1.connectionType = "hostonly"
ethernet1.virtualDev = "e1000"
ethernet1.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "static"
ethernet1.linkStatePropagation.enable = "FALSE"
ethernet1.pciSlotNumber = "37"
ethernet1.address = "00:50:56:38:CC:22"
ethernet1.startConnected = "TRUE"
Host `ifconfig`:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether a0:99:9b:0b:bf:c5
inet6 fe80::a299:9bff:fe0b:bfc5%en0 prefixlen 64 scopeid 0x4
inet 10.230.82.42 netmask 0xffffc000 broadcast 10.230.127.255
nd6 options=1<PERFORMNUD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:01:ba:d6:30
media: autoselect <full-duplex>
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:01:ba:d6:31
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether a2:99:9b:b0:3e:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1<PERFORMNUD>
media: <unknown type>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 02:99:9b:0b:bf:c5
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 7a:81:75:a1:0f:87
inet6 fe80::7881:75ff:fea1:f87%awdl0 prefixlen 64 scopeid 0x9
nd6 options=1<PERFORMNUD>
media: autoselect
status: active
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:01
inet 192.168.247.1 netmask 0xffffff00 broadcast 192.168.247.255
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:08
inet 192.168.195.1 netmask 0xffffff00 broadcast 192.168.195.255
Guest `/etc/network/interfaces`:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.195.200
netmask 255.255.255.0
gateway 192.168.195.2
auto eth1
iface eth1 inet static
address 192.168.247.200
netmask 255.255.255.0
Guest `ifconfig` (when internet works):
eth0 Link encap:Ethernet HWaddr 00:50:56:38:cc:21
inet addr:192.168.195.200 Bcast:192.168.195.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe38:cc21/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:470 errors:0 dropped:0 overruns:0 frame:0
TX packets:461 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:74106 (72.3 KiB) TX bytes:53650 (52.3 KiB)
Interrupt:19 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:50:56:38:cc:22
inet addr:172.16.121.132 Bcast:172.16.121.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe38:cc22/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1648 (1.6 KiB) TX bytes:578 (578.0 B)
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:61 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24465 (23.8 KiB) TX bytes:24465 (23.8 KiB)
Guest `ifconfig` (when internet doesn't work):
eth0 Link encap:Ethernet HWaddr 00:50:56:38:cc:22
inet addr:192.168.195.200 Bcast:192.168.195.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe38:cc22/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2472 (2.4 KiB) TX bytes:9398 (9.1 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:38:cc:21
inet addr:192.168.247.200 Bcast:192.168.247.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe38:cc21/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3498 (3.4 KiB) TX bytes:620 (620.0 B)
Interrupt:19 Base address:0x2000
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:219 errors:0 dropped:0 overruns:0 frame:0
TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:42755 (41.7 KiB) TX bytes:42755 (41.7 KiB)
Here I can see the only difference - the MAC addresses are the other way round, compared to how they are configured.
When internet works:
- from the guest, pinging all 192.168.195.* works fine (.200, .2 and .1)
- from the host, I can ping myself (.1) and the guest (.200), pinging .2 gives me 'Request timeout' error
When it doesn't work:
- from the guest I can ping myself (192.168.195.200), but pinging any other 192.168.195.* (.2 or .1) gives me 'Destinaton Host Unreachable' error. Same when pinging the internet (for example 8.8.4.4)
- from the host I can ping myself (192.168.195.1), but pinging any other 192.168.195.* (.2 or .200) gives me 'Request timeout' error.
Any idea why this might be happening, and what else I could try?
Thanks!
Hi maciejzz
Welcome to Fusion community
It seems your network adapter is not correctly configured.
ethernet0.startConnected = "TRUE"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "en0"
ethernet0.displayName = "Wi-Fi"
This section indicates your VM should be in bridged network. But,
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "static"
ethernet0.linkStatePropagation.enable = "FALSE"
ethernet0.pciSlotNumber = "33"
ethernet0.address = "00:50:56:38:CC:21"
this shows you're in NAT network.
So would you please delete your 'ethernet0'? First you should power off your VM , and then VM settings-> Network Adapter -> Advanced Options -> Remove Network Adapter and then add a new one by VM settings->Add Device-> Network? If you still want your VM to use "00:50:56:38:CC:21" as MAC address, you can configure it by Network Adapter -> Advanced Network , then enter the MAC to textfield. When these process completed, power on your VM and see if your problem is resolved.
Hi maciejzz
Welcome to Fusion community
It seems your network adapter is not correctly configured.
ethernet0.startConnected = "TRUE"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "en0"
ethernet0.displayName = "Wi-Fi"
This section indicates your VM should be in bridged network. But,
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "static"
ethernet0.linkStatePropagation.enable = "FALSE"
ethernet0.pciSlotNumber = "33"
ethernet0.address = "00:50:56:38:CC:21"
this shows you're in NAT network.
So would you please delete your 'ethernet0'? First you should power off your VM , and then VM settings-> Network Adapter -> Advanced Options -> Remove Network Adapter and then add a new one by VM settings->Add Device-> Network? If you still want your VM to use "00:50:56:38:CC:21" as MAC address, you can configure it by Network Adapter -> Advanced Network , then enter the MAC to textfield. When these process completed, power on your VM and see if your problem is resolved.
Thanks a million Nancy! This did the trick.
Even though I have originally tried the "workaround" described at Re: Network connection in Guest VM (Win 8 x64) keeps dropping after a few hours (Host: Mac OS X 10.8... - which helped as well - I kept the original copy of the problematic VM, and tried your solution on it - it was so much easier and faster!
Thanks again!