How can you send a postcard without an address? Likewise on the Internet, information is sent and received via IP (Internet Protocol) addresses of the sender and receiver. Computers connected to a local network interact similarly.
There are two types of IP addresses: public and private. The public address is used to send and receive information in wide area network (Internet), while the private IP address triangulates the position of your computer in a local network.
- What is IP address
- How IP address works
- Method 1: Find public IP address using a search engine
- Method 2: Find public IP address using websites
- Method 3: Find private and public IP addresses using Command Prompt
- Method 4: Find private IP address via Network Connection
- Method 5: Find private IP address in Mac OS X
- Method 6: Find private and public IP addresses in a Mac using Terminal
What is IP address
IP Address or Internet Protocol address allows a computer to communicate in a network. Currently IPv4 or Internet Protocol Version 4 addresses are prevalent worldwide. These are 32-bit address with 4 billion possible permutations. With the increase in internet users and devices that use internet, IPv4 will exhaust in the near future, hence, IPv6 will replace IPv4 in future.
An example of IPv4 address is 18.104.22.168 where the numbers after each period range from 0-255.
An example of IPv6 address is 2561:3001:2AE9::326C:9DF4 where the four digit numbers include numeric digits from 0-9 and alphabets from A-F.
How IP address works
Within a local network MAC address plays a major role in identification of the actual hardware, but the communication is carried out via an IP address. IP address is one either ends of the network communication channel.
To understand the working of IP address and MAC address and how they are responsible for the exchange of information on the Internet, consider the example below-
Imagine you sent a job application via email and a reply came back to you from the company. Now imagine the same information exchange via real mail instead of an email.
- Post Office in your locality - Your IP Address
- Post Office in the company’s locality - Company’s IP Address
- Your home address - MAC address of your Computer
- Company’s address - MAC address of the company’s Computer
First, you took the job application to the post office in your locality. From there, it travelled to a post office in the company’s locality, which delivered it to the company’s address. Now, the reply to your application was sent by the company to their post office, which redirected it your post office. Finally, your post office sent you the reply at your home address.
This is how information is exchanged on the Internet, via IP and MAC addresses.
Method 1: Find public IP address using a search engine
Use your most trusted search engine to find your public IP address quickly. Your public IP is the address of your router/modem and is your global identifier.
Step 1. Open the search engine
Open a search engine like Google, Bing or Ask in your web browser.
Step 2. Type IP address in the search field
Type "IP address" in the search field and press “Enter”. This method works in the mainstream browsers apart from Yahoo. Click here to find your public IP address.
In most cases, your IP address will be displayed at the top of the search results page just below the search field. It will look like four groups of up to three digits separated by periods.
Method 2: Find public IP address using websites
There are also many websites that can tell you your current public IP address. One good one is IP Location. To find your public IP, simply click on the link to their website below. It will immediately display your system’s IP details.
Method 3: Find private and public IP addresses using Command Prompt
Step 1. Open the Command Prompt window
Press the "Windows logo key+X" or right click on the Windows logo icon in the bottom-left corner of the screen. In the menu that pops up, select "Command Prompt".
In Windows 7 and below, press the “Windows logo key + R" to open the Run window. Type "cmd.exe" in the Open field and the “Command Prompt” window will open.
Step 2. Type ipconfig in the Command Prompt window
In the “Command Prompt” window, type "ipconfig" and press "Enter". It will list all the connections on your computer.
Labeling of your active connection will depend on its type or the manufacturer of your network adapter. Find the IPv4 address after locating your active connection, which is your Private IP address.
Find Public IP
To find the public IP of your connection type “nslookup myip.opendns.com resolver1.opendns.com” in the Command Prompt and Press Enter.
Check that the drive in the first character of the Command Prompt must be the one in which windows is installed.
Your Public IP will be displayed.
Method 4: Find private IP address via Network Connection
Step 1. Open the Network Connections window
Press the "Windows logo key + R" to open the “Run” window.
In the Open field in the Run window, type "ncpa.cpl" and click "OK". A Network Connections window will open.
Step 2. Open the active connection status window
The “Network Connections” window will display your active connection (Ethernet or Wi-Fi).
Right click on your connection and select "Status" from the drop-down menu to open your active connection status window.
Step 3. Click on Details to find your IP address
Click on "Details" in the connection status window. A Network Connection Details window will open. Find the IPv4 address, which is your IP address.
Method 5: Find private IP address in Mac OS X
Step 1. Open System Preferences
Click on the Apple icon located in the top-left corner of the screen and select "System Preferences" from the drop-down menu.
Step 2. Open the Network window
Click on the "Network" icon in the System Preferences window and the Network window will open. A list of connections will appear on the left side.
Step 3. Select the Network Connection
Select your connection interface, like AirPort (Wi-Fi) or Built-in Ethernet, to find its IP address and click on the “Advanced” button.
Step 4. Open the TCP/IP tab
A series of tabs will open. Select the "TCP/IP" tab in the case of Wi-Fi connection. In the case of Ethernet connection, your TCP/IP tab might already be selected. Here you will find your IP address listed as IPv4 address.
Method 6: Find private and public IP addresses in a Mac using Terminal
Step 1. Open the Terminal application
Open the "Terminal" application in the “Utilities” section of the “Applications” folder.
Step 2. Type the command to obtain your IP address
In the window that opens, typing simply the "ifconfig" command displays a large chunk of data along with your IP address. To remove any unnecessary information, use the command given below.
ifconfig | grep “inet ” | grep -v 127.0.0.1
Be sure to include a ‘blank space’ after (inet) and before the end quote (”).
In the above case, the command shows the IP addresses for both Ethernet and AirPort respectively as the system is connected via both networks. If the same happens for you, remember “Terminal” shows the Ethernet IP first.
Find Public IP
To find the public IP using terminal type
curl ipecho.net/plain ; echo