The InternetGetConnectedState Function Returns FALSE When Connected to the Internet

Article translations Article translations
Article ID: 315035 - View products that this article applies to.
This article was previously published under Q315035
Expand all | Collapse all

On This Page

SYMPTOMS

The Win32 Internet InternetGetConnectedState function returns FALSE if the following conditions exist on your computer:
  • The default gateway address is not configured, and your computer is on a private Local Area Network (LAN) that is connected to the Internet. See the "How to Check the Default Gateway Value" topic in the "More Information" section of this article.
  • The Never dial a connection option is selected on the Connection tab of the Internet Options dialog box.

CAUSE

An unconfigured default gateway address can occur in the following scenarios:
  • The DHCP server does not have a default gateway configured for the scope that is available to the affected client computer or computers.
  • A non-Microsoft provided Network Address Translation (NAT) technology package is in use, that does not provide a default gateway address to connected client computers. This type of technology may also be referred to as Internet Connection Sharing (ICS). Please refer to the "References" section of this article.
  • The affected client computer is using static IP addressing, and does not have a default gateway address configured. Please refer to the "How to Check the Default Gateway Value" topic in the "More Information" section of this article.
  • The affected client computer is using Automatic Private IP Addressing (APIPA). This occurs if a DHCP server is not available or does not exist on the network. Please refer to the "References" section of this article.
Additionally, and independent from the Internet Explorer Never Dial a Connection setting previously noted, the Code Download Manager (CDM) technology underlying Windows Update may be disabled. This prevents your computer from obtaining updated drivers and components from the Microsoft Windows Update Web site. Please refer to the "References" section of this article.

RESOLUTION

To resolve this issue, use either of the following methods:
  • Manually configure the affected client or clients with an appropriate address for the default gateway. You can do so on the Gateway tab of the TCP/IP Properties for the network adapter that is connected to the LAN. You can view this setting by using the Network tool in Control Panel to view the Configuration tab. Note that you must restart the client computer after you change the indicated value.
  • If your LAN has a DHCP server (or ICS/NAT device that provides DHCP services), configure the DHCP options for the applicable scope with an appropriate IP address for the default gateway.

MORE INFORMATION

How to Check the Default Gateway Value

  1. Click Start, click Run, type winipcfg, and then click OK.
  2. Click your network adapter, and then click More Info.
  3. If the default gateway is blank, the value is not configured.

Impact of an Unconfigured Default Gateway Value

If the default gateway is not configured, the following networking functions may be impacted (note that this does not generally apply to the local subnet):
  • Log on authentication may fail, if the Client for Microsoft Networks is configured for log on to a Microsoft Windows NT domain in the Network tool in Control Panel, and the authenticating server is located on a different subnet than your client computer.
  • Network name resolution may also be affected, if Windows Internet Name Service (WINS) or Domain Naming System (DNS) servers are located on a different subnet than your client computer.
  • While it may be possible to browse the network (by using the Entire Network icon in My Network Places, or by using the net view command), attempts to connect to a target computer that is located on a different subnet than your client computer generally fail.
  • Specific MS-DOS commands, including net use, net view, ping, and so on, may not function as expected.

Default Gateway Address Options

The following list that describes default gateway address options is provided for your convenience, and may not include an optimal choice for your LAN configuration. Note that it does not include security or firewall services considerations.
  • A significant number of small networks may be connected to the Internet by using a device that provides DHCP, as well as NAT (or ICS) services. A device of this type is the logical choice for the default gateway.
  • If your LAN is connected to the Internet by using a router, and consists of a single subnet, the router IP address is normally the appropriate value for the default gateway.
  • In some configurations, it may be necessary to use an IP address that is provided by your Internet Service Provider (ISP).
  • It is possible to configure an invalid, or non-existent default gateway address for clients on the applicable subnet, or subnets. This causes all attempts to access network resources that are outside of the local subnet to fail. Use at your own risk.
For more specific information about NAT, view the "The IP Network Address Translator (NAT)" Request for Comments (RFC) 1631 specification.

REFERENCES

For additional information about ICS, click the article number below to view the article in the Microsoft Knowledge Base:
234815 Description of Internet Connection Sharing
For additional information about APIPA, click the article number below to view the article in the Microsoft Knowledge Base:
220874 Automatic Windows 98/Me TCP/IP Addressing Without a DHCP Server
For additional information about Windows Update and CDM, click the article numbers below to view the articles in the Microsoft Knowledge Base:
269255 Driver Signing in Windows Millennium Edition

Properties

Article ID: 315035 - Last Review: January 31, 2007 - Revision: 2.1
APPLIES TO
  • Microsoft Windows Millennium Edition
Keywords: 
kbenv kbfaq kbfix kbnetwork kbprb KB315035
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com