Linux high-performance programming study notes (1)

TCP/TP protocol family : layered, multi-protocol communication system, four-layer protocol system, bottom-up: data link layer, network layer, transport layer, application layer
Data link layer : network driver that implements network card interface, To process data and transmit it on the physical medium, there are two commonly used protocols in the
data link layer: ARP protocol (address resolution protocol), RARP protocol (reverse address resolution protocol)
network layer : realize the routing and forwarding of data packets The core of the
network layer The protocol is the IP protocol (Internet Protocol), and another important protocol is the ICMP protocol (Internet Control Message Protocol).
Transport layer : provides end-to-end communication for applications on two hosts. There are three main
transport layer protocols : TCP Transmission Control Protocol) (provides a reliable, connection-oriented and stream-based service for the application layer)
                      UDP protocol (User Datagram Protocol) (as opposed to the TCP protocol, provides an unreliable, connectionless and datagram-based service for the application layer) Service)
   SCTP protocol (Stream Control Transmission Protocol) (designed to transmit phone numbers on the Internet)
Application layer : responsible for handling the logic of the
application Application layer protocol: ping is an application, not a protocol
   telnet protocol is a remote login protocol
   OSPF (Open Shortest Path First) protocol is a dynamic routing update protocol
   DNS (Domain Name Service) protocol provides conversion of machine domain name to IP address. The


upper protocol implements the call to the lower-layer protocol through encapsulation. The data encapsulated by TCP
is called a TCP packet segment (or TCP segment)
The data encapsulated by UDP is called UDP datagram The data encapsulated
by TP is called IP datagram
The data encapsulated by the data link layer is called frame




ARP protocol (Address Resolution Protocol): it can realize any network layer address to any physical Address conversion
Use the arp command to view and modify the ARP cache under linux.
For example : sudo arp -d 192.168.1.109
      #delete sudo arp -s 192.168.1.109 08:00:27:53:10:67 #add


Use tcpdump to observe ARP Communication process


DNS (Domain Name Service) protocol : DNS is a distributed domain name service system. Each DNS server stores a large number of mappings between machine names and IP addresses, and the dynamically updated
tcpdump describes a certain end of the communication in the form of "IP address. Port number": ">" indicates the direction of data transmission, ">" is the source end, followed by the destination end

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325755268&siteId=291194637