next up previous contents
Next: 2 The TCP/IP Protocol Up: Implementing a High Performance Previous: Contents

3.1 Introduction

Computer communication is becoming more and more important. The Internet, spanning the world, grows with a tremendous speed. A very important part in a computer communication system is the protocol stack. The protocol stack is the software handling connections between computers, providing reliable (and unreliable) delivery of data.

The performance of the protocol stack is a substantial factor of the overall time for sending and receiving a message over a network. Therefore it is vital that the stack is implemented to be as fast as possible. At the same time it is desirable that the code be as maintainable and portable as can be. Due to the fact that the networks become faster and faster, the importance of fast protocol stacks increases. This creates a need for new, improved implementations.

The objective of this master thesis project was to design and implement a high performance TCP/IP protocol stack in C++. One goal was to make the design and implementation maintainable. Another goal was to make the protocol stack comparative in speed (or faster) than other existing protocol stacks, i.e. the time spent executing in the stack should be as short as possible. To verify this fact, we developed two ways to compare the performance of various protocol stacks.

The resulting protocol stack implements the IP, ARP and UDP protocols from the TCP/IP protocol suit. To evaluate its performance we devised two ways of measurement. The first compared the round-trip time for a packet sent between two hosts, and the other measured the time spent in the stack itself.

Our measurements show that our protocol stack processes packets with a reasonable speed, as compared to the Linux protocol stack. It is only for long packets with the checksum enabled that we lose out to the Linux stack.

The first part of the report describes the history of the TCP/IP protocol suite. After that we describe the different protocols in the TCP/IP protocol suite, starting with the Internet Protocol. We concentrate on the more important aspects of each level. The section ends with the future of the protocols. The second part of the report describes our design and implementation. We describe how our stack is organized, and how different parts have been implemented. The last section includes the description of how to perform some performance tests on TCP/IP protocol stacks, and the results when performing these test on our stack.


next up previous contents
Next: 2 The TCP/IP Protocol Up: Implementing a High Performance Previous: Contents

Peter Kjellerstedt
Thu Jun 5 00:52:23 MET DST 1997