An IPv4 address serves as a unique numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. Understanding how to get IPv4 address information is essential for network troubleshooting, security configuration, and system administration tasks. This guide provides a detailed walkthrough of the methods available.
Understanding IPv4 Fundamentals
The IPv4 protocol defines an address as a 32-bit number, typically represented in dotted-decimal notation, separating four numbers with periods. This structure allows for roughly 4.3 billion unique addresses, a pool that has led to the widespread adoption of Network Address Translation. Every device requiring network access needs this identifier to send and receive data packets across routers and the public internet.
Using Command Line Interface on Windows
For users on Windows operating systems, the Command Prompt offers a direct way to retrieve network configuration data. The ipconfig command displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol and Domain Name System settings.
Steps to Retrieve the Address
Press Windows + R , type cmd , and press Enter to open the Command Prompt.
Type the command ipconfig and press Enter.
Look for the entry labeled "IPv4 Address" under your active network connection, such as Ethernet or Wi-Fi.
Using Terminal on macOS and Linux
Mac and Linux users rely on the Terminal application to interact with the Unix-based system shell. While older commands like ifconfig were standard, modern distributions often require the use of ip or the hostname command to avoid deprecated utilities.
Steps to Retrieve the Address
Open the Terminal application from your Applications or Utilities folder.
Type hostname -I or ip addr show and press Enter.
Identify the IP address listed for your active interface, which will be in the format of four number groups separated by dots.
Checking Through System Settings
Both Windows and macOS provide graphical user interfaces that allow users to view network status without touching the command line. These settings pages are often the most accessible method for home users who prefer visual navigation over text commands.
GUI Method for Windows
Open Settings and navigate to Network & Internet.
Click on Wi-Fi or Ethernet, depending on your connection type.
Select the "Hardware properties" or "Advanced options" section to view the IPv4 address.
GUI Method for macOS
Open System Preferences and click on Network.
Select Wi-Fi or Ethernet from the sidebar.
Click the "Advanced" button and navigate to the TCP/IP tab to see the address listed.
Verifying Public IP Address
While the local IPv4 address identifies your device on a private network, the public IP address is the identifier seen by websites and services on the internet. This address is assigned by your Internet Service Provider and can be either static or dynamic.
Checking the Public Address
Visit a trusted website such as "whatismyip.com" or "ipinfo.io" using your web browser.
The page will instantly display your public-facing IPv4 address.
Compare this address with the local one to confirm if your network is using a router for NAT translation.