Basic network knowledge, ASP. NET core knowledge (1) *, basic knowledge asp.net
Why do I need to write a network?
My original plan was like this. I sorted out the core knowledge of ASP. NET development for two consecutive days. When talking about this, someone asked. "Isn't it good to Make ASP. NET notes? Why do we need to write basic network knowledge? Is it silly ?"
This is the reason. As a website developer, the software you develop will eventually run on the network. This is like a producer who wants to produce and supply products in northeast China, but has no knowledge of the weather, geography, and culture in northeast China. The manufacturer's products must be unavailable or low-end products! It is natural that the product quality is poor. The quality of the product is good, which is a little higher. As an ASP. NET developer, if you do not know the http protocol, Ajax, or JavaScript at all, the effect is the same.
In short, a wealth of knowledge reserves will provide more quality assurance for your software products.
Of course, what we need to know is the HTTP protocol. We only need to know about the content in this article. The goal is to have a general concept of the entire knowledge system. Come on, frankly. This article is of little significance. The root cause of writing it is that I want to recall my network knowledge in this way. After all, I used to take an exam as a network engineer (I knew it was useless when I got into college, but I thought it was amazing. At that time, I spent some time thinking about university life ). Of course, this is just a summary.
Architecture
1. OSI, TCP/IP, and five-layer architecture
Speaking of the network architecture, there are two classic network partitioning Methods: OSI Layer 7 and TCP/IP Layer 4.
1) OSI
OSI's layer-7 protocol architecture is clear and complete. However, it is highly complex and not practical.
2) TCP/IP
Compared with the complexity of OSI Layer 7, the layer-4 Structure of TCP/IP has been widely used.
However, in practice, TCP/IP only uses the top three layers.
3) five-layer architecture.
The bottom layer of the TCP/IP network interface layer. There is nothing new to the specific content, and there is no big difference with the general communication link.
Therefore, when learning, we adopt a moderate approach, which is to combine the TCP/IP System and the OSI system.
Form a five-layer architecture from the physical layer, data link layer, Internet layer, transport layer to the application layer.
2. Description of the five-layer protocol and each layer
1) Physical Layer
Defines the mechanical, electrical, and functional recovery characteristics of communication equipment. (That's What I understood in those years. "The square plug cannot be inserted into the circular port. Is this a standard defined ")
Device: Hub (forming a collision domain)
2) data link layer
Establishes, maintains, and releases data links between network entities. This data link realizes a non-error channel for the network. (MAC media access layer and LLC Logical Link Layer)
Three key features: 1. encapsulated into frames
2. transparent transmission
3. Error Detection
Device: a net bridge with a cache. It accepts MAC frames.
3) Network Layer:
It belongs to the Communication Subnet and is connected through the network to exchange data released by the transport layer entity. It solves the problems of route selection, network congestion, and heterogeneous network interconnection. (Messages are sent)
IP Internet Protocol
ARP Address Resolution Protocol
RARP Reverse Address Resolution Protocol
ICMP Internet Control Packet Protocol
IGMP Internet Group Management Protocol
4) Transport Layer
Implements end-to-end grouped data transmission at the sender and receiver, and ensures data packet transmission without errors, loss, and redundancy. (The service access point is a port)
TCP (Transmission Control Protocol) is reliable, connection-oriented, and has a response mechanism.
UDP (User Datagram Protocol) is unreliable, has no connection, and has no response mechanism
5) Application Layer
Although we are program developers, what do the above-mentioned grass-roots protocols mean? To be honest, we have little contact. The application layer is closely related to our work.
HTTP Hypertext Transfer Protocol is what we need to understand.
FTP File Transfer Protocol
DHCP Dynamic Host Configuration Protocol
NFS Network File System
Telnet Remote logon Protocol
DNS domain name system
SNMP Simple Network Management Protocol
Several concepts to be understood
1. URL
The Learning name of this item plus: unified resource positioning character. He indicates finding the resource location and access method of a resource on the Internet.
The general structure is as follows:
Protocol: // host: Port/path? Request Parameters
This is what happens under http.
Http: // host: Port/path
2. HTTP protocol
- This course is known as hypertext transfer protocol.
As the name implies, the http protocol defines how a browser requests a document from a Web server and how the server sends the document to the browser.
- Http is request and response. If no request is sent, a message is returned.
- Http is text-oriented. Therefore, each field in the message is an ASCII string, so the length of each field is unknown.
- There are two types of http packets: request packets and response packets.
1) Request Message
2) Response Message
- The request message and response message can be divided into three parts.
1) start line
2) first line
I used to call the preceding two parts as the packet header. The following part is called newspaper style. (I do not know if it is true)
3) actual subject
- For details, I will write a simple study on the HTTP protocol in the next blog.