Every week changes between the lab and the dormitory. The lab's damn public router locks the IP address. The Dynamic IP address is always an incorrect address, and can only be manually modified once. Then I was so lazy and didn't want to open the graphical interface to perform operations. I simply learned how to do this.
Command Format: address ""
Command explanation:
Parameters |
Explanation |
Network Connection |
Network Connection name, which can be found in view network connection in the taskbar |
IP address |
Is your IP address, like 192.168.xxx.xxx |
Subnet Mask |
Usually 255.255.255.255 |
> Default Gateway |
It generally ends with. 1 or. 254. |
Hops |
Generally, 1 or auto is used. |
For example, if I am in a dormitory and the IP address is 10.21.48.254 and the default gateway is 10.21.48.1, run the following command after I return from the lab:
Netsh interface ip address "Ethernet" static 10.21.48.254 255.255.255.0 10.21.48.1 1
Then, if I go from the dormitory to the lab, I will change it to the lab IP Address:
Netsh interface ip address "Ethernet" static 192.168.13.23 255.255.255.0 192.168.13.254 1
In addition, the DNS modification method is similar. Just change the address to dns.
Command Format: dns ""
Command explanation:
Parameters |
Explanation |
Network Connection |
Network Connection name, which can be found in view network connection in the taskbar |
DNS address |
For example, 114.114.114.114 |
For example, if you want to change the DNS server address in the lab, you only need to enter:
Netsh interface ip dns "Ethernet" static 114.114.114.114
That's all.