Internet Networks  «Prev  Next»
Lesson 7 TCP/IP and UDP
Objective Explain differences between TCP/IP and UDP

Explain the differences between TCP/IP and UDP protocols

If a son in Chicago is sending a present to his mother in Mississippi for her birthday, he will have to put it in a box to ensure that the Postal Service accepts it and that it does not break on the way. He will also have to take into account the amount of time it will take for the present to reach his mother on time. To send a message over the Internet, some steps and considerations need to be taken too. TCP/IP and UDP are two protocols for transmission of documents over the Internet. They serve similar functions, but have somewhat different features. The application of one or another depends on needs or priorities that vary with the content of the file or service required.

TCP/IP

Transmission Control Protocol/Internet Protocol (TCP/IP) is a communications protocol suite developed to network dissimilar systems. In other words, this protocol allows different kinds of computers, such as PCs and Macs, to communicate between them. TCP/IP is the global standard for Internet-based communications. It is a connection-oriented protocol. When a file is sent over the Internet, the TCP/IP protocol slices the file into "chunks", called packets, so that the file can be transmitted more efficiently. Packets are the unit of data used to send a message from point A to point B. When John in point A sends a file to Mary in point B, TCP/IP slices the file into packets, numbers the packets to ensure that they are received, and reassembles them in the order in which they were sent. If a packet is corrupted or lost along the way, TCP will automatically ensure that the particular packet is re-sent.

1) User sends a file from Point A to Point B
User sends a file from Point A to Point B

2) TCP IP slices the files into chunks or packets.
TCP IP slices the files into chunks or packets.

3) TCP IP assigns each packet a number. The numbers are sequential to facilitate reassembly later on
TCP IP assigns each packet a number. The numbers are sequential to facilitate reassembly later on.

4) The file travels sliced in packets
The file travels sliced in packets

5) TCP IP counts the number of packets and reassembles the file before delivery.
TCP IP counts the number of packets and reassembles the file before delivery.

6) If the file is missing a packet, TCP IP has it re-sent
If the file is missing a packet, TCP IP has it re-sent

7) If the file looks exactly as it did when it was sent, it is delievered to Point B.
If the file looks exactly as it did when it was sent, it is delievered to Point B.

How does TCP/IP work?

The TCP/IP protocol is designed such that each computer or device in a network has a unique IP Address and each IP address can open and communicate over up to 65535 different ports for sending and receiving data to or from any other network device. The IP address uniquely identifies the computer or device on the network and a port number identifies a specific connection between one computer or device and another (i.e between two IP Addresses). A TCP/IP port can be thought of as a private two-way communications line where the port number is used to identify a unique connection between two devices. The concept is very similar to any other type of port on your PC (serial, parallel, etc) except that instead of having a physical connection, the TCP/IP protocol creates a virtual IP port and the network hardware and software is responsible for routing data in and out of each virtual IP port.

UDP

UDP (User Datagram Protocol) is a connectionless protocol that does not guarantee reliable delivery of packets (or datagrams) from Point A to Point B. UDP does not establish a virtual circuit, nor does it number the packets sequentially or acknowledge how many packets were sent. The packets or datagrams sent using UDP may be lost on the way or arrive out of order and make it impossible to reassemble the file. However, UDP is faster than TCP because it produces less overhead for each system to process. It is used for protocol transmissions that require real-time performance, for example, streaming audio and video. It is also used when sending a domain name to the DNS (that is why sometimes you may experience a long delay when visiting a new page. Then you try it again and it works. The UDP protocol 'lost' your request).
Question: What are the advantages of TCP/IP and UDP over each other?
Answer: TCP/IP is reliable: it guarantees accurate delivery. UDP is faster than TCP/IP and allows for real time performance, for example when streaming audio or video. UDP is primarily used each time a domain name needs to be translated to an IP via the DNS. It travels to the DNS via UDP. In the next lesson, how IP addresses are specified will be discussed.

SEMrush Software 9 SEMrush Banner 9