Network of Test and Development - Common Service Protocols
Original
- ZenTao
- 2022-06-08 10:43:54
- 796
The protocol is the abbreviation of network protocol. The network protocol is a set of agreements that both sides of the communication computer must abide by. Such as how to establish a connection, how to identify each other, etc. Only by observing this agreement can computers communicate with each other. Its three elements are syntax, semantics, and time sequence.
(1) Syntax: the structure or format of data and control information;
(2) Semantics: that is, what control information needs to be sent, what actions to be completed, and what response to be made;
(3) Time sequence(synchronization): a detailed description of the sequence of events.
TCP/IP
TCP/IP is the protocol used on today's Internet. It contains not only two parts, TCP and IP, but also a protocol cluster composed of FTP, SMTP, TCP, UDP, IP, and other protocols. Layer 4 of the TCP/IP protocol, the network layer, is responsible for creating network connections between hosts and completing IP-based addressing and forwarding functions.
DNS
DNS(Domain Name System)is a domain name resolution service. It resolves domain names to IP addresses to make it easier for everyone to access the Internet using easy-to-remember English letters. The following example completes a resolution, and by pinging the domain name, we can get its IP address.
Image Source:DNS
Local Domain Name Resolution
In addition to DNS, we can use the local HOSTS file to complete the domain name resolution when we access the internal server through the domain name. Note that this process takes precedence over DNS. The file under Windows is: C:\WINDOWS\system32\drivers\etc\hosts.
An example is given below under Linux, in / etc / hosts.
Source: Local Domain Name Resolution
DHCP
DHCP(Dynamic Host Configuration Protocol)is used to dynamically allocate available IP addresses to hosts in the LAN. Under windows, use the ipconfig command to view the IP address assigned by this machine. Under Linux, use ifconfig instead.
Source:DHCP
Two IP addresses are shown here:
- lo0 127.0.0.1 is the loopback address used for internal communication of the machine. It is a virtual machine's local IP address that is the same and always valid for each device;
- en0 192.168.0.100 is the dynamic IP address assigned by the DHCP server to the first Ethernet card. After the machine is shut down, DHCP will reserve this address for the device (network card).
HTTP/HTTPS
HTTP(HyperText Transfer Protocol)is the most widely used protocol on the Internet. The article you are reading with your browser is transmitted using this protocol. HTTPS realizes encryption on its basis.
HTTP / HTTPS is a connectionless and stateless application layer protocol. In other words, after the browser sends a request to the server for a response, the connection is closed. A Session mechanism is adopted between the browser and the server so that when the subsequent request comes, the server still knows who the visitor is. The method for the server to identify the Session usually works with a unique identifier (such as jsessionid, bear token, cookie) carried in the request URL or header. We will elaborate further when we introduce interface testing later.
WebSocket
WebSocket establishes a persistent connection between the client and the server, allowing the server to actively push data to the client to achieve real-time two-way data transmission. It solves the problem that in the past, when using the HTTP protocol, you could only pull data individually, or when using HTTP to simulate a long connection, the Long polling resource consumption is too large.
WebSocket is an application layer protocol and a subset of TCP / IP protocol. It completes handshake through HTTP protocol during connection.
RPC
RPC(Remote Procedure Call Protocol)is primarily used in the current famous microservice architecture to facilitate one computer to directly call the program on another without understanding the underlying network technology/protocol. RPC can be based on HTTP (application layer) protocol or directly implemented on TCP (transport layer) protocol.
Support
- Book a Demo
- Tech Forum
- GitHub
- SourceForge
About Us
- Company
- Privacy Policy
- Term of Use
- Blogs
- Partners
Contact Us
- Leave a Message
- Email Us: [email protected]