Self-similarity has been observed in various traffic measurements and can be attributed in some instances to the effect of network protocols. We have developed a discrete map for packet transmission using the stop and wait protocol under the limitations of a finite size buffer at the receiver. We have shown that the resultant traffic is self-similar under Poisson distributed input. We then generalized the discrete map for buffer overflow by using it to simulate the self-similarity in TCP traffic. A map of total packets transmitted in a given time interval versus that transmitted in the previous interval provides an easy visualization of self-similarity. The map from a simulation with 10 transmitters captured the salient features of a map from experimental data.