ISC DHCPserver and Cisco CMTS lease-query | docsis.org

You are here

ISC DHCPserver and Cisco CMTS lease-query

20 posts / 0 new
Last post
buzzwork
ISC DHCPserver and Cisco CMTS lease-query

Hello,

Any one using ISC DHCPserver 3.1 and Cisco CMTS and are using DHCP lease-query ?
We cant get it to work :-/

It seems like Cisco CMTS isnt using RFC 4388 standard.

--
http://www.cisco.com/en/US/docs/ios/ipa ... #wp1034751

Usage Guidelines

Some DHCP servers support only the RFC 4388 standard of lease query. If the DHCP server supports only the RFC 4388 standard, then you must configure the DHCP client to send a lease query according to the RFC 4388 standard.

The Cisco IOS DHCP client sends a lease query with the message type set to 13 and receives either an ACK (acknowledge) or NAK (deny) from the DHCP server. This is the behavior of the DHCP client as per the Cisco standard.

As per the RFC 4388 standard, if a DHCP server receives a lease query with the message type set to 10, it will reply with one of the following message types:

•DHCPLEASEUNASSIGNED 11

•DHCPLEASEUNKNOWN 12

•DHCPLEASEACTIVE 13

By using the ip dhcp compatibility lease-query client command, you can switch between Cisco's implementation and the RFC 4388 standard implementation
--

Any one know how cable source-verify works ? the ip dhcp compatibility lease-query client command isnt ava. in 12.3 (123-23.BC2)

hinzoo
AFAIK lease-query starts in

AFAIK lease-query starts in ISC DHCP from verion 4.x, so download this version and compile.

buzzwork
http://oldwww.isc.org/sw/dhcp

http://oldwww.isc.org/sw/dhcp/dhcp_rel2.php?noframes=1

Changes since 3.1.0a1

The DHCP LEASEQUERY protocol as defined in RFC4388 is now implemented. LEASEQUERY lets you query the DHCP server for information about a lease, using either an IP address, MAC address, or client identifier. Thanks to a patch from Justin Haddad.

so it could work already but just not the way Cisco wants it to.

Martin

kwesibrunee
According to the cisco IOS

According to the cisco IOS commands for CMTS'es found Here cable source-verify dhcp uses http://www.ietf.org/internet-drafts/draft-ietf-dhc-leasequery-06.txt version of leasequery which is very similar to rfc4388. ( I believe version 9 of that document became rfc4388, version 0 is the one with the different method)

My Lab CMTS is currently down so I cannot verify this is indeed the case, but it sounds like they have already implemented it close to rfc4388 in newer versions of IOS. Something worth checking out at least.

in your dhcpd.conf you also must specify

allow leasequery;

or it will silently ignore them.

buzzwork
TIME: 2009-10-05

TIME: 2009-10-05 19:08:01.388
IP: 10.110.0.1 (0:0:11:11:22:22) >
(0:16:3e:0:20:30)
OP: 1 (BOOTPREQUEST)
HTYPE: 0 (wrong specified)
HLEN: 0
HOPS: 1
XID: 00000000
SECS: 0
FLAGS: 0
CIADDR: 10.110.69.72
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 10.110.0.1
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 13 (B-node)
OPTION: 57 ( 2) Maximum DHCP message size 548
OPTION: 55 ( 2) Parameter Request List 82 (Relay Agent Information)
51 (IP address leasetime)

As you can see it uses the value 13 in option-53 and yes, we have enabled that function in dhcpc.conf

kwesibrunee
The only other solutions I

The only other solutions I can see to make it work are:

1. modify the source of DHCPd to respond to the funky version of dhcpleasequery that cisco is using. I believe there are some patches floating around that do this from 5-6 years ago if you look hard enough.
2. the cable source-verify dhcp command takes an optional parameter which is server to query, you could write a simple server that only accepted type 13 dhcprequests and forwarded them to your isc dhcpd server as type 10, and then depending on response respond to the CMTS with a ack or nack. Essentially a cisco-leasequery -> rfc4388 proxy. Should not be too difficult to implement. I may even be able to help as this is functionality I would like to have...

buzzwork
right now im having an TAC

right now im having an TAC case open and pushing Cisco to fix the problem because they are not RFC compa. in the uBR software. Plain IOS have already implemented an fix in there dhcp client, so they have the code, they just need to implement it in CMTS IOS.

