It is necessary to determine the computer in the network, to which the longest route .

That is, the maximum value of the last column and the network address, as I understand it. If someone masters, I will be grateful for the help.

Screen: business cat http://freshall.com/img/2017-02/27/qmnsvs7q3d2so6a41dh5hs54b.png

My version:

@echo off for /f "eol== tokens=5" %%i in ('route print ^|findstr /rc:"[0-9]$"') do if %%m%% LSS %%i set m=%%i echo "Max value: "%m% pause 
  • Typically, the длина маршрута is the number of hosts through which the packet passes to achieve the final goal - Anton Shchyrov
  • one
    Distance can only be understood with the help of tracert and that is not always correct. for example, 10.112.238.44, it looks like a point-to-point tunnel; how many real transitions through this subnet can only be understood if you add up the number of transitions inside the tunnel with transitions for which the tunnel packet gets to the server. And according to the routing table it is impossible to determine - Mike

0