I need multiple DNS ips with xDnsServerAddress

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of TyMac TyMac 4 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39456
    Profile photo of TyMac
    TyMac
    Participant

    Is there a way to create a primary and secondary ip for an interface using xDnsServerAddress?

    This works:

    xDnsServerAddress DnsServerAddress
    {
    Address = "8.8.8.8"
    InterfaceAlias = "Ethernet"
    AddressFamily = "IPV4"
    }

    But this fails:

    xDnsServerAddress DnsServerAddress
    {
    Address = "8.8.8.8,9.9.9.9"
    InterfaceAlias = "Ethernet"
    AddressFamily = "IPV4"
    }

    ...maybe just a syntax issue?

    #39457
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Address is an array, you need to pass in multiple strings rather than a single string that happens to contain a comma:

    xDnsServerAddress DnsServerAddress
    {
        Address = "8.8.8.8", "9.9.9.9"
        InterfaceAlias = "Ethernet"
        AddressFamily = "IPV4"
    } 
    
    #39477
    Profile photo of TyMac
    TyMac
    Participant

    Ah ok thanks worked perfectly!

    Last question – is there a way to specify this for all interfaces regardless of InterfaceAlias? InterfaceAlias = "*" does not seem to work.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.