Skip to content

ICMP Destination Unreachable identified as Timeout #27373

Closed

Description

@Petermarcu

@gserfont commented on Fri Aug 10 2018

Issue Title

ICMP Destination Unreachable identified as Timeout

General

Using .Net Core 2.1.301 on OSX 10.13.6

SendPingAsync seems to incorrectly report the reason for Ping failure.

            var reply = await ping.SendPingAsync(Theip, timeout);
            if (reply.Status == System.Net.NetworkInformation.IPStatus.Success)
            {
                Console.WriteLine("Success:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.DestinationHostUnreachable)
            {
                Console.WriteLine("Destination host unreachable:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.DestinationUnreachable)
            {
                Console.WriteLine("Destination unreachable:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.TimedOut) //Everything hits here .. 
            {
                Console.WriteLine("Destination timedout:" + Theip);
            }

screen shot 2018-08-10 at 15 31 41

screen shot 2018-08-10 at 15 20 34

screen shot 2018-08-10 at 15 27 59

Activity

  1. wfurt commented on Sep 19, 2018

    @wfurt
    Member

    I could not reproduce it @gserfont

    I wraped your code to simple console app and it works as expected for me.
    macik2:poll furt$ dotnet run 10.10.80.10
    Destination timedout:10.10.80.10

    I would recommend to do packet capture for ICMP traffic.

    Also note, that on Unix (including OSX/MacOS) the implementation changes depending on user privilege. If possible .net uses RAW sockets and falls back to executing system 'ping' utility if needed.

    Please provide more info.

  2. karelz commented on Nov 2, 2018

    @karelz
    Member

    Not actionable, closing. If you have more information available in future, we can reopen. Thanks!

  3. transferred this issue fromdotnet/corefxon Jan 31, 2020
  4. added this to the 3.0 milestone on Jan 31, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions