eg. ## In batch file : FOR /L %%a in (1,1,254) DO @tracert 172.31.5.%%a ## On a command line: FOR /L %a in (1,1,254) DO @tracert 172.31.5.%a