How to find my DNS Server address in Windows 7

192,690

Solution 1

If you know your public IP address simply enter in a command prompt window:

nslookup <your public IP>

You can also specify the name server to check against by appending it to the above command.

You can get your current IP address from sites like http://whatismyip.com

Solution 2

You want to open "Run" then type

cmd.exe

In the command prompt enter this command

C:\>ipconfig /all | findstr /R "DNS\ Servers"

The output should look something like:
enter image description here

Solution 3

Personally, I prefer this approach:

echo | nslookup | findstr "Default\ Server"

It will print the name of your default DNS server in the shell

Solution 4

echo exit | nslookup

This will show the primary DNS server domain name and IP address.

Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

>

Thanks to @OliverSalzburg's answer.

Solution 5

The following powershell command outputs the DNS information in a structured format:

powershell Get-DnsClientServerAddress

Example output:

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
vEthernet (Default Switch)          21 IPv4    {}
vEthernet (Default Switch)          21 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
Wi-Fi                               17 IPv4    {10.0.0.1}
Wi-Fi                               17 IPv6    {2001:123:456:789::1, 2001:123:456:789::2}
Share:
192,690

Related videos on Youtube

rakib
Author by

rakib

Updated on September 18, 2022

Comments

  • rakib
    rakib over 1 year

    What is the easiest way to know my current DNS server's IP address or domain name? I am trying to troubleshoot my broadband Internet connection under Windows 7.

    • vesquam
      vesquam over 11 years
      Do you mean Ip address? Or are you actual trying to find which name server you're connection is using?
  • rakib
    rakib over 11 years
    thats seems fine .. but there was some conflict :( pls see the photo i.stack.imgur.com/Ua6cT.png any solution? Thanks
  • Canadian Luke
    Canadian Luke over 11 years
    @rakib Means there is no public DNS name for you, or your ISP doesn't give one
  • Canadian Luke
    Canadian Luke over 11 years
    That shows the DNS server, not the DNS name
  • mrchampe
    mrchampe over 11 years
    @rakib, please try running "ipconfig /all" as that will give you more details on the problem. You are essentially troubleshooting your internet connection, yes?
  • mrchampe
    mrchampe over 11 years
    Since he is troubleshooting his internet it seems he wants to verify he is connected to the ISP DNS server. It is unlikely he even has a DNS address, which is shown in the screenshot he shared
  • Oliver Salzburg
    Oliver Salzburg over 11 years
    You can just nslookup anything. It doesn't have to be your own IP address. If you don't provide any parameters, the interactive shell will start and will display the active nameserver right at the top.
  • Mike S
    Mike S over 8 years
    This should be the accepted answer, since it directly answers the user's question: "my current DNS server address..." However, on my Windows box the DNS Servers come as a group and not all of them are prefixed with the string. ipconfig /all works, though, if you eyeball it.
  • merosss
    merosss about 6 years
    actually a combination of the two answers gives the best result: echo exit | nslookup | findstr ":". Just using yours in PS prompts "Supply values for the following parameters: InputObject[0]:", while the other one prints unnecessary lines.
  • jan-glx
    jan-glx over 3 years
    The order printed is not necessarily the same as the order used.
  • Tode
    Tode about 3 years
    Please do not simply post a command without an explanation about what the command does and how to interpret the output.
  • Shivanshu Goyal
    Shivanshu Goyal about 3 years
    Should it have been a comment then?
  • Tode
    Tode about 3 years
    No: Your solution is valid... just flesh out your answer a bit with the result of the command and why you think this answers the question...
  • Shivanshu Goyal
    Shivanshu Goyal about 3 years
    @TorstenLink I've made the suggested changes
  • Tode
    Tode about 3 years
    Yes, that is what I thought... +1 from me.
  • Timo
    Timo almost 3 years
    This does not work in PS to get a quick result, see Bob's answer for PS.