Passa al contenuto principale

5. Gestione degli errori e dei messaggi di controllo

CLNP e IP differiscono nel modo in cui gli errori vengono segnalati agli host. Negli ambienti IP, l’Internet Control Message Protocol (ICMP, [7]) è usato per restituire messaggi (di errore) agli host che hanno originato pacchetti che non possono essere elaborati. I messaggi ICMP sono trasmessi come dati utente nei datagrammi IP. Vengono segnalate le destinazioni non raggiungibili, le intestazioni di datagrammi IP composte in modo errato, gli scarti di datagrammi IP dovuti a congestione e il superamento della durata/del tempo di riassemblaggio; l’intestazione internet completa che ha causato l’errore più (almeno) 8 ottetti del segmento contenuto in tale datagramma IP vengono restituiti al mittente come parte del messaggio di errore ICMP. Per alcuni errori, ad esempio le intestazioni di datagrammi IP composte in modo errato, viene identificato l’ottetto specifico che ha causato il problema.

Negli ambienti CLNP, viene usato un tipo di messaggio specifico, il tipo Error Report, nell’intestazione del protocollo di livello rete per distinguere i rapporti di errore dai datagrammi CLNP. I rapporti di errore CLNP vengono generati al rilevamento degli stessi tipi di errori di ICMP. Come i messaggi di errore ICMP, l’intestazione CLNP completa che ha causato l’errore viene restituita al mittente nella porzione dati del rapporto di errore. Le implementazioni DOVREBBERO restituire almeno 8 ottetti del datagramma contenuto nel datagramma CLNP al mittente del datagramma CLNP originale. Anche qui, per alcuni errori, viene identificato l’ottetto specifico che ha causato il problema.

Un riassunto del contenuto del rapporto di errore CLNP, così come proposto per l’uso in ambienti TUBA, è illustrato nella Figura 5-1:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        ........Data Link Header........       | NLP ID        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Header Length  |     Version   | Lifetime (TTL)| 000 | Type=ER |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  TOTAL Length of Error Report |           Checksum            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Dest Addr Len |               Destination Address...          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Destination Address...                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Destination Address...                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Destination Address...                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Destination Address...                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PROTO field   | Src  Addr Len |  Source  Address...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Source Address...                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Source Address...                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Source Address...                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               ... Source Address...                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       ... Source Address      | Reason for Discard (type/len) |
   |                               |   1100 0001   | 0000 0010     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Reason for Discard        |    Options...                 |
   |   code        |   pointer     |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Options                             |

: :

   |                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data |

: :

   |                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Note that each tick mark represents one bit position.

Figure 5-1. Error Report Format

5.1. Regole per l’elaborazione di un rapporto di errore​

Di seguito è riportato un riassunto delle regole per l’elaborazione di un rapporto di errore:

         * An Error Report is not generated to report a problem
encountered while processing an Error Report.

* Error Reports MAY NOT be fragmented (hence, the
fragmentation part is absent).

* The Reason for Discard Code field is populated with one of
the values from Table 5-1.

* The Pointer field is populated with number of the first
octet of the field that caused the Error Report to be
generated. If it is not possible to identify the offending
octet, this field MUST be zeroed.

* If the Priority or Type of Service option is present in the
errored datagram, the Error Report MUST specify the same
option, using the value specified in the original datagram.

* If the Security option is present in the errored datagram,
the Error Report MUST specify the same option, using the
value specified in the original datagram; if the Security
option is not supported by the intermediate system, no Error
Report is to be generated (i.e., "silently discard" the
received datagram).

* If the Complete Source Route option is specified in the
errored datagram, the Error Report MUST compose a reverse of
that route, and return the datagram along the same path.

5.2. Confronto tra i messaggi di errore ICMP e CLNP​

La tabella 5-1 fornisce un confronto approssimativo tra tipi e codici dei messaggi ICMP e i codici di tipo errore CLNP (valori in decimale Internet):

 CLNP Error Type  Codes            | ICMP Message           (Type, Code)
 ----------------------------------|------------------------------------
 Reason not specified          (0) | Parameter Problem           (12, 0)
 Protocol Procedure Error      (1) | Parameter Problem           (12, 0)
 Incorrect Checksum            (2) | Parameter Problem           (12, 0)
 PDU Discarded--Congestion     (3) | Source Quench                (4, 0)
 Header Syntax Error           (4) | Parameter problem           (12, 0)
 Need to Fragment could not    (5) | Frag needed, DF set          (3, 4)
 Incomplete PDU received       (6) | Parameter Problem           (12, 0)
 Duplicate Option              (7) | Parameter Problem           (12, 0)
 Destination Unreachable     (128) | Dest Unreachable,Net unknown (3, 0)
 Destination Unknown         (129) | Dest Unreachable,host unknown(3, 1)
 Source Routing Error        (144) | Source Route failed          (3, 5)
 Source Route Syntax Error   (145) | Source Route failed          (3, 5)
 Unknown Address in Src Route(146) | Source Route failed          (3, 5)
 Path not acceptable         (147) | Source Route failed          (3, 5)
 Lifetime expired            (160) | TTL exceeded                (11, 0)
 Reassembly Lifetime Expired (161) | Reassembly time exceeded    (11, 1)
 Unsupported Option          (176) | Parameter Problem           (12, 0)
 Unsupported Protocol Version(177) | Parameter problem           (12, 0)
 Unsupported Security Option (178) | Parameter problem           (12, 0)
 Unsupported Src Rte Option  (179) | Parameter problem           (12, 0)
 Unsupported Rcrd Rte        (180) | Parameter problem           (12, 0)
 Reassembly interference     (192) | Reassembly time exceeded    (11, 1)

    Table 5-1. Comparison of CLNP Error Reports to ICMP Error Messages

 Note 1: The current accepted practice for IP is that source quench
         should not be used; if it is used, implementations MUST
         not return a source quench packet for every relevant packet.
         TUBA/CLNP implementations are encouraged to adhere to these
         guidelines.

 Note 2: There are no corresponding CLNP Error Report Codes for the
         following ICMP error message types:
         - Protocol Unreachable  (3, 2)
         - Port Unreachable      (3, 3)
         [Note: Additional error code points available in the ER type
              code block can be used to identify these message types.]