TCP vs UDP
December 18, 2009
The difference between TCP and UDP that causes UDP to be called unreliable is that TCP establishes a virtual circuit, it establish a permanent connection between two parties and ensures end to end sequenced communication after which it breaks the circuit allowing for other connection requests to develop their own virtual circuits unlike UDP that doesn’t establish any virtual circuit sessions or even sequence or guarantee error free communication.
These circuits allow for an acknowledgement flag. TCP periodically sends an acknowledgement flag or signal which is a hash value of previously sent data from the sender to the receiver. If the receiver’s computed hash value doesn’t match the sender’s hash value then the server asks the sender to resend the last batch of data. This provides for error detection and correction and reliable and error free communication.
UDP can be reliable if one programs it to number the packets it sends over the network. This will allow for the receiver to know when certain packets have not been received and thus request for retransmission i.e. it can provide for error detection and correction and also programming UDP to request for acknowledgment from the receiver is another way of making UDP reliable.
Encapsulation allows TCP to work with IP protocols in the following way; an application may create a message e.g. an email message. This message is then passed to a lower layer the presentation layer, this layer encapsulates the message and adds its own header and footer and then passes to another lower layer. When it reaches the transportation layer, TCP establishes a logical connection between the two communicating devices. It then passes the information to the network layer that has the IP protocol, IP provides for routing information but doesn’t guarantee delivery, it only provides IP addressing and packet fragmentation but doesn’t provide for accuracy checking, all this is the responsibility of the TCP. This information is encapsulated and passed over to the data link layer and finally the physical layer for transmission.
Comments
Got something to say?
You must be logged in to post a comment.


