如何在Windows上通过命令行查看IP地址

时间:2019-05-19 01:25:40  来源:igfitidea点击:

如何在Windows系统上使用命令行查看IP地址?

Windows操作系统提供“ipconfig”命令来查看本地系统的IP地址和其他网口信息。

什么是IP地址?

nternet地址(IP地址)是分配给连接到计算机网络的每个硬件设备的数字标签,计算机网络使用互联网协议来识别这些设备。
一般来说,它是任何设备的标识。
IP地址允许一个设备通过一个基于IP的网络(如LAN或Internet)与其他设备通信。

如何查看Windows IP地址

在运行窗口中输入 cmd启动Windows命令提示符。
然后在Windows系统命令提示符上使用 ipconfig命令。
这将显示Windows系统上配置的所有网络接口的详细信息。

c:\>  ipconfig 

输出示例:

Windows IP Configuration

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::9121:66bc:8eb9:a58f%3
   IPv4 Address. . . . . . . . . . . :   **192.168.1.5**  
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Tunnel adapter isatap.{BCC1ECE9-D9A3-4AC4-95CC-9F51D28E8AD6}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

根据上面的输出,本系统的以太网适配器上的IP地址是192.168.1.5。
默认网关设置为192.168.1.1。
网关是局域网中直接连接到internet的网络设备(如路由器)。
我们还可以通过使用ipconfig命令指定/all命令行参数来查看网络接口的详细信息。
例如:

c:\>  ipconfig /all

输出示例:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Hyman
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
   Physical Address. . . . . . . . . : D4-3D-7E-B6-24-22
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9121:66bc:8eb9:a58f%3(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.5(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : 64241022
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-41-AD-6D-D4-3D-7E-B6-24-22

   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{BCC1ECE9-D9A3-4AC4-95CC-9F51D28E8AD6}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes