23.6. IPRTR diagnostics, statistics and debug

23.6.1. IPRTR diagnostics

To display the diagnostics of the IPRTR resource the following commands are used:

d d iprtr / d de iprtr

Shows diagnostic information, such as the state of the resource and the routing table, the current percentage of routings present into the routing table, the current number of routings present in the table, the maximum number of routings reached from start-up in the table and the maximum number of routings present into the table (this information indicates the MAXROUTE parameter).

[18:06:40] ABILIS_CPX:d d iprtr

RES:Iprtr ---------------------------------------------------------------------
       IP_Router_general_properties
       STATE:READY
       ROUTINGs TABLE Diagnostics
       -----------|---State---|-Current%--|--Current--|---Peak----|----Max----|
       ROUTINGS   |NORMAL     |          5|         29|         29|        500|
       ------------------------------------------------------------------------

23.6.2. IPRTR statistics

To display the statistics of the IPRTR resource the following commands are used:

d s iprtr / d se iprtr

Statistic information are divided into two groups: one dedicated to IP Router (the number of IP datagrams sent/received, number of IP datagrams discarded due to header errors and to wrong destination address, etc.), the other one to the ICMP (the number of ICMP messages sent/received, the number of bad ICMP messages received, the number of “Unreachable destination” ICMP messages, etc.).

[18:06:40] ABILIS_CPX:d s iprtr

RES:Iprtr ---------------------------------------------------------------------
       IP_Router_general_properties                                            
       --- Cleared 25 days 05:51:06 ago, on 03/08/2017 at 07:25:50 ------------
       ROUTER Statistics
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       DG         | 1033201636|   63584863|HDR-ERR    |        407|           |
       ADDR-ERR   |          1|           |FRW-DG     |           |  532994832|
       UNK-PROT   |         13|           |DISCARDS   |          0|     113726|
       LOCAL-DG   |  501151839|           |NO-ROUTE   |           |        247|
       REAS-TOUT  |        176|           |REAS-REQD  |      15507|           |
       REAS-OK    |      14938|           |REAS-FAIL  |        569|           |
       FRAG-OK    |           |         25|FRAG-FAIL  |           |          0|
       FRAG-CREATE|           |         50|ROUT-DISC  |          0|           |
       ------------------------------------------------------------------------
       ICMP Statistics
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       MSG        |     217315|    2772726|ERR        |          0|           |
       DST-UNREACH|     214402|    2709495|T-EXCEED   |       1935|      10856|
       PARM-PROB  |          0|          0|SRC-QUENCH |          0|          0|
       REDIRECT   |        190|      50431|ECHO       |        717|       1227|
       ECHO-REP   |         64|        717|TSTAMP     |          3|          0|
       TSTAMP-REP |          0|          0|ADMASK     |          0|          0|
       ADMASK-REP |          0|          0|LOST-BUF   |       2763|           |
       ------------------------------------------------------------------------

With reference to the shown interval of time («Cleared 25 days 05:51:06 ago») these counters show the number of:

DGIP datagrams from all interfaces.
HDR-ERRIP datagrams discarded because of header errors (e.g., checksum error, version number mismatch, TTL exceeded, etc).
ADDR-ERRIP datagrams discarded because of incorrect destination address.
FRW-DGIP datagrams for which an attempt was made to forward.
UNK-PROTLocally addressed IP datagrams with an invalid protocol.
DISCARDSIP datagrams discarded because of a lack of buffer space.
LOCAL-DGIP datagrams delivered to appropriate protocol module.
NO-ROUTEIP datagrams discarded because no route could be found.
REAS-TOUTMaximum number of seconds that received fragments are held while awaiting reassembly.
REAS-REQDIP fragments received that needed to be reassembled.
REAS-OKIP datagrams successfully reassembled.
REAS-FAILFailures by IP reassembly algorithm.
REAS-OKIP datagrams successfully reassembled.
FRAG-OKIP datagrams that have been successfully fragmented.
FRAG-FAILIP datagrams that needed to be fragmented but couldn't because the 'don't fragment' flag was set.
FRAG-CREATEIP fragments generated by fragmentation.
ROUT-DISCRouting entries chosen to be discarded even though they were valid.
MSGICMP messages.
ERRICMP messages with errors (e.g., invalid ICMP checksum).
DST-UNREACHICMP destination unreachable message.
T-EXCEEDICMP time exceeded message.
PARM-PROBICMP parameter problem message.
SRC-QUENCHICMP source quench messages.
REDIRECTICMP redirect messages.
ECHOICMP echo request messages.
ECHO-REPICMP echo reply messages.
TSTAMPICMP timestamp request messages.
TSTAMP-REPICMP timestamp reply messages.
ADMASKICMP address mask request messages.
ADMASK-REPICMP address mask reply messages.

23.6.3. IPRTR debug

