address.isReachable nie wykryje wszystkich węzłów w sieci

Skróciłem mój kod do podstawowych zasad, jest on bardzo prosty i prosty.

Mam następujący kod:

public ArrayList<Node> getNodes() throws IOException
{
    ArrayList<Node> nodes = new ArrayList<Node>();

    StringBuffer root = new StringBuffer(InetAddress.getLocalHost().getHostAddress());
    while(!root.toString().endsWith("."))
        root.deleteCharAt(root.length() - 1);
    //^^ this code gets the ip, for ex 127.0.0.1, and trims the last number, to make it
    //^^ 127.0.0.  <-- see the trailing 0

    for(int host = 0;host < 256; host++)
    {
        InetAddress address = InetAddress.getByName(root.toString() + host);
        try
        {
            if(address.isReachable(500)) // pings the address
                nodes.add(new Node(address.getHostAddress(), false));
        }catch(Exception e){new Node(address.getHostAddress(), true);}
    }

    return nodes;
}

Oto klasa węzła, która jest bardzo prosta:

public class Node 
{
    public Node(String address, boolean restricted)
    {
        this.address = address;
        this.restricted = restricted;
    }

    public String address;
    public boolean restricted;
}

Oto mój główny kod, który wykonuje getNodes ():

case 1:
    System.out.println("Searching for nodes...");
    NodeDetector node = new NodeDetector(); // this is the class
                                           //where getNodes resides
    ArrayList<Node> nodes = node.getNodes();

    Iterator<Node> it = nodes.iterator();
    while(it.hasNext())
    {
        System.out.println("Node: "+it.next().address);
    }

    System.out.println("stopped searching for nodes...");
    break;

Oto moje dane wyjściowe:

Searching for nodes...
Node: 00.00.17.99
Node: 00.00.17.100
Node: 00.00.17.149
Node: 00.00.17.150 <-- this is my computer
Node: 00.00.17.154
Node: 00.00.17.156
Node: 00.00.17.254
stopped searching for nodes...
Teraz jest problem

Mam narzędzie do wykrywania węzła sieciowego pobrane na mój telefon i może znaleźć co najmniej 5 dodatkowych węzłów. Próbowałem zmienić wartość limitu czasu, ale nadal nie miałem szczęścia. Gdy pinguję adres znaleziony za pomocą narzędzia sieciowego na moim telefonie, a nie na moim komputerze, ping jest natychmiast odbierany i zwracany. To pytanie jest podobne i trochę mi pomogło, ale wciąż tkwię:

Jak wykonać prawdziwy ping Java z systemu Windows?

Używam mojego narzędzia na komputerze Mac, wygląda na to, że działa dobrze, zbierając inne macy, iPody i routery, ale to wszystko. Dlaczego mój program nie może wykryć innych urządzeń w sieci?

Oto wyjście, które otrzymuję z mojego narzędzia sieciowego w moim telefonie:

00.00.17.99 <-- SMC Networks *
00.00.17.100 <-- XEROX *
00.00.17.133 <-- My Phone (Android)
00.00.17.134 <-- Intel
00.00.17.142 <-- Apple
00.00.17.149 <-- Apple *
00.00.17.150 <-- Apple * <-- this is my computer
00.00.17.154 <-- Apple *
00.00.17.155 <-- Intel
00.00.17.156 <-- Apple *
00.00.17.158 <-- Motorola Mobility
00.00.17.254 <-- Netopia *

Umieszczam *, gdzie narzędzie na moim telefonie zgadza się z narzędziem, które piszę na moim komputerze. Przeprowadziłem ten test kilka razy, otrzymuję ten sam wynik za każdym razem, zarówno na komputerze, jak i na telefonie, podczas testów nie dodawano ani nie usuwano żadnych urządzeń z sieci.

questionAnswers(1)

yourAnswerToTheQuestion