Windows operating system provide ipconfig
command for network related administration like show ip address, request IP address from DHCP set IP address etc. In this tutorial we will look how can we release and renew IP address. For more information about ipconfig
command read following tutorial.
Windows操作系统提供ipconfig
命令来进行与网络相关的管理,例如显示IP地址,从DHCP设置IP地址请求IP地址等。在本教程中,我们将研究如何释放和更新IP地址。 有关ipconfig
命令的更多信息,请阅读以下教程。
Windows Ipconfig Command Tutorial With Examples To List, Change, Renew IP Configuration
Windows Ipconfig命令教程,包括列出,更改,续订IP配置的示例
打开命令提示符(Open Command Prompt)
We can open command prompt in different ways. The easiest way is Start
-> Run
and type cmd
and press enter like following screenshot. Click open will start MD-DOS.
我们可以用不同的方式打开命令提示符。 最简单的方法是Start
-> Run
然后键入cmd
并按Enter,如以下屏幕截图所示。 单击打开将启动MD-DOS。

列出当前IP地址(List Current IP Address)
We can list current interfaces and their related IP addresses with the ipconfig
command like below.
我们可以使用ipconfig
命令列出当前接口及其相关的IP地址,如下所示。
> ipconfig

释放所有IP地址(Release All IP Address)
As we see that we have IP address assigned to the interface Local Area Connection. We should first release the IP address with ipconfig /relase
. This will release all IP addresses of all interfaces
如我们所见,我们已将IP地址分配给接口Local Area Connection。 我们应该首先使用ipconfig /relase
释放IP地址。 这将释放所有接口的所有IP地址
> ipconfig /release

发布特定的接口IP地址(Release Specific Interface IP Address)
In previous example we have released all interfaces all IP addresses. This is not useful if we have multiple interfaces and we only want single interfaces IP address to release. We can specify the interface name to release given interface IP address. In this example we will only release IP address of Local Area Connection
. Be warned that the name of the interface should be correct to work properly.
在前面的示例中,我们释放了所有接口的所有IP地址。 如果我们有多个接口,而我们只希望释放单个接口IP地址,则此功能将无用。 我们可以指定接口名称以释放给定的接口IP地址。 在此示例中,我们将仅释放“ Local Area Connection
IP地址。 请注意,接口名称应正确才能正常工作。
> ipconfig /release "Local Area Connection"

续订IP地址(Renew IP Address)
In order to get new IP address from DHCP server we should renew our IP address with ipconfig /renew
command like below. This will run DHCP mechanism and get new IP address from the DHCP server. But some DHCP servers prefer to provide same IP address for same MAC address.
为了从DHCP服务器获取新的IP地址,我们应该使用ipconfig /renew
命令来更新IP地址,如下所示。 这将运行DHCP机制并从DHCP服务器获取新的IP地址。 但是某些DHCP服务器更愿意为相同的MAC地址提供相同的IP地址。
> ipconfig /renew

翻译自: https://www.poftut.com/release-renew-ip-address-windows-ip-release-renew/