Friday, September 30, 2011

How to Find Your Own IP

We all know how to use the command line to find our IP addresses, right? “ipconfig”- it’s that easy! Well, especially with newer versions of Windows or for anyone who installs networking or virtualization software, ipconfig’s output can get… verbose.

There is a command that involves a little more typing but whose output is much cleaner:

netsh interface ipv4 show addresses

This can be shortened to “netsh int ipv4 sho ad” as netsh will figure out what you mean as long as you type enough text for it to eliminate any other possibilities.

For me, the output of this command is:

C:\Users\Nathan>netsh int ipv4 sho ad

Configuration for interface "Wifi MS Miniport"
    DHCP enabled:                         Yes
    InterfaceMetric:                      25

Configuration for interface "Local Area Connection"
    DHCP enabled:                         Yes
    InterfaceMetric:                      10

Configuration for interface "Wireless Network Connection"
    DHCP enabled:                         Yes
    IP Address:                           169.254.17.139
    Subnet Prefix:                        169.254.0.0/16 (mask 255.255.0.0)
    InterfaceMetric:                      25

Configuration for interface "Bluetooth Network Connection"
    DHCP enabled:                         Yes
    InterfaceMetric:                      40

Configuration for interface "VirtualBox Host-Only Network"
    DHCP enabled:                         No
    IP Address:                           169.254.121.157
    Subnet Prefix:                        169.254.0.0/16 (mask 255.255.0.0)
    InterfaceMetric:                      20

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      50

No comments: