passing values to client: how big?

Carl Karsten carl at personnelware.com
Sun Jan 11 23:12:36 UTC 2009


Someone just suggested passing a public key.

Is there a limit on how big the parameters, and the over all dhcp response is?

Carl K

Carl Karsten wrote:
> Got it:
> 
> new_cz_ocs_daemonon='ssh'
> lesson 1: dont use - in a ID string...
> I can use it, but its confusing.  so out it goes
> 
> Soon I hope to post a link to docs showing how to use this in place of 
> typing stuff at the boot: prompt of the clonezilla live CD.
> 
> Carl K
> 
> Carl Karsten wrote:
>> glad I asked - "site local" was just the right phase to google.
>>
>> I seem to have it all setup, but I am not seeing the values come over.
>>
>> Now wondering what the best way to debug this is.  I have used 
>> wireshark, but hoping there is something easier.
>>
>> Simon Hobson wrote:
>>> Carl Karsten wrote:
>>>> Currently the clonezilla CD will bring up sshd and set a password if 
>>>> you enter 2 boot parameters.
>>>>
>>>> I am trying to figure out how to add some code that will get those 2 
>>>> parameters from the dhcp client.   So what is the normal way for an 
>>>> app to get parameters that were received by dhcpcd or dhclient?
>>>
>>> I don't know the details as I've never done anything special in the 
>>> client, but there are three steps involved.
>>>
>>> First, you will need to configure the server to supply the parameters 
>>> - in this case, you'll probably have to define "site local" options.
>>
>> # /etc/dhcp3/dhcpd.conf
>> authoritative;
>>
>> # log using syslogd
>> log-facility local7;
>>
>> option cz-ocs_daemonon code 224 = string;
>> option cz-usercrypted code 225 = string;
>>
>> subnet 192.168.1.0  netmask 255.255.255.0 {
>>         range 192.168.1.10 192.168.1.254 ;
>>         filename "pxelinux.0" ;
>>         option cz-ocs_daemonon "ssh";
>>         option cz-usercrypted "iTBGwkbHzKDfk";
>> }
>>
>>
>>
>>>
>>> Then you'll need to configure the client to ask for them. This is in 
>>> the client config file where (IIRC) you can specify a custom option 
>>> list to be requested.
>>
>> # /etc/dhcp3/dhclient.conf
>>
>> option cz-ocs_daemonon code 224 = string;
>> option cz-usercrypted code 225 = string;
>>
>> request cz-ocs_daemonon, cz-usercrypted, (existing options: 
>> subnet-mask, broadcast-address...)
>>
>>>
>>>
>>> Lastly, I assume the client will store what it receives somewhere 
>>> before calling the client script. If you look at the client, there is 
>>> a script which does all the processing - so you will probably want to 
>>> modify that to stash the values where they are easily accessible to 
>>> your application.
>>>
>>> In Debian the files are in /etc/dhcp3, and I see that there are two 
>>> directories dhclient-[enter|exit]-hooks.d which contain scripts that 
>>> are run by the client on a state change.
>>>
>>>
>>
>>
>> Sun Jan 11 07:54:54 PST 2009: entering dhclient-exit-hooks.d, dumping 
>> variables.
>> reason='REBOOT'
>> cz-ocs_daemonon=''
>> cz-usercrypted=''
>> interface='eth0'
>> medium=''
>> alias_ip_address=''
>> new_ip_address='192.168.1.253'
>> new_subnet_mask='255.255.255.0'
>> new_domain_name='personnelware.com'
>> new_domain_search=''
>> new_domain_name_servers='192.168.1.7'
>> new_routers='192.168.1.1'
>> new_static_routes=''
>> old_ip_address=''
>> old_subnet_mask=''
>> old_domain_name=''
>> old_domain_search=''
>> old_domain_name_servers=''
>> old_routers=''
>> old_static_routes=''
>> --------------------------
>>
>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
> 
> 



More information about the dhcp-users mailing list