常用的网络命令(1)

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

IPCONFIG

IPConfig实用程序和它的等价图形用户界面——Windows 95/98中的WinIPCfg可用于显示当前的TCP/IP配置的设置值。这些信息一般用来检验人工配置的TCP/IP设置是否正确。但是,如果你的计算机和所在的局域网使用了动态主机配置协议(Dynamic Host Configuration Protocol,DHCP--Windows NT下的一种把较少的IP地址分配给较多主机使用的协议,类似于拨号上网的动态IP分配),这个程序所显示的信息也许更加实用。

USAGE:

ipconfig [/? | /all | /renew [adapter] | /release [adapter] |

/flushdns | /displaydns | /registerdns |

/showclassid adapter |

/setclassid adapter [classid] ]

where

adapter Connection name

(wildcard characters * and ? allowed, see examples)

Options:

/? Display this help message

/all Display full configuration information.

/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 Refreshes all DHCP leases and re-registers DNS names

/displaydns Display the contents of the DNS Resolver Cache.

/showclassid Displays all the dhcp class IDs allowed for adapter.

/setclassid Modifies the dhcp class id.

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"

ipconfig--当使用IPConfig时不带任何参数选项,那么它为每个已经配置了的接口显示IP地址、子网掩码和缺省网关值

ipconfig /all--当使用all选项时,IPConfig能为DNS和WINS服务器显示它已配置且所要使用的附加信息(如IP地址等),并且显示内置于本地网卡中的物理地址(MAC)。

ipconfig /release和ipconfig /renew--这是两个附加选项,只能在向DHCP服务器租用其IP地址的计算机上起作用。如果你输入ipconfig /release,那么所有接口的租用IP地址便重新交付给DHCP服务器(归还IP地址)。如果你输入ipconfig /renew,那么本地计算机便设法与DHCP服务器取得联系,并租用一个IP地址。请注意,大多数情况下网卡将被重新赋予和以前所赋予的相同的IP地址。

如运行IPCONFIG.EXE则运行结果如下:

Windows IP Configuration

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :

IP Address. . . . . . . . . . . . : 168.168.120.66

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 168.168.120.250

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航