1 / 24

Building-Block Protocols

Building-Block Protocols. Ning Yu Information and Computer Sciences University of Hawaii at Manoa. Summary. Network Protocols. Building-Block Protocols. Implementation. Summary. By: Edoardo S. Biagioni

mariawhite
Download Presentation

Building-Block Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building-Block Protocols Ning Yu Information and Computer Sciences University of Hawaii at Manoa Summary Network Protocols Building-Block Protocols Implementation

  2. Summary By: Edoardo S. Biagioni To decompose the existing networking protocols into simpler components. It should be possible to easily assemble these components into functional networking protocol stacks. Use of different components or the same components in different orders would lead to different protocols. Basic Idea

  3. Network Protocols The abstract objects that make up the layers of a network system are called protocols. Definition:

  4. Service interface • defines the operations that local objects can perform on the protocol • Peer-to-peer interface • defines the form and meaning of messages exchanged between protocol peers to implement the communication service. High-level Object High-level Object Host1 Host2 Protocol Protocol

  5. Protocols generally add headers as the packet moves down the stack in send side, while the receive side removes the header as the packet moves up the stack. • Protocols generally have • two types of functions: • format functions • control functions

  6. Simply adds a fixed-size constant header to all outgoing packets Simply removes a fixed-size constant header to all outgoing packets swap constant void checksum Adds a standard CRC header or trailer CRC flow control counter de/multiplexing Removes/ Adds a header for several higher-level protocol stacks length … et al. Building - Block Protocols

  7. swap de/multiplexing constant length acknowledgement fragmentation checksum Assemble Assemble gateway/interface urgent data CRC routing/loop prevention connections flow control de/multiplexing TCP Example IP Example Internet addressing counter flow control type of service acknowledgement de/multiplexing bit error detection retransmission length version resequencing … et al. fragmentation • Advantages: • Easy assembly of custom protocols bit error detection • Explicit interaction between blocks • Easier to write, test and verify

  8. send_protocol_stack char * header int header_size int (* protocol_function) ( char * spaceBegin, char * dataBegin, char * dataEnd, char * spaceEnd, struct send_protocol_stack * stack); struct send_protocol_stack * next Block’s structure Data Structure

  9. Send stack push struct send_protocol_stack * send_stack_push( char * header, int header_size, int (* protocol_function)( char * spaceBegin, char * dataBegin, char * dataEnd, char * spaceEnd, struct send_protocol_stack * stack), struct send_protocol_stack * stack); Data Structure

  10. header header_size protocol_function() send_protocol_stack 6 header 6 header_size header 4 protocol_function() header_size send _protocol_stack protocol_function() next send_protocol_stack send _protocol_stack send_stack_push send_stack_push send_stack_push send_stack_push

  11. header protocol_function() 6 header_size header 4 header_size send _protocol_stack protocol_function() next send_protocol_stack send _protocol_stack Send stack push send_reorder Data Structure send_constant send_constant send_constant send_udp

  12. receive stack push receive_reorder receive_reorder Data Structure receive_void receive_save receive_demux receive_check receive_void

  13. send_gettime send_gettime receive_rtt receive_save receive_void receive_void send_constant send_constant send_constant send_constant send_constant send_constant send_udp send_udp receive_void receive_void Implementation reflect reflect Feasibility Server Client receive_udp receive_udp Ping-Pong

  14. uhunix2 uhics Ping-Pong round-trip (us) min/avg/max =3580 /3759/5192 ----uhunix2.its.hawaii.edu PING Statistics---- round-trip (ms) min/avg/max = 3/3/8 The average Round trip time could be more than 5 ms when more print out added.

  15. Cleo (Linux) uhunix2 Ping-Pong round-trip (us) min/avg/max = 2257/3203/10625 --- uhunix2.its.hawaii.edu ping statistics --- round-trip min/avg/max = 3.8/4.8/6.2 ms

  16. 48bits 48bits 16bits Destination Address Source Address Type Indicates the type of management information present in the packet. Contains the physical address of the device that is to receive the packet Contains the hardware address of the device sending the packet Ethernet The Ethernet’s data field carries: a minimum of 46 byes a maximum of 1500 bytes If there are less than 46 bytes of data, the field will be padded to the minimum length

  17. Ethernet send stack Ethernet receive stack 48bits 48bits 16bits send_constant Simulating Ethernet Header DestinationIP | port # SourceIP | port # Type send_constant IP ARP send_constant receive_demux send_trim receive_void send_extend receive_void send_udp Ethernet Stack Assembly stack

  18. 0 16 32 Hardware type ProtocolType HLEN PLEN Operation SourceHardwareAddr SourceHardwareAddr SourceProtocolAddr SourceProtocolAddr TargetHardwareAddr TargetHardwareAddr TargetProtocolAddr ARP The goal: To enable each host on a network to built up a table of mappings between IP address and link-level addresses

  19. Implement ARP reply stack and request stack by using send_constant Implement ARP receive stack by using receive_void receive_check receive_save receive_switch Implementation ARP stack

  20. 0 16 32 Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Internet Protocol (IP)

  21. Implement IP send stack by using send_constant send_flag_offset send_counter send_reorder Implement IP receive stack by using receive_demux receive_void receive_flag_offset receive_reorder Implementation IP stack

  22. IP Stack table_lookup A simple implementation of Building-Block Protocol ARP Stack IP Stack ARP Stack Stack Structure Ethernet Stack Ethernet Stack

  23. No Global Variable is used ! Implementation

  24. MAHALO

More Related