windows 7 - Configure LAN on host for internet connection sharing?

07
2014-07
  • Camille Goudeseune

    A Win7 PC (the "host") connects to the internet via a cable modem. Its second NIC is for Windows' "internet connection sharing." That NIC is cabled to a 5-port dumb-as-nails Netgear hub, to which another Win7 PC (the "client") is also cabled, to connect to the internet through the host.

    The host's internet connection is marked as "shared".

    The client is configured to use ICS, per Microsoft's instructions; but its LAN remains an "unidentified network" -- it gets no DHCP address, and remains disconnected from the internet.

    Cables and hub are known to work. Both PCs have been rebooted several times, just to propitiate the gods of packetdom. All 3 NICs are known to work (by plugging each one directly into the cable modem).

    The only thing I've not found documented is how to configure the LAN of the host. I've tried all-auto, like the client. I've tried hardcoding it to the 192.168.137.1 / 255.255.255.0 that ICS defaults to. But the other PC remains disconnected. Bafflingly so, because this kind of thing is designed for non-IT pros to get working in a few seconds. So is that where to search for the fault? Or somewhere else in Windows' innards? Is there another way to narrow down the fault?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    Windows 7 intermittently drops wired Internet/LAN connection
  • CraigTP

    In a nutshell, my Windows 7 Ultimate PC intermittently drops its Internet connection. Why?

    Background: My PC is wired to my ADSL modem/router which is directly connected to the phone line. I also have wireless connectivity turned on within the router for a laptop to connect wirelessly.

    Every few hours or so, when using my PC, I find I cannot access the Internet and pages will not load. Eventually, Windows 7 will update the network icon in the task-tray to show the exclamation mark symbol on the network icon. Opening up the Network And Sharing Centre will show the red cross between the "Multiple Networks" and "The Internet".

    Here's a picture of the "Network And Sharing Centre" (grabbed when everything was working!)

    alt text

    As you can see, I'm running Sun's VirtualBox on this machine and that creates a network connection for itself. This doesn't seem to affect the intermittent dropping (i.e. the intermittent drops occur whether the VirtualBox connection is in use or not).

    When the connection does drop, I cannot access any Internet pages, nor can I access the router's web admin page at http://192.168.1.1/, so I'm assuming I've lost all local LAN access too.

    It's definitely not the router (or the Internet connection itself) as my laptop, using the wireless connection (and running Vista Home Premium) continues to be able to access the internet (and the router's web administration pages) just fine.

    Every time this happens, I can immediately restore all Internet and LAN access by opening the Network Adapter page, disabling the "Local Area Connection" and then re-enabling it. Give it a few seconds and everything is fine again. I assume this is because, beneath the GUI, it's effectively doing an "ipconfig /release" then "ipconfig /renew".

    Why does this happen in the first place, though? I've googled for this and seen quite a few other people (even on MSDN/Technet forums) experiencing the same or almost the same problem, but with no clear resolution. Suggestions of turning off IPv6 on the LAN adapter, and ensuring there's no power management "sleeping" the network adapter have been tried but do not cure the problem. There does not seem to be any particular sequence of events that cause it to happen either. I've had it go twice in 20 minutes when just randomly browsing the web with no other traffic, and I've also had it go once then not go again for 2-3 hours with the same sort of usage.

    Why is this happening and how to make it stop?

    EDIT:

    Additional information based upon the answer provided so far:

    Firstly, I forgot the mention that this is Windows 7 64 bit if that makes any difference at all.

    I mentioned that I don't think the VirtualBox network adpater is causing this problem in any way, and I also have VirtualBox installed on two other machines, one running Windows Vista Home Premium and the other running Windows XP. Neither of these machine experience the same network connectivity issues as the Windows 7 machine.

    The IP assignment for the Windows 7 machine is the same both before and after the "drop". I have a DHCP server on the router issuing IP Addresses, however my Windows 7 machine uses a static address. Here's the output from "ipconfig":

    Ethernet adapter Local Area Connection:
    
       Connection-specific DNS Suffix  . :  
       Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller  
       DHCP Enabled. . . . . . . . . . . : No  
       Autoconfiguration Enabled . . . . : Yes  
       IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)  
       Subnet Mask . . . . . . . . . . . : 255.255.255.0  
       Default Gateway . . . . . . . . . : 192.168.1.1  
       DNS Servers . . . . . . . . . . . : 192.168.1.1  
       NetBIOS over Tcpip. . . . . . . . : Enabled  
    

    Within the system's event logs, the only event that relates to the connection dropping is a "DNS Client Event" and this is generated after the connection has dropped and is an event detailing that DNS information can't be found for whatever website I may be trying to access, just as the connection drops:

    Log Name:      System
    Source:        Microsoft-Windows-DNS-Client
    Event ID:      1014
    Task Category: None
    Level:         Warning
    Keywords:      
    User:          NETWORK SERVICE
    Description:
    Name resolution for the name weather.service.msn.com timed out after none of the configured DNS servers responded.
    

    The network adapter chipset is Realtek PCIe GBE Family Controller and I have confirmed that this is the correct chipset for the motherboard (Asus M4A77TD PRO), and in fact, Windows Update installed an updated driver for this on 12/Jan/2009. The details of the update say that it's a Realtek software update from December 2009. Incidentally, I was still having the same intermittent problems prior to this update. It seems to have made no difference at all.

    EDIT 2 (1 Feb 2010):

    In my quest to solve this problem, I have discovered some more interesting information.

    On another forum, someone suggested that I should try running Windows in "Safe Mode With Networking" and see if the problem continues to occur. This was a fantastic suggestion and I don't know why I didn't think of it sooner myself. So, I proceeded to run in Safe Mode with Networking for a number of hours, and amazingly, the "drops" didn't occur once. It was a positive discovery, however, due to the intermittent nature of the original problem, I wasn't completely convinced that the problem was cured.

    One thing I did note is that the fan on my GFX card was running a lot louder than normal. This is due to the fact that I have an ASUS ENGTS250 graphics card (http://www.asus.com/product.aspx?P_ID=B6imcoax3MRY42f3) which had a known problem with a noisy fan until a BIOS update fixed the issue. (See the "Manufacturer Response" here: http://www.newegg.com/Product/Product.aspx?Item=N82E16814121334 for details).

    Well, running in safe mode had the fan running (incorrectly) at full speed (as it did before the BIOS update), but with an (apparently) stable network connection. Obviously some driver was not loaded for the GFX card when in Safe Mode so this got me thinking about the GFX card (since the very noisy fan was quite obvious when running in Safe Mode).

    I rebooted into normal mode, and found that Nvidia had a very up-to-date new driver for my GFX card (only about 1 week old), so I downloaded the appropriate driver and installed it. After installation and a reboot, I was able to use my PC for an entire day with NO NETWORK DROPS!!! This was on Saturday. However, on the Sunday, I also had my PC for pretty much the entire day and experienced 2 network drops. No other changes have been made to my PC in this time.

    So, the story seems to be that updating my graphics card drivers seems to have improved (if not completely fixed) the issue, however, I'm still searching for a proper fix for this problem. Hopefully, this information may help anyone who may have additional ideas as to why this problem is occuring in the first place. (And why does new GFX card drivers have anything to do with the network?)

    I appreciate everyone's feedback so far. However, I'll have to ask once more for any further ideas of how to fix this particular problem?


  • Related Answers
  • CraigTP

    SOLUTION FOUND:

    I feel incredibly embarassed to admit this, but I finally found the solution to my problem and, for me and my problem at least, it was a very easy fix.

    In a nutshell, it was a dodgy network cable between my PC and my router. Although brand new, the cable was obviously intermittently defective and replacing the cable (ironically, with my older, more battered and twisted (but perfectly functioning) network cable my LAN has worked perfectly ever since without a single "drop". (And this is over the course of 4-5 weeks of "testing" to ensure that the intermittent problem had realy disappeared).

    What is interesting, and what completely threw me off the "scent" of looking at the physical hardware was how the problem manifests itself in Windows 7.

    Basically, there must have been a slightly loose connection or wire in the lan cable. When this would "break", windows would show a broken LAN icon in the taskttray area. This would remain broken until I manually went into the LAN Adapter properties, disabled the LAN, then re-enabled it. It was this software-driven temporary "fix" that lead me to believe that the fault itself was entirely software (ie. Operating System) based, rather than physical. Every time the LAN icon would show as "broken", I could "fix" the issue with this disable/re-enable series of steps. Every time!

    After exhausting all the software avenues, I started on the hardware. I changed my router for a different one at first and that didn't "solve" the problem. Then I tried the LAN cable. Bingo!

    Of course, due to the intermittent nature of the problem, every time I'd try something new, I'd have to "run with it" for a number of weeks to ensure that the problem had gone away (or not, in most cases) since even when the problem was there, I'd been able to go for 5-7 days without a single LAN "break" prior to the issue rearing it's ugly head again. This explains why I'm answering my own question 4 months later! :)

    I've now been running with my new (old) LAN cable for 4-5 weeks, and in that time the network connection has not dropped once. I therefore believe I've fixed my problem.

    I'm sharing my solution here in the hope that anyone else suffering from the same symptoms can try changing the LAN cable first (despite the symptoms looking very much like a software problem!) :)

    I'd also like to thank everyone that responded with various suggestions! Thanks!

  • fluxtendu

    Some things to try:

    1. In a command prompt (runned as administrator):

      netsh int ip reset intipreset.log
      Reset the TCP/IP stack = reset/rewrite the following TCP/IP-related registry keys:

      * SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
      * SYSTEM\CurrentControlSet\Services\DHCP\Parameters\
      

      (you may need to re-configure your TCP/IP settings after that)

      netsh winsock reset
      Repair winsock It removes all Winsock LSP (Layered Service Providers) previously installed, including the potential malfunctioned LSP that causes loss of network packets transmission failure. So all previously-installed LSPs (antivirus/firewall) may need to be reinstalled

      netsh interface reset all
      Reset all interfaces: 6to4, HTTPSTunnel, ipv4, ipv6, isatap, portproxy, tcp, teredo
      But I don't know exactly what you risk to do it (not much I think, except reinstalling/reconfiguring network related software & windows parameters...)

    2. Uninstall your actual driver and install the one from asus: Realtek RTL8111C LAN Driver V7.3.522.2009 for Windows Win7 32bit/64bit

    3. Uninstall the asus driver and install the one from realtek: 7.011

    4. Find all .inf files in c:\windows\inf containing references to realtek lan drivers and move them all in another directory, except one. Remove your network card in the device manager and reboot. The one you left should be reinstalled. Test... If the issue is not resolved try another .inf file.

  • slhck

    Unbelievably, my drops from my Lenovo ThinkPad Y460 were almost entirely from the laptop going to my wireless box and that was the only computer running Windows 7.

    My router is connected to a wireless bridge, which works flawlessly.

    I shut down the Windows firewall, installed ZoneAlarm and the problems are gone.

    Get rid of the Windows Firewall and use something like the free ZoneAlarm.

  • slhck

    I worked on this type of problem myself and found it was a conflict with IPv6 and the router.

    Essentially, disabling IPV6 on all Windows 7 and Vista machines resolved the problem for the entire network. I wrote more details on this in a blog.

  • slhck

    The same is for me (Windows 7 Ultimate 32Bit + VMWare + Intel 1000/PM adapter).

    I believe the problem is in power management – I've disallowed to "Turn off device to save power", and updated the driver from Microsoft to Intel.

    It solved the problem.

  • Brian Rasmussen

    I had the same issue for a while. In my case it was due to problems with sleep/hibernate. I resolved it by disabling power off for the network adapter during sleep.

    Go to device manager, find the NIC and view Power Management under properties. There's a check box that says "allow the computer to turn off this device to save power". Disabling that solved my problem.

  • Peter Mortensen

    I had this issue on new Dell laptops with Windows 7, the post by Brian Rasmussen clued me in, I removed the Dell Control Point and security software suites. This seems to have resolved the issue of the wired NIC card dropping off.

    It would happen about every 10 minutes, the |Internet access would stop then the network access. Running the network troubleshooter would resolve it by reseting the NIC card. This seemed odd to me until I looked at the power options in the control panel and there was a Dell Control Point selection there for the NIC card. I also set the power option to never turn off or sleep while plugged into power.

    I hope this helps someone.

  • slhck

    I have a Dell Inspiron laptop with Windows 7 Home 64-bit and Intel WiFi adapter. I have been experiencing the same problem,

    The solution I have found is that I change Power Plan in Power Options to High Performance and the problem is gone.

    Now my problem is how to save this plan to be as a default plan when the computer starts. Every time I restart it changes back to Power Saver which seems to be default on my laptop.

  • slhck

    One common reason for network drop in Windows 7 is having "side scaling" enabled in your card properties.

    To fix this, go to Network and Sharing Center, click "Change Adapter Settings", select your card and go to "Properties".

    Click "Configure card" and select the "Advanced" tab. Make sure that the "Receive side scaling" option is disabled.

  • slhck

    Set your IP to be static. This worked for me.

    I also had this problem on a Windows 7 computer which had been operating fine for months. I followed many of the solutions on this page but none seemed to correct the problem.

  • slhck
    • First, check your IP assignment before and after it happens, if you have another machine you can connect to the modem/router to test, see if it is affected as well.

    • Check the system's event logs to see if there is any notification.

    • What is your network adapter's chipset? is there an updated driver from the chipset manufacturer?

    • Another issue could be that it is detected as the wrong chipset and using that chipset's driver, with another available from the manufacturer.

    I would suggest seeing if there are any filters added to the network adapter. I know that virtualization software will add in additional filters to your physical adapter, as well as potentially add in additional virtual adapters.

    I would suggest maybe uninstalling any virtualization software (you mention VirtualBox), rebooting, seeing if there are any filters other than that left, and if you can disable any that aren't needed.

  • slhck

    I think it's the VirtualBox that you are using that causes the problem.

    It happens to all other virtualization applications like VMWare, VirtualPC, etc. They will reset your internet connection when you install them.