Microsoft Developer Network > 포럼 홈 > Visual C# General > How to adjust TCP/IP settings (IP, DNS, etc)
질문하기질문하기
 

답변됨How to adjust TCP/IP settings (IP, DNS, etc)

  • 2006년 6월 9일 금요일 오후 3:20mrayyan 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Greetings,
    I am trying to find out how to change the DNS from "Obtain DNS server address automatically" to manual and enter the DNS address.

    Basically, what I want is the following:
    1. If computer ip address subnet is NOT  "141.218.255.255" then change the DNS setting to "Obtain DNS server address autoamtically". 

    2. and if it is "141.218.255.255" then make the DNS primary address "141.218.1.92" and secondary "141.218.218.96"

    Is there away to do this using System.Net?

답변

  • 2006년 6월 9일 금요일 오후 3:41Brendan Grant중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    Unfortunately this kind of functionality is still not supported by the framework... instead one very easy way to do such things is to pass the necessary arguments to an internally launched instance of netsh.

    When it comes to determining the current networks state however, if you are running the 2.0 Framework I would suggest looking into the NetworkInfromation namespace and all of the gettable properties it provides.

모든 응답

  • 2006년 6월 9일 금요일 오후 3:41Brendan Grant중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    Unfortunately this kind of functionality is still not supported by the framework... instead one very easy way to do such things is to pass the necessary arguments to an internally launched instance of netsh.

    When it comes to determining the current networks state however, if you are running the 2.0 Framework I would suggest looking into the NetworkInfromation namespace and all of the gettable properties it provides.