- 论坛徽章:
- 0
|
Windows系统下使用ipconfig得到计算机的IP地址配置情况,在Linux/Unix下一般使用ifconfig
一、运行—CMD,在命令提示符下:
C:Documents and Settingslxiang>ipconfig /?
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 /all得到计算机的计算机名称,计算机的网卡型号,网卡的地址,计算机配置的IP地址,子网掩码,网关地址,DNS服务器地址
二、在Linux下在shell中输入:ifconfig -a ,得到地址配置情况
[root@srun2 FreeBSD]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:30:48:28:B6:86
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18672312 errors:0 dropped:0 overruns:0 frame:0
TX packets:7884849 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2156943357 (2057.0 Mb) TX bytes:2125880712 (2027.3 Mb)
Interrupt:54 Base address:0x3000 Memory:fc220000-fc240000
eth1 Link encap:Ethernet HWaddr 00:30:48:28:B6:87
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:22 Base address:0x5400 Memory:fc401000-fc401038
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:764986 errors:0 dropped:0 overruns:0 frame:0
TX packets:764986 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185250810 (176.6 Mb) TX bytes:185250810 (176.6 Mb)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/11430/showart_55802.html |
|