Skip to main content

Ping group on Windows with FOR command

Source: https://www.foodbev.com/news/food-and-drink-firms-join-loop-waste-free-shopping-platform/

Notes from daily work situation.

One of my colleagues asked me to find out which IP address that his home router dynamically assign to his brand new TOTOLINK N9 Ceiling Mount Access Point without accessing to the home router.

Look at TCP/IP settings, I know the IP address range that the home router assign to client is 192.168.1.2 - 192.168.1.254.


I also know MAC address of the new TOTOLINK N9 Access Point.

So, the idea is using his laptop to ping IP addresses from 192.168.1.2 - 192.168.1.254, then using arp -a command to find out MAC Address of TOTOLINK N9 Access Point.

So, I use FOR command to ping a group of IP Addresses from 192.168.1.1 to 192.168.1.254

FOR /L %variable IN (start,step,end) DO command [command-parameters]

    The set is a sequence of numbers from start to end, by step amount.
    So (1,1,5) would generate the sequence 1 2 3 4 5 and (5,-1,1) would generate the sequence (5 4 3 2 1)


for /l %i in (1,1,254) do @ping 192.168.1.%i -n 1 -w 100 | find "Reply"

-n count       Number of echo requests to send
-w timeout     Timeout in milliseconds to wait for each reply


Ping and Arp command to find IP Address and MAC of TOTOLINK N9
Ping and Arp command to find IP Address and MAC of TOTOLINK N9

Popular posts from this blog

Microsoft Windows: Commonly Used Shortcuts

Windows shortcuts Shortcuts Description Windows + Up Arrow Maximize active window Windows + Down Arrow Restore active window Windows + Left Arrow Move active window to half left of screen Windows + Right Arrow Move active window to half right of screen Windows + A Open Notifications window Windows + C Open C ortana Windows + E Open Windows E xplorer Windows + F Open Windows' F eedback Hub Windows + I Open Windows Settings Windows + L L ock screenr Windows + M M inimize all active windows Windows + P Send screen to P rojector Windows + R Open R UN dialog Windows + Pause Open System Properties window Windows + SHIFT + S Open S creenClipping tool CTRL + SHIFT + ESC Open Task Manager

Take Free English Tests Online

Free online English tests EF Standard English Test https://www.efset.org/ Exam English https://www.examenglish.com/

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.