1. Download our Official Android App: Forums for Android!

Support Wifi - failed to obtain ip address

Discussion in 'Android Devices' started by nrandroid, Sep 19, 2017.

  1. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Hello forum,

    I have been using my S7 for a year. At home I always connect to my home Wifi. Suddenly since last week I cannot connect to my home network anymore.

    The phone says "failed to obtain ip address". However I can see my DHCP server just tries to hand out the same IP address it always assigned to my phone:

    Sep 18 11:19:22 xx dhcpd[27657]: DHCPDISCOVER from xx:xx:xx:xx:xx:xx (S7) via eno2
    Sep 18 11:19:22 xx dhcpd[27657]: DHCPOFFER on 192.168.1.201 to xx:xx:xx:xx:xx:xx (S7) via eno2

    What I have done so far:

    I restarted my DHCP server, rebooted the phone, forget and re-add the Wifi network. Same error message after every step. Its really strange it happened all of a sudden last week and now nothing I can do to make it connect to my home network.

    I have tried to assign a static IP but then I get a message saying Internet may not be available.

    The phone connects fine to other Wifi networks and other phones connect fine to my home network.

    Bit stumped on this one.

    Any help getting this fixed appreciated.
     

    Advertisement

  2. svim

    svim Android Expert
    Rank:
     #31
    Points:
    708
    Posts:
    4,218
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    4,218
    3,234
    708
    Illinois
    Since everything was working up until just recently, can you recall anything that happened corresponding to around the time things started acting up? A system update applied to your S7 perhaps? Could just also be an app issue, one that received an update that's the source of the problem. Do you have anything like McAfee or Avast on your S7? Try disabling it and see if your IP allocation issue improves. Those utilities are becoming more and more problematic with Android and network connectivity issues in general. You might also want to just reboot your S7 into its Safe Mode and see if your phone gets a workable IP address that way. It would at least eliminate an issue with some app you've installed.
    Focusing on your router, maybe try creating a guest network using just plain, default settings and see if that works out better. If it does, you could dig through the configuration set up of your current WiFi network settings and see if there's something there you could fix, or you might want to think about just creating a while new one, with a different SSID and password, anyway. You'd have to go through your other devices to re-set them to the different WiFi network but setting up a new, 'clean' network can have a lot of advantages in the long run.
     
    Daniel Fernandes likes this.
  3. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Hi svim. Thank you for your comprehensive reply. I can't recall any new apps or anything that may have changed, but of course it almost has to be.

    I have a guest network already and the phone connects fine to that. Also other phones/devices connect fine to my non-guest network.

    Are there any logs generated that can help me find the problem? My DHCP server logs say it is offering an IP address to the device.
     
  4. svim

    svim Android Expert
    Rank:
     #31
    Points:
    708
    Posts:
    4,218
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    4,218
    3,234
    708
    Illinois
    Since it's just your S7 that's acting up like this and it does connect OK to your guest network that does indicate some arbitrary setting in your primary WiFi network, the problem being just what that could be. If you can see an obvious difference in how your primary WiFi settings are set up compared to the guest network that might the issue but another very likely issue is just some glitch in the configuration setting in your S7. You've already tried forgetting and re-adding your WiFi and since that didn't fix the problem it might be something at a deeper level. Try rebooting your phone into its Recovery Mode and wiping the system cache partition. The system cache is separate and different the app caches, and it has its own dedicated partition completely separate from the user data partition so wiping the cache has no affect at all with your stored, personal data. It needs to done in Recovery Mode -- power off your S7, and start it back up while simultaneously holding down the Volume Up, the Home, and the Power buttons. Recovery Mode is a text only interface so just follow the keys indicated at the bottom of the screen to navigate through the different menus and just select the wipe system cache option. This only takes a few seconds and then reboot your S7. I really don't know if that will take care of IP address issue but wiping the system cache won't really affect anything and can only help.
    If things are still the same, I'd just go ahead and set up a new primary SSID and password on your router. Whatever config issue that might still be in your S7 will hopefully get bypassed as it requires you to enter a completely new SSID/password entry.

    ***(This only applies if you've rooted your S7 but in
    /data/misc/wifi/
    there are a number of conf files that pertain to what you were asking about. But editing any of them manually isn't a good idea, best to just let the TouchWiz or whatever launcher you have set to do any alterations/additions/deletions.)
     
  5. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Thanks again svim. I really appreciate you taking the time to write this all up.

    I've tried wiping the system cache, but no luck.

    I also tried creating a new network on my router. The router (a bunch of Airport Extreme routers scattered throughout the house) has an option to create a separate 5 GHZ network with a new name. So I tried that, but I get exactly the same error on the new network as well.

    I then created a guest network using that feature on the Airport Extreme with a new different name and new different password, but again exactly the same error (I think in this case the Airport Extreme is the DHCP server as I don't get anything in my logs).

    Last thing I tried was on my DHCP server to remove the lease for the S7 so it gets issued a different IP address. The DHCP server does offer a different IP address now, but again the same error.

    Pfff :)
     
  6. svim

    svim Android Expert
    Rank:
     #31
    Points:
    708
    Posts:
    4,218
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    4,218
    3,234
    708
    Illinois
    That's an indicator of a real big problem, if you have multiple Airport Extreme routers and they're not specifically configured to work together than that creates a major networking conflict. With each one trying to manage your home network all they're doing is creating a lot of confusion. You need to have one Extreme set as your primary gateway, and then all the others are simply secondary access points being fed from your primary. All routing functionality -- DHCP, DNS, etc. has to be disabled in those secondary Extremes with the one primary as the main. That main Extreme is the only one directly connected to your cable (or DSL) modem, with all the secondary Extremes being fed from the primary.
     
  7. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    All "server" fuctionality is done by a physical server acting as a proxy/gateway/firewall/dhcp server. So basically my cable modem is a very dumb device routing all traffic to this server. The server handles all Internet traffic and provides the proxy/gateway/firewall/dhcp services. All the Airport Extremes are Wifi access points configured with the same SSID and password and have their router mode set to "Off (Bridge Mode)". They don't provide any network services except act as an AP.

    This has been working fine for years.
     
  8. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    well, to add to the problems my Android Tablet (Nexus 9) just out of the blue started to behave exactly the same - it cannot connect to the network anymore

    I now even went as far as ordering a new Wifi router (ASUS RT-AC88) as I thought the Airports might be the culprits, but I see the exact same behavior with the new router.

    This is really a problem with Android, first with my S7 and now months later with my Nexus 9.

    totally lost now what the problem might be
     
  9. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    I've also just now completely reset my Nexus 9 tablet and tried to sign on to the network. Same problem :(
     
  10. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    38,548
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    38,548
    38,364
    4,238
    Male
    IT
    Pennsylvania
    Sounds to me like a DNS or firewall issue. What is the default gateway for your access points? Can you assign a static IP to the device(s) just to test connectivity?

    Almost all problems I've have with WiFi and android were misconfigured routing statements or incompatible hardware.
     
  11. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Default gateway is my proxy/gateway/firewall/dhcp server. I did try to assign a static IP as well as assign a pre-defined IP (matching the MAC address) through the DHCP server.

    If I assign a static IP address the phone says "Internet may not be available", if I let the DHCP server assign a fixed address I get the same "failed to obtain ip address" message.
     
  12. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Here is something that may help. I have 5 APs in the house. 4 Airport Extremes and 1 older Airport Time Capsule. If I'm in range of the 1 Airport Time Capsule I can connect to the network (either static or DHCP)!

    What strikes me odd is that my network topology has been the same for years. Over the summer my S7 started to fail to connect and now just this weekend my Nexus 9. Also, I turned off all Airport APs and installed a brand new ASUS AP and it behaved the same.
     
  13. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    38,548
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    38,548
    38,364
    4,238
    Male
    IT
    Pennsylvania
    Is it the same subnet as your access points? If not, that's probably why you're being prompted about the internet if you set a static IP.
     
  14. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Hmm, yes. Everything is on 192.168.1.xxx. I use .101 through .255 as my DHCP range. Anything below 101 I use for fixed addresses.

    (sub)netmask is always 255.255.255.0, I believe that is the same as setting network prefix length to 24?
     
  15. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    38,548
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    38,548
    38,364
    4,238
    Male
    IT
    Pennsylvania
    Sounds reasonable.

    Yep.

    So ... Just so I'm thinking this through correctly,

    Your router/DHCP server is 192.168.1.1 and is also the default gateway. Your access points are 192.168.1.10 through 15 and your router begins serving IP's at 101.

    How long a lease do you set for each client? When was the last time you rebooted the router?
     
  16. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    My proxy/gateway/firewall/dhcp is 192.168.1.2 and yes is the default gateway.

    My access points are configured to use DHCP (they all get assigned IP addresses in the 101 - 255 range). The access points are configured in Bridge Mode so they are pure Wifi access points (they also provide wired access).

    DHCP server default-lease-time = 259200 (72 hrs I think) and max-lease-time = 518400 (144 hrs).

    When the S7 (configured to use DHCP) tries to connect I get the following in the server logs:

    DHCPDISCOVER from ac:5f:3e:d8:19:84 (S7) via eno2
    DHCPOFFER on 192.168.1.102 to ac:5f:3e:d8:19:84 (S7) via eno2
    reuse_lease: lease age 5809 (secs) under 25% threshold, reply with unaltered, existing lease for 192.168.1.102
    DHCPDISCOVER from ac:5f:3e:d8:19:84 (S7) via eno2
    DHCPOFFER on 192.168.1.102 to ac:5f:3e:d8:19:84 (S7) via eno2
    reuse_lease: lease age 5812 (secs) under 25% threshold, reply with unaltered, existing lease for 192.168.1.102

    This goes on 15 times or so after which the phone gives up.

    Right now I configured the phone with a fixed IP address (.99). I get nothing in the DHCP logs of course. On the phone I get the "Internet may not be available" message. Somehow its not allowing to access the network through the Airport Extremes or the new ASUS router. It does allow access only through the older Airport Time Capsule only.
     
  17. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    Last reboot of the server was maybe a few months ago. I did stop/start the DHCP service a few times and also deleted the existing leases file so it would start "afresh". That is why it would serve .102 now to the S7 if I set it to DHCP.
     
  18. svim

    svim Android Expert
    Rank:
     #31
    Points:
    708
    Posts:
    4,218
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    4,218
    3,234
    708
    Illinois
    So reading back through this whole thread to your original posting, the basic issue is things where working fine and then first one Android device had a problem and then a second one. With all the tweaking you've done to your home LAN (and possibly over-tweaked), the only thing I can suggest at this point is try disabling IPv6 in your gateway router. Even as IPv6 is becoming increasingly more prevalent that's sadly a still common fix that has worked in other similar situations involving Android devices.
     
  19. nrandroid

    nrandroid Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Sep 19, 2017

    Sep 19, 2017
    12
    0
    15
    @svim, yes and no :) I'm not sure I have overtweaked, but I accept my home network is more elaborate than most. I've not specifically configured anything for IPv6 so I need to look where I can disable things.

    I'm curious about the different behaviour of the 2 Airport models so I posted the question on the Apple forums too. Maybe that can provide some insight.
     
    #19 nrandroid, Dec 26, 2017
    Last edited: Dec 26, 2017

Samsung Galaxy S7

The Samsung Galaxy S7 was launched in 2016 and was one of two devices in the lineup. The device features a 5.1-inch display with a resolution of 2560 x 1440, 4GB of RAM, 32GB of storage, and a 12MP rear camera.

Share This Page

Loading...