skip to main content
10.1145/1080091.1080123acmconferencesArticle/Chapter ViewAbstractPublication PagescommConference Proceedingsconference-collections
Article
Free Access

Rigorous specification and conformance testing techniques for network protocols, as applied to TCP, UDP, and sockets

Published:22 August 2005Publication History

ABSTRACT

Network protocols are hard to implement correctly. Despite the existence of RFCs and other standards, implementations often have subtle differences and bugs. One reason for this is that the specifications are typically informal, and hence inevitably contain ambiguities. Conformance testing against such specifications is challenging.In this paper we present a practical technique for rigorous protocol specification that supports specification-based testing. We have applied it to TCP, UDP, and the Sockets API, developing a detailed 'post-hoc' specification that accurately reflects the behaviour of several existing implementations (FreeBSD 4.6, Linux 2.4.20-8, and Windows XP SP1). The development process uncovered a number of differences between and infelicities in these implementations.Our experience shows for the first time that rigorous specification is feasible for protocols as complex as TCP@. We argue that the technique is also applicable 'pre-hoc', in the design phase of new protocols. We discuss how such a design-for-test approach should influence protocol development, leading to protocol specifications that are both unambiguous and clear, and to high-quality implementations that can be tested directly against those specifications.

References

  1. R. Alur and B.-Y. Wang. Verifying network protocol implementations by symbolic refinement checking. In Proc. CAV'01, LNCS 2102, pages 169--181, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. E. Anderson, S. Shenker, I. Stoica, and D. Wetherall. Design guidelines for robust internet protocols. Computer Communication Review, 33(1):125--130, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Bhargavan, S. Chandra, P. J. McCann, and C. A. Gunter. What packets may come: automata for network monitoring. In Proc. POPL, pages 206--219, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Bhargavan, D. Obradovic, and C. A. Gunter. Formal verification of standards for distance vector routing protocols. J. ACM, 49(4):538--576, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. E. Biagioni. A structured TCP in standard ML. In Proc. SIGCOMM'94, pages 36--45, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Billington and B. Han. On defining the service provided by TCP. In Proc. ACSC: 26th Australasian Computer Science Conference, Adelaide, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Bishop, M. Fairbairn, M. Norrish, P. Sewell, M. Smith, and K. Wansbrough. TCP, UDP, and Sockets: rigorous and experimentally-validated behavioural specification. Volume 1: Overview. Technical Report UCAM-CL-TR-624, Computer Laboratory, University of Cambridge, Mar. 2005. 88pp. Available at http://www.cl.cam.ac.uk/users/pes20/Netsem/.]]Google ScholarGoogle Scholar
  8. S. Bishop, M. Fairbairn, M. Norrish, P. Sewell, M. Smith, and K. Wansbrough. TCP, UDP, and Sockets: rigorous and experimentally-validated behavioural specification. Volume 2: The specification. Technical Report UCAM-CL-TR-625, Computer Laboratory, University of Cambridge, Mar. 2005. 386pp. Available at http://www.cl.cam.ac.uk/users/pes20/Netsem/.]]Google ScholarGoogle Scholar
  9. C. Castelluccia, W. Dabbous, and S. O'Malley. Generating efficient protocol code from an abstract specification. IEEE/ACM Trans. Netw., 5(4):514--524, 1997. Full version of a paper in SIGCOMM'96.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Chkliaev, J. Hooman, and E. de Vink. Verification and improvement of the sliding window protocol. In Proc. TACAS'03, LNCS 2619, pages 113--127, 2003.]]Google ScholarGoogle ScholarCross RefCross Ref
  11. M. Compton. Stenning's protocol implemented in UDP and verified in Isabelle. In Proc. 11th CATS, Computing: The Australasian Theory Symposium, pages 21--30, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Fersman and B. Jonsson. Abstraction of communication channels in Promela: A case study. In Proc. 7th SPIN Workshop, LNCS 1885, pages 187--204, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Fyodor. nmap. http://www.insecure.org/nmap/.]]Google ScholarGoogle Scholar
  14. M. J. C. Gordon and T. Melham, editors. Introduction to HOL: a theorem proving environment. Cambridge University Press, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Hickey, N. A. Lynch, and R. van Renesse. Specifications and proofs for Ensemble layers. In Proc. TACAS, LNCS 1579, pages 119--133, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Hofmann and F. Lemmen. Specification-driven monitoring of TCP/IP. In Proc. 8th Euromicro Workshop on Parallel and Distributed Processing, Jan. 2000.]]Google ScholarGoogle Scholar
  17. The HOL 4 system, Kananaskis-2 release. http://hol.sourceforge.net/.]]Google ScholarGoogle Scholar
  18. IEEE and The Open Group. IEEE Std 1003.1 TM -2001 Standard for Information Technology - Portable Operating System Interface (POSIX®). Dec. 2001. Issue 6. Available http://www.opengroup.org/onlinepubs/007904975/toc.htm.]]Google ScholarGoogle Scholar
  19. The Isabelle proof assistant. http://isabelle.in.tum.de/.]]Google ScholarGoogle Scholar
  20. IXIA. IxANVL(™)-automated network validation library, 2005. http://www.ixiacom.com/.]]Google ScholarGoogle Scholar
  21. E. Kohler, M. F. Kaashoek, and D. R. Montgomery. A readable TCP in the Prolac protocol language. In Proc. SIGGCOMM'99, pages 3--13, August 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Kreitz. Building reliable, high-performance networks with the Nuprl proof development system. J. Funct. Program., 14(1):21--68, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. X. Leroy et al. The Objective-Caml System, Release 3.08.2. INRIA, Nov. 2004. Available http://caml.inria.fr/.]]Google ScholarGoogle Scholar
  24. S. L. Murphy and A. U. Shankar. A verified connection management protocol for the transport layer. In Proc. SIGCOMM, pages 110--125, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. L. Murphy and A. U. Shankar. Service specification and protocol construction for the transport layer. In Proc. SIGCOMM, pages 88--97, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Musuvathi and D. Engler. Model checking large network protocol implementations. In Proc.NSDI: 1st Symposium on Networked Systems Design and Implementation, pages 155--168, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Norrish, P. Sewell, and K. Wansbrough. Rigour is good for you, and feasible: reflections on formal treatments of C and UDP sockets. In Proceedings of the 10th ACM SIGOPS European Workshop (Saint-Emilion), pages 49--53, Sept. 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Padhye and S. Floyd. On inferring TCP behaviour. In Proc. SIGCOMM'01, Aug. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Parker and C. Schmechel. RFC2398: Some testing tools for TCP implementors, Aug. 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. V. Paxson. Automated packet trace analysis of TCP implementations. In Proc. SIGCOMM'97, pages 167--179, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Postel. A Graph Model Analysis of Computer Communications Protocols. University of California, Computer Science Department, PhD Thesis, 1974.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. I. Schieferdecker. Abruptly-terminated connections in TCP -- a verification example. In Proc. COST 247 International Workshop on Applied Formal Methods In System Design, June 1996.]]Google ScholarGoogle Scholar
  33. A. Serjantov, P. Sewell, and K. Wansbrough. The UDP calculus: Rigorous semantics for real networking. Technical Report 515, Computer Laboratory, University of Cambridge, July 2001. http://www.cl.cam.ac.uk/users/pes20/Netsem/.]]Google ScholarGoogle ScholarCross RefCross Ref
  34. A. Serjantov, P. Sewell, and K. Wansbrough. The UDP calculus: Rigorous semantics for real networking. In Proc. TACS 2001: Fourth International Symposium on Theoretical Aspects of Computer Software, Tohoku University, Sendai, Oct. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. M. A. Smith and K. K. Ramakrishnan. Formal specification and verification of safety and performance of TCP selective acknowledgment. IEEE/ACM Trans. Netw., 10(2):193--207, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. A. S. Smith. Formal verification of communication protocols. In Proc. FORTE IX/PSTV XVI, pages 129--144, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. W. R. Stevens. TCP/IP Illustrated Vol. 1: The Protocols. 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. W. R. Stevens. UNIX Network Programming Vol. 1: Networking APIs: Sockets and XTI. Second edition, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. K. Wansbrough, M. Norrish, P. Sewell, and A. Serjantov. Timing UDP: mechanized semantics for sockets, threads and failures. In Proceedings of ESOP 2002: the 11th European Symposium on Programming (Grenoble), LNCS 2305, pages 278--294, Apr. 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. G. R. Wright and W. R. Stevens. TCP/IP Illustrated Vol. 2: The Implementation. 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Rigorous specification and conformance testing techniques for network protocols, as applied to TCP, UDP, and sockets

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            SIGCOMM '05: Proceedings of the 2005 conference on Applications, technologies, architectures, and protocols for computer communications
            August 2005
            350 pages
            ISBN:1595930094
            DOI:10.1145/1080091
            • cover image ACM SIGCOMM Computer Communication Review
              ACM SIGCOMM Computer Communication Review  Volume 35, Issue 4
              Proceedings of the 2005 conference on Applications, technologies, architectures, and protocols for computer communications
              October 2005
              324 pages
              ISSN:0146-4833
              DOI:10.1145/1090191
              Issue’s Table of Contents

            Copyright © 2005 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 22 August 2005

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            Overall Acceptance Rate554of3,547submissions,16%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader