Ping works fine, but no Internet connection in browser

26

14

Without having changed any settings, I can't access the Internet anymore through my laptop running Windows 10. Every browser tells me the connection has timed out. I can connect to the router and other devices on the network are not affected. Windows tells me that I am "connected to the Internet" but apparently, that's no help. It doesn't seem to work through other WiFi networks or ethernet either.

ping google.com works fine and surfing by IP address does not help. I tried restarting the computer, restarting the router, resetting IP configuration with no avail. I couldn't find a problem in the network settings either. I tried about anything suggested on this website. I hope someone of you has any idea as to what could resolve the issue. Thanks.

Update

So it turns out I can access google websites such as google.com or youtube, but nothing else. I tried some of the suggestions I found online, but nothing worked. Ideas?

quacodas

Posted 2017-05-20T11:27:48.647

Reputation: 371

Any proxy settings in place? – I say Reinstate Monica – 2017-05-20T11:53:03.483

@Twisty no proxy, I checked for that – quacodas – 2017-05-20T11:59:37.187

3ICMP requests (ping) are rather small. If there's intermittent connectivity, the ping command won't likely find it unless you execute ping 8.8.8.8 -t to ping indefinitely until you stop it. It may also be helpful to checking your LAN cables to make sure that they aren't wrapped around any power cables. Cross-talk is possible there. – Shankensteinium – 2017-05-20T13:16:08.400

@Shankensteinium I updated the problem description, maybe that helps – quacodas – 2017-05-20T14:25:30.430

Try network troubleshooting from down-right corner network icon. Change DNS IP address. Flush DNS cache with ifconfig admin. Try to traceroute any website and find the erroreneous IP. Also try nslookup with that website and other DNS IPs. – Biswapriyo – 2017-05-20T14:42:34.577

2

In regards to Shankensteinium's comment, you could also use the free WinMTR network diagnostic tool, which provides a combination of ping and traceroute cababilities. It is a Windows implementation of the MTR tool. You could see any differences in the network path to Google.com and YouTube.com versus other sites that are inaccessible, e.g., differences in the intervening routers or packet loss on a network path.

– moonpoint – 2017-05-20T16:24:34.813

Answers

19

I can't access the Internet anymore

Try reinitialising the network states. Run the following commands in an elevated cmd shell:

  • Reset WINSOCK entries to installation defaults:

    netsh winsock reset catalog

  • Reset TCP/IP stack to installation defaults:

    netsh int ip reset reset.log

  • Reset Firewall to installation defaults:

    netsh advfirewall reset

  • Flush DNS resolver cache:

    ipconfig /flushdns

  • Renew DNS client registration and refresh DHCP leases:

    ipconfig /registerdns

  • Flush routing table (reboot required):

    route /f

DavidPostill

Posted 2017-05-20T11:27:48.647

Reputation: 118 938

2I tried every command you mentioned, and one of them must have done the trick. At least for now, it seems I can normally access the internet. Thank you very much! Let's hope it stays that way. – quacodas – 2017-05-20T17:43:23.630

the power of these instructions! I sent them by email to a computer novice, and after a reboot all fine. Now they also want to know which of these steps did the trick! – reckface – 2017-07-05T09:35:28.767

@reckface The only way to find out is to check the internet connection after each step :) – DavidPostill – 2017-07-05T10:15:01.707

1I will try it out next time when the problems come again and report back. I have windows 10 and once a day this happens. – Black – 2017-11-21T18:59:47.227

your, sir, saved my day! (or at least a re-installation) Thank you so much! – Master of Celebration – 2018-11-23T15:17:23.167

This is a fantastic answer! I saved it for future troubleshooting, thanks a lot! – JoniVR – 2019-02-06T19:58:54.673

To open an elevated cmd shell : Win+R -> cmd -> Ctrl+Shift+Enter – sboye – 2019-07-26T13:57:59.033

