Download presentation
Presentation is loading. Please wait.
1
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #2 Header Compression
2
2 Internet Networking Motivation n The size of network and transport layers headers may be a significant overhead for small packets. n A problem in slow links. n Examples: VoIP traffic over wireless or cellular medium. 16kb/s data rate with a 20ms sampling rate produces packets with 40 bytes of data. 16Kb/s = 320b/20ms = 40Byte/20ms Using Telnet over slow modem connection. In many cases the data size is one byte. n Solution: Compress the headers RTP/UDP/IP headers compression is defined in RFC 2508. TCP/IP headers compression is defined in RFC 1144.
3
3 Internet Networking Header Compression UDP IP H.C. Link Layer IP H.C. Link RTP UDP IP Link Layer RTP 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
4 Internet Networking Basic Idea n The sender and receiver keep track of active connections. n The receiver keeps a copy of the header from the last packet from each connection. n Differential coding: The delta between the current and the previous packet is sent. n A connection number is sent with the compressed packet.
5
5 Internet Networking TCP/IP Headers
6
6 Internet Networking Constant Fields n In a TCP connection many fields are likely to remain constant. A connection is defined by: source IP and port, destination IP and port.
7
7 Internet Networking Unnecessary and Changeable Fields n Some fields are unnecessary Total length (redundancy with layer II protocols). IP checksum (only Packet ID is left in the IP header). n 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. n 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.
8
8 Internet Networking Changeable Fields n 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 2 16 (i.e. 2 bytes). n The differences in the changing fields are sent rather than the fields themselves.
9
9 Internet Networking Compressed Packet Format
10
10 Internet Networking Compressed Packet Format n The first byte is a bit mask that identifies which of the fields are actually changed. n 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. n Connection Number may be omitted if is identical to the Connection Number of the previous packet sent.
11
11 Internet Networking Packet Types n The sender can send 3 types of packets. n The packet type is stored in the header of the link layer protocol. n TYPE_IP - regular uncompressed IP packets. n 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. n COMPRESSED_TCP
12
12 Internet Networking The Compression System n IP packets goes through the compressor. n TYPE_IP is selected if Non-TCP packets. IP fragments. n 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. n Otherwise, COMPRESSED_TCP is selected.
13
13 Internet Networking The Compression System n The decompressor checks the type of incoming packets. n TYPE_IP packets are simply pass through. n 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. n 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.
14
14 Internet Networking Error detection n 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 “COMPRESSED_TCP “ packets without a connection number is discarded, until a “TYPE_IP” or “UNCOMPRESSED_TCP” appears. n Problem: a missed packet cannot be detected by the egress node of the line. This can corrupt all the packets that follow. n TCP checksum is not compressed, hence end-to-end reliability is provided.
15
15 Internet Networking IP/UDP/RTP Headers Compression n Real-time Transport Protocol provides network transport functions for real-time applications such as audio and video. n IP, UDP and RTP are typically used in conjunction when delivering real-time traffic. n The three headers contain 40 bytes. n When the payload is small (e.g. VoIP) it is desirable to compress the three headers.
16
16 Internet Networking IP/UDP/RTP Headers +-------------------------------+--------------------------------+ | Source Port | Destination Port | +-------------------------------+--------------------------------+ | Length | Checksum | +---+-+-+-------+-+-------------+--------------------------------+ |V |P|X| CC |M| PT | Sequence Number + +----------------------------------------------------------------+ | Time Stamp + +----------------------------------------------------------------+ | Synchronization Source Identifier + +----------------------------------------------------------------+ UDPUDP RTPRTP
17
17 Internet Networking IP/UDP/RTP Headers n Headers compression is done in the same way as IP/TCP compression. Constant fields are removed. Differential coding of the changeable fields. n 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.
18
18 Internet Networking Changeable fields n M = RTP marker bit n S = RTP sequence number n T = RTP timestamp n I = IPv4 packet ID n L = RTP CSRC count and list +-------------------------------+ | 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 / +-------------------------------+
19
19 Internet Networking Error Detection and Recovery n Relies on a layer II error detection. n A 4-bit sequence number is added to every compressed packet. Used to detect a missing packet. n In case the receiver detects a corrupted or missing packet, it requests the sender to retransmit the packet.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.