Are we talking about Windows 10 here?
Assuming that we are, try this:-
Hold the Windows key and Press R.
Enter ncpa.cpl in the search field and click OK.
Right click your Network Adapter in the Network Connections window and select Properties.
From the Ethernet Properties window, check Internet Protocol Version 4 (TCP/IPv4) and click on Properties.
You will then see the Internet Protocol Version 4 (TCP/IPv4) Properties window. Enable the following options:
Obtain an IP Address Automatically
Obtain DNS Server Address Automatically