树莓派3通过Windows 7以太网共享WiFi上网失败(ICS故障)求助
Hey there, let’s work through this ICS sharing issue step by step. I’ve debugged a bunch of similar setups, so we’ll get your Pi online in no time.
1. Verify Windows 7 ICS Configuration
First, double-check that you’ve shared the right network adapter—this is where most folks trip up:
- Right-click your WiFi adapter (the one with active internet access) → select Properties → go to the Sharing tab.
- Make sure "Allow other network users to connect through this computer’s Internet connection" is checked.
- In the dropdown menu below, select the Ethernet adapter linked to your Raspberry Pi (not the WiFi adapter).
- Uncheck "Allow other network users to control or disable the shared Internet connection" (this can cause unexpected conflicts).
- Click OK and confirm any pop-up prompts.
After this, Windows should automatically assign your Ethernet adapter the IP 192.168.137.1 (subnet mask 255.255.255.0). Verify this by right-clicking the Ethernet adapter → Status → Details.
2. Check Raspberry Pi Network Settings
Now let’s confirm your Pi is picking up the correct network details:
- Connect to your Pi via VNC or SSH, then run this command to check your Ethernet IP:
You should see an IP in theip addr show eth0192.168.137.xrange (e.g.,192.168.137.2). - Next, check your default gateway:
The default gateway should beip route show192.168.137.1. If not, your Pi might be using a conflicting static IP. Switch it back to DHCP:- Edit the dhcpcd config file:
sudo nano /etc/dhcpcd.conf - Comment out any static IP lines for eth0 (add a
#at the start of those lines) - Save and exit (
Ctrl+O,Enter,Ctrl+X), then reboot your Pi withsudo reboot
- Edit the dhcpcd config file:
- For DNS, check the
/etc/resolv.conffile:
It should havecat /etc/resolv.confnameserver 192.168.137.1(Windows acts as a DNS proxy here). If not, manually add a public DNS like8.8.8.8temporarily to test:
Addsudo nano /etc/resolv.confnameserver 8.8.8.8and save.
3. Test Connectivity Step-by-Step
Let’s narrow down where the issue lies:
- First, ping the Windows gateway from your Pi:
If this fails, check your Ethernet cable or re-run the ICS setup—there’s a connection or IP assignment issue.ping 192.168.137.1 - If the gateway pings successfully, ping a public DNS server:
If this works but you can’t load websites, it’s a DNS problem. Stick with the public DNS fix above or ensure Windows is forwarding DNS requests correctly.ping 8.8.8.8 - If neither ping works, move on to checking Windows services and firewall.
4. Fix Windows 7 Firewall & Services
ICS relies on specific Windows services and firewall rules:
- Check ICS Service: Press
Win + R, typeservices.msc, and find Internet Connection Sharing (ICS). Ensure it’s set to Automatic and is running. If not, start it and set the startup type to Automatic. - Temporarily Disable Firewall: Sometimes Windows Firewall blocks ICS traffic. Go to Control Panel → Windows Firewall → Turn Windows Firewall on or off, disable it for both private and public networks, then test connectivity. If this fixes it, add an inbound rule for ICS in the firewall settings later.
5. Reset ICS if All Else Fails
If you’re still stuck, resetting ICS often clears up glitches:
- Open Command Prompt as Administrator (right-click Command Prompt → Run as administrator).
- Run these commands one by one:
netsh interface ip reset netsh routing ip reset - Reboot your Windows PC, then re-configure ICS sharing as outlined in step 1.
内容的提问来源于stack exchange,提问作者Limlim Hope

