The first layer: physical layer
Layer 2: Data link layer 802.2, 802.3ATM, HDLC, FRAME RELAY
Layer 3: Network layer IP, IPX, ARP, APPLETALK, ICMP
Layer 4: Transport layer TCP, UDP, SPX
Fifth layer: Session layer RPC, SQL, NFS, X WINDOWS, ASP
The sixth layer: presentation layer ASCLL, PICT, TIFF, JPEG, MIDI, MPEG
Layer 7: Application layer HTTP, FTP, SNMP, etc.
https://www.nowcoder.com/questionTerminal/7cf6990ea2e345b6bc96d882944c4d6b
The ICMP protocol is the satellite protocol of IP layer, which is a protocol between IP layer and TCP layer, which is generally considered to belong to IP layer protocol.
The IP protocol uses it to exchange error messages and other network conditions with other hosts or routers.
The ICMP packet is heavily carrying control information and recovery information.
Mainly used for router host to send error message control information to other routers or hosts
http://bbs.csdn.net/topics/70431973
In the OSI model, the ARP protocol belongs to the link layer , whereas in the TCP/IP model, the ARP protocol belongs to the network layer .
1) The location of the ARP hierarchy is the network layer of TCP/IP
2) The ARP message is encapsulated and transmitted by an Ethernet frame. Not encapsulated into IP packets.
3) In fact, for the network interface layer of the Ethernet frame, they are also the upper layer of the frame protocol, when the Ethernet frame is received, according to the frame of the Protocol field to determine whether to send to ARP or IP.
4) It is not placed in the data link layer, because it does not have the function of the data link layer, it is the role of the data link layer to provide the receiver's frame address. In addition, I also recommend reading "TCP/IP detailed" Volume One inside there is a diagram, it is clear that its location belongs to the network layer (note, when painting, ARP Rarp painted at the lower end of the IP layer, and ICMP and IGMP painting in the upper part of the IP layer, because these two protocols are encapsulated by IP. )
TCP / IP:
Network interface layer (link layer):
Network layer: IP, ICMP, IGMP, [ARP, RARP]
Transport layer: TCP, UDP, UGP
Application layer: Telnet, FTP, SMTP, SNMP.
OSI: Physical layer: EIA / TIA-232, EIA / TIA-499, V.35, V.24, RJ45, Ethernet, 802.3, 802.5, FDDI, NRZI, NRZ, B8ZS
Data link layer: Frame Relay, HDLC, PPP, IEEE 802.3 / 802.2, FDDI, ATM, IEEE 802.5 / 802.2, [ARP, RARP]
Network layer: IP, IPX, AppleTalk DDP
Transport layer: TCP, UDP, SPX
Session layer: RPC, SQL, NFS, NetBIOS, names, AppleTalk, ASP, DECnet, SCP
Presentation layer: TIFF, GIF, JPEG, PICT, ASCII, EBCDIC, encryption, MPEG, MIDI, HTML
Application layer: FTP, WWW, Telnet, NFS, SMTP, Gateway, SNMP
http://blog.csdn.net/cuiweitju/article/details/38761381
RPC (remote Procedure call Protocol)-a remoting protocol that requests services from a remote computer program over a network without needing to know the underlying network technology.
RPC is socket-based, that is, working at the session level
The RPC protocol assumes that some transport protocols exist , such as TCP or UDP, to carry information data between communication programs. In the OSI network communication model, RPC spans the transport and application tiers. RPC makes it easier to develop applications that include distributed, multi-program networks.
RPC takes client/server mode. The requestor is a client, and the service provider is a server. First, the client call process sends a call message with process parameters to the service process, and then waits for the reply message. On the server side, the process stays asleep until the call information arrives. When a call arrives, the server obtains the process parameters, evaluates the result, sends a reply message, and then waits for the next invocation information, and finally, the client invokes the process to receive the reply message, obtains the process result, and then invokes execution to proceed.
Http://baike.baidu.com/link?url=poJKurLLzJhUqI8SJWBuls2KLnyfJGID4BLDopemG085rfmwmOQ9IxzDC3IUYJ6tfW_ Mrxixkc4fo9m_8jnizjsczuhgizk3ocew9v1bax2yhwzxppxtrgmk5y5alluyz26osxbu_pep2_ao_zqjdhpavfgd_ Vxdjuu-qtqb74awfa4aoyfd8yuhh0_9ja23
The network is divided from bottom to top
The physical layer, the data link layer, the network layer, the Transport layer, the session layer, the presentation layer, and the application layer.
With a preliminary understanding, I know that the IP protocol corresponds to the network layer , theTCP protocol corresponds to the Transport layer , and the HTTP protocol corresponds to the application layer,
The three are inherently not comparable,
Socket]
It is theTCP/IP protocol Package and application (at the programmer level) is the API-level concept, to facilitate the development of the production, not the concept at the communication protocol level.
It can also be said that the TPC/IP protocol is a transport layer protocol, mainly to solve how the data in the network transmission,
HTTP is an application-layer protocol that primarily addresses how data is packaged.
Regarding the relationship between TCP/IP and HTTP protocol, the network has a relatively easy to understand introduction:
"When we transmit data, we can only use the (Transport Layer) TCP/IP protocol, but in that case the data content cannot be recognized without the application layer."
If you want to make the transferred data meaningful, you must use the application-layer protocol.
There are many application layer protocols, such as HTTP, FTP, Telnet, etc., and you can define the application layer protocol yourself.
The web uses the HTTP protocol as an application-layer protocol to encapsulate HTTP text information and then send it to the network using TCP/IP as the Transport layer protocol. ”
And what we usually say the most socket is what, in fact, the socket is the TCP/IP protocol encapsulation, the socket itself is not a protocol, but a call interface (API).
With the socket, we can use the TCP/IP protocol.
In fact, the socket is not necessarily associated with the TCP/IP protocol.
The socket programming interface is designed to adapt to other network protocols as well.
So, the advent of sockets just makes it easier for programmers to use the TCP/IP protocol stack, which is an abstraction of the TCP/IP protocol.
This creates some of the most basic functional interfaces we know, such as Create, listen, connect, accept, send, read, write, and so on.
The network has a section on the socket and TCP/IP protocol relationship is relatively easy to understand:
"TCP/IP is just a stack of protocols, just like operating systems, which must be implemented in a specific way, as well as providing an external interface for operations."
This is like the operating system will provide standard programming interfaces, such as the Win32 programming interface,
TCP/IP also provides the interface for programmers to do network development, which is the socket programming interface. ”
About the TCP/IP protocol only, with the broad and profound I think not too, just check the online about this kind of information and books only the number of documents to know,
This I am going to buy some classic books (such as "TCP/IP Detailed: Volume One, Volume Two, Volume three") to learn, today, first summarizes some based on TCP/IP protocol-based applications and programming interface knowledge, that is, just said a lot of HTTP and sockets.
CSDN has a comparative image of the description: HTTP is a sedan, provides a package or display the specific form of data; The socket is the engine that provides the ability to communicate over the network.
In fact, the transport layer TCP is based on the network layer of IP protocol, and the application layer of the HTTP protocol is based on the transport layer of the TCP protocol, and the socket itself is not a protocol, as mentioned above, it just provides a TCP or UDP programming interface.
Here are some of the important concepts that are often encountered in a written test or interview and are summarized here.
First, what is the three-time handshake for a TCP connection
First handshake: The client sends a SYN packet (SYN=J) to the server and enters the Syn_send state, waiting for the server to confirm;
Second handshake: The server receives the SYN packet, it must confirm the customer's SYN (ACK=J+1), and also send itself a SYN packet (syn=k), that is, the Syn+ack packet, when the server enters the SYN_RECV state;
Third handshake: The client receives the server's Syn+ack packet, sends the acknowledgment packet ack (ACK=K+1) to the server, the packet is sent, the client and the server enter the established state, and the handshake is completed three times.
The data is not included in the packets that are delivered during the handshake, and the client and server formally begin transmitting the data after the three handshake is complete.
Ideally, once a TCP connection is established, the TCP connection is maintained until either side of the communication actively closes the connection.
When disconnected, both the server and the client can initiate a request to disconnect the TCP connection, and the disconnection process requires a "four handshake" (the process is not fine-grained, that is, the server interacts with the client and finally determines the disconnection)
Second, steps to establish a network connection using a socket
Establishing a socket connection requires at least one pair of sockets, one running on the client, called Clientsocket, and the other running on the server side, called ServerSocket.
The connection between sockets is divided into three steps: Server listening, client request, connection acknowledgement.
1, Server monitoring: Server-side sockets do not locate the specific client sockets, but in the status of waiting for the connection, real-time monitoring network status, waiting for the client connection request.
2, client request: Refers to the client socket to make a connection request, to connect to the target is the server-side socket.
To do this, the client's socket must first describe the socket of the server it is connecting to, indicate the address and port number of the server-side socket, and then make a connection request to the server-side socket.
3. Connection confirmation: When the server side socket is heard or received the connection request of the client socket, it responds to the request of the client socket, establishes a new thread, sends the description of the server end socket to the client, and once the client confirms the description, the two sides formally establish the connection.
While the server-side socket continues to be in the listening state, it continues to receive connection requests from other client sockets.
Third, the characteristics of HTTP links
The HTTP protocol, the Hypertext Transfer Protocol (hypertext Transfer Protocol), is the foundation of Web networking and one of the most commonly used protocols for mobile networking, an application built on the TCP protocol.
The most notable feature of an HTTP connection is that each request sent by the client requires a server loopback response, and the connection is actively released after the request has ended. The process from establishing a connection to closing a connection is called a "one-time connection."
Fourth, the difference between TCP and UDP (the most test). It's getting rotten. I think--\\)
1, TCP is a link-oriented, although the security of the network instability characteristics determine how many times the handshake can not guarantee the reliability of the connection, but the TCP three handshake at a minimum (in fact, to a large extent guaranteed) to ensure the reliability of the connection;
And UDP is not connection-oriented, UDP transmission data before the connection with the other, the docking received data does not send a confirmation signal, the sender does not know whether the data will be received correctly, of course, there is no need to resend, so that UDP is a non-connected, unreliable data transmission protocol.
2, also due to 1 of the characteristics of the said, so that the cost of UDP smaller data transmission rate is higher, because there is no need to send and receive data confirmation, so UDP real-time better.
Know the difference between TCP and UDP, it is not difficult to understand why the use of TCP transmission protocol MSN than UDP transmission file slow, but can not say that QQ communication is not safe,
Because programmers can manually authenticate UDP data, such as the sender of each packet number and then by the receiver to verify ah what?
Even so, UDP does not have a TCP-like "three-time handshake" on the package of the underlying protocol to achieve the transmission efficiency that TCP cannot achieve.
Http://jingyan.baidu.com/article/08b6a591e07ecc14a80922f1.html
Which layer of the OSI is RPC, SQL, and NFS