金兴 发表于 2012-4-18 07:27
你连上网线了之后,才有局域网 或者是外网,这样你的机器才有ip地址啊。拔掉网线的话,自己就随便设置一个i ...
刚刚我把网张断了,在命令行窗口里我输入:ipconfig eth0 -addr=192.168.1.222,之后出现如下信息:
D:\JCWorkspace\Test>ipconfig eth0 -addr=192.168.1.222
Error: unrecongnized or incomplete command line.
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"
D:\JCWorkspace\Test>ipconfig
Windows IP Configuration
Ethernet adapter 本地连接:
Media State . . . . . . . . . . . : Media disconnected
Ethernet adapter 无线网络连接:
Media State . . . . . . . . . . . : Media disconnected
之后我再输入:ipconfig,结果还是没有ip和原来的情况一模一样 |