[Enterprise SONiC] Enable debugging for the routing protocol Follow
The routing protocol in SONiC is implemented using FRRouting. By default, debug logs are not enabled to minimize log size. However, it is possible to enable debug flags to receive more detailed debug logs. In the system view, FRR is implemented specifically for routing purposes, which means it may have a different logging system compared to SONiC's original syslog. When encountering routing-related issues, you can refer to this guide to obtain additional information for debugging purposes. It will assist you in packaging more helpful information within the support dump for effective troubleshooting.
Tested model & firmware version:
- Switch model name:
DCS203 (AS7326-56X)
DCS201 (AS5835-54X)
- Edgecore SONiC version:
202111.3 ~ 202111.8
Restriction:
- After enabling debugging, the changes take effect immediately. It is important to remember to save the configuration to the startup configuration using FRR's command. Failure to do so may result in the debugging information being lost after restarting the BGP service.
- The debugging flags in FRR are divided by different protocols and events, and there is no single command to enable all debug events in the current version.
- If the optional second argument using "log syslog", is not present, the default logging level will be set to the debugging level.
Integrating syslog with the enabled FRR log
Steps 1. Configure the syslog level.
admin@sonic:~$ vtysh
Hello, this is FRRouting (version 8.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure
sonic(config)#
Steps 2. Enable the debugging log and store it in syslog.
sonic(config)# log syslog debugging
sonic(config)# log stdout debugging
Note. You can use the command below to disable logging.
sonic(config)# no log stdout
Steps 3. This is an example of how to enable the debug flag for BGP neighbor events.(For detailed debugging flags information, please refer to the table in the Appendix)
sonic(config)# debug bgp neighbor-events
Note. You can use the command below to disable the flag.
sonic(config)# no debug bgp neighbor-events
Steps 4. Check the configuration status regarding the debug flags.
sonic(config)# do show debugging
Zebra debugging status:
OSPF debugging status:
BGP debugging status:
BGP neighbor-events debugging is on
isis debugging status:
PIM debugging status
Staticd debugging status
BFD debugging status:
sonic(config)#
Appendix
Debug flags | Purpose |
BGP | |
debug bgp zebra |
Communications between bgpd and zebra. |
debug bgp nht |
BGP nexthop tracking. |
debug bgp update-groups |
This provides general information on group creation, deletion, join and prune events. |
debug bgp updates |
This provides information on BGP UPDATE messages transmitted and received between local and remote instances. |
debug bgp neighbor-events |
This provides general information on BGP events such as peer connection / disconnection, session establishment / teardown, and capability negotiation. |
debug bgp evpn mh es |
This provides information about the Ethernet Segment (ES) in EVPN multihoming. |
debug bgp evpn mh route |
This provides information about the EVPN routes in EVPN multihoming. |
OSPF | |
debug ospf packet all detail |
Dump Packet for debugging |
debug ospf ism status |
This provide the information about ISM(Interface state machine). |
debug ospf nsm status |
This provide the information about NSM(Network state machine). |
debug ospf event |
This provide the information about the OSPF events. |
debug ospf nssa |
This provide the information about the "Not So Stub Area". |
debug ospf lsa |
This provide the information about the LSA(Link state messages) |
debug ospf zebra |
Communications between ospf and zebra. |
IS-IS | |
debug isis adj-packets |
This provide the information about the adjacency packets. |
debug isis events |
This provide the information about the events of ISIS. |
debug isis packet-dump |
This provide the information about the packet dumps of ISIS protocol. |
debug isis route-events |
This provide the information about the route events of ISIS protocol. |
debug isis spf-events |
This provide the information about spf information, including "Shortest Path First Events, Timing and Statistic Data and triggering events". |
debug isis update-packets |
This provide the information about spf update packets of ISIS protocol. |
Zebra | |
debug zebra dplane |
Dataplane / FIB events. |
debug zebra events |
ZEBRA events |
debug zebra evpn mh es |
This provide the address informations about the ES in the context of EVPN multihoming. |
debug zebra evpn mh mac |
This provide the address informations about the MAC in the context of EVPN multihoming. |
debug zebra evpn mh neigh |
This provide the address informations about the nighbors in the context of EVPN multihoming. |
debug zebra evpn mh nh |
This provide the address informations about the nexthop tracking in the context of EVPN multihoming. |
debug zebra fpm |
FPM (forwarding-plane manager) events. |
debug zebra kernel |
Kernel / OS events. |
debug zebra nexthop detail |
Nexthop and nexthop-group events. |
debug zebra nht detail |
Nexthop-tracking / reachability information |
debug zebra packet detail |
ZAPI message and packet details |
debug zebra rib detailed |
RIB events. |
debug zebra vxlan |
VxLAN (EVPN) events |
Comments
0 comments
Please sign in to leave a comment.