Thursday, January 12, 2012

BGP maximum-prefix

R1 - ebgp - R2

R2(config-router)#neighbor 10.0.12.1 maximum-prefix 3 2

- the command will R2 can only receive three prefixes from R1 and will send notification after receving two prefixes; after receiving (more than three) prefixes, it will simply notifiy its neighbour and then drop the bgp session.

When R1 send R2 two prefixes, R2 has
*Mar  1 00:48:31.511: %BGP-4-MAXPFX: No. of prefix received from 10.0.12.1 (afi 0) reaches 2, max 3


When R1 send R2 three prefixes R2 has
*Mar  1 00:49:10.695: %BGP-4-MAXPFX: No. of prefix received from 10.0.12.1 (afi 0) reaches 3, max 3

When R1 send R2 four prefixes R2 has
 *Mar  1 00:50:18.015: %BGP-3-MAXPFXEXCEED: No. of prefix received from 10.0.12.1 (afi 0): 4 exceed limit 3
*Mar  1 00:50:18.015: %BGP-5-ADJCHANGE: neighbor 10.0.12.1 Down BGP Notification sent
*Mar  1 00:50:18.015: %BGP-3-NOTIFICATION: sent to neighbor 10.0.12.1 3/1 (update malformed) 0 bytes                           

While R1 has
*Mar  1 00:50:18.411: %BGP-3-NOTIFICATION: received from neighbor 10.0.12.2 3/1 (update malformed) 0 bytes
*Mar  1 00:50:18.411: %BGP-5-ADJCHANGE: neighbor 10.0.12.2 Down BGP Notification received

To fix, change the maximum-prefix value and do clear ip bgp

Pls note: neighbor 10.0.12.1 maximum-prefix 3 2 restart 1 - the restart dosen't work as you have to manually change the maximum-prefix value at the first place.

No comments:

Post a Comment