At work I use Windows network sharing to give my laptop internet, but I found that after every machine reboot the shared network breaks — I have to cancel the sharing and share the network again. Doing this every morning is really tedious. Today I finally found a solution and share it with everyone, hoping to help those who come after.
For configuring network sharing under Windows, see the other article: My office environment setup
The Problem Encountered
Let me first describe the problem I met. The following phenomena appear after every reboot of the Win10 machine:
Phenomena on my laptop:
- Cannot access the internet normally — even baidu.com won’t open.
ping 192.168.137.1works fine.- Using
wiresharkto capture packets on the relevant NIC: all DNS requests get no response, while all ICMP requests return. telnet 192.168.137.1 3389works — 3389 is the remote desktop port, and remote desktop also works normally.
Phenomena on the Win10 machine:
- All network access is normal
- The USBTP network interface keeps showing
Unidentified network, but theIPconfiguration is normal (192.168.137.1) - Using
wiresharkto capture USBTP NIC traffic: all DNS requests are not answered, all ICMP requests are answered.
Summarizing the phenomena above: only ICMP packets and TCP requests directly accessing Win10 got answers; all other requests were presumably lost. Or rather, the Win10 machine doesn’t process these requests (I guess there may be a problem with the routing table settings).
Basic Solution
The problem above was solved after I cancelled network sharing and re-shared the network. However, my Win10 computer reboots every day, and I have to connect to the Win10 computer after each reboot to do this operation — really annoying.
Root Solution
I searched the keywords windows 10 ics not working after reboot, and the pinned result
was this guy’s ICS stops working after a reboot. Published 2018-12-29 —
looks quite new.
ICS: Internet Connection Sharing — I only found this term after looking through many services in services.msc.
It introduces two ways to solve the problem:
- a powershell script to restart network sharing — basically scripting my previous operation
- modifying the registry:
1
2
3
4 Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\SharedAccess
Type: DWORD
Setting: EnableRebootPersistConnection
Value: 1
Thanks to him, I also saw Microsoft’s official blog: ICS doesn’t work after computer or service restart on Windows 10
After the modification, the picture is as follows:

Reboot the computer, and you’ll find everything is so beautiful.