1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python 3.4. Win32. Take DNS addreses from DHCP

Discussão em 'Python' iniciado por Stack, Setembro 17, 2025.

  1. Stack

    Stack Membro Participativo

    To set something in my nic's wmi library. I'm turning on DHCP using:

    nic.EnableDHCP()


    I'm setting static settings using:

    nic.EnableStatic(IPAddress=[ip],SubnetMask=[subnetmask])
    nic.SetGateways(DefaultIPGateway=[gateway])


    I'm setting static DNS using:

    nic.SetDNSServerSearchOrder(DNSServerSearchOrder = dnsServers)


    But I don't know, how to set dynamic assign DNS IP. When I turn on DHCP, then DNS are still static.

    How can I set the DHCP DNS?

    Continue reading...

Compartilhe esta Página