Thanks a lot, David – Taras Vovkovych – 2019-09-28T09:45:35.337

While running netsh int ip reset reset.log, I got an error Access is denied. I was able to resolve it with a registry change.

– Zev Spitz – 2019-11-28T19:46:42.237

5

Are you coming here because you have a MacBook Pro running Windows 10 and this exact issue?

The solution is to go to Device Manager, find your Wi-Fi card and run Roll Back Driver.

Roll Back Driver

Ole Melhus

Posted 2017-05-20T11:27:48.647

Reputation: 151

1Saved me a ton of time. Thank you. – Moe – 2019-11-24T13:05:13.507

The roll back driver option is disabled for me. – BM5k – 2019-12-07T03:16:34.407

2

Your update indicates you can only access two websites, google.com and youtube.com. For other sites that are inaccessible via your browser, can you successfully ping them?

You could try accessing problematic websites outside of a browser with a Telnet client, such as PuTTY. You can use PuTTY to issue the commands a browser issues to retrieve content from a website. Or you can install a telnet client from Microsoft, if you are using a Microsoft Windows system by opening a command prompt window with administrator access and issuing the command pkgmgr /iu:"TelnetClient". Once that telnet client is installed, you can then issue the command telnet www.example.com 80 from a command prompt.

If you are able to successfully connect on port 80, the well-known port for HTTP connections, you will then just see the black background for the command prompt window with a flashing cursor. Type the command GET / HTTP/1.1 and hit Enter. Then type the command Host: www.example.com and hit Enter twice. Note: the website won't echo the characters you type back to you, so you won't be able to see what you are typing, so you can't readily see if you've made a typo. But even if you make a typo, if you have been able to successfully connect to the website, it will display a message such as "404 - Not Found", which at least tells you that you can successfully connect to the website outside of a browser. I've found in some cases where malware has affected connectivity to websites from browsers on the system, that I could successfully connect to sites using a telnet client, which helped me isolate the problem.

You can return to the telnet prompt by using the Ctrl-] keys, i.e,, hit Ctrl and ] simultaneously. You can exit from the telnet program by typing the command quit at the Microsoft Telnet> prompt..

The commands provided to the website in the example above perform the following functions:

GET / HTTP/1.1 - get informs the site that you wish to retrieve a web page on the site while the forward slash tells the site that you want to retrieve the main page for the site and HTTP/1.1 tells it you want to use version 1.1 of the HTTP protocol. That's the version that allows you to specify the domain name, since many webservers host multiple websites.

Host: www.example.com - tells a server that may support multiple websites that you want a page on the site www.example.com. Note that www.example.com is an actual website created specifically for people to use in documentation examples. If you connect to the site, you will see "This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission." So, if you use it and are able to see the text on the webpage for that site displayed, then you know that there is some issue affecting browsers on the system, but at the TCP/IP level and at the HTTP protocol level, you do have access to the sites that are inaccessible by a browser or browsers on the system.

Alternatively, I've found HTTPNetworkSniffer is sometimes helpful in debugging problems with website access. It is free and can be downloaded from the website of the developer, Nir Sofer, at HTTPNetworkSniffer. You could run that program while attempting to access a site within a browser on the system and at least see if the browser is actually attempting to communicate with the problematic sites, i.e., that attempts to access a problematic site are getting from the browser to the TCP layer of the network protocol stack.

You could also use the free and open source packet analyzer, Wireshark, but being able to understand the information it provides requires familiarity with how the underlying protocols of the Internet, such as TCP/IP work. There are courses and tutorials on its usage online, including YouTube videos. But learning how to use it effectively may take a fair amount of time. The advantage is, though, that once you learn how to use a tool such as Wireshark, you will be able to more easily troubleshoot all sorts of problems involving network connectivity.

