DotNext by .NET Foundation and Contributors

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

 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.