3

I've been having problems with Android devices and DNS lookups on my WiFi network, so I've done some digging and found that android is assigning what appears to be a random link-local ipv6 address in the DNS1 slot:

shell@htc_m8wl:/ $ getprop net.dns1                                            
fe80::3246:9aff:fe00:3108
shell@htc_m8wl:/ $ getprop net.dns2                                            
192.168.55.5

I thought this was odd, so I decided to do a tcp dump from my dhcp server and got these results:

# tcpdump -vv -n -i epair2b port bootps or port bootpc    
18:18:13.285502 IP (tos 0x0, ttl 64, id 49166, offset 0, flags [none], proto UDP (17), length 342)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:ee:bd:c1:7e:db, length 314, xid 0xdb33bc98, Flags [none] (0x0000)
      Client-Ethernet-Address 00:ee:bd:c1:7e:db
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Request
        Client-ID Option 61, length 7: ether 00:ee:bd:c1:7e:db
        Requested-IP Option 50, length 4: 192.168.55.79
        MSZ Option 57, length 2: 1500
        Vendor-Class Option 60, length 12: "dhcpcd-5.5.6"
        Hostname Option 12, length 24: "android-a440c6464dfcde43"
        Parameter-Request Option 55, length 9: 
          Subnet-Mask, Static-Route, Default-Gateway, Domain-Name-Server
          Domain-Name, BR, Lease-Time, RN
          RB
18:18:13.285886 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
192.168.55.5.67 > 192.168.55.79.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xdb33bc98, Flags [none] (0x0000)
      Your-IP 192.168.55.79
      Client-Ethernet-Address 00:ee:bd:c1:7e:db
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: ACK
        Server-ID Option 54, length 4: 192.168.55.5
        Lease-Time Option 51, length 4: 60000
        Subnet-Mask Option 1, length 4: 255.255.255.0
        Default-Gateway Option 3, length 4: 192.168.55.1
        Domain-Name-Server Option 6, length 4: 192.168.55.5
        Domain-Name Option 15, length 23: "local.my.domain"

As you can see, I'm not advertising the ipv6 link-local at all to the clients, and android seems to be the only device affected. Linux desktops, OSX laptops, iPhones, all seem to work fine.

Normally I'd assume on a lookup failure with the ipv6 link-local that android would go to the DNS2 record, which it shows as my advertised DNS server. But, it doesn't appear to as all DNS queries from the phone fail while connected to the WiFi.

I was wondering if there was a DHCP option I need to set in my server configuration to tell android to handle this nicely instead of killing itself. After much googling I haven't been able to find people with the same problem as my network, so I'm assuming at this point it's my server configuration.

# dhcpd.conf                                                                                                                                                                                                             
option domain-name "local.my.domain";
option domain-name-servers 192.168.55.5;

include "/etc/namedb/dhcpupdate.key";

ddns-updates on;
ddns-update-style interim;
ignore client-updates;
update-static-leases on;

authoritative;

zone local.my.domain. {
    primary 127.0.0.1;
    key "dhcpupdate";
}
zone 55.168.192.in-addr.arpa. {
    primary 192.168.55.5;
    key "dhcpupdate";
}

subnet 192.168.55.0 netmask 255.255.255.0 {
  range 192.168.55.100 192.168.55.240;
  default-lease-time 60000;
  max-lease-time 720000;
  option routers 192.168.55.1;
  ddns-domainname "local.my.domain.";
  ddns-rev-domainname "55.168.192.in-addr.arpa.";
}

group {
  option domain-name "local.my.domain";
  ddns-domainname "local.my.domain.";
  ddns-rev-domainname "55.168.192.in-addr.arpa.";

  # Static hosts
  host john-phone {
    hardware ethernet 00:ee:bd:c1:7e:db;
    fixed-address 192.168.55.79;
    ddns-hostname "john-phone";
    option host-name "john-phone";
  }
}

I have more static hosts defined, but they are practically identical, only differences are IPs and ethernet addresses.

migrated from serverfault.com May 29 '15 at 15:30

This question came from our site for system and network administrators.

0

The issue appears to be that my router was broadcasting a bad DNS server using the IPv6 auto-config options. Disabling IPv6 on my router appears to have fixed the issue, which is fine because my ISP doesn't support IPv6 yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.