Technology
How to Quickly Look up Your IP Address in OS X
Generally, there are two relevant IP addresses that your computer will use. The first is the LAN address, configured directly on your system, which is the private IP address that computers and devices use to communicate when behind a router (such as at your home). The second is the public IP address issued by your Internet service provider, and can usually be used either directly on your system or with a router.
In most cases, private IP addresses are set up by a router to establish a protected network for computers and other devices, and are not directly accessible from the Internet but are used extensively for device-to-device communication in your home or office.
To look up a private IP address, you can go to the Network preferences pane in your Mac and select your active network connection. When you do so, the main window will show the IP address currently assigned to that connection.
You can also look up your private IP address in the Terminal, using the following commands for both Wi-Fi and Ethernet connections:
networksetup -getinfo Wi-Fi
networksetup -getinfo Ethernet
A publicly accessible IP will be the one issued by your ISP, and it allows you to contact your home network from remote locations.
This IP address is generally configured in a router (not in your computer), and therefore connections to your computer using it will require proper routing and forwarding configurations in your router.
Image Credit: howto.cnet.com
If you need to look up your router’s public IP address, you can do so in several ways beyond going to your router’s configuration.
The easiest way to look it up is to perform a Google search for the term “IP” (click here). The search results will show your public IP address as the first entry.
Moreover, some third-party utilities that you can install will look this up and keep you informed if it changes.
OS X Daily recently outlined some options for looking this up via the command line, which may be useful if you need to determine the IP address in a script.
Source: howto.cnet.com