TCPIP protocol history and development process

xiaoxiao2021-03-06  82

Architecture model of TCP / IP protocol 2.1 IP network layer function 2.2 IP address and its conversion 2.2.1 IP address 2.2.2 Conversion of IP address 2.2.3 Subnet Technology 2.3 IP Datebook Format 2.4 Internet Control packet protocol ICMP3.1 TCP Transportation Layer Protocol Overview 3.2 Port and Sockets 3.3 TCP Packet Format 3.4 Error Control and Flow Control 3.5 TCP Connection Management 3.6 User Data News Agreement UDP4.1 Application Layer 4.2 Application layer protocol 4.2.1 File Transfer Protocol FTP, TFTP4.2.2 Simple Mail Transfer Protocol SMTP4.2.3 Remote Log in Telnet The Structure of TCP / IP Protocol (Easy Fushi 99714001 Lu Lingling 99714004) Abstract: This article mainly discusses TCP / IP protocol Architecture and layers of protocols. Key to illustrate the database format, IP address and address conversion, IP address and address conversion, TCP transmission control protocols, and establishment of error control, traffic control, and connection establishment. Finally introduced the application layer Several common agreements. Keywords: TCP / IP IP address subnet mask port socket introduction: The current world economy is changing from the industrial economy to the knowledge economy, this kind of knowledge-based economy has two important features It is informationization and globalization. To achieve informationization and globalization, you must rely on a complete network. Computer network is the most important part of them, but computer networks are much more complicated than the telecommunications network, but it is not just a simple computer. Connection, or highly coordinated work between computer systems, so it must be hierarchically handled, transformed into a number of local problems, thereby forming a network architecture like a building frame. Due to Internet It has been recognized worldwide, so the TCP / IP system computer network used by Internet has an important status to understand the content and working principle. 1.1.1 TCP / IP protocol history and development Process TCP Agreement was earlier in 1973 by the two researchers of Stanford University. In 1983, TCP / IP was adopted by UNIX 4.2BSD system. With the success of UNIX, TCP / IP gradually became a standard network protocol of UNIX machines .Internet The predecessor Arpanet initially uses the NCP (Network Control Protocol) protocol. Because the TCP / IP protocol has cross-platform features, the ARPANET's experimenter will use the TCP / IP protocol to specify the TCP / IP protocol in accordance with the improvement of TCP / IP. As Arpanet gradually develops into the Internet, TCP / IP protocols become Interne T 's Standard Connection Protocol. 1.2 Architecture Model of TCP / IP Protocol The TCP / IP protocol is actually a set of protocols, which includes TCP protocol (Transport Control Protocol, Transport Control Protocol), IP Protocol (Internet Protocol Internet Protocol) and others Some protocols. As shown in Figure 1, the TCP / IP architecture model is: (1) Network interface layer: strict it is not a hierarchy, but only an interface to provide the following data link The interface between the layer and the physical layer. There is no specific content of the network interface layer. This is no longer discussed. Figure 1 (2) IP network layer: Main internet protocol IP, address resolution protocol ARP, reverse address resolution protocol RARP. (3) TCP transportation layer: TCP with transport control protocols, User Data News Agreement UDP. (4) Application layer: Telnet, FTP, SMTP and other application layer protocols. The relationship between layers and layers is that the lower layer is always on The service details of the next layer of the next layer .2.1 The function of the IP network layer has different physical network technologies with different addressing methods;

