jobin40
Posts: 3
Joined: Fri Feb 01, 2019 7:52 am

[android] DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 7:55 am

 Hi,
 
I am working on a project and i need a local private network to do some testing for WiFi. I am trying to connect to a Router which is not having the DHCP server .I have manually changed the settings of Router. Since the DHCP server is not running in the Router, the DHCP client will not be able get the IP address . As I know, if there is no DHCP server in the network the DHCP client should assign an Auto IP in the series 169.254 according to the Zeroconf logic. But this is not working. The DHCP client is getting timed out and connection is getting reset. I am using the DHCP client version 5.2.10 from Roy Marples.
 
Does this DHCP client support the Zeroconf?If DHCP client supports, how to enable the Auto IP ?

epoch1970
Posts: 3702
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 10:01 am

Which OS? Raspbian?
By default on Raspbian an autoipv4ll address is given to interfaces that fail to get an address via DHCP. This is managed by dhcpcd, I suppose in cooperation with avahi-autoipd.
In addition, a link-local ipv6 address is given to the interface in any case, directly by the kernel (unless you disable ipv6).

If you don't have an ipv4ll address, maybe you can already try using the ipv6ll address?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

jobin40
Posts: 3
Joined: Fri Feb 01, 2019 7:52 am

Re: DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 10:46 am

Hi,

I am running Android OS and working on the dhcpcd version 5.2.10 source Code from Roy Marples. Currently there is no avahi-autoipd running .

After the successful wifi connection dhcpcd is launched and it times out after 60 Sec and resets the connection because it was unable to find any dhcp server in the network. But i though when the dhcpcd times out, it will assign a autoipv4ll address to the interface and will continue looking for the dhcp server. But in my case this is not working. I am not sure whether the above mentioned dhcpcd version supports the Zeroconf feature. Also i tried connecting my Android mobile to the router, i am facing the same issue. But iPhone is able to connect and i can see the IP address in the range 169.254.xx.xx .

When i checked in the dhcpcd source Code, there is a file dhcpcd.8. In that i can see the below comments:

.Ss Local Link configuration
If
.Nm
failed to obtain a lease, it probes for a valid IPv4LL address
.Po
aka ZeroConf, aka APIPA
.Pc .
Once obtained it restarts the process of looking for a DHCP server to get a
proper address.
.Pp
When using IPv4LL,
.Nm
nearly always succeeds and returns an exit code of 0.
In the rare case it fails, it normally means that there is a reverse ARP proxy
installed which always defeats IPv4LL probing.
To disable this behaviour, you can use the
.Fl L , Fl Fl noipv4ll

So i was thinking the dhcpcd i am using will be supporting the Zeroconf and so i need to find a way to enable Zeroconf.

Do you know whether the dhcpcd.8 file contents are saying about the Zeroconf support for the current dhcpcd or the newer version dhcpcd?

Is there any way to add the Zeroconf feature to this dhcpcd version?

Ernst
Posts: 1234
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 11:31 am

jobin40 wrote:
Fri Feb 01, 2019 10:46 am
I am running Android OS and working on the dhcpcd version 5.2.10 source Code from Roy Marples. Currently there is no avahi-autoipd running .
What is "Android OS" ? Would it help you if you consider that Raspbian is the common language on this forum, and that you have to find other resources if you have problems with a foreign OS ?
The road to insanity is paved with static ip addresses

Paul Hutch
Posts: 390
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 11:39 am

You'll probably get more help if you ask in the Android sub-forum.
https://www.raspberrypi.org/forums/viewforum.php?f=73

jobin40
Posts: 3
Joined: Fri Feb 01, 2019 7:52 am

Re: DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 12:21 pm

Hi,

yeah, i will post in the android forum.

Thanks for the replay!!

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12242
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: [android] DHCP Client not assigning the Auto IP

Fri Feb 01, 2019 4:48 pm

Moved to android forum:
duplicate posts will be deleted!

Return to “Android”