TCP/IP protocol

Source: Internet
Author: User
Tags file transfer protocol

TCP/IP protocol, what is the content and function of TCP/IP protocol? March 19, 2010 13:55www.elecfans.co Anonymous user reviews (0) Keywords: TCP/IP protocol (9)

TCP/IP protocol, what is the content and function of TCP/IP protocol?

TCP/IP is synonymous with a set of protocols and includes many other protocols that make up the TCP/IP protocol cluster. In general, TCP/IP provides Transport layer services, while IP provides network layer services. The architecture of TCP/IP corresponds to the ISO OSI layer Reference Model, as shown in 1.

In the TCP/IP hierarchy model, the second layer is the implementation base of TCP/IP, which can include MENETIEEF802.3 CSMA/CD, IEEEJ802.4 token bus, and EEE802.5 's token Ring.

In the third layer of network layer, IP is Internet Protocol (PMTOCOL), ICMP is Internet Control Message protocol. (Internet Control Message Protocol), ARP is the Address Translation protocol (Resolution Protocol) rarp for reverse Address Translation protocol (Reverse ARP).

The fourth layer is the transport layer, TCP/IP is the Transmission Control Protocol, UDP is the user Data Datagram Protocol (user Datagram pro-toed).

Fifth to seventh tier, SLMTP is the Simple Mail Transfer Protocol (easy Mail Transfer Protocol), DNS for the domain Name service, and FTP for File Transfer Protocol (Files Transfer Protocol) and a remote terminal access protocol.

The TCP/IP protocol itself is shown in layered model 3.21. The following sections focus on the protocol groups that introduce TCP/IP from an architectural perspective.

TCP/IP protocol, what is the content and function of TCP/IP protocol?
Data Link Layer
The data link layer is not part of the TCP/IP protocol, but it is the interface between the various communication networks and TCP/IP on which TCP/IP exists, including a wide range of WANs such as ARPANET, Milnet, and x. Public data networks, as well as various local area networks such as Ethernet, IEEE various standard LAN and so on. The IP layer provides specialized functionality to resolve conversions with various network physical addresses.

In general, each physical network can use its own Data Link layer protocol and Physical layer protocol, without the need to set up a dedicated TCPAP protocol on the data link layer. However, when connecting a host to a network using a serial line, or when connecting to a network or network, such as when a user uses a telephone line and modem to access a network, or if two distant networks are interconnected via a data line, a dedicated slip (Serial lines IP) protocol or PPP is required at the Data Link layer ( Point to Pointprotoed) protocol.

1.SLE protocol

Slip provides a simple way to encapsulate IP packets on a serial communication line so that remote users can easily access TCP/IP networks via telephone lines and modems. Slip is a simple way of framing, and there are some problems with it. First of all, slip does not support dynamic IP address assignment During the connection process, the communication parties must inform each other's IP address beforehand, which brings great inconvenience to the Internet network of the individual users without fixed IP address, and secondly, the Meta-protocol type field in the slip frame, so it can only support the IP protocol; There is no check field in the slip frame, so transmission error cannot be detected on the link layer, and the transmission error must be solved by the upper body or the modem with error correction capability.

2.PPP protocol

In order to solve the problem of slip, the PPP protocol has been developed in the serial communication application. PPP protocol is a kind of effective point communication protocol, which is composed of a set of frames on serial communication lines, a Link control protocol LCP for establishing, preparing, testing and removing data link, and a set of network control protocol NCPs to support different network layer protocols.

Because the check field is set in the PPP frame, PPP has the function of error detection on the link layer. The protocol in PPP provides the means of parameter negotiation between two parties, and provides a set of NCPs protocol, so that PPP can support various network layer protocols, such as IP, IPX, OSI, etc. In addition, the IP-enabled NCP provides the ability to dynamically assign IP addresses when establishing a connection, which solves the problem of an Internet network on individual users.


The network layer of TCP/IP
The network layer contains four important protocols: the Interconnection network protocol IP, the Interconnection Network Control Message Protocol ICMP, the address Translation protocol ARP and the reverse address Translation protocol Rarr.

The function of the network layer is mainly provided by IP. In addition to providing end-to-end packet distribution capabilities, IP also provides a number of expansion capabilities. For example, to overcome the limitations of the data link layer on frame size, the network layer provides data chunking and reassembly functions, which enables large IP datagrams to be transmitted over the Internet in smaller groupings.

Another important service of the network layer is to establish an interconnection network, namely the Internet, on each other's independent LAN. The traffic between the Nets travels through the router to another network based on its destination IP address.

