I don't know if my friends have such experiences when setting IP addresses for batch processing. When I bring this book to the Internet, the Unit needs to configure a fixed IP address, and the home automatically obtains the IP address, so we need to set this IP address every day. Is there a simple and convenient way? In fact, we can do a batch processing, each time you need to set an IP address, you just need to run the batch processing.
1. Set IP address batch processing and save the following code as a. BAT file in notepad, for example, static. bat. Double-click it to run it.
@ Echo off
Echo tool for modifying local IP addresses
ECHO is setting your IP address as a static address. Please wait ......
Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 192.168.1.102 mask = 255.255.255.0
Netsh interface IP Set address name = "Local Connection" Source = static gateway = 192.168.1.1 gwmetric = 0
Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 41.211.224.7 register = primary
Netsh interface IP add DNS name = "Local Connection" ADDR = 41.211.224.3
Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
The parameters in the above Code are described as follows. You can modify them based on your actual situation:
ADDR = 192.168.1.102 -- IP Address
Mask = 255.255.255.0 -- Subnet Mask
Gateway = 192.168.1.1 -- Gateway
ADDR = 41.211.224.7 -- preferred DNS
ADDR = 41.211.224.3 -- backup DNS (if no backup DNS exists, delete the entire line of code)
2. Set to automatically obtain the IP address. Save the following code in Notepad as A. BAT file, such as DHCP. bat. Double-click it to run it.
@ Echo off
Echo tool for modifying local IP addresses
ECHO is setting to automatically obtain the IP address. Please wait ......
Netsh interface IP Set address name = "Local Connection" Source = DHCP
Netsh interface IP Set DNS name = "Local Connection" Source = DHCP
Note: The "Local Link" in the above Code is the default name of the network link system in your computer. If you have installed Multiple NICs or renamed the local link, change the Local Link name in the code to your current name.