How to ping a range of IP addresses using Windows BATCH FOR /L command

Subscribers:
613
Published on ● Video Link: https://www.youtube.com/watch?v=etN8R1B5uL0



Category:
Guide
Duration: 15:12
1,474 views
9


Hello Windows Administrator or Windows Network Administrator. This video is about how to ping range of IP addresses using Windows cmd FOR /L command.

You know we can do this using command FOR /L. FOR /L is other variant of FOR command.

In this video we will do:
1. Ping all hosts on other subnet that your current subnet. Mine subnet for instance 192.168.42.0/24. So in this case we will ping 192.168.1.0/24 subnet: FOR /L %i IN RANGE (1,1,254) DO PING 192.168.1.%i -n 1

2. Ping all hosts in your current subnet:
FOR /L %i IN (1,1,254) DO PING 192.168.42.%i -n 1

3. PING a bunch of hosts or a range of IP addresses on the internet.
FOR /L %i IN (1,1,10)

4. Ping all host on a subnet and save the output to a file
FOR /L %i IN (1,1,10) DO PING 192.168.1.%i -n 1 "redirection operator"

5. Ping all host on a subnet and save the output to a file in shorter form of output using FIND command.
FOR /L %i IN (1,1,254) DO PING 192.168.1.%i -n 1 | FIND /i "Reply" "redirection operator" testpinghost_192.168.1.%i.txt

P.S.: You can erase all files that generated by example 4 and 5 using this command: DEL

Thanks for watching and don't forget to subscribe.




Other Videos By Computertechlighthouse


2020-04-06In waves - Trivium vocal cover by Totzfreelance not too good but I've tried
2020-03-28Strange moon and star aligning found today 28-03-2020, 19:00
2020-03-28I make Matrix the movie intro like using Small Basic
2020-03-26How to troubleshoot Python IDLE can't run or F5 file (IDLE's subprocess didn't make connection)
2020-03-14Batch Language: Extracting a substring from a string!
2020-03-13Audacity Tutorial: Silencing, DTMFing, Noising, etc. your song part!
2020-03-09Cisco Packet Tracer Activity 5.5.1 Explaination Part 1
2020-03-09Cisco Packet Tracer Activity 5.5.1 Explaination Part 2
2020-03-08Cisco Packet Tracer LAB 5.5.2: Router Segment Broadcast Domains
2020-03-05FOR /F can't use multiple commands and how to solve it
2020-03-04How to ping a range of IP addresses using Windows BATCH FOR /L command
2020-03-02How to run powershell script (.ps1) for the first time (How to fix SecurityError)
2020-03-01How to search for File(s) on your Windows computer using command line (cmd)
2020-02-26How to set a network interface IP address using netsh subcommands
2020-02-26How to rename a network interface using netsh interface subcommand
2020-02-26How to disable and enable a network interface quickly using netsh subcommand
2020-02-26How to use netsh interface command to determine all of or one of your interface IP address quickly
2020-02-03How to play Donkey Kong 64 with Project64 (a Nintendo Emulator) [Easy]
2020-01-25Asus Zenfone Troubleshooting can't finished bootup forever / freezing
2018-06-25How to instal font from google font on windows 7
2018-06-24Microsoft Access Tutorial 6 : Exporting Microsoft Access Table to Microsoft Excel