1. Interconnection protocol IP (Internet Protocol)

The most important protocol of the network layer is IP, which connects multiple networks into an interconnected network, which can distribute the high-level data in multiple datagrams via an Internet connection.

The basic task of IP is to transmit datagrams through the interconnection network, and each IP datagram is independent of each other. The IP layer on the host provides services to the transport layer. IP obtains data from the source transport entity and passes it through its data Link layer service to the I layer of the destination host. IP does not guarantee the reliability of the service, in the case of insufficient host resources, it may discard some datagrams, while IP does not check packets discarded by the data link layer.

At the time of transmission, the high-level protocol transmits the data to the IP,IP and then encapsulates the data as an interconnection network datagram, which is sent to the Data Link layer protocol over the LAN. If the destination host is directly connected to the network, the IP can transmit the data to the destination host directly through the Internet; If the destination host is in a remote network, the IP router transmits datagrams, and the router transmits the datagram to the destination host or to the next router in turn via the next network. That is, an IP datagram is transmitted from one IP module to another through an interconnected network until the end point.

A router that needs to connect to an independently managed network can select any protocol it requires, such as an internal inter-Network Connector protocol IGP (Interior Geteway pmtocol). In an IP environment, an independently managed system is called an autonomous system.

The protocol used for routers across different domains, such as from private networks to PDN, is called an external inter-Network Connector protocol EGP (Exterior Gateway Protocol), and the EGP is a simple, well-defined formal protocol.

2. Interconnect network Control Message Protocol ICMP

From the function of IP interconnection protocol, it can be known that IP provides an unreliable packet transfer service for meta-connection packets. If the router or host fails to block the network, you need to notify the sending host to take the appropriate action.

To enable the interconnection network to report errors or provide information about contingencies, a special-purpose message mechanism, the Interconnection Network Control Message Protocol ICMP, is added to the IP layer.

The packet receiver uses ICMP to notify the IP module sender of certain aspects of the modifications required. ICMP is usually generated by a problematic station where the message is found, such as a destination host or a relay router to identify the problem and generate the relevant ICMP. If a packet cannot be delivered, ICMP can be used to warn the packet source that a network, host, or port is unreachable. ICMP can also be used to report network congestion in P. ICMP is part of the IP formal protocol, and the ICMP datagram is sent over IP, so it is functionally the third tier of the network, but it is actually encoded as a fourth protocol.

3. Address Translation Protocol ARP

In the TCPAP network environment, each host is assigned a 32-bit IP address, which is a logical address that identifies the host in the internetwork. In order for messages to be transmitted on a physical network, it is necessary to know each other's physical address. So there is the problem of transforming the address of the interconnection network into the physical address. Take the Ethernet (Ethernet) environment as an example, in order to correctly transmit the message to the destination station, the 32-bit IP address of the destination station must be converted to a 48-bit Ethernet address DAO This requires a set of services at the network layer to translate the IP address into the corresponding physical network address, this set of protocols is the p.

When sending a message, if the source network layer sends only the IP address and no corresponding Ethernet address, the network layer broadcasts the ARP request to obtain the destination station information, and the destination station must answer the AP request. This allows the source site to receive an Ethernet 48-bit address and place the address into the appropriate cache (cache). The next source site's address translation to the same destination site can directly reference the address content in the cache. The Address Translation protocol ARP enables the host to identify the physical address of any physical host in the same physical network, simply by giving the destination host IP address. In this way, the physical addressing of the network can be transparent to the network layer service.

In the Internet environment, in order to send messages to the host of another network, the datagram is first directed to the IP router of the network where the sender is located. Therefore, the sending host must first determine the physical address of the router, and then send the datagram to the receiving end in turn. In addition to the basic AP mechanism, Proxy ARP is sometimes required on the router to respond to the sender ARP request by the IP router instead of the destination station.

4. Reverse address Translation Protocol Rapp

Reverse address Translation protocol is used in a special case, if after the site is initialized, only its own physical network address and no IP address, it can be sent through the team RP Protocol, broadcast requests to solicit their own IP address, and the RARP server is responsible for the answer. Thus, a site without an IP address can obtain its own IP address through the RARP protocol, which is valid until the next system restarts, without the need for continuous broadcast requests. Rarp is widely used to obtain the IP address of the meta-disk workstation.


Transport layer for TCP/IP
The TCP/IP layer provides two main protocols: Transmission Control Protocol (redundant p) and User Datagram Protocol (UDP), as well as other protocols, such as the NVP protocol for transmitting digitized voice.

1. Transmission Control Protocol TCP

