There is actually not much to record the commonly used windows commands, but it is advantageous to remember them here, configure a bat script for the network IP address and dns @ echo offnetsh interface ip set address name = "Local Connection" source = static addr = 192.168.1.134 mask = 255.255.255.0 gateway = 192.168.1.1 gwmetric = autonetsh interface ip set dns name = "Local Connection" source = static addr = 192.168.1.1 primaryipconfig/flushdnspauseexit Parameter name: network Connection name, generally "Local Connection" or "wireless network connection ". You can view the network connection name in "Control Panel"> "network connection. Source: The way to obtain the IP address. Dynamic retrieval is dhcp, and manual configuration is static. Addr: IP address or DNS address to be set. Mask: Specifies the subnet mask of the IP address. Gateway: Specifies the gateway address of the IP address. Gwmetric: the number of hops of the default gateway. It can be set to an integer or "auto. Register: none indicates that dynamic DNS registration is disabled. primary is registered only under the primary DNS suffix, both is registered under the primary DNS suffix, and also registered under the specific connection suffix.