The Internet includes a great variety of systems, each implementing many protocols and protocol layers, and some of these contain bugs and misguided features in their Internet protocol software. As a result of complexity, diversity, and distribution of function, the diagnosis of problems is often very difficult.
Problem diagnosis will be aided if routers include a carefully designed facility for logging erroneous or strange events. It is important to include as much diagnostic information as possible when an error is logged. In particular, it is often useful to record the header(s) of a packet that caused an error. However, care must be taken to ensure that error logging does not consume prohibitive amounts of resources or otherwise interfere with the operation of the router.
There is a tendency for abnormal but harmless protocol events to overflow error logging files; this can be avoided by using a circular log, or by enabling logging only while diagnosing a known failure. It may be useful to filter and count duplicate successive messages. One strategy that seems to work well is to both:
This topic is further discussed in [MGT:5].