Monitoring and Debugging L2/L3 protocols
Find and Configure the Log File
By default, the syslog local-file is ram. The log file name is "message" which is in the directory "/tmp/log"
admin@XorPlus$cd /tmp/log admin@XorPlus$ls lastlog lighttpd messages wtmp
You can use "tail -f /tmp/log/messages" to display the log messages.
You can set the syslog local-file location to disk. The log file name is "messages" which is in the directory of "/var/log"
admin@XorPlus# set system syslog local-file disk admin@XorPlus# commit Commit OK. Save done. admin@XorPlus# admin@XorPlus$cd /var/log/ admin@XorPlus$ls apt dmesg fsck last_death lastlog messages news ntpstats wtmp admin@XorPlus$
You can use "tail -f /var/log/messages" to show the log messages.
Enable Important Debugs
Enable debug interface:
##Global Interface traceoptions. admin@XorPlus# set interface traceoptions flag Possible completions: <[Enter]> Execute this command all Configure all tracing config Configure configuration tracing ethernet-switching-options Configure ethernet-switching-options tracing neighbor-event Configure neighbor event tracing packets Configure received or sent packets event tracing port-security Configure port security tracing raw-packet Configure receive raw packet tracing route-event Configure route event tracing static-ethernet-switching Configure static-ethernet-switching tracing timer Configure timer tracing admin@XorPlus# set interface traceoptions flag config <[Enter]> Execute this command disable Disable configuration tracing admin@XorPlus# set interface traceoptions flag config disable false admin@XorPlus# commit Commit OK. Save done. admin@XorPlus# admin@XorPlus# set interface traceoptions line-card ? Possible completions: <[Enter]> Execute this command statistic Configure line card statistic module trace trace-level Configure line card trace level trace-type Configure line card trace type admin@XorPlus# set interface traceoptions line-card trace-level all disable false admin@XorPlus# commit Commit OK.
Enable debug of protocals:
admin@Xorplus# set protocols Possible completions: <[Enter]> Execute this command arp Configure ARP bgp Configure BGP inter-domain routing dhcp Dynamic Host Configuration Protocol dot1x 802.1x protocol igmp Configure the IGMP protocol igmp-snooping Configure the igmp snooping lacp Link Aggregation Control Protocol lldp Link Layer Discovery Protocol 802.1AB mlag Configure MLAG neighbour Configure Neighbour Discovery Protocol netconf Configure NETCONF ospf Configure the OSPF protocol ovsdb Enable OVSDB pim PIM protocol sflow Configure sflow snmp Simple network management protocol configuration spanning-tree Configure Spanning Tree static Configure static routes udld Unidirectional Link Detection Protocol vrrp Configure VRRP admin@Xorplus# set protocols bgp traceoption updates in admin@Xorplus# commit Commit OK Save Done!
Enable debug of LLDP:
## LLDP global traceoptions. admin@Xorplus# set protocols lldp traceoptions flag Possible completions: <[Enter]> Execute this command all Configure all events and packets tracing configuration Configure configuration tracing message-in Configure received message tracing message-out Configure send message tracing state-change Configure LLDP state change tracing admin@Xorplus# set protocols lldp traceoptions flag message-in disable false admin@XorPlus# commit Commit OK.
Enable debug of LACP:
## LACP global traceoptions. admin@Xorplus# set protocols lacp traceoptions flag  Possible completions: <[Enter]> Execute this command all Configure all events and packets tracing configuration Configure configuration tracing fallback Configure FALLBACK tracing message-in Configure received message tracing message-out Configure send message tracing mlag Configure MLAG tracing state-change Configure LACP state change tracing admin@Xorplus# set protocols lacp traceoptions flag message-in disable false admin@XorPlus# commit Commit OK. ##LACP per interface traceoptions. admin@Xorplus# set protocols lacp traceoptions interface ge-1/1/1 flag Possible completions: <[Enter]> Execute this command all Configure all events and packets tracing configuration Configure configuration tracing message-in Configure received message tracing message-out Configure send message tracing state-change Configure LACP state change tracing admin@Xorplus# set protocols lacp traceoptions interface ge-1/1/1 flag configuration disable false admin@XorPlus# commit Commit OK.
Enable debug of UDLD:
## UDLD global traceoptions. admin@Xorplus# set protocols udld traceoptions Possible completions: <[Enter]> Execute this command all Configure all events and packets tracing configuration Configure configuration tracing event Configure event tracing packet Configure the sending/receiving packets tracing raw-packet Configure UDLD raw packet tracing state-change Configure state change tracing timer Configure UDLD timer tracing admin@Xorplus# set protocols udld traceoptions event disable false admin@XorPlus# commit Commit OK.
Enable debug of BGP:
admin@XorPlus# set protocols bgp traceoption ? admin@XorPlus# set protocols bgp traceoption Possible completions: <[Enter]> Execute this command bestpath BGP bestpath evpn EVPN keepalives BGP IPv4 neighbor to debug neighbor-events BGP Neighbor Events updates BGP updates zebra BGP zebra messages admin@XorPlus# set protocols bgp traceoption updates in admin@XorPlus# commit Commit OK. Save done. admin@XorPlus#
Enable debug of ospf:
admin@XorPlus# set protocols ospf traceoption ? Possible completions: <[Enter]> Execute this command ism Configure tracing of OSPF interface state machine lsa Configure tracing of OSPF link state advertisement nsm Configure tracing of OSPF neighbor state machine packet Configure tracing of OSPF packets zebra Configure tracing of zebra information admin@XorPlus# set protocols ospf traceoption packet all detail admin@XorPlus# commit
Enable debug of stp:
admin@XorPlus# set protocols spanning-tree traceoptions interface ge-1/1/1 ? Possible completions: <[Enter]> Execute this command all Configure all tracing operations bridge-detection-machine Configure bridge detection state machine tracing configuration Configure configuration tracing events Configure events tracing message-in Configure receive message tracing message-out Configure send message tracing mlag Configure mlag tracing port-information-machine Configure port information state machine tracing port-migration-machine Configure port migration state machine tracing port-receive-machine Configure port receive state machine tracing port-role-selection-machine Configure port role selection state machine tracing port-role-transition-machine Configure port role transition state machine tracing port-state-transition-machine Configure port state transition state machine tracing port-transmit-machine Configure port transmit state machine tracing state-machine-variables Configure state machine variables tracing timers Configure timers tracing topology-change-machine Configure topology change state machine tracing admin@XorPlus# set protocols spanning-tree traceoptions interface ge-1/1/1 all disable false admin@XorPlus# commit Commit OK. Save done. admin@XorPlus#
Enable debug of igmp:
admin@XorPlus# set protocols igmp traceoption ? Possible completions: <[Enter]> Execute this command events IGMP protocol events packets IGMP protocol packets trace IGMP internal daemon activity admin@XorPlus# set protocols igmp traceoption events admin@XorPlus# commit Commit OK. Save done. admin@XorPlus#
Find the Core Dump File
When the device crashes, it will create a core file which can be found in a directory called pica/core.
admin@R2:/pica/core$ pwd /pica/core
Find the last_death file for Troubleshooting
You can view the last_death file after the device crashes. It will record the last log message and is located in /var/log directory.
admin@R2:/pica/core$ cd /var/log/ admin@R2:/var/log$ ls btmp faillog fsck lastlog messages report_diag.log dmesg frr last_death lighttpd private wtmp
Copyright © 2024 Pica8 Inc. All Rights Reserved.