BGP peer closed status

Unanswered Question
Nov 22nd, 2011
User Badges:

Hi all,

i still newbie to configure eBGP, i have Router 3600 series, and i configure BGP neighbor to my ISP, but the peer still don't established,

there is warning like this,

Connections established 339; dropped 339

"Last reset 2w4d, due to Peer closed the session

No active TCP connection"

any one can explain to me about "due to Peer closed the session " ?

i've read some documents for troubleshooting BGP, and do some step to troubleshoot, but

i still don't get solution. please help.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Reza Sharifi Tue, 11/22/2011 - 19:19
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

Hi Ahmad,

Can you post your BGP config?

Also, can you post the output of sh ip bg nei xx.x.x.x.?


ahmed Tue, 11/22/2011 - 19:46
User Badges:

Hi Reza thanks for your reply,

here is my simple BGP config :

router bgp xxxxx

no synchronization

bgp router-id x.x.x.x

bgp log-neighbor-changes

network x.x.x.x

neighbor x.x.x.x remote-as yyyyy

neighbor x.x.x.x description ISP

neighbor x.x.x.x soft-reconfiguration inbound

neighbor x.x.x.x distribute-list TDS-OUT out

neighbor x.x.x.x route-map ISP-IN in

neighbor x.x.x.x route-map NAP-IN out

ip as-path access-list 2 permit ^yyyyy_[0-9]*$

route-map NAP-IN permit 10

match as-path 2

please help Reza

smitesh kharecha Tue, 11/22/2011 - 22:24
User Badges:
  • Silver, 250 points or more


Can you please ping the BGP neighbor IP Address with the repeat count for 1000 and check how many drops you are getting there.

If there  are too many drops, then your neighborship is getting dropped due to crappy link.



milan.kulik Wed, 11/23/2011 - 00:10
User Badges:
  • Red, 2250 points or more


IMHO, if you are able to Ping the neighbor router, you should contact your ISP and ask why their router is closing the BGP session.

There might be several reasons:

Incorrect AS number configured on your side, BGP session password expected, maximum number of prefixes advertised exceeded, etc.

I've personally seen the last one in my network some time ago:

You might try to reconfigure your router to send just one prefix to the ISP and reset the BGP peering by "clear ip bgp nei  x.x.x.x".

If the BGP session keeps Up then, you know the root problem cause probably.



smitesh kharecha Wed, 11/23/2011 - 00:19
User Badges:
  • Silver, 250 points or more

Hi Milan,

As per Ahmad's logs, we can see that BGP session is getting established and then getting dropped, so that we can safely assume that issue is not with incorrect AS number configuration and neither BGP session password; as if these would be incorrect, BGP won't be establishing in first place.

However, prefix-limit reach can be one possible issue.

But, I wanted him (Ahmad) to rule out physical layer issue first (that why i suggested to check the ping response and see how many packets are getting dropped) and then move to upward layer issues.



Message was edited by: smitesh kharecha

Kishore Chennupati Wed, 11/23/2011 - 02:07
User Badges:
  • Gold, 750 points or more

hi ahmad,

i agree with smitesh. first make sure there is no packet loss n latency. try different mtu sizes as well.

also check the interface " sh int " on ur router to see any issues. then we can look further.

also check with ip if they made any changes at their end?


ahmed Wed, 11/23/2011 - 18:51
User Badges:

Hi all,

thanks so much for your reply,

1. i try to ping like  smitesh said, the result is good i think, 999/1000

2. also i try to use different MTU like kishore said, then still good, also i check again my interface, no problem

3.  i consider what simtesh said about prefix-limit issue, sorry for all, i forgot to tell you that my Router is 3600 with 64 MB memory only, is it has many affect  (with my as-path config) ?

please your suggestion


smitesh kharecha Wed, 11/23/2011 - 20:59
User Badges:
  • Silver, 250 points or more

Hi Ahmad,

Are you receiving full routing table or just default route  from your ISP ?

If it is continuous flapping, then can you please provide us outputs of following commands:

debug ip bgp updates

debug ip bgp event



milan.kulik Thu, 11/24/2011 - 00:21
User Badges:
  • Red, 2250 points or more


IMHO, if it were your router lack of memory problem, you would see some error messages in your syslog.

Additionally to Smitesh's question:

How many prefixes are you sending to the ISP? (Possibly too many?)

Have you asked the ISP why their router is closing the BGP session?



ahmed Thu, 11/24/2011 - 19:48
User Badges:

Hi all,

sorry i couldn't go to debug command (i use telnet), oh yeah how to know number of prefixes which i sent to my ISP, as you know from my config above, i use  prefix scheme that i got from cisco tutorial (,

then if  prefix number is the main issue, please give me some help how to config use minimum prefix to my ISP,

and Mr. smittesh  i didn't use default route, but i use prefix scenario from tutorial above.

sorry, i strongly need your help


Ahmad Kabiru

smitesh kharecha Thu, 11/24/2011 - 20:32
User Badges:
  • Silver, 250 points or more

Hi Ahmad,

Can you please provide the output of following commands

show ip bgp neighbor advertised

show ip bgp neighbor received-route

show ip bgp summary

Also, you need to check with your ISP whether they have put any prefix-limit to your connection.



ahmed Sun, 11/27/2011 - 18:55
User Badges:

Hi Smitesh,

thanks for your help

here is the result of show command :

JKT1#sh ip bgp neighbors x.x.x.x received-routes

JKT1#sh ip bgp neighbors x.x.x.x advertised-routes

JKT1#sh ip bgp summary

BGP router identifier A.A.A.A, local AS number BBBBB

BGP table version is 111680, main routing table version 111680

7816 network entries using 758152 bytes of memory

7816 path entries using 281376 bytes of memory

516 BGP path attribute entries using 30960 bytes of memory

460 BGP AS-PATH entries using 11252 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1081740 total bytes of memory

BGP activity 50865/43049 prefixes, 57369/49553 paths, scan interval 60 secs

Neighbor        V         AS           MsgRcvd      MsgSent        TblVer       InQ      OutQ      Up/Down       State/PfxRc

z.z.z.z             4       BBBBB           0                      0                           0              0               0          never                   Active

x.x.x.x            4       CCCC              0                      0                           0           0               0           never                   Active

y.y.y.y            4       DDDD        38606        25636             111680            0               0           2w3d                        7808

as you see above, i have 2 link2 (multi) neighbors y.y.y.y was my domestic route and it's work, but the problem peer was x.x.x.x, which were discuss point.

please don't bored helping me

Ma Juner Sun, 11/27/2011 - 23:51
User Badges:

try to add one config:

neighbor x.x.x.x ebgp-multihop X

ahmed Tue, 12/06/2011 - 18:20
User Badges:

Hi all, sorry i've been some job to do,

i've tried use any scenario, such as only receive default route from ISP, and receive only Directly-Connected Routes,

but still the error was "not enough memory", is there any config to not receive any routes from ISP, so i just use default route to the ISP?



milan.kulik Thu, 12/08/2011 - 07:00
User Badges:
  • Red, 2250 points or more


neighbor x.x.x.x route-map ISP-IN in

route-map ISP-IN deny 10

This way you will not accept any prefix from your neighbor.

But so far you did not mention any "not enough memory" error messages on your router?




This Discussion