Gab.com

Reverse Ping a 255.255.254 Scope

To quickly obtain the devices using an IPv4Address in a scope reverse ping the scope in PowerShell (5.1)

‘#’ReverseLookup-Ipv4Address-By23Range.ps1’
$subnet = read-host -Prompt “What IP scope with /23 range? -leave off the last octet numbers – like this 10.228.30.
for ($i=0; $i -le 511; $i++) {
$ip = $subnet + $i
Resolve-DnsName -name $ip -ea SilentlyContinue|select Server,Name -First 1
}


See the 511? That’s because /23 is 512 IPV4 Addresses (always minus 1)
To adjust for /24 just change the 511 to 255, /25 is 127, and so on :

Number of
Addresses
Number of
Bits
PrefixClassful
Notation
Mask
10/32255.255.255.255
21/31255.255.255.254
42/30255.255.255.252
83/29255.255.255.248
164/28255.255.255.240
325/27255.255.255.224
646/26255.255.255.192
1287/25255.255.255.128
2568/241 C255.255.255
5129/232 C255.255.254
1 K10/224 C255.255.252
2 K11/218 C255.255.248
4 K12/2016 C255.255.240
8 K13/1932 C255.255.224
16 K14/1864 C255.255.192
32 K15/17128 C255.255.128
64 K16/161 B255.255
128 K17/152 B255.254
256 K18/144 B255.252
512 K19/138 B255.248
1 M20/1216 B255.240
2 M21/1132 B255.224
4 M22/1064 B255.192
8 M23/9128 B255.128
16 M24/81 A255
32 M25/72 A254
64 M26/64 A252
128 M27/58 A248
256 M28/416 A240
512 M29/332 A224
1024 M30/264 A192

Btw, if you are not using Gab.ai by now, you SHOULD. Gab.ai is FAR FASTER than even Copilot.Microsoft.com!!! I do tend to compare the results with each other to be sure I get accurate data, but man, oh MAN, is Gab.ai FAST, and accurate.
I recently asked Copilot the EventIDs to troubleshoot a PDC emulator after a reboot. Microsoft’s AI gave me PC answers, like sending me to Learn URLs, instead of the actual EventIDs, where Gab.ai gave me the exact answer (like 1058)!

Just a quick note about Copilot.Microsoft.com, though: It’s able to be set up internally in your corporation/business so that all interaction is secure and not replicated outside the network! VERY nice for specific questions with company sensitive data; No having to :adjust” the question to keep your confidential data secured when you use CoPilot. (But GAB.ai does let you keep everything secured to your own login, btw. And then you delete the conversation later if need ve. No prying eyes.)


Posted

in

, ,

by