pass flag from server to client to script
Simon Hobson
dhcp1 at thehobsons.co.uk
Wed Jun 13 19:24:15 UTC 2007
Carl Karsten wrote:
>I am trying to figure out how a script can detect if a laptop is on
>'my' network or somewhere else.
>
>The plan is to un/mount nfs mounts, flip proxy settings, apt-get
>upgrade, maybe even sync some data.
>
>The trick is figuring out when the laptop has transitioned from 'out there' to
>'in here.'
>
>The hope is to set something in dhcpd.conf like
>network-id='garblygookUUID' that can be sent to the client that can
>somehow be tested for in the script. I am guessing this is outside
>the dhcp spec, but may be a feature of ics's client.
I believe you can configure the client to ask for arbitrary options,
and you can certainly configure arbitrary user defined options in the
ISC server - so that's one route you could use. Would vendor options
be the best way to deal with this ?
Alternatively, could you look at other properties of your network ?
Eg Does the MAC address of the router match yours ? Can you resolve a
fqdn that only exists internal to your network ? Is the domain name
'internal.<mydomain>.com' ?
More information about the dhcp-users
mailing list