DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="3.1.1" />

 MtuDiscovery

public class MtuDiscovery : Ping
Allows to discover maximum size of Message Transfer Unit over IP network.
public MtuDiscovery()

public int? Discover(IPAddress address, int timeout, MtuDiscoveryOptions options, CancellationToken token = default)

Discovers maximum allowed MTU size by the underlying network.

public Task<int?> DiscoverAsync(IPAddress address, int timeout, MtuDiscoveryOptions options, CancellationToken token = default)

Discovers maximum allowed MTU size by the underlying network.