Hosts in different physical networks have different physical network addresses. Network technology is a high-level software that will be unified from different physical network technology. Internet technology uses a global universal address format, for every network Both the network and each host allocate a network address, with this to block the difference between the physical network address. IP protocol provides an address format for all-Internet network universal, and is assigned under unified management to ensure that one address corresponds to one Net network hosts (including gateways), the difference in physical addresses is blocked by the IP layer. The iP provides connectionless service. 2.2 IP address and its conversion 2.2.1 IP address The host and router on each Internet An IP address, including the network number and host number, where the network number identifies the network, and the host number identifies the host in the network. All IP addresses are 32 bits, divided into 4 fields, 8 digits per field. 32 bits The IP address can have five formats, as shown in Figure 2: IP addresses usually written with point decimal notes, that is, the IP address is written into four decimal numbers, separated by a decimal point, each decimal number (from 0 to 255) represent a byte of the IP address. It is worth pointing out that 0 and 1 have special meaning, see the table 1: NET-IDHOST-ID source address usage of the destination address using the meaning of the representative of the destination, can not be available on this network Host 0HOST-ID can not be able to broadcast NET-ID all 1 in this network can only be broadcast on the network, so the host is broadcast 127 any number can be used as The conversion IP address of the local software retrans test Table 12.2.2 The IP address of the IP address is the address of the network layer, and the down to the link layer is converted to the Mac frame to send to the network. The MAC frame is used is a hardware address. How to Transferring 32-bit IP addresses into 48-bit LAN addresses, this is the problem to resolve address resolution protocol ARP. Suppose is to generate a datagram in this LAN, A host to bor the Boat. First A host View the ARP cache The IP address to the mapping table of the physical address, if you are found to write to the MAC frame, otherwise make the following steps: Send an ARP request packet on this LAN, there is an IP address of host B; on this LAN, so on the host Both the running ARP process receives this ARP request packet; host B sends an ARP response group to host A in the ARP request packet, and write its own physical address; host A receives the main B After the ARP response group, the IP address to the IP address to the physical address is written in its ARP cache. Sometimes the counter address resolution protocol RARP enables only the host that only knows its physical address, it can know its IP address. If the boot of the free workstation can be solved by the reverse address resolution protocol RARP. 2.2.3 Subnet Technology We know that a unit allocated IP address is the IP address NE T-ID, while the host number host-id is allocated by this unit. If all hosts of the unit use the same network number, the number of hosts is a lot, distributed in a large geographic range, often require some bridges Multi-disadvantages of these hosts. For example, it is easy to cause broadcast storms, and it is not easy to isolate and manage when the network fails. To make this unit's host, this unit is host Divided into a number of subnets, the first few bits in the host number field in the IP address as "subnet" field "

The remaining remaining is still the host number field. This can use the router to connect each subnet of the unit to each other, so that the network of the whole unit is easy to manage. From the outside, this unit has only one network number. Only when it is After the group enters the unit, the router of the unit is selected according to the sub-network number, and finally find the destination host. This way, the network management of the unit is much easier. At the same time, the IP address is not caused Very big waste, ease the growing demand for the IP address of the LAN and online host. As shown in Figure 3, the meaning of the subnet mask is illustrated. Each router is first checking the packet when receiving a packet The network number in the IP address, if the network number is not sent to the next router, if the network number is used by the subnet mask and the IP address, then take the subnet number to determine, decision is sent to Other subnets, or directly delivered to the host port of this network. 2.3 IP datagram The format IP dataglet format can illustrate what the IP protocol has functions, Figure 4 is the format of the datagram. From Figure 4 Out, a data newspaper head is composed of two parts of the data. The first 20 bytes of the header are fixed parts, and the latter part is a variable portion. The fields in the fixed portion of the Data Newspaper Party. Version of 4Bit, referring to the version. The version of the agreement used by the communication must be consistent .. The head length accounts for 4bit, the maximum value of the representation is 15 units (4 bytes per unit), so the maximum length of the head length of IP is 60 bytes. When IP The first length of the group is not a 4-byte integer time, so that it will be relatively convenient to implement. The length of the first length is 60 bytes of disadvantage (if the source station is selected) is not enough. But Such intention is to minimize additional overhead .. The service type accounts for a better service, and its meaning is shown in the above part of the picture. The first three bits of the service type field indicate priority, it can make Data newspaper has one of eight finishes. The fourth bit is D bit, indicating that there is a lower delay. The fifth bits are T bits, indicating that there is a higher throughput. The sixth bit is R bit, indicating that there is a higher reliability, that is, during the data report transmission, the probability of being discarded by the node switch is more smaller. The seventh bit is C bit, which is new, indicating that the cost is more Low routing. The last word is not used before .. The total length of the total length refers to the length of the head and the sum of the data. The unit is byte. The total length field is 16bit, so the maximum length of the datagram is 65535 bytes. This is At present, it is enough. When a long data is reported to slide, the "total length" does not index the length of the index, but the sum of the head length and data length after fragmentation .. Identification identification field is for The dataginary report after fractions can finally reload the original data report. Please note: "Identification" here doesn't mean the sequence number, because IP is no connection service, data There is no sequential acceptance problem .. The mark accounts for 3BIT. There is only the first two bit. The lowest bit in the flag field is MF (more fragment). Mf = 1 means that there is also a separate data report .Mf = 0 indicates that this is the last one in a number of data messages. One record in the middle of the flag field is DF (don't fragment). Only when MF =

