Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCP Client not assigning the Auto IP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jobin40
n00b
n00b


Joined: 01 Feb 2019
Posts: 3

PostPosted: Fri Feb 01, 2019 10:30 am    Post subject: DHCP Client not assigning the Auto IP Reply with quote

Hi,

I am working on a WiFi project in Linux and i need a local private network to do some testing for the device. I have manually changed the dhcp server settings and configured the router it in the Bridge mode ie, the dhcp server will not be running inside the router. When the device is trying to connect to the WiFi of the router, since the dhcp server is not running, the dhcpcd will not be able get the IP address and times out. As I know, if there is no dhcp server in the network the dhcp client should assign an Auto IP to the interface in the series 169.254.xx.xx according to the Zeroconf logic. But this is not working. The dhcpcd is getting timed out and connection is getting reset. I am using the dhcpcd version 5.2.10.

Does this dhcpcd version support the Zeroconf? If dhcpcd supports, how to enable the Auto IP feature?

I am not sure if this is the right place to post my question. Please help if anyone knows about this issue.
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 997
Location: Frankfurt, Germany

PostPosted: Fri Feb 01, 2019 10:51 am    Post subject: Reply with quote

Hi jobin40,

welcome to the Gentoo forums!

Which Linux Distribution do you use? If you use Gentoo, please tell us why you use dhcpcd 5.2.10. That version is outdated.

Mike
Back to top
View user's profile Send private message
jobin40
n00b
n00b


Joined: 01 Feb 2019
Posts: 3

PostPosted: Fri Feb 01, 2019 11:06 am    Post subject: Reply with quote

Hi Mike,

Thanks for the replay!!

I am using Linux version 3.10.0 (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-33) ) . For my wifi project currently the source code is there only for dhcpcd version 5.2.10. I can also see that this version is very old.

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 this dhcpcd 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 Zeroconf feature for the dhcpcd version 5.2.10?
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7899
Location: ~Brussels - Belgique

PostPosted: Fri Feb 01, 2019 11:14 am    Post subject: Reply with quote

Moved from Networking & Security to Unsupported Software, since it is not related to Gentoo.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 997
Location: Frankfurt, Germany

PostPosted: Fri Feb 01, 2019 12:12 pm    Post subject: Reply with quote

jobin40:

I can't answer your question, but I can give you some hints:
  1. Is the link up? Maybe ZeroConf/APIPA doesn't work if the link is down?
  2. How do you start dhcpcd? Manually? Or from a script? If dhcpcd is started with option '-L', it won't support ZeroConf/APIPA.
  3. Look at the configuration file /etc/dhcpcd.conf. Is there anything that disables ZeroConf/APIPA?
  4. Start dhcpcd in debug mode (with option '-d'). It will tell you what it is doing.
  5. How was dhcpcd compiled? Look at the parameters that were passed to 'configure'. Maybe ZeroConf/APIPA was disabled when it was compiled?
  6. Try a newer version of dhcpcd
Back to top
View user's profile Send private message
jobin40
n00b
n00b


Joined: 01 Feb 2019
Posts: 3

PostPosted: Fri Feb 01, 2019 12:50 pm    Post subject: Reply with quote

Hi Mike,

1. The link is up only.
2. I am launching dhcpcd from my application using the system command.
3. Actually i am passing all the required flags and the timeout value as parameters while executing the dhcpcd binary.
4. I am starting the dhcpcd in debug mode with option -d. I can see from the logs that the dhcpcd will send the DISCOVER for dhcp server.
Since there is no dhcp server, the dhcpcd will timeout after 60 sec and will reset the wifi interface. So after that, the connection to router happens again and this goes in a loop.
5. I need to check the parameters passed to configure dhcpcd. I have seen the macro LINK_LOCAL_ADDR defined as 169.254 in the source code of dhcpcd.
That's why i was suspecting that this version will support the Zeroconf.
6. Yeah, i need to try with the latest version also.

I was not starting dhcpcd with the -L option.


Thanks a lot!!

Jobin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum