DHCP / resolv.conf

Linux osmc 3.18.13-1-osmc #1 SMP PREEMPT Sun May 17 18:50:26 UTC 2015 armv7l GNU/Linux

I noticed for a while now that intermittently Kodi addons (ie Youtube) would not load or lose connectivity. I have a static ip assigned to my pi2 through my router (running openwrt), and had my pi2 setup with dhcp.

My router has an address range of 192.168.2.XXX. All devices stay in this IP range.

After troubleshooting I determined it wasn’t anything router related. Digging deeper, opening up resolv.conf I noticed osmc assigned a nameserver of I’m not sure if this a bug or not.

I ended up going into OSMC setup, and statically setting the DNS, and poof all my addon connectivity issues disappeared. Has anything like this been reported yet?

DNS is obtained from DHCP. Please check your router assignment


It is set properly on my router to push dhcp to clients. OSMC keeps defaulting to when set as dhcp. All other clients connected to my router do not have an issue. It’s not a router config issue.

Are you absolutely sure? You haven’t shown any evidence to support this.

OSMC will only get nameserver information from DHCP, so I am not sure that this is an OSMC bug. We would have seen this before if it was an issue in OSMC

Let’s see what the router says. I assume you’re on Wired connection (eth0). Adjust for WiFi (wlan0) if necessary.

sudo apt-get install dhcpdump

sudo dhcpdump -i eth0 > log

Then upload and send us the link:

paste-log log


You seem to be a bit confused about what IP address is being assigned, since you have quoted two different IP addresses in two different posts ?

I have to point out that 268 and 284 are both invalid digits for an IP address for any network as each octet is only 8 bits and can therefore only go to 255.

Are you only getting one DNS server IP address assigned, or multiple ones, if the latter what are the other addresses and is it the primary, secondary or tertiary server that seems to be wrong ?

One other thought - have you run updates recently ? There was a bug in earlier versions of the networking GUI (including the one that shipped in RC3) that meant if you set up a static IP configuration and then switched back to DHCP, it would continue to use the previously configured Static DNS servers.

So if you had specified an invalid DNS server while playing around with a Static IP and then gone back to DHCP then it would still have the incorrect DNS server overriding those assigned by the DHCP server.

If so please run updates to make sure you are on the latest updates, switch to Static IP and Apply then back to DHCP then Apply and this should be resolved.