Even though the LAN cable was connected my system was showing LAN Disconnected.
Here are the steps to sort out the issue.
Click Start, [click Run], type regedit, and then press ENTER.
Locate and then click the following registry subkey:
HKEY_LOCAL-MACHINE\SYSTEM\CurrentControlSet\Control\Network
Right-click this subkey, click Export , and then save the selected branch in a file.
Click the Network subkey again, and then delete the Config entry. Do not delete the >Network subkey. The Config entry will be reconstructed when you restart the computer.
Restart the computer. You may have to manually turn off the computer.
The config key is re-created on the next boot up.