Original address: http://www.cnblogs.com/imystr/p/4026639.html
OSI Seven layer modelLayer-Functional TCP/IP protocol family in OSIApplication-layer file transfer, email, file service, virtual terminal tftp,http,snmp,ftp,smtp,dns,telnetPresentation layer data format, code conversion, data encryption No protocolSession layer release or establish contact with other contacts no agreementThe Transport layer provides end-to-end interface
slow), Send and receiveMail (POP IMAP SMTP High data accuracy requirements, non-emergency applications), remote login (telnet SSH to the accuracy of the data has a certain requirements, there is a connection concept); UDP is generally used for instant communication (QQ Chat on data accuracy and packet loss requirements are relatively low, but the speed must be fast), online video (RTSP speed must be fast,
because of the Reliability guarantee and control means, the transmission efficiency is lower than that of UDP. UDP is based on the non-connection unreliable protocol,Without control means, data is only sent to the other party, so the efficiency is higher than that of TCP.
2. Applicable scenarios of TCP and
model:
7
Application Layer
such as HTTP, SMTP, SNMP, FTP, Telnet, SIP, SSH, NFS, RTSP, XMPP, Whois, ENRP
6
Presentation Layer
such as XDR, ASN.1, SMB, AFP, NCP
5
Session Layer
For example ASAP, TLS, SSH, ISO 8327/ccitt x.225, RPC, NetBIOS, ASP, Winsock, BSD sockets
4
Transport Layer
such as
TCP and UDP are protocols in the transport layer in the OSI model.TCP definitionTCP (transmission Control Protocol Transmission Protocol ) is a connection-oriented, reliable, byte-stream-based Transport Layer communication protocol defined by the IETF RFC 793. UDP definitionThe UDP (user Datagram Protocol Subscriber
Telnet and NC are general tools for testing port connectivity.Telnet can test the connectivity of the TCP port.NC can test the connectivity of TCP and UDP ports.Make sure that Telnet and NC tools are installed # Yum install nc# yum install TelnetTo test the connectivity of the TCP port:Syntax: Telnet The following are
Difference Between TCP and UDP
TCP-the transmission control protocol provides connection-oriented and reliable byte stream services. Before the customer and the server exchange data with each other, a TCP connection must be established between the two parties before data can be transmitted.
TCP (Transmission Control Protocol, Transmission Control Protocol) is a connection-oriented protocol, reliable, guaranteed correctness, sequential arrival, flow control, congestion management, retransmission mechanism, window mechanism, more requirements for system resources and time, and flow mode sock_stream.Server-side: Socket, bind, listen, accept, send, recv;Client: Socket, connect, send, recv.20-FTP Data port 21-ftp control Port 22-
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.