TCP vs. UDP differences
TCP---Transmission Control Protocol, providing a connection-oriented, reliable byte-stream service. Before the customer and the server Exchange data with each other, a TCP connection must be established between the two parties before the data can be transferred. TCP provides time-out re-send, discard duplicate data, test data, flow control and other functions to ensure that data can be transmitted from one end to the other.
UDP---User Datagram Protocol, is a simple transport layer protocol for datagram. UDP does not provide reliability, it simply sends the application to the IP layer's datagram, but does not guarantee that it will reach its destination. Because UDP does not have to establish a connection between the client and the server before transmitting the datagram, and there is no mechanism such as time-out retransmission, the transmission speed is very fast.
Use TCP Protocol The main ports are the following:
(1) FTP: Defines the file transfer protocol, using 21 ports. Often said that a computer opened the FTP service is to start the file transfer service. The FTP service is used to download files and upload the homepage.
(2) Telnet: It is a port for remote login, the user can remotely connect to the computer as their own identity, through which can provide a DOS-based communication service. As the previous BBS is-the pure character interface, the support BBS server will open 23 ports, external services.
(3) SMTP: Defines the Simple mail delivery protocol, which is now used by many mail servers to send mail. As the common free mail service is used in this mail service port, so in the e-mail settings-often see such SMTP port Settings This column, the server is open Port 25th.
(4) POP3:the abbreviation for post Office Protocol 3, which is the 3rd version of the Post Office Protocol , which corresponds to SMTP and POP3 is used to receive messages. Typically, the POP3 protocol uses 110 ports. Also said that, as long as you have the appropriate use of the POP3 protocol (such as Fo-xmail or Outlook), you can not Web access to the mailbox interface, directly with the mail program can receive mail (in the case of 163 mailbox there is no need to first enter the NetEase website, and then into their own mail-box to receive the letter).
(5)HTTP: This is the most widely used protocol, it is often said "hypertext Transfer Protocol." When surfing the web, you have to open port 80th on the computer that provides the Web resources to provide the service. Often said "WWW service", "Web Server" is the use of this port.
using UDP protocol Common ports are:
(1) RIP Route Selection Information Protocol (RIP) is a standard for exchanging routing information between gateways and hosts
(2) DNS : For Domain name resolution services, this service is used most in Windows NT systems. Each computer on the Internet has a network address corresponding to that address, which is often said to be an IP address, with a pure number + "." Representation in the form. However, it is inconvenient to remember, so out-now the domain name, access to the computer only need to know the domain name, domain name and IP address transformation between the DNS server to complete. DNS is using port 53rd.
(3) SNMP : Simple Network Management protocol, using port 161th, is used to manage network devices. Because of the many network devices, the non-connected service embodies its advantages.
(4) OICQ : The OICQ program not only accepts services, but also provides services, so that two people who chat are equal. OICQ uses a protocol that is not connected, and that it uses a UDP protocol. The OICQ server uses port 8-000 to listen for information, and the client uses port No. 4000 to send out information. If both ports are in use (there are many people chatting with several friends at the same time), add them in order.
TCP, UDP, and HTTP relationships
1,TCP/IP is a protocol group, can be divided into three levels: Network layer, Transport layer and application layer.
At the network layer are IP protocols, ICMP protocols, ARP protocols, RARP protocols, and BOOTP protocols.
There are TCP protocols and UDP protocols in the transport layer.
In the application layer, there are FTP, HTTP, TELNET, SMTP, DNS and other protocols.
Therefore, HTTP itself is a protocol that transmits hypertext to a local browser from a Web server.
2, the HTTP protocol is based on the request/response model. First the client establishes a TCP link to the server and sends a request to the server that contains the request method, URI, protocol version, and the associated MIME-style message. The server responds to a status line that contains the protocol version of the message, a success and failure code, and the associated MIME style message.
Http/1.0 creates a new TCP link for each HTTP request/response, so a page containing HTML content and pictures will need to establish multiple short-term TCP links. The establishment of a TCP link will require a 3-time handshake.
In addition, in order to obtain the appropriate transfer speed, TCP is required to spend additional loop link time (RTT). Each time the establishment of the link requires this recurring overhead, and it does not have the actual useful data, just to ensure the reliability of the link, so http/1.1 put forward a sustainable link implementation method. http/1.1 will use it to transmit a series of request/response messages repeatedly using only one TCP link, thus reducing the number of link builds and the frequent link overhead.
3, Conclusion: Although HTTP itself is a protocol, it is ultimately based on TCP . Currently, however, some people are studying the HTTP protocol based on the TCP+UDP hybrid.
TCP-based protocol, UDP-based protocol