Re: Re: [Idr] why has 4096 bytes limit on BGP messages size?

Jeffrey Haas <jhaas@pfrc.org> Thu, 14 June 2007 13:53 UTC

Return-path: <idr-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1Hypll-0003FB-Jk; Thu, 14 Jun 2007 09:53:49 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1Hyplk-0003F6-Nl for idr@ietf.org; Thu, 14 Jun 2007 09:53:48 -0400
Received: from manos.scc.mi.org ([204.11.140.250]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Hyplj-0003sH-H4 for idr@ietf.org; Thu, 14 Jun 2007 09:53:48 -0400
Received: by manos.scc.mi.org (Postfix, from userid 1025) id 0E2C14E4A2; Thu, 14 Jun 2007 09:53:40 -0400 (EDT)
Date: Thu, 14 Jun 2007 09:53:40 -0400
From: Jeffrey Haas <jhaas@pfrc.org>
To: Fenggen Jia <fgjia@mail.zjgsu.edu.cn>
Subject: Re: Re: [Idr] why has 4096 bytes limit on BGP messages size?
Message-ID: <20070614135339.GA10519@scc.mi.org>
References: <20070614105451.9C6C11140496@mail.zjgsu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20070614105451.9C6C11140496@mail.zjgsu.edu.cn>
User-Agent: Mutt/1.5.9i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 798b2e660f1819ae38035ac1d8d5e3ab
Cc: idr <idr@ietf.org>
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/idr>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
Errors-To: idr-bounces@ietf.org

On Thu, Jun 14, 2007 at 06:58:06PM +0800, Fenggen Jia wrote:
> Then why not other limit,how is 4096 bytes derived, thanks.

It wouldn't shock me if it had to do with the MTU of a FDDI link but
that's complete speculation.

Aside from the 4k limit, here's some things to keep in mind when writing
protocols.  Mostly IMO:
- Messages encoded in some sort of TLV format probably need a full PDU
  kept in memory at the same time.  This is because a sane
  implementation will validate the PDU contents against TLV constraints
  (either implied by the TLV or by the protocol) before doing *anything*
  to it.
- Having a fixed sized buffer means you can allocate it *once* and be
  done with it.  
- You're going to have one of these buffers for each of your peering
  sessions.  You don't want it to be large.
- You want the PDU to be "big enough" to be able to transport your
  information usefully.  If you're regularly exceeding a 4K message in
  BGP, you're probably not passing around Internet reachability.

-- Jeff

_______________________________________________
Idr mailing list
Idr@ietf.org
https://www1.ietf.org/mailman/listinfo/idr