cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2350
Views
0
Helpful
3
Replies

Setting up BGP Trace/Debug on production router

shivani.sharma
Level 1
Level 1

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

Mahesh Gohil
Level 7
Level 7

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

View solution in original post

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

View solution in original post

3 Replies 3

Mahesh Gohil
Level 7
Level 7

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

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

Thanks Mahesh and Bert. I will try this out.