On YouTube, there is WireShark Tutorial for Beginners and Wireshark 101: How to Wireshark, Haktip 115; many others can be found by searching on the terms "Wireshark tutorial". Websites with tutorials include Quick and dirty Wireshark tutorial, How to Use Wireshark to Capture, Filter and Inspect Packets, and Wireshark Tutorial, which is a PDF file created by Professor Angelos Stavrou in the Computer Science Department of George Mason University.

Udemy offers online courses at a relatively low cost. E.g., Wireshark in 60 minutes and The Complete Wireshark Course: Go from Beginner to Advanced! are $10 USD at the moment. Search the site for "Wireshark" to find other courses on Wireshark. Lynda.com also offers courses - see Wireshark Training and Tutorials. You can find online courses from others by a web search on "Wireshark course". I can't vouch for any of those Wireshark courses personally, since my learning to use it has been based on installing it and using it to troubleshoot particular network problems over time.

moonpoint

Posted 2017-05-20T11:27:48.647

Reputation: 4 432

Thanks a lot for your elaborate answer! I could successfully ping websites that don’t work in the browser, however using PuTTY did not do anything. After typing the commands, nothing happened. The issue seems resolved for now, but you mentioned: “There are courses and tutorials on its usage online, including YouTube videos”. I am generally interested in this topic, could you recommend anything like that? – quacodas – 2017-05-20T17:40:10.423

@quaductas - I added links to tutorials and classes. – moonpoint – 2017-05-20T18:43:37.880

1

The same happened to me. Reinitialising the network didn't work. I tried a lot of options but in the end uninstalling the AVG antivirus was the one that solved the problem!!!

Deix

Posted 2017-05-20T11:27:48.647

Reputation: 11

1

I just resolved a similar issue with my new Dell Inspiron laptop so I will share in case it helps someone. In my case from time to time the internet connection seemed to drop: no application could connect to to the internet even though ping and tracert kept working fine.

I've spent a lot of time trying various solutions (including those mentioned here) but nothing helped. Finally, I decided to browse manually through active Windows services and see if I can find anything strange that may be related to network.

It turned out that those laptops come with preinstalled SmartByte technology that is supposed to optimize network traffic. I uninstalled it and my issue was fixed.

Paweł Chorążyk

Posted 2017-05-20T11:27:48.647

Reputation: 111

0

I've seen this happen due to Path MTU Discovery black holes. If you are sending packets that are too large for your network and some part of your network is keeping you from discovering that fact, then you'll only be able to connect to some websites that insist on smaller packets when negotiating each TCP connection, such as Google.

Try setting your MTU down to something smallish like 1300 and see if you can connect to other websites. If that fixes it, then try increasing your MTU until you find the highest value that works.

Spiff

Posted 2017-05-20T11:27:48.647

Reputation: 84 656

0

This same issue kept happening to me on Windows 10: I would suddenly lose all ability to open new websites or connect to new ports (even localhost:8080) in any browser, but I could still ping remote servers, and already-open WebSockets (e.g., in a chat program) continued to work. Switching from WiFi to Ethernet (and vice-versa) had no effect.

My problem stemmed from two events:

  1. Every time this issue started, I would also get this event in the Event Viewer program, under "Administrative Events": Event 4231, Tcpip: A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use.

  2. When I opened a CMD or PowerShell and entered the command Get-NetTCPConnection, it showed that nearly all of my ~60,000 ports were being used by a process with a certain PID. I opened the Task Manager, found the service with that PID, and clicked "End process tree". That freed up most of my ~60,000 ports and fixed the issue.

Update: my problem turned out to be caused by this issue.

Josh

Posted 2017-05-20T11:27:48.647

Reputation: 131

-1

I would say that the reason can be also a crazy antivir. Stop it and try some page by browser. If it is OK, uninstall the antivir or try to repair it. Here the actions are SW-specific. I have one problem for half a day (reset Internet, DNS and proxy settings were in vain) and it was resolved that very way.

Gangnus

Posted 2017-05-20T11:27:48.647

Reputation: 157