TCP provides a reliable data flow service. When the transmission of the error-disturbed data, or the underlying network failure, or the network load is too heavy to make the Internet basic transmission system (meta-connection Message delivery system) does not work properly, it is necessary to pass other protocols to ensure reliable communication. TCP is the protocol that corresponds to the transport layer of the OSI model, which provides end-to-end connection-oriented reliable transmission based on the IP protocol.

TCP uses the "positive confirmation with retransmission" technique to achieve the reliability of the transmission. A simple "positive confirmation with retransmission" means that the receiver communicates with the sender, sends back a confirmation message each time the data is received, and the sender leaves a record of each packet sent to it, and then sends the next packet after the acknowledgement is received. When a sender sends a packet, a timer is started, and if the timer count is complete and the confirmation is not reached, the sender sends the packet again.

Simply confirming retransmission is a serious waste of bandwidth, TCP also uses a traffic control mechanism called a "sliding window" to improve the throughput of the network, and the scope of the window determines the number of datagrams sent by the sender but not acknowledged by the receiver. Whenever the receiving party receives a message correctly, the window slides forward, which increases the number of unacknowledged datagrams in the network and increases the throughput of the network.

TCP communication is based on connection-oriented and realizes a concept of "virtual circuit". Before the communication between the two parties, the/IP first establishes a connection, and then both sides can send the data stream on it. This type of data exchange can improve efficiency, but the overhead of establishing a connection beforehand and removing the connection afterwards is necessary. The establishment of a TCP connection takes three handshake processes, the entire process consists of a sender request to establish a connection, a receiver acknowledgement, and a sender to send a confirmation of three process components.

2. User Datagram Protocol MP

The User Datagram protocol is an extension of the IP protocol group, which adds a mechanism by which the sender can distinguish multiple receivers on a single computer. Each UDP message in addition to the data sent by a user process, there is a message destination port number and message source port number, so that the UDP software can send the message to the correct receiver, and then the receiver to send a reply. This expansion of UDP makes it possible to deliver datagrams between two user processes.

UDP is relying on IP protocol to transmit the message, so its service and IP are not reliable. This kind of service does not need to confirm, does not order the message, also does not carry on the flow control, the UDP message may appear loses, repeats, the disorder and so on phenomenon.

Session layer to application tier for TCP/IP
The above three layers of TCP/IP are significantly different from the OSI reference Model, and there is no very clear hierarchical division. FTP, TELNET, and SMTP DNS are some of the protocols that are widely implemented on various models, and many other high-level protocols are defined in TCP/IP.

1. File Transfer Protocol FTP

The file Transfer Protocol is a protocol used by the Internet to access remote machines, allowing users to operate on files between the local machine and the remote machine. FTP works by establishing two TCP connections, one for transferring files and the other for transmitting control. FTP uses client/server mode, which contains customer FRP and server FTP. The client FTP initiates the transfer process, and the server FTP responds to it. Most client FTP has an interactive interface that gives customers the flexibility to transfer files to and from the remote.

2. Remote terminal access Ielnet

Telnet connection is a TCP connection that transmits data with Telnet control information. It provides a standard way to interact with end-device or terminal processes, supporting terminal-to-terminal connections and process-to-process distributed computing communication.

3. DNS for Domain name services

DNS is a Domain Name Service protocol that provides conversion of domain names to IP addresses, allowing decentralized management of domain name resources. DNS was originally designed to enable mail senders to know the IP address of the receiving host and the mail sending host.

4. Simple Mail Transfer Protocol SMTP

e-mail in the Internet standard is a simple text-based protocol for reliable and efficient data transfer. As an application-level service, MTP does not care what kind of transport service it uses, it can send messages over a TCP connection over a network, or simply send messages through a process-communication channel between processes on the same machine. In this way, message transport is independent of the transport subsystem, and messages can be transmitted in the TCP/IP environment, the OSI Transport layer, or the X. Protocol environment.

The sender and receiver must be negotiated before the message is sent. When the SMTP service process agrees to send a message to a recipient, it either sends the message directly to the receiving user or passes the message individually through the network connector until the message is delivered to the recipient user. During the message transfer process, the routed route is recorded. This allows the sender to be found on the original route when the message is not transferred properly.

In the current UNIX version, the TCP/IP protocol has been incorporated into one part of the UNIX operating system. DOS also introduced the corresponding TCP/IP software products. Sun Company will be a wide range of TCP/IP to the business system, which in all workstation systems are pre-installed ICP/IP network software and network hardware, so that the network and computer become one, but also make TCP/IP network software and its client/server working mode for the majority of users.

TCP/IP protocol

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.