Mathematical Modelling of Computer Networks: Part II Module 1: Network Coding Lecture 3: Network coding and TCP 12th November 2013 Laila Daniel and Krishnan Narayanan Dept. of Computer Science, University of Helsinki, Finland
Today s Lecture: Network Coding and TCP Based on the paper Network Coding meets TCP: Theory and Implementation, Sunderarajan etal. Proc. IEEE, March 2011 Challenges in combining Network Coding and TCP Combining TCP and Network Coding for incremental deployment Structure of the protocol stack Key idea: ACKs as acknowledging degrees of freedom Sender and the Receiver in TCP/NC Summary
TCP (Transmission Control Protocol) TCP combines the twin functions of reliable data transfer and congestion control TCP congestion control derived from the control loop based on the arrival of ACKs from the receiver The Sender s window which regulates the rate at which the packets are sent is adapted to the available bandwidth in the network The timely reception of the ACKs is quite crucial here - ACK clocking
The notion of coding in packet networks Coding across packets means combining the original packets to create new packets More precisely, a packet can be thought of a vector of n elements from a finite field F q and a linear coding scheme, linear combination of the incoming packets at a node produces the outgoing packets from the node Coding is used as a solution to the problem of lossy links. So when a receiver gets a batch of slightly more than k linear combinations from any batch of k input packets, it can recover the original packets A well-known example of such a coding scheme is Digital fountain codes in which a random linear combination of the input packets is sent to the receiver so that with high probability the input packets can be recovered by the receiver These codes have low complexity and use minimum feedback as only successful decoding of a block is signalled
TCP and Network Coding (1/2) Network Coding, random linear network coding in particular, offers benefits such as communication efficiency, robustness of operation, and easy maintenance in many network settings such as multicast communication, P2P networking for streaming and content distribution, wireless relay networks etc. Network Coding can be used to mitigate the problem of packet transmission in lossy links TCP was not originally designed to work with any packet coding scheme.
TCP and Network Coding (2/2) Combining a coding scheme such as Network Coding with TCP can interfere with the working of the ACK clocking scheme and so can affect the congestion control mechanism In coded schemes the receiver can send the ACKs only after receiving a batch of k coded packets and decoding them to recover the original packets. So the flow of ACKs cannot adequately reflect the congestion in the network So, It is a challenge to integrate Network Coding with TCP with minimal changes to TCP and no change to the network nodes Such an approach also TCP friendly to enable incremental deployment
Network Coding meets TCP paper This paper proposes a simple and ingenious solution to the problem of harmoniously combining TCP and Network Coding For each coded packet that arrives at the receiver, the receiver checks whether the linear combination in the coded packet reveals new information and if so, it sends an ACK immediately Note in this approach, the receiver does not wait to decode the coded packets to recover the original packet before sending an ACK for the packet A new unit of information contained in the received coded packet corresponds mathematically to a degree of freedom The proposed mechanism that combines TCP with Network Coding is based on sending ACKs for every degree of freedom received, (regardless of whether it reveals a new packet) which is a natural generalization of the idea of sending ACKs for received packets This scheme is called TCP/NC
The Mathematical description of the network coding scheme used in TCP/NC The message to be transmitted is broken into a sequence of packets p 1,p 2,... the kth packet of the source message has the index k. We regard a packet as a vector over the finite field F q of size q In this view, a group of log 2 q bits in the packet correspond to a symbol in F q In linear Network Coding, a node can transmit a packet obtained by a linear operation on the incoming packets (by performing the operation in the field F q ) Eg. The node may transmit the packets q 1 and q 2 derived from the incoming packets p 1 and p 2 by the linear operation of addition in the field F q q 1 = αp 1 + βp 2 q 2 = γp 1 + δp 2 Here α,β,γ,δ are elements suitable chosen from the underlying field F q This coding can be explicitly described by a matrix representation
Matrix representation of encoding and decoding ( ) q1,1 q 1,2 q 1,l q 2,1 q 2,2 q 2,l ( ) p1,1 p = C. 1,2 p 1,l p 2,1 p 2,2 p 2,l where C = ( ) α β γ δ ( ) p1,1 p 1,2 p 1,l p 2,1 p 2,2 p 2,l ( ) = C 1 q1,1 q. 1,2 q 1,l q 2,1 q 2,2 q 2,l
Some concepts in decoding for TCP/NC We introduce informally the three notions: seeing a packet, knowledge of node and witness which are useful in understanding the decoding scheme under Network Coding Seeing a packet is a natural extension of the notion of decoding a packet which corresponds to receiving a packet in the ordinary TCP sense Knowledge of a node is the set of all linear combinations of the original packets it can compute based on the information it has received so far Witness for seeing a packet p k refers to the unique linear combination involving p k in which all the other summands in the linear combination involve only packets later to p k
Seeing a packet A node sees a packet p k if it can compute a linear combination of the form p k + q where q = l>k α lp l with α l F q for all l > k
Knowledge of a node Knowledge of a node is the set of all linear combinations of the original packets it can compute based on the information it has received so far
Witness A useful proposition states that if a node has seen packet p k it knows exactly one linear combination of the form p k + q where q itself is a linear combination involving only unseen packets This unique linear combination is called the witness for seeing p k The reduced row-echelon form of the Gauss-Jordan elimination is a useful representation of these concepts
The protocol architecture using TCP/NC In the standard protocol stack, TCP operates at the transport layer in between the application layer above it and the IP layer below it at both the sender and receiver In deploying TCP/NP, the network coding layer NC is embedded in between TCP and IP, at both sender and receiver.
NC sender Module The NC module at the sender accepts packets from the TCP sender and keeps them in an encoding buffer (also called coded window ) until they are acknowledged by the receiver. The NC module at the sender generates random linear combinations of packets in coding window. The coefficients used in the linear combination are conveyed in the packet header
NC Receiver Module When the receiver NC module obtains a linear combination it extracts the coding coefficients from the header and append it to the basis matrix of the knowledge space Then it performs Gauss-Jordan elimination to determine the newly seen packet so that this packet can be acknowledged. The receiver module also keeps a buffer of linear combination packets that have not been decoded yet Upon decoding the packets, the receiver module delivers them to the TCP receiver
Summary We have seen how Network Coding can be combined with TCP with minimal modifications to TCP and underlying packet network The key idea in the scheme TCP/NC is to generalize the notion of acknowledging received packets to that of acknowledging the degree of freedom For further details and illustrations please refer to the original paper and Mitzenmacher s presentation slides at http://www.eecs.harvard.edu/~michaelm/talks/london.ppt