In the FRRouting routing protocol debugging blog entry, there is a debugging approach explained how to get routing protocol debugging messages in FRRouting. This kind of debugging works for all versions of FRRouting, WHEN you have the possibility to leave the vtysh shell and use a regular system shell, like f.e. bash or zsh. If there is no possibility to leave the vtysh then there is no way getting routing protocol debug messages using FRRouting.
But, since FRRouting version 9 it is possible to get the routing debugging protocol messages using the terminal monitor command. This works without leaving the vtysh. It works the same way as it works in Cisco IOS products.
If using IOS, NX-OS or IOS-XR network operating system, the debug routine works simply, like in shown example below. Exactly 2 commands are needed to use interactive protocol debugging while being in need of troubleshoot in some situation:
configure terminal
logging console
end
Enable specific IOS protocol debugging option:
terminal monitor
debug ip ospf adj
Using FRRouting, the routing debugging routine will work the same. vtysh has now the option to interactive write protocol debug to the vtysh prompt.
This article is a simple demonstration using the RIPng, OSPF6 and IS-IS routing protocol debugging, to show the different debug options in action.
Enable the routing protocol debugging in the FRR vtysh. First example below is showing a RIPNG routing protocol debug.
This is working using since:
Hello, this is FRRouting (version 9.0.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
FRRouting 9.0.1 (R1) on Linux(6.1.57-0-virt). Copyright 1996-2005 Kunihiro Ishiguro, et al. ...
debug ripng
2023-10-16 21:27:32.707 [DEBG] ripngd: [PFFNW-H080S] RIPng update timer expired! 2023-10-16 21:27:32.707 [DEBG] ripngd: [NF770-F9RZW] RIPng update routes on interface eth0 2023-10-16 21:27:32.707 [DEBG] ripngd: [NF770-F9RZW] RIPng update routes on interface eth2
After finished debugging, disable the debug using the no debug ripng events
command:
And finally disable the interactive log output to vtysh using the no terminal monitor
command:
debug ospf6
Showing the OSPF routing protocol. OSPF6 example debugging output.
2023-10-16 21:37:39.899 [DEBG] ospf6d: [TT486-9H7F8] Neighbor Event 192.0.2.2%eth0: HelloReceived 2023-10-16 21:37:39.899 [DEBG] ospf6d: [M8XF6-3BFFD] Neighbor state change 192.0.2.2%eth0 (Router-ID: 192.0.2.2): [Down]->[Init] (HelloReceived) 2023-10-16 21:37:43.776 [DEBG] ospf6d: [KF5Q0-MQ9NH] Neighbor Event 192.0.2.2%eth0: 2Way-Received 2023-10-16 21:37:43.776 [DEBG] ospf6d: [M8XF6-3BFFD] Neighbor state change 192.0.2.2%eth0 (Router-ID: 192.0.2.2): [Init]->[ExStart] (2-WayReceived) 2023-10-16 21:37:43.776 [DEBG] ospf6d: [NW6S6-VBVF0] Neighbor Event 192.0.2.2%eth0: NegotiationDone 2023-10-16 21:37:43.776 [DEBG] ospf6d: [M8XF6-3BFFD] Neighbor state change 192.0.2.2%eth0 (Router-ID: 192.0.2.2): [ExStart]->[ExChange] (NegotiationDone) 2023-10-16 21:37:43.778 [DEBG] ospf6d: [YJ981-ADPMN] Neighbor Event 192.0.2.2%eth0: ExchangeDone 2023-10-16 21:37:43.778 [DEBG] ospf6d: [M8XF6-3BFFD] Neighbor state change 192.0.2.2%eth0 (Router-ID: 192.0.2.2): [ExChange]->[Loading] (ExchangeDone) 2023-10-16 21:37:43.780 [DEBG] ospf6d: [Y6JDB-9F2AJ] Neighbor Event 192.0.2.2%eth0: LoadingDone 2023-10-16 21:37:43.780 [DEBG] ospf6d: [M8XF6-3BFFD] Neighbor state change 192.0.2.2%eth0 (Router-ID: 192.0.2.2): [Loading]->[Full] (LoadingDone) 2023-10-16 21:37:43.780 [NTFY] ospf6d: [GHN28-AMRE7] AdjChg: Nbr 192.0.2.2(default) on 192.0.2.2%eth0: Loading -> Full (LoadingDone) 2023-10-16 21:37:49.899 [DEBG] ospf6d: [TT486-9H7F8] Neighbor Event 192.0.2.2%eth0: HelloReceived
After finished, disable the active debug using the no debug ospf6 neighbor event
command:
And finally again `no terminal monitor' command:
debug isis
Last example. Showing the IS-IS protocol in action. IS-IS example debugging output
2023-10-18 18:58:22.208 [DEBG] isisd: [H62XJ-ECWS5] ISIS-Upd (1): Rcvd L2 LSP on eth0, cirType L2, cirID 0 2023-10-18 18:58:22.208 [DEBG] isisd: [R78GD-MAYNF] ISIS-Upd (1): Rcvd L2 LSP 2222.2222.2222.00-00, seq 0x00000005, cksum 0x1b05, lifetime 1164s, len 74, on eth0 2023-10-18 18:58:24.041 [DEBG] isisd: [Z5DX2-FG5TJ] ISIS-Upd (1): Refreshed our L2 LSP 1111.1111.1111.00-00, len 89, seq 0x00000006, cksum 0x1ac9, lifetime 1185s refresh 8 2023-10-18 18:58:24.050 [DEBG] isisd: [Z9FW1-T3SB5] ISIS-Upd (1): Sending L2 LSP 1111.1111.1111.00-00, seq 0x00000006, cksum 0x1ac9, lifetime 1185s on eth0 2023-10-18 18:58:49.399 [DEBG] isisd: [H62XJ-ECWS5] ISIS-Upd (1): Rcvd L2 LSP on eth0, cirType L2, cirID 0 2023-10-18 18:58:49.399 [DEBG] isisd: [R78GD-MAYNF] ISIS-Upd (1): Rcvd L2 LSP 2222.2222.2222.00-00, seq 0x00000006, cksum 0x734d, lifetime 1142s, len 89, on eth0
After finished debugging session, disable the active debug using the no debug isis event
command:
And finally again `no terminal monitor' command:
Finished. Cool stuff.
References
The appliance used in the examples is running on alpinelinux and FRRouting. Detailed setup instructions for this FRR appliance read the Building 64bit alpine linux GNS3 FRRouting appliance article. Setup and ready in 10 minutes, for free, a advanced router specifically for GNS3 netlab usage.