Ever wondered how to quickly list all IP addresses on your local network using the command line?
With decades of experience in networking, I’ll walk you through how to use the Windows CMD to discover devices, understand what the commands show you, and troubleshoot common issues — in this article you’ll learn step-by-step methods including native commands, how to interpret results, how to export them, and best practices for network security and inventory.
Understanding Why You’d Want to List All IP Addresses
Tracking all active IP addresses on your network offers several benefits: it helps you detect unknown devices, prevent unauthorized access, manage IP conflicts, and troubleshoot connectivity issues. According to recent data, network misconfigurations account for around 28% of all small to medium business connectivity issues, so discovering all devices and their addresses is a foundational skill.
When you use the command line (CMD) in Windows, you avoid needing third-party tools and gain visibility using built-in utilities — which makes this process lightweight, efficient and secure.
Prerequisite: Determine Your Network Subnet and Default Gateway
Before diving into scanning all IP addresses, you should identify your own machine’s IP, subnet mask, and default gateway. To do this in CMD: open a command prompt (Win + R, type cmd, press Enter) and type:
ipconfig /all
You will see details including your IPv4 address, subnet mask (e.g., 255.255.255.0) and the default gateway (e.g., 192.168.1.1). From that you determine your network’s address range (for example 192.168.1.0/24) which will guide the rest of your scan.
Native CMD Commands to List Network IP Addresses
Here are the main commands you’ll use and how they work.
- arp –a
Type the following in CMD:
arp –a
This command shows the ARP (Address Resolution Protocol) cache, listing IP addresses your computer knows about on the local subnet and their associated MAC addresses and allocation types (dynamic or static). This helps you map IP to hardware and identify devices. Several guides recommend using arp –a as one of the easiest built-in methods.
- ping sweep (using FOR loop)
For example:
for /L %i in (1,1,254) do @ping –n 1 –w 250 192.168.1.%i > nul && echo 192.168.1.%i is alive
This command pings every IP between 192.168.1.1 and 192.168.1.254 and echoes the addresses that respond. It lets you discover live hosts across the subnet. Many users have reported that this method returns more devices than just ARP alone.
- net view /all
Another useful command:
net view /all
This lists all computers and devices visible in the same workgroup or domain. Once you have names, you can resolve them to IP addresses using nslookup <computername>. It’s helpful in domain or shared networks where device names matter.
- Combining Commands for Better Coverage
Because no single native command guarantees discovery of every device (e.g., fire-walled or ping-disabled hosts might not respond), the best practice is to combine: first run ping sweep, then arp –a, then optionally net view. This layered approach maximizes discovery.
Step-by-Step: Full Process to List All IPs via CMD
Here’s a straightforward workflow:
- Open CMD as Administrator.
- Run ipconfig /all and note your IPv4 address, subnet mask and default gateway.
- Determine your network range (e.g., 192.168.0.0/24 or 10.0.0.0/24).
- Run a ping sweep using a FOR loop (as above) to identify live hosts.
- After the ping sweep, run arp –a to list IP-MAC mappings for the hosts your PC knows about.
- Optionally, run net view /all if you’re in a workgroup/domain environment and want device names.
Combine and consolidate your results into a list of IP addresses, and optionally export them to a text file:
arp –a > arp_output.txt
or
for /L %i in (1,1,254) do @ping –n 1 –w 250 192.168.1.%i > nul && echo 192.168.1.%i >> live_hosts.txt
- Review the list for unknown or unauthorized devices and record their MAC addresses, hostnames, and roles.
Interpreting the Results
After running these commands you’ll get a list such as:
Interface: 192.168.1.10 — 0x12
Internet Address Physical Address Type
192.168.1.1 00-50-56-c0-00-08 dynamic
192.168.1.23 68-7f-74-8b-2f-6d dynamic
192.168.1.45 5c-51-88-13-2d-01 static
Here’s how to interpret:
- The “Internet Address” column is the IP address of a device the PC has seen.
- “Physical Address” is the MAC address of that device.
- “Type” indicates whether the entry is dynamic (via DHCP) or static (manually assigned)
Devices marked static may be servers, printers, or other infrastructure. Devices marked dynamic likely connected via DHCP.
If you’ve done the ping sweep and then run arp –a, you will have a more complete list of devices that responded plus their MAC addresses. If some devices don’t show up, it may be because they don’t respond to pings or the ARP cache hasn’t updated.
Exporting and Filtering Results
To make your results actionable:
- Redirect output to text files as shown above.
Use findstr to filter by subnet:
arp –a | findstr “192.168.1.” > filtered.txt
- Sort and dedupe entries using PowerShell or Excel.
- Save your final list and label each device (e.g., Printer-01, Workstation-12) along with its IP and MAC.
Troubleshooting Why Some Devices Don’t Appear
You might notice some devices are missing from your list. Common reasons:
- The device doesn’t respond to ICMP (ping) due to firewall or configuration.
- The device has been offline and not registered in ARP cache yet.
- Certain IoT appliances or switches block broadcast or unknown traffic.
If you need deeper scanning, you can use nmap –sn <subnet> but that is beyond native CMD.
Best Practices and Security Considerations
Listing all IP addresses is not just about discovery — it ties into security and network hygiene:
- Regular inventory: Update your list weekly or monthly to catch rogue devices.
- Static vs dynamic assignments: Use static IPs for servers/printers and dynamic for guest/user devices.
- Lock down unauthorized IPs: If you find unknown addresses in your list, investigate and isolate.
- Use network segmentation: In medium to large networks use VLANs so scanning one segment doesn’t expose all devices.
- Document and label MAC addresses: Match MACs to known hardware to speed up troubleshooting and audits.
When Or Why Native CMD Methods May Not Be Enough
While built-in CMD commands work well for small to medium networks, there are limitations:
- They rely on devices responding to ping or being in ARP cache.
- They don’t scan large or segmented networks efficiently.
- They don’t provide device names or advanced metadata (OS type, port status).
In enterprise grade environments, you’d often use IP address management (IPAM) tools or dedicated network scanners to automate discovery, alert on conflicts and track address usage trends. However, for most small business or home networks, CMD methods are cost-free and adequate.
Summary and Final Checklist
To recap, here’s your checklist for listing all IP addresses on your network using CMD:
- Identify your subnet with ipconfig /all.
- Run a ping sweep across your IP range.
- Use arp –a to capture IP to MAC mappings.
- Use net view /all if device names are required.
- Export results and label each device, IP, MAC, and type (static/dynamic).
- Troubleshoot missing devices (firewall, ping disabled, etc.).
- Maintain and update your inventory regularly.
By following this process you gain a clear map of devices on your local network, improve your security posture, and save time in troubleshooting connectivity or conflict issues.

