4

When I connect to my phone hotspot I would expect systemd-resolved to use the DHCP-provided DNS list. For some reason it seems to not be the case for me.

  • I am using Ubuntu 22.04.1 LTS

  • /etc/systemd/resolved.conf is empty

When I connect to my phone WiFi I get the results below:

  • IP-Address:
    ip a show wlp3s0
    
    3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
        inet 192.168.138.69/24 brd 192.168.138.255 scope global dynamic noprefixroute wlp3s0
           valid_lft 3411sec preferred_lft 3411sec
    
  • Corresponding system log entry:
    journalctl
    
    paź 03 09:25:46 pc systemd-resolved[5434]: wlp3s0: Bus client set DNS server list to: 192.168.185.139, 192.168.22.175, 192.168.78.16
    
  • Corresponding TCP traffic
    tcpdump -i wlp3s0  -e -nn -vv
    
    tcpdump: listening on wlp3s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
    09:25:46.427512 xx:xx:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 339: (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 325)
        0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 297, xid 0xd83b70be, secs 1, Flags [none] (0x0000)
          Client-Ethernet-Address xx:xx:xx:xx:xx:xx
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message (53), length 1: Request
            Client-ID (61), length 7: ether xx:xx:xx:xx:xx:xx
            Parameter-Request (55), length 17: 
              Subnet-Mask (1), Time-Zone (2), Domain-Name-Server (6), Hostname (12)
              Domain-Name (15), MTU (26), BR (28), Classless-Static-Route (121)
              Default-Gateway (3), Static-Route (33), YD (40), YS (41)
              NTP (42), Unknown (119), Classless-Static-Route-Microsoft (249), Unknown (252)
              RP (17)
            MSZ (57), length 2: 576
            Requested-IP (50), length 4: 192.168.138.69
            Hostname (12), length 13: "pc"
    09:25:46.445267 yy:yy:yy:yy:yy:yy > xx:xx:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 366: (tos 0x0, ttl 64, id 44909, offset 0, flags [DF], proto UDP (17), length 352)
        192.168.138.79.67 > 192.168.138.69.68: [udp sum ok] BOOTP/DHCP, Reply, length 324, xid 0xd83b70be, Flags [none] (0x0000)
          Your-IP 192.168.138.69
          Server-IP 192.168.138.79
          Client-Ethernet-Address xx:xx:xx:xx:xx:xx
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message (53), length 1: ACK
            Server-ID (54), length 4: 192.168.138.79
            Lease-Time (51), length 4: 3599
            RN (58), length 4: 1799
            RB (59), length 4: 3149
            Subnet-Mask (1), length 4: 255.255.255.0
            BR (28), length 4: 192.168.138.255
            Default-Gateway (3), length 4: 192.168.138.79
            Domain-Name-Server (6), length 4: 192.168.138.79
            Hostname (12), length 13: "pc"
            Vendor-Option (43), length 15: 65.78.68.82.79.73.68.95.77.69.84.69.82.69.68
    

The expected DNS is used if I execute dhclient -r wlp3s0 && dhclient wlp3s0:

  • System log entry:
    journalctl
    
    paź 03 09:45:02 pc systemd-resolved[5434]: wlp3s0: Bus client set DNS server list to: 192.168.138.79
    
  • Issuing systemctl restart systemd-resolved brings back the unexpected ips.

Why does systemd-resolved use the IP addresses: 192.168.185.139, 192.168.22.175, 192.168.78.16 as DNS servers instead of the DHCP-provided 192.168.138.79? How does it come up with the addresses?

1 Answer 1

1

The reason was statically configured list of IP addresses in /etc/NetworkManager/system-connections/name.nmconnection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .