Re: [dhcwg] DHCPv4: Relay agents and packet sizes

Ted Lemon <mellon@fugue.com> Wed, 04 May 2016 16:03 UTC

Return-Path: <mellon@fugue.com>
X-Original-To: dhcwg@ietfa.amsl.com
Delivered-To: dhcwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5186C12DBFC for <dhcwg@ietfa.amsl.com>; Wed, 4 May 2016 09:03:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fugue-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NI10RLwcrOZy for <dhcwg@ietfa.amsl.com>; Wed, 4 May 2016 09:03:33 -0700 (PDT)
Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7C6E12D86D for <dhcwg@ietf.org>; Wed, 4 May 2016 08:55:59 -0700 (PDT)
Received: by mail-lf0-x22b.google.com with SMTP id y84so65719231lfc.0 for <dhcwg@ietf.org>; Wed, 04 May 2016 08:55:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fugue-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Icx5exXAGzH3BAZc8oUfFHrJVtVC9heo/FujZCWtkRk=; b=l8DlkbxgUMENstV6B977mQaJ6MNoG0D8GTUCqkuDEGErLvSDlW48O+EjDlia4vrbof 56hTlKLeOmFCyV3Yua3bYOQpjlSsXzHLjE+8IHcdFLbIwwhmGkjYpY9e6XGw4xAtixXi VA403DvyUmrjynXZ9x2zsKNxY98qluYMf9FfRD4/KBUxqzo9OAc8zaoxYbuJWqMcaBra i+EN61w28FRq3RBbk+Y8UOTgaqBTmBxtmahhCL33wmVClSv0aREFVqaZeS+W1BxS/cAX 4uw8pDKvCOR5j5OSAi/4E9E+Y/NrYXJlBXt3no2SWPj+fHQQleVpqgVDB6E4y/Wl0ATQ w08w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Icx5exXAGzH3BAZc8oUfFHrJVtVC9heo/FujZCWtkRk=; b=WscoaGe4DZxXCnXQPofJ7CF1yqyeixjHKBKLh29wyREmTIz4OvJLt5yIcA3hIMTwg6 K55Uo75XR3zddxmYe16Sehg1G1vtfh1DFJfYT6rjHOru1pbxBtUC8eyC0slM42crvcQs X0K5JicR4+pyyYIKP7IbFTBZII+Nkb9LWIcaC/Zjp2ZLVCv6Gom5GQjKBRk1nUEIPh5E vc7MBh0fuGQ8JLOn63VZGQQsFZFsUHS2puL7c/4csUQgqdoYruvemuTiJBfX2dDDBob1 QYgCOxuv7hPqNNesINxjktJuuj89inw9PJPQ6/tJmliYXlYOZgJfnFIxznxxB7XJYFY7 8GUA==
X-Gm-Message-State: AOPr4FVtrlokwdacTRK4lQJpSWoO4yr8KGh6SV+yTz/iZVlXQjC8nPoXDq4sGDO69OaO9BT4soLBwf2q8++KDA==
X-Received: by 10.25.8.204 with SMTP id 195mr3870975lfi.132.1462377358065; Wed, 04 May 2016 08:55:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.213.19 with HTTP; Wed, 4 May 2016 08:55:18 -0700 (PDT)
In-Reply-To: <CAOpJ=k0wwnTHeOUWEsx-QO=jX5F4sXfru6MEJAmDmbBT91Kpaw@mail.gmail.com>
References: <CAOpJ=k1q84fU5XTkU6XUM3incv43dxiLy8tTAwKAmK_6=En8Qg@mail.gmail.com> <CAPt1N1kYCev-BnzRRdBM8cqTMQsUOZ9KtgKdk1MBX5zpMfEuKA@mail.gmail.com> <CAOpJ=k0wwnTHeOUWEsx-QO=jX5F4sXfru6MEJAmDmbBT91Kpaw@mail.gmail.com>
From: Ted Lemon <mellon@fugue.com>
Date: Wed, 04 May 2016 11:55:18 -0400
Message-ID: <CAPt1N1nN+1trfjGBBmL+ENVOtAq-mgtRs=jUMBBfGLSUmTERMQ@mail.gmail.com>
To: Bud Millwood <budm@weird-solutions.com>
Content-Type: multipart/alternative; boundary="001a113ebdc4f49df905320642e7"
Archived-At: <http://mailarchive.ietf.org/arch/msg/dhcwg/11Oj4DpkpK672vcw1dm1cOrUdJo>
Cc: "dhcwg@ietf.org" <dhcwg@ietf.org>
Subject: Re: [dhcwg] DHCPv4: Relay agents and packet sizes
X-BeenThere: dhcwg@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: <dhcwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dhcwg/>
List-Post: <mailto:dhcwg@ietf.org>
List-Help: <mailto:dhcwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 May 2016 16:03:35 -0000

Question: RFC 2131 says this:

   A DHCP client must be
   prepared to receive DHCP messages with an 'options' field of at least
   length 312 octets.

It sounds like you are reporting that some clients do not follow this rule.
  Is that right?   I find it hard to believe, because most of the time
clients don't send many options, and need many more options back.   Or is
it your experience that clients send packets with 312-octet option buffers?
  I'm a bit confused by what you're reporting here, but I haven't hacked on
DHCP servers in a while, and am willing to believe nearly any report of
brokenness in clients based on past experience.

BTW, I was remembering how I implemented the relay options, and I actually
wound up having a separate bit of code that unpacks and repacks them, IIRC,
rather than using the same packet assembly code that I used for sending
options to clients and receiving options from clients.   I've never heard
reports of problems with it, FWIW.


On Wed, May 4, 2016 at 4:20 AM, Bud Millwood <budm@weird-solutions.com>
wrote:

> Thanks for the advice Ted, I really appreciate it!
>
> My concern has always been that the clients have already allocated
> their buffer and won't have enough sense to allocate a larger buffer
> for packet reception. But I suppose if it's that or no packet at all,
> the clear choice is to increase the buffer size. Also I went back and
> re-read the relay agent RFC and remembered that it's added onto the
> packet, not into it, so essentially I just have a space problem. As
> usual.
>
> As for the max packet size, I purposefully decided to go with whatever
> size made it into the server, under the impression that there was a
> good chance it would make it back. It is, however, configurable to
> force it to drop back to the max packet size. As a side note, I've had
> good experience with this policy. I don't think I've ever had to
> configure my server to limit the output packet size because the input
> packet size was too large to get back to the client.
>
> Thanks again for the tips!
>
> - Bud
>
>
> On Tue, May 3, 2016 at 7:11 PM, Ted Lemon <mellon@fugue.com> wrote:
> > The expectation is that the remote-id and circuit-id options are not
> counted
> > as part of the packet size for the client, because they are stripped by
> the
> > relay agent.   I'm fairly sure that I handled this by simply allowing the
> > option buffer to get bigger.
> >
> > Also, the maximum packet size is (IIRC) 576 by default, not "whatever
> size
> > the client sent."
> >
> > On Tue, May 3, 2016 at 7:17 AM, Bud Millwood <budm@weird-solutions.com>
> > wrote:
> >>
> >> Hello all, hope everyone is well. Long time no see. I could use some
> >> advice:
> >>
> >> Our DHCP server responds to clients with the same size packet as the
> >> client sends us unless A) it's smaller than the minimum size or B) the
> >> max-message-size option is present. In the case of (A) we bring it up
> >> to the minimum size, in the case of (B) we use the max-message-size.
> >>
> >> I have a CMTS that is placing both Remote ID and Circuit ID in DHCPv4
> >> packets, and the Circuit ID is quite large (40 bytes?). I'm running
> >> out of space in my response packet.
> >>
> >> There is no max-message-size here, and we aren't overloading the file
> >> or sname fields.
> >>
> >> Any advice on the best way to handle this? For maximum compatibility,
> >> should I be overloading the file/sname fields, or increasing the
> >> packet size? (Increasing seems downright crazy)
> >>
> >> What approaches do you use when you're getting squeezed like this?
> >>
> >> Thanks in advance for any advice.
> >>
> >> - Bud
> >>
> >> _______________________________________________
> >> dhcwg mailing list
> >> dhcwg@ietf.org
> >> https://www.ietf.org/mailman/listinfo/dhcwg
> >
> >
> >
> > _______________________________________________
> > dhcwg mailing list
> > dhcwg@ietf.org
> > https://www.ietf.org/mailman/listinfo/dhcwg
> >
>