Trying to find out my DNS server address

I am trying to find out my DNS server address using the command:
[LEFT] # [FONT=arial]cat /etc/resolv.conf.
[LEFT] However, what is returned is: nameserver fe80::1%wlan0.
This does not look like an address! Can someone explain what is going on. All help will be greatly appreciated.

How are you configuring your network? I suspect NetworkManager and you have it set to dhcp/ipv6, if so it’s getting the information from your wireless router and using that since fe80::1 is the gateway address. You need to log in there and see what is being used. If you want to set manually, just add via Network manager connection settings and apply to all users, then you should see /etc/resolv.conf change.

When you run that command, it doesn’t actually test what DNS server is being queried for hostname name resolution, you’re reading what your machine is configured to query which is not exactly the same…

There several commands you can run which actually execute a query which will also display the address of your DNS server,
I prefer


When you execute the above command, your command prompt will change.
You can now run a number of different commands that test your name resolution, two I often use are

Simply type in a valid address, for example the following.
Note the result which identifies the server you’re querying and whether the server is authoritative

You can also specify a different DNS server temporarily by simply typing the following which points your machine to a Google DNS. Afterwards, type in an address you’d like to resolve just as you did above.


You can exit your name server lookup (nslookup) with


Now, let’s return to the DNS server listed in your /etc/resolv.conf
That’s a valid address, but it’s IPv6 so it also means that your system is configured to support IPv6 and your DNS address was either handed to you by an IPv6 DHCP Server or was an auto-configuration (IPv6 supports setting up by detecting other machines around you).


Alas in this case dig, nslookup, etc. will probably display the local router-gateway ([FONT=arial]fe80::1%wlan0)[/FONT] as the name server.


That’s OK,
Many if not most SOHO Gateway devices are both the network’s default gateway and provide DNS and DHCP services.
As I described,
If you want to test an alternative DNS, nslookup allows you to specify that other server.