1 / 20

Internet Networking Spring 2006

Internet Networking Spring 2006. Tutorial 14 Header Compression. Motivation. The size of network and transport layers headers may be a significant overhead for small packets. A problem in slow links. Examples: VoIP traffic over wireless or cellular medium.

Download Presentation

Internet Networking Spring 2006

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. Internet Networking Spring 2006 Tutorial 14 Header Compression

  2. Motivation • The size of network and transport layers headers may be a significant overhead for small packets. • A problem in slow links. • Examples: • VoIP traffic over wireless or cellular medium. • 16kb/s data rate with a 20ms sampling rate produces packets with 40 bytes of data. • Using Telnet over slow modem connection. In many cases the data size is one byte. • Solution: Compress the headers • RTP/UDP/IP headers compression is defined in RFC 2508. • TCP/IP headers compression is defined in RFC 1144.

  3. Header Compression • This is not an end to end compression. • Compression is done in the ingress point of the (slow) serial link. • Decompression is done in the egress point of the serial link. • Compression is done between the network and the link layers. • Transparent to the network and transport layers.

  4. Header Compression RTP RTP UDP IP H.C. Link Layer UDP IP Link Layer IP H.C. Link Link

  5. Basic Idea • The sender and receiver keep track of active connections. • The receiver keeps a copy of the header from the last packet from each connection. • Differential coding: The delta between the current and the previous packet is sent. • A connection number is sent with the compressed packet.

  6. TCP/IP Headers

  7. Constant Fields • In a TCP connection many fields are likely to remain constant. • A connection is defined by: source IP and port, destination IP and port.

  8. Unnecessary and Changeable Fields • Some fields are unnecessary • Total length (redundancy with layer II protocols). • IP checksum (only Packet ID is left in the IP header). • The other fields may be changed. However, they do not all change at the same time. • E.g. in an ACK packet the sequence number may remain constant. • The sender sends only the fields that are changed. • It uses the copy of the last packet that was sent for each connection. • A bit mask that indicates which fields were sent precedes these fields.

  9. Changeable Fields • How the fields change? • The difference between current and previous Packet ID is small (usually 1). • The difference between current and previous sequence number is less than 216 (i.e. 2 bytes). • The differences in the changing fields are sent rather than the fields themselves.

  10. Compressed Packet Format

  11. Compressed Packet Format • The first byte is a bit mask that identifies which of the fields are actually changed. • TCP Checksum of the original packet is located in the compressed header. • An end-to-end integrity check is still valid. • Used for error detection and resynchronization. • Connection Number may be omitted if is identical to the Connection Number of the previous packet sent.

  12. Packet Types • The sender can send 3 types of packets. • The packet type is stored in the header of the link layer protocol. • TYPE_IP - regular uncompressed IP packets. • UNCOMPRESSED_TCP - identical to the original packets except the IP protocol field is replaced with a connection number. • Use to (re-)synchronizes the receiver. • Use to send a TCP packet of new connection. • COMPRESSED_TCP

  13. The Compression System • IP packets goes through the compressor. • TYPE_IP is selected if • Non-TCP packets. • IP fragments. • UNCOMPRESSED_TCP is selected if • The connection is new. • One of the constant fields has changed. • The delta in one of the changeable fields is large or negative. • Otherwise, COMPRESSED_TCP is selected. • If COMPRESSED_TCP or UNCOMPRESSED_TCP is chosen, then the packet header is copied into the array.

  14. The Compression System • The decompressor checks the type of incoming packets. • TYPE_IP packets are simply pass through. • UNCOMPRESSED_TCP packets • The connection number is extracted and used as an index into the an array of saved headers. • The header is copied into the array. • The TCP protocol number is restored to the protocol field in the IP header. • COMPRESSED_TCP packets • The last packet from that connection is extracted from the array of saved header using the connection number. • The compressed header is used to restore a new TCP/IP header and construct a new TCP/IP packet. • The new header is stored in the array.

  15. Error detection • Error detection should be provided by layer-II. • Transmission errors are detected by the egress point of the line. • In such a case all following packets without a connection number is discarded. • Problem: a missed packet cannot be detected by the egress node of the line. • This can corrupt all the packets that follow. • TCP checksum is not compressed, hence end-to-end reliability is provided.

  16. IP/UDP/RTP Headers Compression • Real-time Transport Protocol provides network transport functions for real-time applications such as audio and video. • IP, UDP and RTP are typically used in conjunction when delivering real-time traffic. • The three headers contain 40 bytes. • When the payload is small (e.g. VoIP) it is desirable to compress the three headers.

  17. UDP RTP IP/UDP/RTP Headers +-------------------------------+--------------------------------+ | Source Port | Destination Port | +-------------------------------+--------------------------------+ | Length | Checksum | +---+-+-+-------+-+-------------+--------------------------------+ |V |P|X| CC |M| PT | Sequence Number + +----------------------------------------------------------------+ | Time Stamp + +----------------------------------------------------------------+ | Synchronization Source Identifier + +----------------------------------------------------------------+

  18. IP/UDP/RTP Headers • Headers compression is done in the same way as IP/TCP compression. • Constant fields are removed. • Differential coding of the changeable fields. • However, • Constant first order differences are not sent (Packet ID, Time Stamp). • A connection is identified by: source IP and port, destination IP and port, synchronization source of the RTP.

  19. Changeable fields +-------------------------------+ | msb of session context ID | +-------------------------------+ | lsb of session context ID | +---+---+---+---+---+---+---+---+ | M | S | T | I | link sequence | +---+---+---+---+---+---+---+---+ | | + UDP checksum + | | +-------------------------------+ | M'| S'| T'| I'| CC | +-------------------------------+ | delta IPv4 ID | +-------------------------------+ | delta RTP sequence | +-------------------------------+ | delta RTP timestamp | +-------------------------------+ | | | CSRC list | +-------------------------------+ | | / RTP data / +-------------------------------+ • M = RTP marker bit • S = RTP sequence number • T = RTP timestamp • I = IPv4 packet ID • L = RTP CSRC count and list

  20. Error Detection and Recovery • Relies on a layer II error detection. • A 4-bit sequence number is added to every compressed packet. • Used to detect a missing packet. • In case the receiver detects a corrupted or missing packet, it requests the sender to retransmit the packet.

More Related