0 is allowed to allow fragmentation .. Sliced ​​offset shift indicates that a longer packet is in the relative position of some piece in the original group. That is to say, the film is from the starting point of the user data field. Where to start. The film offset is offset by 8 bytes .. The life life field is TTL (Time to Live), the unit is second, the recommended life value is 32 seconds .. Agreement accounts for 8Bit, the protocol field points out The data of the transportation layer carried by this data is to use the protocol to allow the IP layer of the host to give this datagna to which process should be handed over. Common protocols and corresponding protocol field values ​​are: UDP (17), TCP ( 6), ICMP (1), GGP (3) .. The first inspection and this field only inspect the header of the data is not included. IP inspection and calculation method is: the first part of the data report is a sequence of 16bit characters. First After zeroing the inspection and field, after adding all 16bit characters, the binary counter will be written into the inspection and field. After receiving the data report, the sequence of the first 16bit word is added again, if the first end does not occur Any change, then it is all 1, otherwise, it is considered an error, and the datagram is discarded. The variable part of the iP Data newspaper is mainly used to perform network testing or debugging. Option is a long, defined 5 options : That is, the safety, strict routing, loose routing, routing, time tag. 2.4 Internet Control packet protocol ICMPICMP is mainly used by host and router in the Internet, used to exchange information for data report transmission. Usually ICMP routes The error report caused by the problem, but there is eleven different types of packets with ICMP. Mainly divided into two types, namely ICMP error messages and ICMP interrogation packets. In ICMP error messages, change the route The number used by the message, is used to update the host's routing table. IicMP source suppression packets are used to control network congestion, solve the matching problem of the host host to send data reports to the low rate of destination hosts...........................................................................................................................................................................................? Wen mainly: echo request packets: The test destination station can be reached, and it is related to the status. Timestamp request message: can be used to perform clock synchronization and measurement time. Address Mask Request Packet: Make the host The Net Mask server gets an address mask of an interface 3.1 TCP transport layer protocol overview From the perspective of communication and information processing, the transportation layer belongs to the highest layer facing the communication portion. But from the network function or user function, transport layer It is also the lowest layer in the user function. The transportation layer blocks the details of the following communication subnets to the high-level user, and the user does not see what the physical link to implement communication is, what protocol is not available .TCP The protocol is provided for connection service, which is a reliable byte stream that provides end-to-end in unreliable network services. 3.2 port and socket ports are interfaces for interacting with transport entities. The port number is a 16bit address Different application processes different The port number is identified. The port number is divided into two categories. One is specifically assigned to some most common applications. This is a well-known port (Well-KNown Port), the value is 0-1023. "Know" means these ports No. The TCP / IP system is determined and published; the other class is a general port number, which is used to assign a customer process that requests communication. The socket is the combination of IP addresses and port numbers. One connection of TCP is With a pair of sockets, a pair of sockets communicating in the transportation layer must be unique. 3.3 TCP packet format The following figure is the TCP packet format map: source port and destination ports each account for two Bytes. The port is the transport layer and the high-level service interface, 16bit port, 32bit IP address, which constitutes an address equivalent to the transport level service access point TSAP (total 48bit) .. The serial number takes four bytes, It is the serial number of the data part of the data sector sent by this newspaper. There is a serial number in each byte in the data stream transmitted by the TCP .. Verify that the serial number accounts for four bytes, and it is expected to receive the next next time. The serial number of the first byte of the transmitted data is also desired to receive the serial number of the next message segment. Since the serial number field has 32Bit long, the 4GB data can be numbered, so that the serial number can be repeated. The data of the serial number is already disappeared in the network .. The data offset accounts for 4BIT, which is the length of the TCP message section, which is used to point out how far is the beginning of the data from the TCP report. "Data Offset" unit is 32bit word, reserved bit 6bit, these bits must be 0; the control bit accounts for 6bit, each bit is as follows: Emergency Bit URG, when URG = 1, indicate this message section Send it as soon as possible without pressing the original queuing, it should be used with the emergency pointer field; confirm the bit Ack, when the ACK = 1 confirms the serial number field meaning; urgent bits PSH, when PSH = 1, indicate request remote TCP Immediately transfer this newspaper to its application layer, and delivery will be delivered again after the entire buffer is over;

