The whole "you are not connected" functionality is based upon Windows being able to periodically poll a URL and get a response. If that call fails then it assumes you are offline whether you actually are or not.
- If you cannot get to any internet site then the network card is bad, your cable is bad or there is a problem with your wired router.
- If you can get to some sites but not others then it could be an intermittent issue, a bad cable or possibly a network card going bad.
- If you can get to other sites without issues then it is most likely an issue with Windows trying to ping the URL(s) that it uses. This may be an intermittent issue or perhaps a firewall problem.
Ideally you should test another computer on the same network. Plug it into your ethernet. If it is fine then the problem is most likely specific to your machine so the standard "check for network updates" etc apply. If multiple machines have the issue then it is more likely a router problem.
If you are using a cable plugged into the wall or a switch or something then try plugging the computer directly into the router. If it works from there then the intermediate connections (other switches, wall port, etc) could be bad or have interference.