TCP is a connection-oriented protocol whereas UDP is a connectionless protocol.
TCP ensures data integrity and reliability. TCP is prefered when important data must be sent and verified that it arrived correctly and is most desirable in conditions that promote data corruption or loss. If a packet is lost or corrupt, TCP will automatically resend the packet and wait for a confirmation message back. TCP would be used in senarios such as transfering files, Surfing a webpage, or listening to pre-recorded on-demand music or video.
UDP is a fast, efficient protocol with low overhead that offers no redundancy to lost or corrupt packets. If a packet is lost or corrupt, the data is lost and no attempt is made to resend the information. UDP is prefered for streaming audio and/or video live such as Voice over IP phones, watching internet TV, or listening to internet radio.
TCP and UDP are two different layer 4 protocols. TCP reliably sends data with acknowledgments and UDP sends data without checking if the destination received it. Skype uses UDP while email uses TCP.
Both TCP and UDP have origin and destination ports - and that is about all the similarity there is between the two. TCP has several other fields that UDP doesn't have, including window size; a consecutive byte numbering (to figure out where to place a TCP segment in a data stream); the bytes that the other side is expected to send; and others.
Ports are something where you can connect output devices and other devices. Here is a list of different ports you can have: USB ports SD card reader port SATA ports (located on the motherboard)
TCP and UDP
The two that are most commonly used are called TCP and UDP.
1 tcp transmission control protocol 2 udp protocol
There are actually more than two protocols associated with Layer 4. According to Wikipedia, there are Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Stream Control Transport Protocol (SCTP), Datagram Congestion Control Protocol (DCCP), and Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX).
Samba primarily uses two port numbers: TCP port 445 and UDP port 137. Port 445 is used for SMB (Server Message Block) over TCP, while port 137 is used for NetBIOS Name Service. Additionally, ports 138 and 139 are associated with NetBIOS Datagram Service and NetBIOS Session Service, respectively. These ports facilitate file sharing and printer services in a networked environment.
The most common two are TCP (transmission control protocol) and UDP (user datagram protocol)
Strictly speaking, the question is invalid, as DNS uses both UDP and TCP for its transport. The expected use is for DNS to run on top of UDP, with a fall-back to TCP for data packages that can't fit into a single 8K UDP packet. Large replies and zone transfers will fall in to this category. DNS can also be configured to work exclusively over TCP, but this isn't recommended. Early MS Windows systems used DNS over TCP exclusively. Fortunately the more recent editions (XP onwards) use DNS over UDP by default, falling back to TCP only when necessary. Why UDP rather than TCP? It's simply a matter of efficiency. To start a TCP connection a minimum of three packets are required (SYN out, SYN+ACK back, ACK out). By the time you add a data packet into that and close the session off correctly you will have sent several packets. In contrast, UDP can get away with a minimum of two packets (one question, one reply). DNSSec adds a layer of complexity to this, but with caching the extra resource required can usually be mitigated against a number of queries.
list 2 major types of internet application and their use
TCP and UDP Correct: UDP (User Data-gram Protocol) is a communications protocol that offers a limited amount of service when messages are exchanged between computers in a network that uses the Internet Protocol. UDP provides two services not provided by the IP layer. It provides port numbers to help distinguish different user requests and, optionally, a checksum capability to verify that the data arrived intact. TCP (Transmission Control Protocol) is a set of rules (protocol) used along with the Internet Protocol (IP) to send data in the form of message units between computers over the Internet. While IP takes care of handling the actual delivery of the data, TCP takes care of keeping track of the individual units of data (called packets) that a message is divided into for efficient routing through the Internet. (TCP/IP) is the know definition by most.