network protocol design and evaluation
play

Network Protocol Design and Evaluation 04 - Protocol Specification, - PowerPoint PPT Presentation

Network Protocol Design and Evaluation 04 - Protocol Specification, Part III Stefan Rhrup University of Freiburg Computer Networks and Telematics Summer 2009 Overview In previous parts of this chapter: Modeling behaviour with


  1. Network Protocol Design and Evaluation 04 - Protocol Specification, Part III Stefan Rührup University of Freiburg Computer Networks and Telematics Summer 2009

  2. Overview ‣ In previous parts of this chapter: • Modeling behaviour with state machines, state charts ‣ Part III: • Specifying data/message formats Network Protocol Design and Evaluation Computer Networks and Telematics 2 Stefan Rührup, Summer 2009 University of Freiburg

  3. Data Format Specification ‣ Structuring data is part of the design process ... however, it is usually not of primary importance. ‣ Design decisions should not be driven by data format or encoding issues ‣ A defined data/message format and the corresponding encoding is important for the interoperability ‣ Some notation needed during the specification process (...and also for documentation) Network Protocol Design and Evaluation Computer Networks and Telematics 3 Stefan Rührup, Summer 2009 University of Freiburg

  4. Tabular and Box Notation ‣ Tabular Notation • Listing of message fields with types, lengths and descriptions ‣ Box Notation • Table of message fields, where the size of the boxes indicate the field length • used by the IETF in RFCs Network Protocol Design and Evaluation Computer Networks and Telematics 4 Stefan Rührup, Summer 2009 University of Freiburg

  5. Tabular Notation, Example C)&&*+)'-/5)D';EFGHCI#;GE @%+,%9%<*,<)D'J2<*8'=E2-)'!> K%1)<-%2,D'L2-$ 8&F$G%()*$&+"@"%"&) !"F"G"&#" I*G"#)*$& >JK" L"&E)M 1DH?#@(HD"6 M12-2<28'7%&<1%(%,*-21 N:O L2-$ C ! P*88'1)9)1),<) N:A L2-$ C'=E2-)'O> O?Q C)&&*+)'-/5) N:N L2-$ C ! @),7%,+'<2(58)-) N:" L2-$ G'=E2-)'A> ! K%&58*/ N:" G'=E2-)'N> =E2-)'"> ,' → '0 R)/5*7'9*<%8%-/ N:" G'=E2-)'S> O?AN 0' → ', @%+,*8 N:" G'=E2-)'B> O?A ,' → '0 P*88)7'5*1-/',0(.)1 N:" .2-$ G'=E2-)'T> O?Q Contents of an ISDN Information Message ISDN Basic Call Control Specification [ITU Q.931] Network Protocol Design and Evaluation Computer Networks and Telematics 5 Stefan Rührup, Summer 2009 University of Freiburg

  6. Tabular and Box Notation, Example Q " R S ! ? > ; T20%0 P+606263&/(,2+(5(.-06+ ; U U U U V%.)0$&6'&2-33&+%'%+%.2%&B-3*%&L(.&620%0,D > W-33&+%'%+%.2%&B-3*% ? U X%,,-)%&0=A% %027 T0$%+&(.'6+5-0(6.&%3%5%.0,&-,&+%F*(+%/ #$%& ' ( ) ! * + , " - - - - - - - - .&/0123%4350%$4506673&12/$8$/392&&0:23%7123;<4%2= - - - > > > > > !"##$%&'"(#)&*+%,'$+%&&"-%. - - - - " ?3@A.BCD<E - - - " - ?3F@AA3GBHF..ID<E - - " " " ?3FH<<.FC - " " " " ?3FH<<.FC3@FJ<HKA.IE. - - - " " ?3GBHEB.LL - - " - " ?3L.CMG - " " - " ?3L.CMG3@FJ<HKA.IE. - - " > > > > > !"##$),/01+"')0,$2*"&%$+%&&"-%. - - " " - ?3B.LMN. - " " " - ?3B.LMN.3@FJ<HKA.IE. General Message Organization and Message Types ISDN Basic Call Control Specification [ITU Q.931] Network Protocol Design and Evaluation Computer Networks and Telematics 6 Stefan Rührup, Summer 2009 University of Freiburg

  7. Box Notation, Example ‣ Data format specification of the internet protocols ‣ TCP and IP packets have a header and a data part ‣ Header information: • destination address (IP) and port (TCP) • source address and port • TTL (IP), sequence number (TCP), and checksums (both) • flags and options • etc. Network Protocol Design and Evaluation Computer Networks and Telematics 7 Stefan Rührup, Summer 2009 University of Freiburg

  8. Box Notation, Example (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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| IHL |Type of Service| Total Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification |Flags| Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time to Live | Protocol | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ASCII Box Notation for the IPv4 Header Format [RFC 791] Network Protocol Design and Evaluation Computer Networks and Telematics 8 Stefan Rührup, Summer 2009 University of Freiburg

  9. Box Notation, Example (2) 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ASCII Box Notation for the TCP Header Format [RFC 793] Network Protocol Design and Evaluation Computer Networks and Telematics 9 Stefan Rührup, Summer 2009 University of Freiburg

  10. Box Notation and TLVs ‣ Box Notation • Intuitive way of describing a data format • Field types/encoding have to be specified separately • Limitations: no variable length fields ‣ Type-Length-Value (TLV) • Representation of variable size or optional message fields • Can be parsed without understanding the meaning of the field Network Protocol Design and Evaluation Computer Networks and Telematics 10 Stefan Rührup, Summer 2009 University of Freiburg

  11. TLV Example 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 Header Option1 Type Option1 Length Option1 Value 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 Option1 Value Option2 Type Option2 Length +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option2 Value Padding | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Data | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Field in the TCP Header [RFC 793] Network Protocol Design and Evaluation Computer Networks and Telematics 11 Stefan Rührup, Summer 2009 University of Freiburg

  12. Getting more formal: ABNF ‣ Augmented Backus-Naur Form ‣ Defined in RFC 5234 (older def. in RFC 822) ‣ Definition language for some IETF protocols ‣ BNF describes context-free grammars (Chomsky 2) by derivation rules of the form < symbol> ::= expression ‣ Left side symbols: non-terminals , right side symbols: terminals and non-terminals ‣ Right side expression: sequence of symbols (or choice of sequences) Network Protocol Design and Evaluation Computer Networks and Telematics 12 Stefan Rührup, Summer 2009 University of Freiburg

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend