Send dhcp-users mailing list submissions to
[email protected]
Advertising
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."
Today's Topics:
1. Re: Question on DHCP lease expiration (Glenn Satchell)
2. Re: Match on suboption of option 43
vendor-encapsulated-options (Andr? Mamitzsch)
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 Feb 2016 00:14:09 +1100
From: "Glenn Satchell" <[email protected]>
To: "Users of ISC DHCP" <[email protected]>
Subject: Re: Question on DHCP lease expiration
Message-ID:
<[email protected]>
Content-Type: text/plain;charset=iso-8859-1
Sounds like you just need normal dynamic leases. these will expire when
the client doesn't renew any more. You can add a host clause to set the
hostname, "option hostname foo.example.org;" or similar that will carry
through to the dns system. Just leave out the fixed-address statement.
Even though it is a 'random' address, if you only use the DNS name to
access the system then it doesn't matter what the IP address is.
regards,
-glenn
On Sun, February 28, 2016 6:47 am, Patrick Trapp wrote:
> There was a similar thread to this on this list over the last few days. I
> believe reserved addresses were suggested rather than static, but you will
> probably benefit from looking at the archive from the last week to see if
> that OP was truly looking at the same situation as you.
>
>> On Feb 27, 2016, at 11:42 AM, David Li <[email protected]> wrote:
>>
>> I see!
>> Do you have any suggestions to get around this? I do need to remove
>> the assignment from the DNS
>> if the host failed so others won't bother to contact the failed host.
>> Of course I can let the application to deal with the
>> timeout but still prefer to resolving this at DHCP/DNS level. It just
>> seems logical and convenient.
>>
>> Maybe another related question is if I have to use static lease to map
>> host MAC to a name to assign the IP. I need to assign meaningful names
>> to our hosts in order for others to use them. That means the name
>> assignment has to be based on what kind of application this host runs.
>> I haven't found other dynamic ways to do this yet. Any suggestions?
>>
>>
>> David
>>
>>> Date: Fri, 26 Feb 2016 17:46:04 -0800
>>> From: Shawn Routhier <[email protected]>
>>> To: Users of ISC DHCP <[email protected]>
>>> Subject: Re: Question on DHCP lease expiration
>>> Message-ID: <[email protected]>
>>> Content-Type: text/plain; charset=utf-8
>>>
>>> The server treats dynamic and static leases differently.
>>>
>>> Dynamic leases have a lease structure that moves between
>>> different queues and this is how the server knows when to
>>> expire the lease and thence when to remove it from the DNS.
>>>
>>> Static leases don?t have a lease structure and so don?t get
>>> expired and don?t get removed from the DNS.
>>>
>>> regards,
>>> Shawn
>>>
>>>> On Feb 26, 2016, at 5:37 PM, David Li <[email protected]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> This is my first post here.
>>>>
>>>> I am testing to see if an expired DHCP lease can result in the removal
>>>> of the corresponding DNS record on Centos 7.
>>>>
>>>> So far I am able to let DHCP server assign an static IP based on the
>>>> host's MAC address and add a DNS A record. The host is also able to
>>>> refresh its lease every time it expires.
>>>>
>>>> But when I shut down the host, I don't see the record removed after
>>>> the lease expired (5 min). Even more the syslog doesn't show any
>>>> messages from DHCP server attempting to remove the IP address and
>>>> update the BIND 9 (named) server. So I am thinking there might be
>>>> something wrong or missing in my dhcpd.conf.
>>>>
>>>> Here is a snippet of my dhcpd.conf:
>>>>
>>>>
>>>> # DNS options
>>>>
>>>> ddns-updates on;
>>>> ddns-update-style interim;
>>>> update-static-leases on;
>>>> authoritative;
>>>>
>>>> allow unknown-clients;
>>>> use-host-decl-names on;
>>>> default-lease-time 300; #5 min
>>>> max-lease-time 300; #5min
>>>> log-facility local7;
>>>>
>>>>
>>>>
>>>> # static assignment
>>>> #
>>>> host node1 {
>>>> hardware ethernet 08:00:27:0A:C3:1C;
>>>> fixed-address 10.4.1.11;
>>>> ddns-hostname "node1";
>>>> }
>>>>
>>>>
>>>> Can anyone help to see what's missing from my configuration?
>>>>
>>>> Thanks.
>> _______________________________________________
>> dhcp-users mailing list
>> [email protected]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
> _______________________________________________
> dhcp-users mailing list
> [email protected]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
------------------------------
Message: 2
Date: Sun, 28 Feb 2016 23:06:50 +0100
From: Andr? Mamitzsch <[email protected]>
To: Users of ISC DHCP <[email protected]>
Subject: Re: Match on suboption of option 43
vendor-encapsulated-options
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"
That's how we do it:
#### Option 43 Option Space ####
option space CM;
option CM.devtype code 2 = text;
option CM.esafetype code 3 = text;
option CM.sernum code 4 = text;
option CM.hwver code 5 = text;
option CM.swver code 6 = text;
option CM.bootrom code 7 = text;
option CM.OUI code 8 = string;
option CM.modnum code 9 = text;
option CM.vendor code 10 = text;
option CM-43 code 43 = encapsulate CM;
on commit {
log(info,
concat("VENDORLOG FOR ",
binary-to-ascii(10,8,".",leased-address),
" with vendor information",
" ",option CM.devtype,
" ",option CM.vendor,
" ",option CM.hwver,
" ",option CM.swver,
" ",option CM.sernum,
" ",
concat (suffix (concat
("0", binary-to-ascii (16, 8, "", substring( hardware, 1, 1))),2),
":",
suffix (concat
("0", binary-to-ascii (16, 8, "",substring( hardware, 2, 1))),2),
":",
suffix (concat
("0", binary-to-ascii (16, 8, "", substring( hardware, 3, 1))),2),
":",
suffix (concat
("0", binary-to-ascii (16, 8, "", substring( hardware, 4, 1))),2),
":",
suffix (concat
("0", binary-to-ascii (16, 8, "", substring( hardware, 5, 1))),2),
":",
suffix (concat
("0", binary-to-ascii (16, 8, "", substring( hardware, 6, 1))),2))
)
);
}
Regards,
Andr?
Am 26.02.2016 um 20:31 schrieb Bob Harold:
> I have Cisco cable modems and will soon deploy another vendor's modem that
> needs a different set of options, but both use the same
> vendor-class-identifier "docsis3.0:", so I want to match on the "vendor-name"
> which is suboption 10 in option 43 vendor-encapsulated-options. To start, I
> am trying to get DHCP to log the value, but I am failing somewhere.
>
> Wireshark shows that the REQUEST packet includes:
>
> Option: (43) Vendor-Specific Information (CableLabs)
> Length: 103
> ...
> Option 43 Suboption: (10) Vendor Name
> Length: 5
> Vendor Name: Cisco
>
> I have put this in dhcpd.conf:
>
> log (info, concat( "extra logging vendorID=", pick-first-value( option
> vendor-class-identifier, "no-vendor-class-id" ) ) );
> set vendor-string = option vendor-class-identifier;
> option space docsis;
> option docsis.vendor-name code 10 = text;
> class "docsis" {
> match if option vendor-class-identifier = "docsis3.0:";
> vendor-option-space docsis;
> log (info, concat( "extra logging vendor-name=", pick-first-value( option
> docsis.vendor-name, "no-vendor-name" ) ) );
> log (info, concat( "extra vendor-encapsulated-options ", pick-first-value(
> binary-to-ascii( 16, 8, ":", vendor-encapsulated-options ), "no-vend-opt" ) )
> );
> log (info, concat( "extra vivso ", pick-first-value( binary-to-ascii( 16, 8,
> ":", vivso), "no-vivso" ) ) );
> }
> class "cisco" {
> match if ( ( substring(hardware,1,3) = 08:80:39 ) or
> ( substring(hardware,1,3) = 10:5f:49 ) or
> ( substring(hardware,1,3) = 34:bd:fa ) or
> ( substring(hardware,1,3) = 54:d4:6f ) or
> ( substring(hardware,1,3) = 68:ee:96 ) or
> ( substring(hardware,1,3) = e4:48:c7) );
> log (info, "extra class cisco" );
> }
>
> But I get this in the log file:
>
> Feb 26 14:13:08 adonis12 dhcpd: extra class cisco
> Feb 26 14:13:08 adonis12 dhcpd: extra logging vendor-name=no-vendor-name
> Feb 26 14:13:08 adonis12 dhcpd: extra vendor-encapsulated-options no-vend-opt
> Feb 26 14:13:08 adonis12 dhcpd: extra vivso no-vivso
> Feb 26 14:13:08 adonis12 dhcpd: DHCPREQUEST for 10.213.139.100 from
> 54:d4:6f:d0:28:2e via 10.213.139.97
> Feb 26 14:13:08 adonis12 dhcpd: DHCPACK on 10.213.139.100 to
> 54:d4:6f:d0:28:2e via 10.213.139.97
>
> Is there something wrong in my log syntax?
> Is there any way to turn up DHCP debugging to the point where it tells me all
> the fields that it reads from each packet?
> Has anyone else matched or logged a suboption of option 43?
>
> I would be glad to post more of the gory details, just let me know what you
> want to see. I was hoping to avoid a really long email.
>
> --
> Bob Harold
> University of Michigan
>
>
>
> _______________________________________________
> dhcp-users mailing list
> [email protected]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4359 bytes
Desc: S/MIME Cryptographic Signature
URL:
<https://lists.isc.org/pipermail/dhcp-users/attachments/20160228/ef270a41/attachment-0001.bin>
------------------------------
_______________________________________________
dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users
End of dhcp-users Digest, Vol 88, Issue 36
******************************************