Method for updating IP address and DNS server address by computer through command

Time:2021-11-27

If the router DHCP and DNS addresses are replaced, the computer will have the problem of address error or unable to obtain the IP address, resulting in failure to access the Internet. When this happens, we need to update the IP address and DNS server address. Therefore, the system city Xiaobian will introduce the specific operation methods for you in the next content.

1. Press Win + R to open operation, enter CMD and press enter;

2. Enter ipconfig / all in the command prompt to view the current IP address, subnet mask, gateway, DNS and other related information;

3. If the displayed IP address, DNS and company are inconsistent with the settings, the cache needs to be released and updated. Enter and execute: ipconfig / release to release the IP address;

4. After releasing the IP address, you need to update the IP address again. Enter ipconfig / renew and press enter;

5. Similarly, DNS also needs to be released and updated. Enter the command ipconfig / flushdns and click enter to release DNS;

6. The DNS update command and the IP address update command are the same, both ipconfig / renew.

After completing the above steps, you can re obtain the correct IP address so that the computer can access the network.