Type the following command to view the commands allowed:

[12:28:04] ABILIS_CPX:debug res:iprtr

RES:Iprtr ---------------------------------------------------------------------
       IP_Router_general_properties                                            
       BufferLength:64512  Date/Time:08/08/2017 12:28:08 TraceTime:97326729

Usage:
   LSN:0                 == This help
   --- Debug ------------------------------------------------------------------
   LSN:1                 == Complete debug
   LSN:2                 == Upper/Lower NCB status
   --- Router and NAT ---------------------------------------------------------
   LSN:4                 == NAT/ROUTE statistics
   LSN:4   CMD:CLR       == NAT/ROUTE statistics clear
   LSN:9   CMD:src.src.src.src-dst.dst.dst.dst == Route query
   --- Queues -----------------------------------------------------------------
   LSN:10 [CMD:IP-x]     == Queue packet status information
   LSN:11  CMD:IP-x      == Queue flow information
   LSN:11  CMD:IP-x,EXT  == Queue flow information with extended format
   LSN:12  CMD:IP-x      == Queue flow virtual times
   LSN:13 [CMD:IP-x]     == Queue forced discards
   LSN:14 [CMD:IP-x]     == Queue total discards
   LSN:15  CMD:CLR       == Queue forced/total discards clear
   LSN:16 [CMD:IP-x]     == Queue BYTEs status information
   LSN:17 [CMD:IP-x]     == IP Shaping queue status information
   --- Reassembler and fragmented --------------------------------------------
   LSN:20 [CMD:<prot>]   == Reassembler statistics
   LSN:21 [CMD:<prot>]   == Reassembler descriptor information
   LSN:22 [CMD:IP-x]     == FRAG/REAS statistics by IP-RES
   LSN:22 [CMD:IP-x,]CLR == FRAG/REAS statistics by IP-RES clear
   --- IPACL ------------------------------------------------------------------
   LSN:25  CMD:IP-x      == IPACL request tracer information
   LSN:25  CMD:CLR       == IPACL request tracer information clear
   --- Speedlimit -------------------------------------------------------------
   LSN:30                == Speed-limit status information
   LSN:31                == Speed-limit error information
   LSN:31   CMD:CLR      == Speed-limit error information clear
   --- State detect -----------------------------------------------------------
   LSN:40 [CMD:IP-x]     == STATE-DETECT status information
   LSN:41  CMD:IP-x,EXT  == STATE-DETECT status information extended 
   --- Load Balancing ---------------------------------------------------------
   LSN:45                == Load balancing configuration by ID
   LSN:46                == Load balancing configuration by IP-RES
   --- LAN interfaces  --------------------------------------------------------
   LSN:50  CMD:IP-x      == Registered local IP addresses
   LSN:51  CMD:IP-x      == Registered multicast MAC addresses
   LSN:52  CMD:IP-x      == Registered virtual MAC/IP addresses
   LSN:53  CMD:IP-x      == Registered aliases
   LSN:54  CMD:IP-x      == Local Addresses summary
   LSN:55  CMD:IP-x      == Sessions to Ethernet
   LSN:56  CMD:IP-x      == Multi-Packet statistics
   LSN:57  CMD:IP-x      == DHCP client information
   --- AIPT tunnels -----------------------------------------------------------
   LSN:60 [CMD:IP-x]     == AIPT tunnels: TCP-MSS-CLAMP statistics
   LSN:61 [CMD:IP-x,]CLR == AIPT tunnels: TCP-MSS-CLAMP statistics clear
   --- Errored packets --------------------------------------------------------
   LSN:70                == ICMP header of last 10 packets with checksum error
   LSN:70  CMD:EXT       == ICMP dump of last 10 packets with checksum error
   LSN:70  CMD:CLR       == ICMP checksum failures clear
   LSN:71                == IP headers of last 100 packets with unknown protocol
   LSN:71  CMD:CLR       == Unknown protocol history clear
   --- Miscellaneous ----------------------------------------------------------
   LSN:80                == Sorted table of local IP addresses
   LSN:81  CMD:IP-x      == Lower IP-Res overhead information
   LSN:82                == Information on FIFO node manual-check corruption
   LSN:83  CMD:IP-x      == Throughput statistics

Square brackets indicate optional arguments
x indicates the index of an IP resources.

For example, type the following command to create a route query to verify the outgoing IP port and the gateway for a specific source and destination IP.

[12:28:08] ABILIS_CPX:debug res:iprtr lsn:9 cmd:192.168.29.254-8.8.8.8

RES:Iprtr ---------------------------------------------------------------------
       IP_Router_general_properties                                            
       BufferLength:64512  Date/Time:08/08/2017 12:35:04 TraceTime:97742590

Route query information

Route query for SRC:192.168.029.254 and DST:008.008.008.008.

Outgoing IP Port 2, gateway 192.168.010.001.