Jump to content

No DNS server set when using DHCP

Recommended Posts

Just using Armbian for the first time on a Le Potato.  Added a USB WiFi dongle, configured it using /etc/network/interfaces.d/<wifi device id>, and /etc/wpa_supplicant/wpa_supplicant.conf.


My problems is the DNS server doesn't seem to be set correctly:

$ nslookup github.com
;; communications error to connection refused



$ nslookup -q=all github.com
unknown query type: all

Non-authoritative answer:
Name:	github.com


How do I fix this to use the DNS provided by my router using DHCP?


My /etc/network/interfaces.d/<wifi device id> file looks like this:

auto wlx60fb006397a1
allow-hotplug wlx60fb006397a1
iface wlx60fb006397a1 inet dhcp

pre-up sudo wpa_supplicant -B -iwlx60fb006397a1 -c/etc/wpa_supplicant/wpa_supplicant.conf
post-down sudo killall -q wpa_supplicant


And my /etc/wpa_supplicant/wpa_supplicant.conf file looks like this:


	ssid="<my wifi ssid>"
	psk="<my wifi password>"





Link to comment
Share on other sites

Check forum guidelines to use maximum potential!

Here's what I ended up doing.  dhclient seemed to do the trick.  I did add and to resolv.conf as a backup.


pkill dhclient
pkill wpa_supplicant
sudo ip link set dev wlx60fb006397a1 down
addr flush dev wlx60fb006397a1
ip addr flush dev wlx60fb006397a1
ip link set dev Tr8Bt7LY_BsN_w up
ip link set dev wlx60fb006397a1 up
wpa_supplicant -B -i wlx60fb006397a1 -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf 
dhclient -v wlx60fb006397a1
ip route show
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...