How to debug: ping "Name or service not known" with Ubuntu 20.04 in WSL1 in Windows 10, even with required nameserev settings for VPN?

Yu Shen

I'm running into a tough problem: With VPN for my employer's intranet, I cannot ping to a host "sensor-access01" on the Intranet. The same command:

ping sensor-access01

works in Windows CMD console with the expected replies:

Pinging sensor-access01.xxx.domain [10.1.242.50] with 32 bytes of data:
Reply from 10.1.242.50: bytes=32 time=13ms TTL=62

but in the Ubuntu/WSL I only got the error:

ping: sensor-access01: Name or service not known

I have made sure that the content of /etc/resolv.conf in the Ubuntu has the correct nameserves for the VPN, following the solution at WSL - DNS not working when connected to VPN by Donatello and I confirmed that the content of /etc/resolv.conf changes accordingly with the presence and absence of the VPN

I'm seeking advice to troubleshoot for a solution.

Here are a few potential suspicions.

  1. The Ubuntu 20.04 was supposed to be installed with WSL2, as the version of my Windows 10 supports WSL2, but I checked that it WSL2 was not enabled due to some reason that I don't quite know. Could it be possible, due to the inconsistent version of WSL? (expected vs. the actually used), the Ubuntu does not work properly? (I had Ubuntu/WSL1 with an older machine/Windows 10, I had no issue with DNS/ping. This new Ubuntu installation otherwise has no problem found so far.)
  2. The host that I cannot ping is a host on the Intranet, for other host, such as dropbox.com, I'm able to get host address resolution without the name error in the same Ubuntu and same VPN. I still cannot ping dropbox.com, but I guess that it might be a separate issue with the Intranet policy. Here is the different response:

ping dropbox.com

PING dropbox.com (162.125.248.18) 56(84) bytes of data.

^C

--- dropbox.com ping statistics ---

8 packets transmitted, 0 received, 100% packet loss, time 7007ms

Yu Shen

The mystery is solved. Using the domain suffix of my employer, makes ping working:

ping sensor-access0.xxx.domain

where xxx is the name of my employer's name.

I wish the error message would have been more helpful. Without the domain suffix, it used to work. I don't know what have changed.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Show matplotlib plots in Ubuntu (Windows subsystem for Linux, WSL1 & WSL2)

ftp: Name or Service not known

how do i fix sudo: unable to resolve host raspberrypi4: Name or service not known

ping: http://google.com: Name or service not known

I can't ping6 my domains in my home network: "mydomain.tld: Name or service not known"

JWTRefreshTokenBundle: Name or service not known

Ubuntu ssh: Could not resolve hostname myserver: Name or service not known

Unable to ssh into Ubuntu 12.04 LTS [could not resolve hostname (hostname): Name or service not known

ping displays "Name or service not known"

How to configure VPN settings?

How to import/export VPN settings in Windows 7?

hostname: Name or service not known

Windows 10 VPN Issues

How to access linux/Ubuntu files from Windows 10 WSL?

How to troubleshoot OpenGL on Ubuntu under Windows 10 (WSL)

Suppress "Name or service not known" on ping

windows 10 WSL ubuntu unable to ping anything

How to retrieve saved password of VPN on Windows 10?

Ping : Name or service not known

Ubuntu host can't ping guest virtual box Windows 10

How to prevent Windows 10 from preserving some language settings, even after removing that language, restarting, checking settings with PowerShell?

How to specify startup directory for WSL (Ubuntu) in ConEmu in Windows 10

When VPN is on in WSL2, how can I ping windows from WSL2

sudo: unable to resolve host slave-node: Name or service not known when need to install skaffold on ubuntu 20

Docker for Windows and WSL1 to Work together

testdriven.io How do I fix "Name or service not known" during docker run?

How to recover/re-mount a lost drive letter in Win10 WSL1?

How can WSL have access to Internet when the GlobalProtect VPN is activated on Microsoft Windows 10?

Windows Terminal: How to create multiple profiles with different start commands on same WSL1 Ubuntu