Windows 7 error: Local Area Connection doesn't have a valid ip

Problem: After upgrading a windows vista to windows 7 we started having problems that every time we started windows the network card would have an error and not connect to internet or any other computers , to fix it we had to click on the network icon and select troublsoot problems , that would fix it and the error it would show was “local area connection doesnt have a valid ip” , so we figured that it must be because upgrading is never as good as installing from scratch. so we reinstalled windows 7 and the problem still occured.

Solution: Go to network and internet, right click the local area connection or wireless , properties and deselect the internet protocol version 6, only leaving the version 4 it seems to have solved the problem. if that doesnt work you can always try to take a fixed ip.