Reconstruction Bit RST, when RST = 1, indicates a serious error, must be released, then re-establish the transport connection; synchronize bit SYN, when SYN = 1 and ACK = 0, indicating this is a connection request message section, if The other party agreed to establish a connection, then SYN = 1 and ACK = 1; terminating bit Fin, when FIN = 1, indicating that the transmitted byte string has been sent, and the transport connection is required to be released. The window accounts for two bytes, which is the accept window of the sender of the report. The unit is byte.. Test and account for two bytes, the scope of the test includes the first and data, when calculating the inspection, first, first in TCP A 12-byte pseudo head is added to the front of the report, and then the receiving end will still add a pseudo-headed part when the check is calculated, and the option is changeable. TCP specifies a option to use the longest message section MSS The TCP tells the other party's TCP: The maximum length of the reporting section that can be received by the local buffer .. Fill is not set, the content of the filled must be 0, which is to ensure that the binding of the header and the beginning of the data can be 32 Union; 3.4 Error Control TCP is not numbered by the transmitted message segment .tcp looks to the entire message you want to transmit into a data stream consisting of bytes, then edit a serial number for each byte. Both parties must agree to the initial number .TCP will place the serial number of the first data byte in each transmitted message section, placed in the serial number field of the TCP header. TCP confirmation is confirmed to confirm the highest number of data received. But the return confirmation number is added to the highest number of data received 1. That is to say that the confirmation number indicates the number of the first data bytes you received next time. If the sender does not receive it within the specified set time To confirm, it is necessary to resend the unrecognized message segment. If the acceptor receives a message segment with an error, the report segment (does not send the noble message). If you receive a duplicate message section, It is also necessary to discard it, but to send confirmation information. If there is no error in the received message segment, it is only no sequence number, then the TCP should be handled clearly, but let TCP's implementation from the line to determine. Or discard the unprecedented message segment, or temporarily store it within the received buffer, and then the reporting segment of the sequence number is collected and then upon the application layer together. Use the latter policy to the network performance Will be better. 3.5 TCP traffic control TCP flows through the variable transmission window. The send window refers to the number of sessions that can continue to send a report segment when the sender does not receive a confirmation. The unit of the window is Bytes. The value written in the window field of the TCP message section is the currently set reception window value. The send window is agreed by both parties when the connection is established. In the process of communication, the receiving end can be based on its own resources, at any time. Dynamically adjust your own receiving window, then tell the other party, match the other party's sending window and your own receiving window. Implementing traffic control is not only to receive the receiving end. If the sender is too much The network load will be overweight. This will cause the delay of the report segment to increase, which will cause the host to receive confirmation in time, so it will reach more news segments, and this will further exacerbate the network Congestion. In order to avoid congestion, the host should reduce the transmission rate. 3.5 TCP connection management transportation connection The establishment and release of the transport connection is an indispensable process for each connection communication, the management of transportation connectivity makes the establishment and release of transportation connections It can be done normally. Solve the following three questions during the connection establishment: To make each party know the existence of the other party; to allow both parties to negotiate some parameters (such as the maximum report length, the largest window of the largest window); Can transport entity resources (such as buffer size, projects in the connection table) to allocate. The process created in the data connection is called three handshakes: the TCP of the host A sends a request connection report to the host B, and the synchronization bit in its head SYN should be set 1, simultaneously select a serial number x, agreed to the start number; the TCP of the host B receives the connection request report section, if the consent, send back confirmation, in the confirmation report, 1, confirm the serial number X 1, at the same time select a serial number Y. The TCP of the host A will give a confirmation to b after receiving this report, confirming the serial number Y 1; the TCP notification of each host is established. After the data transfer ends, both parties of the communication can issue a request for the connection. Similar to the establishment connection, the release process is also three handshake: assuming A first release request, then the TCP message section issued to b is the termination bit of the TCP message section Fin1; b Received a confirmation after receiving the request, at this time, the connections of A to B are released, and the connection is in a semi-closed state;

转载请注明原文地址:https://www.9cbs.com/read-95142.html

New Post(0)