Anda di halaman 1dari 6

What is the difference between UDP and TCP internet protocols?

Q. Can you explain the difference between UDP and TCP internet protocol (IP) traffic and its usage with an example? A. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)is a transportation protocol that is one of the core protocols of the Internet protocol suite. Both TCP and UDP work at transport layer TCP/IP model and both have very different usage.

Difference between TCP and UDP


TCP UDP Reliability: TCP is connection-oriented protocol. When Reliability: UDP is connectionless protocol. a file or message send it will get delivered unless When you a send a data or message, you don't connections fails. If connection lost, the server will know if it'll get there, it could get lost on the request the lost part. There is no corruption while way. There may be corruption while transferring transferring a message. a message. Ordered: If you send two messages along a connection, Ordered: If you send two messages out, you one after the other, you know the first message will get don't know what order they'll arrive in i.e. no there first. You don't have to worry about data arriving ordered in the wrong order. Heavyweight: - when the low level parts of the TCP Lightweight: No ordering of messages, no "stream" arrive in the wrong order, resend requests have tracking connections, etc. It's just fire and to be sent, and all the out of sequence parts have to be forget! This means it's a lot quicker, and the put back together, so requires a bit of work to piece network card / OS have to do very little work to together. translate the data back from the packets. Streaming: Data is read as a "stream," with nothing Datagrams: Packets are sent individually and distinguishing where one packet ends and another are guaranteed to be whole if they arrive. One begins. There may be multiple packets per read call. packet per one read call. Examples: World Wide Web (Apache TCP port 80), e- Examples: Domain Name System (DNS UDP mail (SMTP TCP port 25 Postfix MTA), File Transfer port 53), streaming media applications such as Protocol (FTP port 21) and Secure Shell (OpenSSH port IPTV or movies, Voice over IP (VoIP), Trivial 22) etc. File Transfer Protocol (TFTP) and online multiplayer games etc

Difference between TCP and UDP


There are two types of internet protocol (IP) traffic, and both have very different uses. 1. TCP(Transmission Control Protocol). TCP is a connection-oriented protocol, a connection can be made from client to server, and from then on any data can be sent along that connection. o Reliable - when you send a message along a TCP socket, you know it will get there unless the connection fails completely. If it gets lost along the way, the server will re-request the lost part. This means complete integrity, things don't get corrupted. o Ordered - if you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order. o Heavyweight - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together. 2. UDP(User Datagram Protocol). A simpler message-based connectionless protocol. With UDP you send messages(packets) across the network in chunks. o Unreliable - When you send a message, you don't know if it'll get there, it could get lost on the way. o Not ordered - If you send two messages out, you don't know what order they'll arrive in. o Lightweight - No ordering of messages, no tracking connections, etc. It's just fire and forget! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.

TCP vs. UDP


By Erik Rodriguez This article describes how TCP and UDP work, the difference between the two, and why you would choose one over the other.

Overview
TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a "guaranteed delivery." This is due largely in part to a method called "flow control." Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. This works because if a packet of data is sent, a collision may occur. When this happens, the client re-requests the packet from the server until the whole packet is complete and is identical to its original. UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc; UDP is commonly used for streaming audio and video. Streaming media such as Windows Media audio files (.WMA) , Real Player (.RM), and others use UDP because it offers speed! The reason UDP is faster than TCP is because there is no form of flow control or error correction. The data sent over the Internet is affected by collisions, and errors will be present. Remember that UDP is only concerned with speed. This is the main reason why streaming media is not high quality.

On the contrary, UDP has been implemented among some trojan horse viruses. Hackers develop scripts and trojans to run

over UDP in order to mask their activities. UDP packets are also used in DoS (Denial of Service) attacks. It is important to know the difference between TCP port 80 and UDP port 80. If you don't know what ports are go here.

Frame Structure
As data moves along a network, various attributes are added to the file to create a frame. This process is called encapsulation. There are different methods of encapsulation depending on which protocol and topology are being used. As a result, the frame structure of these packets differ as well. The images below show both the TCP and UDP frame structures.

TCP FRAME STRUCTURE

UDP FRAME STRUCTURE

The payload field contains the actually data. Notice that TCP has a more complex frame structure. This is largely due to the fact the TCP is a connection-oriented protocol. The extra fields are need to ensure the "guaranteed delivery" offered by TCP.

Differences between TCP and UDP


Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the major protocols operating at
Transport Layer. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) operate very differently and you can choose Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) depending on your requirement.

TCP stands for Transmission Control Protocol and it guarantees delivery of data packets. This protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data. Transmission Control Protocol (TCP) is a

connection

oriented protocol. Before transmitting data, a connection must be established between the devices participating in data

transmission. If your Application require guaranteed delivery of data, then you must choose TCP as the Transport layer protocol. UDP stands for User Datagram protocol and it operates in Datagram mode. The main difference you should notice here is User Datagram Protocol (UDP) is a connection-less protocol. User Datagram protocol (UDP) has only the basic error checking mechanism using checksums.

Difference between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)

Transmission Control Protocol (TCP)


1) Transmission Control Protocol (TCP) is a connection oriented protocol, which means the devices should before transmitting data and should close the connection gracefully after transmitting the data. 2) Transmission Control Protocol (TCP) assure reliable delivery of data to the destination. 3) Transmission Control Protocol (TCP) protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data. 4) Sequencing of data is a feature of Transmission Control Protocol (TCP). 5) Delivery of data is guaranteed if you are using Transmission Control Protocol (TCP). 6) Transmission Control Protocol (TCP) is comparatively slow because of these extensive error checking mechanisms 7)

open a connection

Multiplexing and Demultiplexing is possible in Transmission Control Protocol (TCP) using TCP port numbers.

8) Retransmission of lost packets is possible in Transmission Control Protocol (TCP).

User Datagram Protocol (UDP)


1) User Datagram Protocol (UDP) is Datagram oriented protocol with no overhead for opening, maintaining, and closing a connection. 2) User Datagram Protocol (UDP) is efficient for broadcast/multicast transmission. 3) User Datagram protocol (UDP) has only the basic error checking mechanism using checksums. 4) There is no sequencing of data in User Datagram protocol (UDP) . 5) The delivery of data cannot be guaranteed in User Datagram protocol (UDP) . 6) User Datagram protocol (UDP) is faster, simpler and more efficient than TCP. However, User Datagram protocol (UDP) it is less robust then TCP 7) Multiplexing and Demultiplexing is possible in User Datagram Protcol (UDP) using UDP port numbers. 8) There is no retransmission of lost packets in User Datagram Protcol (UDP).

Re: What does MOS means in GSM/UMTS terms? MOS has same algortihm for 2G and 3G. (For Non WB-AMR Calls). So MOS is independent of used technology, it is only dependent on end to end voice. MOS is affected by many reasons: -Codec type (AMR FR & EFR has highest value) -Codec Rate (12.2 kbps gives highest value) -RF Conditions -Mobility (Handover, Codec Rate Change has negative effect on MOS) -Core Network Parameters or Silence, Echo, DTX etc. -Noise Reduction Algorithms Recently P.OLQA algorithm is available for P 862.2 MOS measurement algorithm. This algorthm is used for WB-AMR calls besides previous codec types. But mapping is different.

Anda mungkin juga menyukai