< Free Open Study > |
3-16 bgp log-neighbor-changesSyntax Description: This command has no arguments. Purpose: To enable the logging of changes in a BGP neighbor's status. If the UNIX syslog facility is enabled, messages can be sent to a UNIX host running the syslog daemon. If you are not using the UNIX syslog facility, the status change messages are stored in the router's internal buffer. Events that are logged include the following:
Cisco IOS Software Release: 11.1 CC and 12.0 Configuration Example 1: Enabling BGP Neighbor Status Change Logging to the ConsoleTo enable the display of BGP neighbor status change events on the console, use the following configuration: router bgp 1 bgp log-neighbor-changes neighbor 172.17.1.1 remote-as 2 VerificationWhen the state of a BGP neighbor changes, the event should be displayed on the console. For example, if you execute the command clear ip bgp * on a BGP neighbor, the following output should be displayed: rtr# 01:10:52: %BGP-5-ADJCHANGE: neighbor 172.17.1.2 Down - Peer closed the session 01:11:22: %BGP-5-ADJCHANGE: neighbor 172.17.1.2 Up Configuration Example 2: Enabling BGP Neighbor Status Change Logging to MemoryTo enable the logging of BGP neighbor status change events to memory, use the following configuration: logging buffered 4096 debugging ! router bgp 1 bgp log-neighbor-changes neighbor 172.17.1.1 remote-as 2 The parameters 4096 and debugging are default values and are supplied by the router when you use the command logging buffered. The default values vary by platform. VerificationThe show logging command displays the status of buffered logging. If logging is enabled, the contents of the buffer are displayed: rtr# show logging Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns) Console logging: level debugging, 48 messages logged Monitor logging: level debugging, 0 messages logged Buffer logging: level debugging, 3 messages logged Trap logging: level informational, 51 message lines logged Log Buffer (4096 bytes): 01:18:16: %SYS-5-CONFIG_I: Configured from console by console 01:18:31: %BGP-5-ADJCHANGE: neighbor 172.17.1.2 Down - Peer closed the session 01:19:00: %BGP-5-ADJCHANGE: neighbor 172.17.1.2 Up Troubleshooting
|
< Free Open Study > |