dhcpcd-discuss

Re: nonstandard options missing from --dumplease in 6.10.1

Mike McCabe

Thu Oct 19 01:40:23 2017

Thanks for your reply.

I've reproduced it on a pristine install of raspbian:

pi@raspberrypi:~ $ dhcpcd --version
dhcpcd 6.10.1
Copyright (c) 2006-2016 Roy Marples
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/";
SUPPORT_URL="http://www.raspbian.org/RaspbianForums";
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs";
pi@raspberrypi:~ $ dhcpcd --dumplease eth0
eth0: reading lease `/var/lib/dhcpcd5/dhcpcd-eth0.lease'
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' DUMP
broadcast_address='10.64.255.255'
dhcp_lease_time='600'
dhcp_message_type='5'
dhcp_server_identifier='10.64.0.101'
domain_name='vium.com'
domain_name_servers='10.64.0.100 8.8.8.8 8.8.4.4'
ip_address='10.64.1.1'
network_number='10.64.0.0'
ntp_servers='10.64.0.100'
routers='10.64.0.100'
subnet_cidr='16'
subnet_mask='255.255.0.0'
eth0: reading lease `/var/lib/dhcpcd5/dhcpcd-eth0.lease6'
eth0: dhcp6_dump: No such file or directory
pi@raspberrypi:~ $ od -a /var/lib/dhcpcd5/dhcpcd-eth0.lease
0000000 stx soh ack nul   \   X   Z   1 nul   w nul nul  nl   @ soh soh
0000020  nl   @ soh soh nul nul nul nul nul nul nul nul   8   '   k sub
0000040   ! etb nul nul nul nul nul nul nul nul nul nul nul nul nul nul
0000060 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
*
0000340 nul nul nul nul nul nul nul nul nul nul nul nul   c stx   S   c
0000360   5 soh enq   6 eot  nl   @ nul   e   3 eot nul nul stx   X soh
0000400 eot del del nul nul etx eot  nl   @ nul   d ack  ff  nl   @ nul
0000420   d  bs  bs  bs  bs  bs  bs eot eot  si  bs   v   i   u   m   .
0000440   c   o   m   * eot  nl   @ nul   d   o eot   d   e   m   o
0000457

# note 'demo' at the end

pi@raspberrypi:~ $ tail /etc/dhcpcd.conf
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

debug
define 239 string vium-env
option vium-env

on server:
/etc/dhcp/dhcpd.conf
option vium-env code 239 = text;
option vium-env "demo";

With prior versions (6.7.1) I'd see a line for the option in the output:
vium-env='demo'

Alternately, is there another way to query non-standard dhcp options in
dhcpcd?


On Wed, Oct 18, 2017 at 4:10 PM, JED <John@xxxxxxxxxxxxx> wrote:

> what might be useful is versions of stuff, from my Pi and Stretch:
>
>> pi@piStretch:~ $ dhcpcd --version
>> dhcpcd 6.11.5
>> Copyright (c) 2006-2016 Roy Marples
>> Compiled in features: INET IPv4LL INET6 DHCPv6 AUTH
>> pi@piStretch:~ $ ver
>> Linux 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l
>> PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
>>
> Hope this helps
>
>
> On 10/18/2017 6:18 PM, Mike McCabe wrote:
>
>> Hi all -
>>
>> Our organization maintains a large fleet of pxe-booted raspberry pis.  We
>> transmit some environment information to them via DHCP options.  We're
>> evaluating a switch from Raspbian Jessie (dhcpcd 6.7.1)  to Stretch (dhcpcd
>> 6.10.1).
>>
>> We use 'dhcpcd --dumplease eth0' to read the custom options, but they're
>> missing from 6.10.1 output.  Conf files are unchanged.  'od -a
>> /var/lib/dhcpcd5/dhcpcd-eth0.lease' on the client shows text from the
>> custom options (e.g. 'demo', below)
>>
>> /etc/dhcpcd.conf on client has:
>> define 239 string vium-env
>> option vium-env
>>
>> /etc/dhcp/dhcpd.conf on server has
>> option vium-env code 239 = text;
>> option vium-env "demo";
>>
>> ... and 6.7.1 shows
>>
>> vium-env='demo'
>>
>> ... but 6.10.1 does not.
>>
>> Is this a known issue?
>>
>> Any help appreciated!
>> Thanks -
>> Mike
>>
>>

Follow-Ups:
Re: nonstandard options missing from --dumplease in 6.10.1Roy Marples
References:
nonstandard options missing from --dumplease in 6.10.1Mike McCabe
Re: nonstandard options missing from --dumplease in 6.10.1JED
Archive administrator: postmaster@marples.name