Networking Fundamentals Part 3 – The TCP Protocol

TCP ProtocolIf the IP protocol is considered the backbone of the Internet, TCP is heart and veins that bring it to life. As the primary protocol used by most of the Internet, from web browsing, to database access, to many multimedia applications, TCP lets computers talk to each other, and makes sure that the message gets through reliably.

Similar to the “Certified Mail” provided by US Postal Service, TCP provides confirmation of delivery for each and every piece of data sent over the Internet. While it’s cousin, the UDP protocol, is faster, TCP instead makes sure that even if the underlying communication link has occasional errors, the message will get through properly. This is crucial for the distributed routing of the Internet, where packets often can get lost. As data is sent over the Internet, each piece of data “hops” from router to router, until it reaches its final destination. In the process of hopping, a packet might end up in a loop or be dropped from a router that has been flooded with packets. By using TCP, programs at the application level protect themselves from errors that occasionally occur on the network.

The reliability does have its drawbacks however, and the primary drawback is a slower speed. Every packet sent over TCP must be acknowledged by the recipient. In the simplest version of the protocol, it might take twice as long to send data over TCP, if the sender had to wait for a confirmation of receipt before sending each subsequent packet. Fortunately, thanks to a technique called the “TCP Window”, the speed of TCP can often approach the peak possible speed of a link. Instead of waiting for confirmation of each individual packet, TCP will send enough packets to fill the Internet link connecting two computers. Once the window becomes too large and the receiver tells the sender that it is loosing packets, the sender will scale back speed and send smaller amounts of data at a time.

TCP does have another dark side, however – its vulnerability to denial of service attacks. Since the reliability offered by TCP requires more memory for each network connection, malicious users can take advantage of this to crash routers and servers. A flood of SYN and ACK packets have been known to take down the infrastructure of even large corporations. Modern firewalls have evolved to counter this threat however, and can often protect against denial of service attacks with packet filtering technology.

With its reliability and guaranteed packet ordering, TCP brings stability and reliability to Internet traffic. As the Internet evolves, newer versions of TCP bring even further additional techniques to improve users’ Internet experience. For the foreseeable future, the tried-and-true TCP protocol will continue to power our communication and dominate the Internet.

Written by Andrew Palczewski

About the Author
Andrew Palczewski is CEO of apHarmony, a Chicago software development company. He holds a Master's degree in Computer Engineering from the University of Illinois at Urbana-Champaign and has over ten years' experience in managing development of software projects.
Google+

RSS Twitter LinkedIn Facebook Email

Leave a Reply

Your email address will not be published. Required fields are marked *