How to debug network connection?

1

windows can't connect to network
Typical dialog with no explanation why can't windows connect.

Sometimes it happens that you can't connect to certain router. How can I obtain some verbose info about connection procedure to find out what went wrong?

Is there a command line version of the network connection UI?

Tomáš Zato - Reinstate Monica

Posted 2014-10-25T17:01:28.693

Reputation: 2 932

Superuser is an English language website, please can you translate the text in the dialog? Also let us know what program shows this dialog and what windows version you are using? – DavidPostill – 2014-10-25T17:06:35.910

My windows version is in the tag of this question. And the dialog is from windows. The dialog says: "Windows can't connect to network.". I have serious doubts you'd post an answer if the dialog was translated... – Tomáš Zato - Reinstate Monica – 2014-10-25T17:23:51.873

I have serious doubts you'd post an answer if the dialog was translated is not a nice way to respond when someone is trying to help you ... :/ You haven't answered the question what program shows this dialog. What are you trying to do when this message is displayed? – DavidPostill – 2014-10-25T17:42:02.890

And the dialog is from windows. It displays to everybody around the globe when something goes wrong. But no matter what the problem is, the dialog is the same - unhlepful. – Tomáš Zato - Reinstate Monica – 2014-10-25T17:46:00.813

What are you trying to do when this message is displayed? It doesn't appear without you trying to do something? You are trying to connect to a network? Which network? one you connected to before? A new network? – DavidPostill – 2014-10-25T17:47:51.577

Yes, it appears when I'm trying to connect to (any) network and the connection fails from other than wrong password reasons. Actually, my screenshot comes from different network than the one I'm having problems with now. – Tomáš Zato - Reinstate Monica – 2014-10-25T18:57:56.567

Answers

1

This article gives good overview on diagnosing network problems on Windows: http://technet.microsoft.com/en-us/magazine/ff625276.aspx

It starts with GUI methods you probably tried, but then touches on netsh (Network Shell) which is very powerful command line utility. It allows you to control everything network related (command reference); in particular it provides tracing with netsh trace context (command reference). Netsh can include windows events and network traffic in it's traces as well as plethora of additional diagnostic information.

You may also combine both methods (quoted from technet article):

When you enable tracing with Netsh.exe, Windows 7 can create two files. An ETL file contains trace events for Windows components, and if specified, network traffic. By default, the ETL file is named Nettrace.etl and stored in the %TEMP%\NetTraces folder. You can specify a different name and storage location with the tracefile= parameter. An optional CAB file can contain several types of files including text, Windows Registry, XML and others that store additional troubleshooting information. The CAB file also includes a copy of the ETL file. By default, the CAB file is named Nettrace.cab and stored in the %TEMP%\NetTraces folder.

You can also use Netsh.exe tracing in conjunction with Control Panel | Troubleshooting. First, use the appropriate Netsh.exe command to enable tracing for the scenario. For example, use the netsh trace scenario=internetclient report=yes command. Use Control Panel | Troubleshooting to run the Connect to the Internet troubleshooting session. When complete, run the netsh trace stop command. Now, when you view the history of the troubleshooting session, you’ll be able to access the CAB file.

wmz

Posted 2014-10-25T17:01:28.693

Reputation: 6 132

0

I understand you need to have a tool to troubleshoot network in general. In this case you can get a lot of network-related information by using tcpdump or Wireshark if you want a nice GUI.

nochkin

Posted 2014-10-25T17:01:28.693

Reputation: 337

I need to trobleshoot even network I can't connect to (no actual network connection exists). – Tomáš Zato - Reinstate Monica – 2014-10-25T17:20:44.540

That's exactly what Wireshark does -- it will show you even failed connections with all related information and reasons on why it failed. – nochkin – 2014-10-25T22:38:32.347

-1

The command you're referring to is called "ipconfig".

It will tell you if you get an ipaddress from the router and if so, what it is.

If you get an 169.254.?.? address, it basically says: this computer wants to get an IP address from a DHCP server, but no DHCP server gave an ip address.

This can be due to not being able to reach the router, or the router's dhcp not working properly, or all slots have been taken.

If you do get an ip address from the router, or you have a static one, the next step is to ping the router to see if you can get a connection between you and the router. If so, ping the internet both by an url and by an ip address, for example 8.8.8.8

Lastly, determine if there are more computers in the network who have network issues.

Also, physically look at the network connector that goes into the computer. There are 2 lights. A green and Orange one. Both should be blinking. If not, something is wrong with the cable or its not connected properly, or the device at the other end does not provide any network activity. (a hub that lost power for example)

I can go into far more details, but that would make this way too broad for the scope of SuperUser.

LPChip

Posted 2014-10-25T17:01:28.693

Reputation: 42 190

Thanks for trying, but I'm debuging a problem where "Windows can't connect to network" - that means no ipconfig, no nmap or something like that. In my particular case it's wireless network, so there are no physical cables. – Tomáš Zato - Reinstate Monica – 2014-10-25T17:22:50.527

ipconfig still gives you details about the connection. If the computer cannot find it, look for the source, the device that creates the connection. Try a powercycle on it. – LPChip – 2014-10-25T17:29:42.697

When you can't connect to network, the ipconfig reports Disconnected for the WiFi hardware. Powercycling solves the problems for a few minutes. I need to find out why does the router refuse connections - when find out, I'll be able to ask better question than this one. I'm really suprised that my question has no easy answer. Has nobody ever failed to connect to WiFi network? – Tomáš Zato - Reinstate Monica – 2014-10-25T18:59:43.527

Your question indicates you want to find the cause. The wifi router is your cause. If it works for a few minutes and then stops working again, look for problems concerning your wifi router. Possibly update the firmware or consider replacing it. – LPChip – 2014-10-25T19:28:17.857

Well, first I want to know what's causing the problem. The router worked for years. Maybe it's just a capacitor blown. Maybe somebody screwed up with antenna when absentmindedly touching it. But I want to know at which point windows fails. I want to know the general solution, because sometimes it's just me who can't connect. So I need a general problem finder. There must be some obserwable protocol... – Tomáš Zato - Reinstate Monica – 2014-10-25T19:43:17.943