I have faced this problem of Ethernet connection failure earlier. After trying various solutions, it finally stated working. The last one was this youtube one. I agree it was not the best way to fix such a problem. So I have gone through this landmark question. Here is the wireless info paste.ubuntu.com. It seems to have collected more than I could have thought of. I have gone through the following questions
Ethernet connection Issues on Ubuntu 16.04 (Ethernet controller is different than mine, So I don't think so the solution would help.)
Really just a workaround solution inspired by that youtube link. It is just something to try out if you are hard-pressed for time. (Acknowledgements to my friend Surender.) So, I typed in
and edited the resulting file from this
To this
After this, I entered
and voila Internet works. Now, I really don't think so my answer is right. I mean it's obvious, isn't it? I am editing a file which has a line
Obviously, this will fail again when I restart my computer. So, I think I need to do something to fix this resolvconf (note the missing "." it is not resolv.conf) or glibc. Maybe a good starting point would be resolvconf man page. I think this question here