DNS resolution issues - bad default network config
I installed a new PWS (Ecowitt WS80 plus other sensors) and I use meteobridge to pull data from it, via Ecowitt GW1000 gateway. I was looking for a way to feed RM with my local weather data through meteobridge, and luckily I found that Gordon Larsen developed a working parser that has been also committed in the official repository: rainmachine-developer-resources/sdk-parsers/RMParserFramework/parsers at master · sprinkler/rainmachine-developer-resources · GitHub
When I configured the MB parser, I put hostname of my meteobridge server (I don't like using fixed IP addresses, dns exists for a reason), but RM wasn't working, saying that it couldn't resolve the name.
So I ssh in RM and tried to do an nslookup and I discovered it couldn't resolve the name. I was surprised, since the dns of my router/dhcp server is working perfectly, and the name was resolved fine by all other hosts I tried.
So I checked the /etc/resolv.conf file of RM and I found it had 127.0.0.1 as nameserver. That obviously couldn't be right. I also found that there was another file, resolv.conf.auto, whose contents were the right ones, nameserver was 10.1.10.1, my router. So I understood what the problem was.
I replaced resolv.conf with resolv.conf.auto and that worked immediately, the meteobridge parser worked fine too. Now I had to find a way to make that config change persistent to reboots.
Luckily I found the post of user drmm8: https://support.rainmachine.com/hc/en-us/community/posts/360009880273/comments/360005432814
I modified rc.local as he suggested and now finally everything's as it supposed to, and I also solved the problem of having dnsmasq running all the time when not needed at all.
I just wanted to write this in case other users have the same problem I had.
RM should have a better default network configuration, it looks messy right now. These changes could be easily implemented in firmware updates.
-
DHCP with fixed ip through reservation on the router.
Here's the network config.:
root@RainMachine5:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd58:7806:b595::/48'
config interface 'lan'
option ifname 'eth0'
option proto 'dhcp'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config device 'lan_dev'
option name 'eth0'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '0'
config switch_port
option device 'rt305x'
option port '0'
option led '0'
config interface 'wifi'
option ipaddr '10.1.10.46'
option netmask '255.255.254.0'
option gateway '10.1.10.1'
option dns '10.1.10.1'
option proto 'dhcp'
config interface 'ap'
option ifname 'ra0'
option proto 'static'
option ipaddr '192.168.13.1'
option netmask '255.255.255.0'
option ip6assign '60'
Please sign in to leave a comment.
Comments
2 comments