IPNetworkInformation Class

Represents network configuration information for a given IP address or network interface.

Namespace

System.Net.NetworkInformation

Syntax


public abstract class IPNetworkInformation
            

Remarks

The IPNetworkInformation class is an abstract base class that provides common properties and methods for network interface information. Specific implementations, such as UnicastIPAddressInformationCollection and GatewayIPAddressInformationCollection, derive from this class to provide detailed information about IP addresses, gateways, and other network-related data.

This class is part of the .NET Framework's networking capabilities, allowing developers to programmatically access and manage network configuration on a local machine. It's particularly useful for diagnostics, network monitoring, and customizing network behavior.

You will typically interact with derived classes of IPNetworkInformation when querying network interface details using classes like NetworkInterface.

Properties

GatewayAddresses

Syntax

public abstract GatewayIPAddressInformationCollection GatewayAddresses { get; }

Remarks

Retrieves a collection of IP addresses that represent the gateways configured for this network interface.

IsDnsEnabled

Syntax

public abstract bool IsDnsEnabled { get; }

Remarks

Indicates whether the Dynamic Host Configuration Protocol (DHCP) is enabled for this network interface.

IsMulticastEnabled

Syntax

public abstract bool IsMulticastEnabled { get; }

Remarks

Indicates whether IP multicast is enabled for this network interface.

NetbiosName

Syntax

public abstract string NetbiosName { get; }

Remarks

Retrieves the NetBIOS name of the local computer.

NetworkCategory

Syntax

public abstract NetworkCategory NetworkCategory { get; }

Remarks

Gets the network category of the network interface. This can be Public, Private, or DomainAuthenticated.

PrefixOrigin

Syntax

public abstract PrefixOrigin PrefixOrigin { get; }

Remarks

Indicates the origin of the IP address prefix. This is typically used for IPv6 addresses.

SuffixOrigin

Syntax

public abstract SuffixOrigin SuffixOrigin { get; }

Remarks

Indicates the origin of the IP address suffix. This is typically used for IPv6 addresses.

UnicastAddresses

Syntax

public abstract UnicastIPAddressInformationCollection UnicastAddresses { get; }

Remarks

Retrieves a collection of unicast IP addresses assigned to this network interface.

Inheritance Hierarchy

System.Object
System.Net.NetworkInformation.IPNetworkInformation

Derived classes include:

See Also