Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Setting up BGP Trace/Debug on production router

Hello,

I have a BGP peer which drops BGP session after every few hours. I have no way of running BGP debug on the remote peer. Also I have multiple customers peering to my core router. Is there a way I can set up a trace for BGP events to see what is causing the drop? I am not comfortable with running BGP debug for hours on the core router, as that may crash it.

Please suggest a way I can run trace/debug on the core router without using much router resources.

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Setting up BGP Trace/Debug on production router

Hi Shivani,

You can put access-list along with debug command which will refine the messages.

Like

access-list 199 permit tcp host 10.10.10.1(Peer router ID) host 10.10.10.2 (This router ID) eq 179

debug ip bgp updates 199 detail

Or you can use below one

debug ip packet 199 detail  >> This will show you packet exchange


Hope this helps

Regards

Mahesh

Cisco Employee

Re: Setting up BGP Trace/Debug on production router

Hi,

When performing debugs on a Cisco device, it is good practice to take some precautions if you expect that the debug may be very verbose.

Logging to monitor or console is very CPU intensive and may cause loss of management connectivity to the device.

To prevent this, you can configure the device to only log to the logging buffer.  Additionally, it is recommended to set timestamps to msec and to increase the size of the logging buffer.

service timestamps debug datetime msec
service timestamps log datetime msec
logging buffered 200000
no logging console
no logging monitor

If you are logging to a syslog server, you should also limit the amount of messages send.

In regards to the debug itself, it is recommended to try to be as specific as possible by using ACL/conditional debugs/... 
In case it would be needed, additional debugs can be done as needed.

HTH,
Bert
3 REPLIES

Re: Setting up BGP Trace/Debug on production router

Hi Shivani,

You can put access-list along with debug command which will refine the messages.

Like

access-list 199 permit tcp host 10.10.10.1(Peer router ID) host 10.10.10.2 (This router ID) eq 179

debug ip bgp updates 199 detail

Or you can use below one

debug ip packet 199 detail  >> This will show you packet exchange


Hope this helps

Regards

Mahesh

Cisco Employee

Re: Setting up BGP Trace/Debug on production router

Hi,

When performing debugs on a Cisco device, it is good practice to take some precautions if you expect that the debug may be very verbose.

Logging to monitor or console is very CPU intensive and may cause loss of management connectivity to the device.

To prevent this, you can configure the device to only log to the logging buffer.  Additionally, it is recommended to set timestamps to msec and to increase the size of the logging buffer.

service timestamps debug datetime msec
service timestamps log datetime msec
logging buffered 200000
no logging console
no logging monitor

If you are logging to a syslog server, you should also limit the amount of messages send.

In regards to the debug itself, it is recommended to try to be as specific as possible by using ACL/conditional debugs/... 
In case it would be needed, additional debugs can be done as needed.

HTH,
Bert
New Member

Re: Setting up BGP Trace/Debug on production router

Thanks Mahesh and Bert. I will try this out.

605
Views
0
Helpful
3
Replies
CreatePlease to create content