Modern network cards and operating systems usually support media sense or link detection, where the system detects if a network cable is plugged in or not. Often this is beneficial, but there are drawbacks as well. As a developer I’m often working with server software on my laptop and it can be tricky to get it working without a network.
Fortunately the feature can be disabled. For Windows 7, open a command prompt as an administrator and run:
netsh interface ipv4 set global dhcpmediasense=disabled netsh interface ipv6 set global dhcpmediasense=disabled
Reboot. The network will still be shown as disconnected by ipconfig, but it will be possible to ping the address (if a static or alternate IP address is used) and run server software that depends on it.
To restore media sense, run:
netsh interface ipv4 set global dhcpmediasense=enabled netsh interface ipv6 set global dhcpmediasense=enabled
Again a reboot is required.