Martin

buzzwork
Hello, I have gotn an answer

Hello,

I have gotn an answer from TAC and the Cisco Business Unit and it seems the Cisco has no plan to fix the LeaseQuery problems in CMTS IOS :
--
The initial feedback I see from the business unit is that for the foreseeable future there're no plans to implement CSCsq70056 (CSCsm10121) in any CMTS releases [due to percieved lack of business demand].
--

They have fixed the problem in non-CMTS IOS in this feature request :
http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method...

So yes, we'r now forced to recode ISC DHCP or make another hack to get LeaseQuery to work :-/

Argh Cisco, hope some BIG cable-ISPs can force this fix through but they probably dont care

Martin
DK

jc_crespo
Guys

Does any one of you know how to make the old IOS works with the Current Version ?? :(

kwesibrunee
Its not a matter of it used

Its not a matter of it used to work but now does not. All of the cisco IOS for CMTS use the old leasequery method dhcpd only supports the newer rfc method. Cisco fixed the problem in non-CMTS routers late in the 12.3 version but will not update the cmts specific IOS with the same fix due to lack of demand.

Your options are two fold:

1. Code a patch for dhcpd to use the old method and add a conf option to turn on the old style dhcp leasequery.

2. write a dhcp proxy server that translates between cisco-leasequery and the rfc version i.e. you send the lease queries to a specially designed server that accepts the old query then contacts the dhcpd server and use the already supported rfc version and then responds back with the old style to the cmts.

Depending on your skillset the second option would be far easier and less likely to break something.

jc_crespo
Finally I find how to, but its a very pragmatic solution

I will study how to make a patch file, but for now it could help:

I just make it work in freebsd port

in /usr/ports/net/isc-dhcp41-server/work/dhcp-4.1.2/include/dhcp.h
****FIND THIS LINES****
-----------------------------------------------------------------------------------------------------------------
#define DHCPLEASEQUERY 10
#define DHCPLEASEUNASSIGNED 11
#define DHCPLEASEUNKNOWN 12
#define DHCPLEASEACTIVE 13
-----------------------------------------------------------------------------------------------------------------

****AND REPLACE IT WITH THIS****
-----------------------------------------------------------------------------------------------------------------
#define DHCPLEASEUNASSIGNED 11
#define DHCPLEASEQUERY 13
#define DHCPLEASEKNOWN 14
#define DHCPLEASEUNKNOWN 15
#define DHCPLEASEACTIVE 16
#define DHCPUNIMPLEMENTED 17
-----------------------------------------------------------------------------------------------------------------

in /usr/ports/net/isc-dhcp41-server/work/dhcp-4.1.2/include/dhcpd.h
****FIND THIS LINES****
-----------------------------------------------------------------------------------------------------------------
void dhcpinform PROTO ((struct packet *, int));
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
-----------------------------------------------------------------------------------------------------------------

****AND REPLACE IT WITH THIS****
-----------------------------------------------------------------------------------------------------------------
void dhcpinform PROTO ((struct packet *, int));
void dhcpleasequery PROTO ((struct packet *, int));
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
-----------------------------------------------------------------------------------------------------------------

in /usr/ports/net/isc-dhcp41-server/work/dhcp-4.1.2/server/dhcp.c
****FIND THIS LINES****
-----------------------------------------------------------------------------------------------------------------
"DHCPLEASEQUERY",
"DHCPLEASEUNASSIGNED",
"DHCPLEASEUNKNOWN",
"DHCPLEASEACTIVE"
-----------------------------------------------------------------------------------------------------------------

****AND REPLACE IT WITH THIS****
-----------------------------------------------------------------------------------------------------------------
"DHCPLEASEUNASSIGNED",
"DHCPLEASEQUERY",
"DHCPLEASEKNOWN",
"DHCPLEASEUNKNOWN",
"DHCPLEASEACTIVE",
"DHCPUNIMPLEMENTED"
-----------------------------------------------------------------------------------------------------------------

in /usr/ports/net/isc-dhcp41-server/work/dhcp-4.1.2/server/dhcpleasequery.c
****FIND THIS LINES****
-----------------------------------------------------------------------------------------------------------------
if (lease == NULL) {
dhcpMsgType = DHCPLEASEUNKNOWN;
dhcp_msg_type_name = "DHCPLEASEUNKNOWN";
} else {
if (lease->binding_state == FTS_ACTIVE) {
dhcpMsgType = DHCPLEASEACTIVE;
dhcp_msg_type_name = "DHCPLEASEACTIVE";
} else {
dhcpMsgType = DHCPLEASEUNASSIGNED;
dhcp_msg_type_name = "DHCPLEASEUNASSIGNED";
}
}

/*
* Set options that only make sense if we have an active lease.
*/

if (dhcpMsgType == DHCPLEASEACTIVE)
{
-----------------------------------------------------------------------------------------------------------------

****AND REPLACE IT WITH THIS****
-----------------------------------------------------------------------------------------------------------------
if (lease == NULL) {
dhcpMsgType = DHCPLEASEUNKNOWN;
dhcp_msg_type_name = "DHCPLEASEUNKNOWN";
} else {
if (lease->binding_state == FTS_ACTIVE) {
dhcpMsgType = DHCPACK;
dhcp_msg_type_name = "DHCPACK";
} else {
dhcpMsgType = DHCPNAK;
dhcp_msg_type_name = "DHCPNAK";
}
}

/*
* Set options that only make sense if we have an active lease.
*/

if (dhcpMsgType == DHCPACK)
{
-----------------------------------------------------------------------------------------------------------------

After you replaces all, you must rebuild it , good Luck :)

mdejko
jc_crespo your path work! but...

dhcpd answer only for dynamic dhcpd hosts.
bur for static :
dhcpd: DHCPLEASEUNKNOWN to 172.16.0.1 for IP 172.18.0.17 (0 associated IPs)

jc_crespo
If you want to use static..

Try to make a subinf without the 'cable source-verify dhcp' command and with another ip address pool associated.

In my practice I never have mixed static and dynamic lease.

buzzwork
it seems that Cisco has fixed

it seems that Cisco has fixed the bug in newst IOS and calling it a "new feature" now supporting the RFC :-)

Martin

uscallesen
Thanks !

Thanks for the update Martin - we're looking into using it aswell ;-)

mdejko
which version of IOS has this

which version of IOS has this patch ?

mbowe
New Software Features in

New Software Features in Cisco IOS Release 12.2(33)SCE1

This section lists the new features in Cisco IOS Release 12.2(33)SCE1.
RFC4388 Compliance DHCP Lease Query

In addition to Cisco standard compliant DHCP LEASEQUERY, Cisco CMTS now also supports RFC 4388 standard compliant DHCP LEASEQUERY. These two standards differ mostly in the identifiers used to query or respond to the DHCP Server. You can choose between these two implementations depending on which standard is supported on your DHCP Server.

The ip dhcp compatibility lease-query client command is modified.

For more information about this feature, see Filtering Cable DHCP Lease Queries on Cisco CMTS Routers guide at the following URL:

http://www.cisco.com/en/US/docs/ios/cable/configuration/guide/cmts_flt_d...

jc_crespo
New update

in /usr/ports/net/isc-dhcp41-server/work/dhcp-4.1.2/include/dhcpd.h
****FIND THIS LINES****
-----------------------------------------------------------------------------------------------------------------
void dhcpinform (struct packet *, int);
void nak_lease (struct packet *, struct iaddr *cip);
-----------------------------------------------------------------------------------------------------------------

****AND REPLACE IT WITH THIS****
-----------------------------------------------------------------------------------------------------------------
void dhcpinform (struct packet *, int);
void dhcpleasequery (struct packet *, int);
void nak_lease (struct packet *, struct iaddr *cip);

mac86
option from CMTS

instead to Patch ISC DHCP Server you can setup this in your C3 CMTS:

dhcp-lq-params leasequery 10 active 13 unassigned 11 trans-time-option 0 timeout 0

hartright (not verified)
DHCPv6 ISC leasequery support

Hello, everyone!

Hope that someone is still here.
Does anyone know if leasequery for ISC DHCPv6 server has to be enabled in some other way than writing "allow leasequery" to the conf file?
Can't find any info regarding this anywhere, except for the one sentence in 4.2.7 Release Notes: "Basic and partial DHCPv6 leasequery support"

Thank you in advance!

Log in or register to post comments