Share via


IPInterfaceProperties.IsDynamicDnsEnabled 속성

정의

이 인터페이스가 DNS(Domain Name System)에 IP 주소 정보를 자동으로 등록하도록 구성되었는지 여부를 나타내는 Boolean 값을 가져옵니다.

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

속성 값

이 인터페이스가 동적 IP 주소와 정적 도메인 이름 간의 매핑을 자동으로 등록하도록 구성되어 있으면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제에서는이 속성의 값을 표시합니다.

void DisplayDnsConfiguration()
{
   array<NetworkInterface^>^adapters = NetworkInterface::GetAllNetworkInterfaces();
   System::Collections::IEnumerator^ myEnum10 = adapters->GetEnumerator();
   while ( myEnum10->MoveNext() )
   {
      NetworkInterface ^ adapter = safe_cast<NetworkInterface ^>(myEnum10->Current);
      IPInterfaceProperties ^ properties = adapter->GetIPProperties();
      Console::WriteLine( adapter->Description );
      Console::WriteLine( "  DNS suffix................................. :{0}", 
         properties->DnsSuffix );
      Console::WriteLine( "  DNS enabled ............................. : {0}", 
         properties->IsDnsEnabled );
      Console::WriteLine( "  Dynamically configured DNS .............. : {0}", 
         properties->IsDynamicDnsEnabled );
   }
}
public static void DisplayDnsConfiguration()
{
    NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {
        IPInterfaceProperties properties = adapter.GetIPProperties();
        Console.WriteLine(adapter.Description);
        Console.WriteLine("  DNS suffix .............................. : {0}",
            properties.DnsSuffix);
        Console.WriteLine("  DNS enabled ............................. : {0}",
            properties.IsDnsEnabled);
        Console.WriteLine("  Dynamically configured DNS .............. : {0}",
            properties.IsDynamicDnsEnabled);
    }
    Console.WriteLine();
}
Public Shared Sub DisplayDnsConfiguration() 
    Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Dim adapter As NetworkInterface
    For Each adapter In  adapters
        Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
        Console.WriteLine(adapter.Description)
        Console.WriteLine("  DNS suffix................................. :{0}", properties.DnsSuffix)
        Console.WriteLine("  DNS enabled ............................. : {0}", properties.IsDnsEnabled)
        Console.WriteLine("  Dynamically configured DNS .............. : {0}", properties.IsDynamicDnsEnabled)
    Next adapter

End Sub

설명

동적 DNS를 사용하면 클라이언트가 동적 IP 주소가 정적 호스트 이름에 매핑되어 있음을 DNS 서버에 알릴 수 있습니다.

적용 대상