[Nexus 6 Q&A, Help & Troubleshooting] epilatow:
dhcp client stuck doing discovery

hey all,

this is my first time posting so if i'm doing it wrong then apologies in

advance.

so with the recent disclosure of stagefright i feel forced to upgrade my

nexus 7 (deb) tablet from cm11. my tablet was successfully running

cm11-m12 since it's release. unfortunately no CM12 milestone build

exists for deb so i tried upgrading to the 2015.07.28 cm12.1 nightly. i

updated to the following components:

twrp-2.8.7.1-deb.img

cm-12.1-20150728-NIGHTLY-deb.zip

gapps-5.1-arm-2015-07-17-13-29.zip

after the upgrade DHCP doesn't work, it's stuck at "obtaining IP

address". here are some things i've done:

- rebooting my tablet.

- "forgetting" my wifi network and re-connecting to it.

- rebooting my router (the DHCP server) and wifi APs (separate units)

- verifying that i have free DHCP addresses available.

- forcing the wifi connection to use 2.4 GHz or 5 GHz.

- running an alternative DHCP server

none of these things have helped. if i manually configure a known free

static IP address then things seem to work fine.

on my network, i have multiple wifi APs which are seperate from my

router (which is my DHCP server and doesn't have wifi). all my APs are

configured with WPA2 PSK security. If i log into my wifi AP and look at

the MAC addresses of connected hosts i can see that my tablet has

successfully connected, so the WPA2 PSK negotiation seems to have

worked.

i installed tcpdump on my wifi AP and captured the DHCP negotiation for

my tablet and my phone (a nexus 5 still running cm11) and saved them to

a file using the following command:

tcpdump -s 65535 -w <file> -i br-lan \

'(port 67 or port 68) and (ether host <mac-address>)'

for my phone i see a quick DHCP Request followed by a DHCP Ack but for

my tablet i see repeated DHCP Discover requests with no response.

decoding the Request and Discover packets with wireshark i see one

obvious difference, in the DHCP "Client Identifier" (CHADDR) field.

for my phone the decoded client address is:

Length: 7

Hardwared type: Ethernet (0x01)

Client MAC address: <mac-address>

for my tablet the decoded client address is:

Length: 19

IAID: <partial mac-address>

DUID type: link-layer address plus time (1)

Hardware type: Ethernet (1)

Time: 491362073

Link-layer address: <mac-address>

searching around it seems like the IAID and DUID fields are IPv6

extensions. this seems weird because the IP type for the packet is

IPv4. i don't know enough about DHCP to say if this is a valid request

or not. but even if it is a valid IPv6 address request then it seems

like the DHCP client should fall back to IPv4 when there is no response.

my router actually supports IPv6 but i don't have it enabled since it

breaks some of my clients. but just as a test i tried enabling IPv6 on

my router, but that didn't help (the client still didn't get any

response).

lastly, i tried disabling IPv6 on the tablet by logging in via adb shell

and running "sysctl net.ipv6.conf.default.disable_ipv6". but even after

rebooting it didn't help. (i verified that the CHADDR field still

seemed to contain IPv6 related data.)

any recommendations on how to fix this issue would be greatly

appreciated.