ipconfig使用方法完整版

  技术分享     |      2021/03/12

  iPConfig是查看本机ip网络配置,排除本机网络故障必用的一个DOS命令。


  在“开始”菜单项中的“运行”或搜索栏中输入“cmd”,确定或按回车键后打开“命令提示符”窗口。


  在其中输入“iPConfig /all”并回车,注意,不用输入引号,即可显示这个命令的帮助提示信息,如下图所示。


ipconfig使用方法完整版


  帮助文档文字如下:


  USAGE:

      

  where

      adapter         Connection name

                   (wildcard characters * and ? allowed, see examples)


     Options:

         /?          

         /all         

         /release     Release the IP address for the specified adapter.

         /renew       Renew the IP address for the specified adapter.

         /flushdns    Purges the DNS Resolver cache.

         /registerdns  

         /displaydns  Display the contents of the DNS Resolver Cache.

         /showclassid  

         /setclassid   


  The default is to display only the IP address, subnet mask and

  default gateway for each adapter bound to TCP/IP.


  For Release and Renew, if no adapter name is specified, then the IP address

  leases for all adapters bound to TCP/IP will be released or renewed.


  For Setclassid, if no ClassId is specified, then the ClassId is removed.


  Examples:

      > ipconfig                   ... Show information.

      > ipconfig /all              ... Show detailed information

      > ipconfig /renew            ... renew all adapters

      > ipconfig /renew EL*        ... renew any connection that has its

                                       name starting with EL

      > ipconfig /release *Con*    ... release all matching connections,

                                       eg. "Local Area Connection 1" or

                                           "Local Area Connection 2"


  下面对上述帮助文档逐个加以解释。


   /? Display this help message.翻译过来的意思是显示帮助提示信息。


   /all  Display full configuration information.这个开关箱显示完全的配置信息。


  下面是笔者电脑IP配置的截图如下:


ipconfig使用方法完整版


  如上图所示,其中显示了IP配置和各适配器的详细信息。


  其中:


  Host Name后面显示的是主机名


  Primary Dns Suffix后面显示主DNS后缀


  Node Type指节点类型


  IP Routing Enabled,是否开启IP路由


  WINS Proxy Enabled指WINS代理服务是否启用


  下面则是各适配器的详细的配置信息,根据具体电脑的不同,可能有多个适配器的配置信息。


  “Ethernet adapter 本地连接 ”是适配器的名称,紧接着下面是它的配置信息。


  Connection-specific DNS Suffix 特定连接的DNS后缀


  Description 描述


  Physical Address 物理地址,mac


  Dhcp Enabled DHCP是否开启


  Autoconfiguration Enabled 自动配置是否开启


  IP Address


  Subnet Mask


  Default Gateway缺省网关IP


  DHCP Server DHCP服务IP地址如果设置成静态IP的话,则这里会显示no


  DNS Servers DNS服务器


  Lease Obtained IP地址用开始时间,如果设置成静态IP的话,这项就不会显示。


  Lease Expires指IP地址租用结束时间,如果设置成静态IP的话,这项就不会显示。


  以上是ipconfig /all命令显示的各项解释。


  /release Release the IP address for the specified adapter.意思是强制释放指定适配器的IP地址。对  于静态设置来说,这个命令开关是无效的,与它对应的则是 /renew,Renew the IP address for the specified adapter.则是重新获取指定适配器的IP地址。同样的,这个命令也对静态设置无效。


  /flushdns    Purges the DNS Resolver cache.清除本地DNS缓存内容。


  /registerdns Refreshes all DHCP leases and re-registers DNS names 刷新DHCP租期客户端手工向服务器进行注册DNS名。


  /displaydns  Display the contents of the DNS Resolver Cache.显示DNS解析缓冲的内容。


  /showclassid Displays all the dhcp class IDs allowed for adapter.显示指定的适配器的DHCP类别ID


  /setclassid  Modifies the dhcp class id.修改适配器的DHCP类别。


  上面的用于特定操作的开关项中,可以使用*和?通配符。