Click to record commonly used windows commands

  
        In fact, it doesn't matter much, just remember here is a good bat script for configuring network IP and dns @echo off netsh 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=auto netsh interface ip set dns name="local connection" source=static addr=192.168.1.1 primary ipconfig /flushdns pause exit Related parameters name:Network connection name, generally “&ldquo ;local connection" or <quo;wireless network connection”. You can see the name of the network connection in the “Control Panel”->“Network Connections”. Source: The path to get the IP. Dynamically get dhcp; manually set to static. Addr: The IP address or DNS address to be set. Mask: Specifies the subnet mask of the IP address. Gateway: The gateway address for the IP address. Gwmetric: The number of hops of the default gateway, which can be set to an integer value or set to “automatic":auto. Register:none disables dynamic DNS registration, primary is registered only under the primary DNS suffix, both is registered under the primary DNS suffix, and is also registered under a specific connection suffix
Copyright © Windows knowledge All Rights Reserved