IETF, SIPPING WG Internet Draft Jiri Kuthan Document: draft-kuthan-sipping-diag-00.txt iptel.org Expires: April 2003 October 2002 Requirements for Diagnostics Support in SIP Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026 [1]. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Abstract Session Initiation Protocol (SIP) provides only limited space for communicating diagnostic information when errors occur. To facilitate troubleshooting, automated error detection, and reporting we propose to create new protocol extensions. The extensions will be used for richer reporting on request processing status. Particularly, we suggest that User Agent Servers (UAS) include additional information about error reasons in negative replies, and proxy servers indicate in relayed requests the routing logic they used. Table of Contents 1. Introduction and Motivation....................................2 2. Proposal for Debugging Information Extensions to SIP...........3 2.1 Noisy UASs.................................................3 2.2 Proxy Hints................................................4 3. Security Considerations........................................5 Kuthan Expires April 2003 [Page 1] SIP Diagnostics Info October 2002 References........................................................5 Acknowledgments...................................................6 Author's Addresses................................................6 1. Introduction and Motivation "Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants. These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences." [2] SIP networks typically consist of User Agent Clients (UAC), User Agent Servers (UAS) and proxy servers between them. SIP requests, such as call invitations or instant messages [3], are routed from UACs down to UASs directly or via one or more proxy servers. The path of a SIP request can be arbitrarily complex in a distributed environment. The request can visit as many proxy servers along its path as the Max-Forwards header field permits. If an attempt to forward the request to a destination fails, stateful proxy servers may decide to fork the request to another destination. Also, it is perfectly valid and useful for a request to visit a proxy server several times, which is called "spiral". The following graph shows an example of such a non-trivial request path: +-----+ REQ a +--------+ REQ branch0 +----+ | UAC |-------->| ...... |------------->|UAS1| +-----+ | |<--- 500 -----+----+ | | | proxy1 | REQ branch1 +--------+ | |-------------------------->| proxy2 |--+ | | REQ 1.2.1 +----+ +--------+ | +->| ...... |---------->|UAS2| | | +--------+ +----+ v | REQ br1.2 | +----------------------<----------------------------+ Example 1: A SIP Request Path with Many Hops, Forking and a Spiral While such application-layer routing ability gains flexibility (see [4] for a discussion of benefits of distributed design), it makes tracing network errors quite difficult. When an error occurs in the request path, upstream clients have very little knowledge about what has gone wrong and why. They know final status from status lines in SIP responses, and at the server's discretion, the server's name (without port number) and additional hints in Warning header field. Important information about the circumstances which made the Kuthan Expires April 2003 [Page 2] SIP Diagnostics Info October 2002 downstream server send a negative reply back remains hidden downstream. Particularly, upstream troubleshooters do not know: - What was the resource requested and identified by a URI. - If spirals occurred, which spiral iteration failed. - Who was the pre-last hop, which might have indeed caused the request to fail. - If forwarding to next hop failed, what was the next hop. Lack of this information makes operation of SIP networks difficult, even if very few SIP hops are involved in a request's path. Manual troubleshooting is difficult without sufficient information and even more difficult is automated error detection, reporting, and statistics collection. The difficulty grows with the complexity of the request path and by the presence of multiple administrative domains, which prohibit troubleshooters from watching operation at foreign SIP hops. We thus propose to introduce a place for additional debugging information to SIP. Details are described in the following section. 2. Proposal for Debugging Information Extensions to SIP We propose a very simple answer to the problem of SIP's lack of debugging information: make SIP servers propagate their request processing knowledge along the SIP path. Whereas one might think of propagating the debugging information through special-purpose systems, we argue that embedding it in SIP makes operation easier. A primary benefit is that the information will be routed along the SIP path. That allows all SIP hops involved in processing the request in question to gain potentially needed information. This also solves the problem of multiple administrative domains: remote parties automatically receive desired information without having to communicate to other domain's administration systems. Particularly, we propose two SIP extensions: Making SIP UASs to disclose additional information about failed requests upstream (Section 2.1) and making SIP proxy servers indicate their routing decision in relayed requests (Section 2.2). 2.1 Talkative UASs As mentioned previously, upstream clients have very little knowledge about circumstances that caused a request to fail. We are thus suggesting SIP servers to supply additional debugging hints in negative SIP replies. Kuthan Expires April 2003 [Page 3] SIP Diagnostics Info October 2002 Fortunately, SIP servers know lot of information that can facilitate troubleshooting: - They know the current request URI, which caused a request to fail. Making upstream clients aware of it helps to debug errors in routing plans. - They know the number of Via header fields that gains the knowledge of how many SIP hops a request has passed; particularly useful for spiral troubleshooting. - They know the transport address of the previous SIP hop, which is good to know, if that is the hop responsible for an error. - Proxy servers know the next-hop SIP address – useful to know when the proxy server misrouted a request, or the downstream server is unresponsive. We leave the syntax open. The following example response solely demonstrates content of additional diagnostic information. SIP/2.0 500 Really Bad Error Via: SIP/2.0/UDP 61.15.105.253:5060;branch=z9hG4bK8745430abc.0 Via: SIP/2.0/UDP 192.168.0.129:5060;branch=z9hG4bK14f54300fc.0 From: sip:21004041@iptel.org;tag=123 To: sip:21004041@iptel.org;tag=456 Call-ID: 415392@61.15.105.253 CSeq: 2 REGISTER Content-Length: 0 Warning: 392 195.37.77.101 "downstream ICMP failure" Debug: req_src_ip=61.15.105.253; in_uri=sip:foobar@foo.bar; out_uri=sip:foo@195.37.77.22; via_cnt=2" Example 2: SIP Response with Embedded Diagnostic Information Though this memo focuses on pieces of diagnostic information well- known to be needed in current operational practice, even more information may be needed in the future and extensibility needs to be preserved. This information may include: - Server's process and/or thread ID (good for server debugging if multiple instances bind to the same address) - Log cookies when operators do not wish to disclose extensive information but wish to keep the ability to link SIP transactions to log reports, etc. 2.2 Proxy Hints Yet another difficulty troubleshooters encounter is discovering broken logic in SIP proxy servers. A proxy server's request-routing logic may be quite complex and consist of a decision-making tree with many leafs: it may distinguish between requests for IP and PSTN destinations, it can apply different logic to anonymous and Kuthan Expires April 2003 [Page 4] SIP Diagnostics Info October 2002 authenticated users, inbound and outbound requests, it can divert requests to different destinations when a primary contact fails, etc. A failure in server's logic is not easy to locate as the logic is hidden in server's internals. Observers only see the final result, which might have been caused by any part of the logic. To facilitate troubleshooting of broken routing logic, we suggest that a proxy server reveal the logic it applied to an incoming request in the relayed outgoing request. This piece of aggregated information may be expressed as any human-readable string describing the logic applied. A possible place for this information is the Via header field, which is inserted by a proxy server when forwarding. The following example shows such a Via header field stack: Via: SIP/2.0/UDP 1.2.3.4;branch=z9hG4bK87454300fc.0;route=PSTN Via: SIP/2.0/UDP 1.2.3.4;branch=z9hG4bK1234560012.0;route=INBOUND Via: SIP/2.0/UDP 1.2.3.4;branch=z9hG4bKabcdef00we.0;route=OUTBOUND Example 3: Proxy Routing Logic Hints Attached to Requests Possibly, the collected routing hints may be mirrored back by a UAS at the end of SIP chain to make the upstream part of the chain understand downstream progress. 3. Security Considerations Enhanced diagnostic information included in SIP messages as proposed in this memo may reveal information about service provider's network. The information is optional and we leave it up to the provider to trade between transparent and secret operational mode. Our recommendation is to choose the transparent, information-rich strategy to make operation easier. References 1 Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996. 2 Rosenberg J., Schulzrinne H., Camarillo G., Johnston A., Peterson J., Sparks R., Handley M., Schooler E.: "SIP: Session Initiation Protocol", RFC 3261, IETF, June 2002. 3 B. Campbell (Editor): "Session Initiation Protocol Extension for Instant Messaging", Internet Draft, draft-ietf-sip-message-07, IETF, September 2002. Work in progress. Kuthan Expires – April 2003 [Page 5] SIP Diagnostics Info October 2002 4 Rosenberg J., Mataga P., Schulzrinne H.: "An Application Server Component Architecture for SIP", Internet Draft, draft-rosenberg- sip-app-components, IETF, March 2001. Expired. (Parts of the text available in J. Rosenberg's dissertation.) Acknowledgments Thanks to Alan Johnston for a review. Author's Addresses Jiri Kuthan iptel.org Email: jiri@iptel.org Full Copyright Statement Copyright (C) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgement Kuthan Expires April 2003 [Page 6] SIP Diagnostics Info October 2002 Funding for the RFC Editor function is currently provided by the Internet Society.