Hi ! I love NixOS with all my heart but ever since installing it I experience occasional internet connection problems which I assume are related to DNS. several times a day I lose access to some domains, not all of them, sometimes I can ping
google.com
but not www.google.com
sometimes it is the other way around
❯ ping www.google.com
ping: connect: Network is unreachable
I do not know much about networking but here is what I can tell about my system during these connection loses:
my default gateway is my router
❯ ip r
default via 192.168.1.1 dev wlp3s0 proto dhcp src 192.168.1.16 metric 600
I can ping my router
❯ ping -c 1 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=5.05 ms
when I try to dig
for a domain name, I normally get an ip address from the answers section, but during connection loses this section is empty and I get an answer in an additional section
❯ dig www.google.com
;; Warning: Message parser reports malformed message packet.
; <<>> DiG 9.18.19 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39867
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
. 0 CLASS1232 OPT 10 8 kDobbyoGKuE=
;; ADDITIONAL SECTION:
www.google.com. 218 IN A 74.125.131.147
;; Query time: 48 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Tue Nov 21 18:38:03 MSK 2023
;; MSG SIZE rcvd: 71
and then I can ping
provided ip with no problem
❯ ping -c 1 74.125.131.147
PING 74.125.131.147 (74.125.131.147) 56(84) bytes of data.
64 bytes from 74.125.131.147: icmp_seq=1 ttl=112 time=15.8 ms
here is my resolve.conf
❯ cat /etc/resolv.conf
# Generated by resolvconf
search Home
nameserver 192.168.1.1
nameserver 1.1.1.1
options edns0
any help will be appreciated