Java Network Programming のTCP/IP

Source: Internet
Author: User
Tags file transfer protocol

TCP/IP Reference Model and TCP/IP protocol

Similar to the OSI Reference Model, the TCP/IP Reference Model draws on the idea of network layering, simplifies the level of the network, and provides a perfect protocol in each layer of the network, which constitutes the TCP/IP protocol set, or TCP/IP protocol.

  

The TCP/IP reference model is divided into 4 levels: The application layer, the transport layer, the network interconnect layer and the host-network layer. There is a corresponding agreement at each level. Specifically, the TCP/IP protocol should be referred to as the TCP/IP protocol set, which is a collection of three layers of protocols other than the host-network layer (provided by third parties) of the TCP/IP reference Model, while the IPs and TCP protocols are the two most core protocols in the set of protocols.

Layer protocols for the TCP/IP Reference Model

  

In the TCP/IP reference model, the session and presentation layers in the OSI reference model are removed, and the functions of these two layers are incorporated into the application layer, merging the data link layer and physical layer in the OSI Reference model into the host-network layer.

• 1, host-Network layer

In fact, the TCP/IP reference model does not really provide the implementation of this layer, nor does it provide a protocol. It only requires a third-party implementation of the host-network layer to provide a provider for the upper layer, so that the network interconnect layer can use the host-network layer to pass IP packets.

2. Network interconnection layer

The network interconnect layer is the core of the whole reference model. Its function is to send IP packets to the target host. In order to send data as quickly as possible, the IP protocol divides the raw data into multiple packets and then passes the packets along different paths. The order in which the packets arrive and the order in which they are sent may be different, which requires the upload to reorder the packets and revert to the original data.

  

The network interconnection layer has the function of connecting heterogeneous network. A network topology that connects Ethernet with a different token network. Both the Ethernet and the token network provide a unified access interface to the network interconnect layer, which hides the differences of the underlying network to the network interconnect layer, so that the packets can be passed smoothly between the two networks.

  

The network interconnect layer uses the IP protocol, which specifies the format of the packet and specifies the process for finding the route for the packet.

Transport Layer

The function of the transport layer is to enable a conversation between the source host and the process on the target host. In the transport layer, two protocols with different quality of service are defined, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). The TCP protocol is a connection-oriented, reliable protocol. It sends the stream of bytes emitted by the source host to the target host on the Internet without error. On the sending side, the TCP protocol is responsible for transferring the data from the upper layer into the packet segment to the lower layer. At the receiving end, TCP is responsible for reorganizing the received messages and submitting them to the upper layer. The TCP protocol also controls end-to-end traffic control to avoid slow receivers not having enough buffers to receive large amounts of data sent by the sender. UDP protocol is an unreliable, non-connected protocol, which is mainly applicable to the situations where the message is not ordered and the flow control is not required. UDP does not guarantee that datagrams are received in the same order as they were sent, and that they are not even guaranteed to reach the target host.

Application Layer

The TCP/IP model merges the functionality of the session and presentation layers in the OSI reference model into an application-level implementation.

FTP: File Transfer Protocol

Telnet: Telnet protocol

HTTP: Hypertext Transfer Protocol

HTTPS: Secure Hypertext Transfer Protocol, which allows hypertext transmission over the network, transmits encrypted data on the Internet and decrypts the data when it arrives at the destination.

POP3: Post Office Protocol-version 3

SMTP: Simple Mail Transfer Protocol

DNS: Domain Name System protocol

URL Rules

  

  

  

Java Network Programming のTCP/IP

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.