troubleshooting Question

Search CIDR subnet ranges with powershell

Avatar of Rich Rumble
Rich RumbleFlag for United States of America asked on
NetworkingVB ScriptPowershell
4 Comments2 Solutions565 ViewsLast Modified:
I'd like to be able to search for an IP's within CIDR ranges/list, and output the information around that IP's CIDR file.
Very similar to this EE question https://www.experts-exchange.com/questions/29127048/Excel-CIDR-IP-Address-Overlap-Formula-Check-for-CIDR-IP-Address-Overlap.html

This is what I envision...
CIDR.csv
CIDR, Subnet_Name
10.0.0.0/24, Guest Network
10.10.0.0/23, Production
10.8.0.0/22, Telco
10.69.69.0/24, BoomChickaWowWow

.\findip.ps1 10.0.0.22
    Found: 10.0.0.22 - Guest Network 10.0.0.0/24

.\findip.ps1 10.8.0.123, 10.69.69.68, 10.1.2.3
   Found: 10.8.0.123 - Telco 10.8.0.0/22
   Found: 10.69.69.68 - BoomChickaWowWow
   Not Found: 10.1.2.3

FindIp would look inside the cidr.csv and then expand the CIDR's and seqrch for matches within.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros