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

Tony Li <> Mon, 18 June 2007 03:35 UTC

Return-path: <>
Received: from [] ( by with esmtp (Exim 4.43) id 1I0816-0004ZO-Ry; Sun, 17 Jun 2007 23:35:00 -0400
Received: from [] ( by with esmtp (Exim 4.43) id 1I0814-0004Xy-OS for; Sun, 17 Jun 2007 23:34:58 -0400
Received: from ([]) by with esmtp (Exim 4.43) id 1I0814-0005c3-Do for; Sun, 17 Jun 2007 23:34:58 -0400
Received: from ([]) by with ESMTP; 17 Jun 2007 20:34:58 -0700
X-IronPort-AV: i="4.16,432,1175497200"; d="scan'208"; a="166956763:sNHT49700160"
Received: from ( []) by (8.12.11/8.12.11) with ESMTP id l5I3YvEV004300; Sun, 17 Jun 2007 20:34:57 -0700
Received: from ( []) by (8.12.10/8.12.6) with ESMTP id l5I3YvtV019658; Mon, 18 Jun 2007 03:34:57 GMT
Received: from ([]) by with Microsoft SMTPSVC(6.0.3790.1830); Sun, 17 Jun 2007 20:34:57 -0700
Received: from [] ([]) by with Microsoft SMTPSVC(6.0.3790.1830); Sun, 17 Jun 2007 20:34:57 -0700
In-Reply-To: <>
References: <>
Mime-Version: 1.0 (Apple Message framework v752.3)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <>
Content-Transfer-Encoding: 7bit
From: Tony Li <>
Subject: Re: [Idr] why has 4096 bytes limit on BGP messages size?
Date: Sun, 17 Jun 2007 20:34:56 -0700
To: "Fenggen Jia" <>
X-Mailer: Apple Mail (2.752.3)
X-OriginalArrivalTime: 18 Jun 2007 03:34:57.0392 (UTC) FILETIME=[A487D700:01C7B159]
DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=2300; t=1182137697; x=1183001697; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version;;; z=From:=20Tony=20Li=20<> |Subject:=20Re=3A=20[Idr]=20why=20has=204096=20bytes=20limit=20on=20BGP=2 0messages=20size? |Sender:=20; bh=Vqso/18hs56fDtfB7trY55rtoC3lzC0zHjpaSm4ja28=; b=yUMIJA3Lf3Dh9RrnmJg50IjEo15otUM363Ewu2Wz4jAkkS4l/1sHNVJ0mvczMKzJmGkKcynK e13wy79WGuRPQJ+CZwmNDq8bwZAhg4rCu8Za/9gk+6Jnwa1kBHy63WxD;
Authentication-Results: sj-dkim-2;; dkim=pass (sig from verified; );
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 0ddefe323dd869ab027dbfff7eff0465
Cc: idr <>
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Inter-Domain Routing <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>

On Jun 17, 2007, at 6:12 PM, Fenggen Jia wrote:

> 	I think my inital question is why the protocol has 4K limit on  
> messages sizes,that is different from the implementation,an  
> implementation may chose to use large read or write buffer(>4K) to  
> handle multiple updates one time,still my question is if message  
> size limit is a good pratice in protocol design?

Hmmm, ok, I guess we haven't been explicit enough.  I'll try again:

1) First, an implementation should NOT be using a message size that  
is different than the specified 4k message size limit.  If an  
implementation sends messages more than 4k, then other  
implementations will not be able to parse them.  If an implementation  
cannot receive 4k messages, then it will also not be able to  

1a) Having a fixed size is good because it makes the protocol  
implementations easy.  There is no point to having complexity in an  
implementation if it provides no benefit.  Large messages don't  
provide a wonderful benefit, as they need to be large enough to carry  
the path attributes and associated prefixes.  For this purpose 4k is  
probably adequate to date.

1b) Historically, 4k was considered a bit wasteful.  Of course, it  
was wonderfully simple compared to EGP which used fragmented  
packets.  Care to parse a 16k jumbo-gram?  Care to debug that?  Trust  
me, it's not fun.

2) The 4k message size is *completely independent* of the TCP window  
size.  An implementation is perfectly free to compose any number of  
messages, each of which is within the 4k limit.  The implementation  
can then cram any number of messages into its TCP socket, up to the  
buffering limits of that TCP.

2a) Thus, the message size is *NOT* performance limiting, except when  
an implementation could actually overfill a message.  Folks  
maintaining current implementations might chime in here as to whether  
or not they see this.

So, in summary, yes, a 4k message size limit is a fine situation *for  
BGP*, for the way that it behaves and the job that it does.  This  
does *NOT* necessarily generalize to other protocols, (e.g. OSPF)  
where 4k exceeds the most common MTUs.  In those cases, you'd end up  
with fragmentation, and that's bad.


Idr mailing list