Configuring a static IP address. Blank default gateway shows in network properties.

You may be attempting to set a TCP/IPv4 Default gateway address along with a static IP address, but it may fail. The IP address and Subnet mask will be correct. But, the Default gateway address will remain blank after you save the settings.

It can sometimes occur on Windows 7 systems and is a known problem. Particularly after a recent network driver update.

There are two possible ways of solving this:

  1. In some cases, you will need to enter the static IP address, Subnet mask, and Default gateway TWICE. That can have the values save correctly. Follow the steps below to do so:

  2. Open the Local Area Connection / Internet Protocol Version 4 (TCP/IPv4) Properties dialog. Select “Obtain an IP address automatically” and choose OK. From the Local Area Connection Properties dialog, choose OK.

  3. Reenter the Local Area Connection / Internet Protocol Version 4 (TCP/IPv4) Properties dialog. Select “Use the following IP address” followed by your specific settings. Choose OK twice.

  4. Perform steps 1 & 2 AGAIN, even though the IP address appears to be displaying properly.

Or:

  1. Run the following Netsh command TWICE through the command prompt window, using the desired static address information.

  2. In the network and sharing center, note the name of the network connection that won’t save the gateway info. e.g. “Local Area Connection 39”.

  3. In the network and sharing center, set that connection’s IPv4 to “DHCP” and close out of the dialogs.

  4. Type “cmd” or “cmd.exe” in the start menu search box.

  5. Right click the “cmd.exe” command prompt result and select “Run as administrator”.

  6. In the command prompt window, enter the text as shown below (using your settings):

netsh interface ipv4 set address “Local Area Connection Name” static [IP address] [ subnet mask] [gateway address]

Example:

netsh interface ipv4 set address “Local Area Connection 39” static 192.168.255.230 255.255.255.0192.168.255.1

  1. Press <return>.

Note: This first command may return an error “Object already exists”. If that happens, repeat the same command line again and it should succeed with no errors.