Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to manually add / modify local IP in Win10

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Xiaobian to share with you how to manually add/modify local IP in Win10, I hope you have gained something after reading this article, let's discuss it together!

1 Introduction

Today I need to experiment with Win10 and manually modify IP.

2 summarizes

Changing local IP in Win10 is not a particularly difficult thing. In simple terms, it can be divided into two ways:

graphically

command line

Let's look at a simpler graphical approach.

3 Graphic operations

Open Win, enter Network status, you can see the following interface:

Select the network card (Ethernet in the picture) and click Properties:

Click Edit and select Manual to modify:

For how to fill in the values, we recommend referring to the values in ipconfig /all.

The black box on the right is the result obtained by using ipconfig /all in cmd. You can see:

Intranet IP: 10.0.2.15

Subnet mask: 255.255.255.0

Gateway: 10.0.2.2

Therefore, you can modify the value of the intranet IP as needed. The subnet mask is generally 24 (255.255.255.0). The gateway and DNS can directly use the default gateway value (10.0.2.2):

In cmd, use ipconfig /all again to see the newly modified values:

4 Command line operations

As we all know, the use of command line operations in Win10 is more than one grade higher than the use of graphical operations, and the use of graphical operations can not add new IP, only modify IP, then, this time it is the turn of command line operations.

Command line operations mainly use the netsh command. The official documentation is here. Let's first take a look at how to modify IP.

4.1 modify IP

Before operation, you first need to know the name of the network card.

netsh interface show interface

You can see the name of your card:

There is only one network card called Ethernet. When modifying it, use the set command. The format is:

netsh interface ipv4 set address name="INTERFACE_NAME" static IP_ADDRESS SUBNET_MASK GATEWAY

For example, here you need to modify the IP to 10.0.2.18, the command is as follows (requires administrator privileges):

netsh interface ipv4 set address name="Ethernet" static 10.0.2.18 255.255.255.0 10.0.2.2

Effect:

4.2 new IP

The operation is similar to modifying, except that it is modified to add command, which has the following format:

netsh interface ipv4 add address name="INTERFACE_NAME" IP_ADDRESS SUBNET_MASK GATEWAY

For example, you need to add an IP of 10.0.2.19, named as follows:

net interface ipv4 add address name="Ethernet" 10.0.2.19 255.255.255.0 10.0.2.2

Effect:

4.3 delete IP

Removing IP is similar:

netsh interface ipv4 delete address name="INTERFACE_NAME" IP_ADDRESS

For example, delete the newly added 10.0.2.19:

netsh interface ipv4 delete address name="Ethernet" 10.0.2.19

Effect:

5 summarizes

Graphical operation modification is relatively simple, while command-line modification is powerful, but the configuration difficulty is relatively high. In practice, it can be used in combination with both.

In addition, if there is a situation where the network cannot be connected, a simple solution is to switch to DHCP in the Network status, automatically assign IP and DNS:

After reading this article, I believe you have a certain understanding of "how to manually add/modify local IP in Win10". If you want to know more about it, please pay attention to the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report