IPAddressInformation.IsDnsEligible 속성

정의

IP(인터넷 프로토콜) 주소가 DNS(Domain Name System) 서버 데이터베이스에 표시될 수 있는지 여부를 나타내는 Boolean 값을 가져옵니다.

public:
 abstract property bool IsDnsEligible { bool get(); };
public abstract bool IsDnsEligible { get; }
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public abstract bool IsDnsEligible { get; }
member this.IsDnsEligible : bool
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
member this.IsDnsEligible : bool
Public MustOverride ReadOnly Property IsDnsEligible As Boolean

속성 값

주소가 DNS 데이터베이스에 표시될 수 있으면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제에서는 로컬 컴퓨터의 네트워크 인터페이스에 대한 anycast 주소를 표시합니다.

void DisplayAnycastAddresses()
{
    int count = 0;
            
    Console::WriteLine( "Anycast Addresses" );
    array<NetworkInterface^>^adapters = NetworkInterface::GetAllNetworkInterfaces();
    System::Collections::IEnumerator^ myEnum13 = adapters->GetEnumerator();
    while ( myEnum13->MoveNext() )
    {
        NetworkInterface ^ adapter = safe_cast<NetworkInterface ^>(myEnum13->Current);
        IPInterfaceProperties ^ adapterProperties = adapter->GetIPProperties();
        IPAddressInformationCollection ^ anyCast = adapterProperties->AnycastAddresses;
        if ( anyCast->Count > 0 )
        {
            Console::WriteLine( adapter->Description );
            System::Collections::IEnumerator^ myEnum14 = anyCast->GetEnumerator();
            while ( myEnum14->MoveNext() )
            {
                IPAddressInformation ^ any = safe_cast<IPAddressInformation ^>(myEnum14->Current);
                Console::WriteLine( "  Anycast Address .......................... : {0} {1} {2}", 
                    any->Address, any->IsTransient ? "Transient" : "", 
                    any->IsDnsEligible ? "DNS Eligible" : "" );
                count++;
            } 
            Console::WriteLine();
        }
    }
    if (count == 0)
    {
        Console::WriteLine("  No anycast addresses were found.");
        Console::WriteLine();
    }
}
public static void DisplayAnycastAddresses()
{
    int count = 0;

    Console.WriteLine("Anycast Addresses");
    NetworkInterface[] adapters  = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {
        IPInterfaceProperties adapterProperties = adapter.GetIPProperties();
        IPAddressInformationCollection anyCast = adapterProperties.AnycastAddresses;
        if (anyCast.Count >0)
        {

            Console.WriteLine(adapter.Description);
            foreach (IPAddressInformation any in anyCast)
            {
                Console.WriteLine("  Anycast Address .......................... : {0} {1} {2}",
                    any.Address,
                    any.IsTransient ? "Transient" : "",
                    any.IsDnsEligible ? "DNS Eligible" : ""
                );
                count++;
            }
            Console.WriteLine();
        }
    }
    if (count == 0)
    {
        Console.WriteLine("  No anycast addressses were found.");
        Console.WriteLine();
    }
}
Public Shared Sub DisplayAnycastAddresses() 
    Dim count as Integer = 0
    
    Console.WriteLine("Anycast Addresses")
    Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Dim adapter As NetworkInterface
    For Each adapter In  adapters
        Dim adapterProperties As IPInterfaceProperties = adapter.GetIPProperties()
        Dim anyCast As IPAddressInformationCollection = adapterProperties.AnycastAddresses
        If anyCast.Count > 0 Then
            Console.WriteLine(adapter.Description)
            Dim any As IPAddressInformation
            For Each any In  anyCast
                Console.WriteLine("  Anycast Address .......................... : {0} {1} {2}", any.Address, IIf(any.IsTransient, "Transient", ""), IIf(any.IsDnsEligible, "DNS Eligible", ""))
            'TODO: For performance reasons this should be changed to nested IF statements
            'TODO: For performance reasons this should be changed to nested IF statements
                count += 1
            Next any
            Console.WriteLine()
        End If
    Next adapter

    if count = 0 then
        Console.WriteLine("  No anycast addresses were found.")
        Console.WriteLine()
    End if
End Sub

설명

169.254.0.0~169.254.255.255 범위의 주소는 DNS에 적합하지 않습니다. 이러한 주소는 APIPA(자동 개인 IP 주소 지정)를 위해 예약되어 있습니다.

적용 대상