Score:0

Problem with establishing connection to internet

cn flag

I am unable to reach any web server from ubuntu VM ware on macOS host.

Host: MacOS --> internet connection is fine Guest: Ubuntu --> internet connection not fine

Ubuntu version

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

Ifconfig

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.010.11  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:09:48:52:9b  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 50178  bytes 63227601 (63.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50178  bytes 63227601 (63.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Network Manager Status

sudo systemctl status network-manager.service 
● NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-11-19 11:53:22 CET; 10s ago
       Docs: man:NetworkManager(8)
   Main PID: 8622 (NetworkManager)
      Tasks: 4 (limit: 14267)
     Memory: 2.9M
     CGroup: /system.slice/NetworkManager.service
             └─8622 /usr/sbin/NetworkManager --no-daemon

Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1865] ifupdown:       interface-parser: parsing file /etc/network/interfaces
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1865] ifupdown:       interface-parser: finished parsing file /etc/network/interfaces
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1880] device (lo): carrier: link connected
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1881] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1888] manager: (docker0): new Bridge device (/org/freedesktop/NetworkManager/Devices/2)
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1895] manager: (ens33): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <warn>  [1637319202.1900] Error: failed to open /run/network/ifstate
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.1944] manager: startup complete
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.2162] agent-manager: agent[de5a91ed7bc2b4be,:1.39/org.gnome.Shell.NetworkAgent/1000]: agent registered
Nov 19 11:53:22 ubuntu NetworkManager[8622]: <info>  [1637319202.2202] modem-manager: ModemManager available

NS lookup

nslookup google.com
Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find google.com: SERVFAIL

Can someone guide me to trouble shoot this problem and fix it?


interfaces

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# auto eth1

# iface eth1 inet dhcp

netplan

$ cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

lshw

sudo lshw -C network
[sudo] password for -----: 
  *-network                 
       description: Ethernet interface
       product: 82545EM Gigabit Ethernet Controller (Copper)
       vendor: Intel Corporation
       physical id: 1
       bus info: pci@0000:02:01.0
       logical name: ens33
       version: 01
       serial: 00:0c:29:a1:3f:99
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 66MHz
       capabilities: pm pcix bus_master cap_list rom ethernet physical logical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=5.11.0-38-generic duplex=full latency=0 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:19 memory:fd5c0000-fd5dffff memory:fdff0000-fdffffff ioport:2000(size=64) memory:fd500000-fd50ffff

VMWARE network settings

enter image description here

ChanganAuto avatar
us flag
Not an Ubuntu problem. The problem is at the VMWare settings.
in flag
You may want to confirm that you've assigned a network device to the VM, as there isn’t one in your `ifconfig` output
heynnema avatar
ru flag
Edit your question and show me `cat /etc/network/interfaces` and `cat /etc/netplan/*.yaml`. Start comments to me with @heynnema or I'll miss them.
cppiscute avatar
cn flag
@heynnema I have added the additional info you have asked, can you please check.
heynnema avatar
ru flag
Thanks for the data. They look fine. Show me `sudo lshw -C network`. Thanks! Have you checked your VMWare network settings as per @ChanganAuto?
cppiscute avatar
cn flag
@heynnema please have a look.
heynnema avatar
ru flag
Everything looks fine, except for `ifconfig` doesn't show ens33. I do see docker, and I'm not familiar with docker, but isn't there a config file that needs to be edited to make it work? Somewhere the ens33 device is not being seen. Did you recheck the VMWare network settings?
cppiscute avatar
cn flag
@heynnema I have checked everything in vmware settings and everrthing seems ok to me. I have added the screenshot, please check.
heynnema avatar
ru flag
Try Bridged autodetect and see what happens. Use `ifconfig` to see if ens33 shows up after restarting.
cppiscute avatar
cn flag
@heynnema yeah I tried this things, but nothing worked. The adapter wont appear in the config.
heynnema avatar
ru flag
And you checked your docker settings, yes? I'm out of ideas. Sorry.
cppiscute avatar
cn flag
@heynnema yes i did.
cppiscute avatar
cn flag
The problem got fixed by itself, after a few continuous restarts the DHCP could get the IP established. I have no idea what was the root cause. I do face the problem now and then. But then restarting it and waiting couple of minutes at DHCP connection establishment step at console loading, finally everything works.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.