The Simplest Network Scanner

Standard

https://i2.wp.com/ashcampbell.com/wp-content/uploads/2013/08/ping-meaning-the-pingdom-of-blog.jpgI’m an “Old School” IT Guy.  I remember when the there was no GUI and all you had at your disposal was a Command (CMD) Prompt – and you thought that was COOL.

Nowadays, it seems like there is a tool for everything – but some times you run into roadblocks preventing you from their installation.

Today – I give you a command string you can enter if you don’t have an IP Scanner available, and you need to know what is active on your network.

Just paste the string below into your CMD Window, sit back and wait (it can take some time to run against 255 hosts)

for /l %i in (1,1,255) do @ping -n 1 192.168.1.%i | find /i “bytes=”

Presto – you have all the active IP addresses within your subnet – in an output that looks like this

image

Now, if you are like me, I bet you are wondering– What is this string doing behind the scenes?  Here is a general break down of commands, their syntax and any arguments used:

FOR – A Loop command that conditionally performs a command several times. Search for a text string in a file & display all the lines where it is found.
Syntax (in thise case, /l = list of numbers ) – FOR /L %%parameter IN (start,step,end) DO command : all options Files, Directory, List•

PING – THE classic network command – used to est a network connection – if successful, ping returns the ip address.
Syntax – PING [options] destination_host
-n count = Number of echo requests to send.

FIND– Searches for a text string in a file & displays all the lines where it is found.
Syntax –  FIND [/V] [/C] [/N] [/I] “string” [pathname(s)]
   /i  = Ignore the case of characters when searching for the string.
   “string” = The text string to find (must be in quotes).
   [pathname] = A drive, file or files to search.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s