Fun talk about network protocols! Huawei's 18th-level technical experts have worked hard to produce 545 pages of fairy documents!

The network uses physical links to connect separate workstations or hosts together to form a data link to achieve the purpose of resource sharing and communication. Communication is the exchange and transmission of information between people through a certain medium. Network communication is to connect various isolated devices through the network, and realize the communication between people, people and computers, and computers and computers through information exchange.

The most important thing in network communication is the network communication protocol. There are many network protocols today, and there are three most commonly used network protocols in local area networks: NETBEUI from MICROSOFT, IPX/SPX and TCP/IP from NOVELL. The appropriate network protocol should be selected according to needs.

  • First, we will start from the things we often see around us, use storytelling to explain various agreements, and then slowly expand into unfamiliar areas. For example, everyone will use the command to view the I address, and we will start with this command to explain some related concepts. Everyone uses a simple network to play games in the university dormitory group. We start with the simplest network concepts involved in the dormitory network, then talk about the office network, and then talk about the daily activities such as surfing the Internet, shopping, and video downloading. Related network protocols, finally talked about the most unfamiliar data center. When it comes to this, many concepts have already appeared in the previous examples of "dormitory" and "office", so it is easier to accept and understand.
  • Second, when explaining the network protocol, it will be closer to the usage scenario, connecting the relationships at all levels, rather than explaining a concept in isolation.
  • Common computer network courses tend to be layered according to the network, layer by layer, but rarely talk about the relationship between layers. For example, when we are learning routing protocols, in real scenarios, what is the relationship between so many algorithms and the second layer? What is the relationship with the fourth layer? For example, we visit a website in real network communication, For a payment, what is the IP layer doing during the TCP three-way handshake? What is the MAC layer doing? These contents will be explained one by one in this book.
  • Third, after explaining the protocols at each level, we will talk about how to use these protocols in current popular areas (such as cloud computing, containers, and microservices).
  • By studying this book, readers can understand the real application scenarios of these network protocols on the one hand, and on the other hand, they can further deepen their understanding of network protocols by using cloud computing, containers, and microservices.

Due to the length of the article is too long to show all of it, you need the full version to add a small assistant to get it

Content section

Chapter 1 Overview of Communication Protocol.

1.1 Why learn network protocols

I believe everyone has heard the story of Tongtian Tower. In order to prevent mankind from uniting and let humans speak different languages, human beings cannot communicate and reach an "agreement", and the plan of Tongtian Tower will fail.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

1.2 The true meaning of network layering

Since I have been engaged in computer network-related work for a long time, I found that computer network has a remarkable feature, that is, it is a subject that not only needs to be memorized, but also needs to be familiar with the principles. Many questions seem to understand, but I'm afraid to ask them carefully. When you ask, you will find that you don't understand so thoroughly.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

1.3 ifconfig: familiar and unfamiliar command line

When interviewers hear this question, they often feel that they are in the wrong room. I’m interviewing for a technical position. Why do I ask such a simple question?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

1.4 DHCP and PXE: How did the IP address come from, and how did it disappear

In the previous section, we talked about some basic concepts of IP addresses. If you need to communicate with other machines, you need a communication address, and we need to configure an IP address for the network card.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 2: From the second to the third floor

2.1 From the physical layer to the MAC layer: how to network and play online games in the dormitory

In the last chapter we witnessed the birth of the IP address, or the birth of the entire operating system. Once the machine has an I address, it can communicate with other machines in the network environment.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

2.2 Switch and VLAN: The office is too complicated, I want to go back to school

In the previous section, we set up a local LAN in the dormitory, and everyone can play games together happily. The dormitory is a very simple scene. In this section, let us switch to a slightly more complicated scene-the office.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

2.3 ICMP and ping: Scouts who throw stones and ask directions

Whether in the dormitory, in the office, or in the operation and maintenance of a data center, we often encounter the problem of network failure. The machine is clearly there, you can even connect to it through the machine's terminal to see it. It looks good, but it just doesn't connect to the Internet. What's wrong?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

2.4 The world is so big, I came up with a gateway: travel to ten European countries and Xuanzang's westward journey

The previous sections mainly talked about the network protocols used in the dormitory and office. You already have some foundation, it's time to go shopping on the Internet!

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

2.5 Routing protocol: "West-out gateway for no reason" "Dare to ask where is the way"

As the saying goes, it’s good for a thousand days at home, but it’s hard for a day to go out. Once Bao was out of the gateway, it was like Xuanzang's westward journey-on a wandering road.

What we described in the previous section was a relatively simple situation. After running out of the gateway, there is only one way to go. However, the network world is much more complicated. Once the gateway is out, there will be many routers and many roads to choose from. How to choose the most convenient way to obtain the truth? There are many ways to talk about it.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 3 The Most Important Transport Layer

3.1UDP: Although simple but can be customized

After talking about the layers, let's start talking about the transport layer. As mentioned in section 1.1, there are two more important protocols in the transport layer, one is TCP and the other is UDP. For those who are not engaged in low-level development or application development, these two protocols are most commonly used. During the interview, these two agreements are often asked together, so they will be combined in this book.

3.2 TCP (Part 1): Although complicated, it is easy to use

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

3.2 Tcp (top): Although complicated, it is easy to use

Section 3.1 talked about UDP. The UDP packet basically includes the port field necessary for the transport layer. It is as simple as when we were young. I believe that at the beginning of the "net", the nature is good, no packet loss, no disorder.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

3.3 TCP (Part 2): Westward bound must be more enchanting, perseverance and wisdom to eliminate hardship

We mentioned earlier that Xuanzang was going west, and he had to leave the gateway. Since the gateway is out, the data must be transmitted on the public network. The public network is often unreliable. Therefore, many mechanisms are needed to ensure the reliability of transmission. At this time, various important strategies are needed to strengthen the perseverance of westbound. A large number of algorithms are used as the wisdom reserve for westbound.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

3.4 socket:Talk is cheap, show me the code

I have finished talking about TCP and UDP, but I haven't practiced it yet. This section will talk about socket programming based on TCP and UDP.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 4 The most commonly used application layer

4.1 HTTP: It turns out to be so troublesome to watch a news

Finished talking about the transport layer, and then started talking about the application layer protocol. Let's start with the most commonly used HTTP.

HTTP is almost the first protocol that everyone uses to surf the Internet, and it is also a protocol that is easily overlooked.

Since we are going to talk about news in this section, let's log on to a news website http://www. Jue Ming.com.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

4.2 HTTPS: The process of ordering food is so complicated

There is no problem using HTTP to watch news, but in a more serious scenario, there are many security risks. For example, if you want to place an order to make a payment, if you still use ordinary HTTP, then you are likely to be targeted by hackers.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

4.3 Streaming Media Protocol: How to see handsome men and beautiful women in live broadcasts

Recently, live broadcasts are quite popular. Many people like to watch live broadcasts. What are the components of a live broadcast system and what protocols are used?

Whether it is live or on-demand, it is actually the transmission of video data. When it comes to video, everyone loves to watch it, but when it comes to video technology, everyone has a headache because there are too many terms.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

4.4P2P protocol: download movies, distributed protocol is fast

If you want to download a movie, how do you usually do it?

Of course, the easiest way is to download via HTTP. But I believe you have had this experience. When downloading through a browser, as long as the file is slightly larger, the download speed is extremely slow.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 5 Unfamiliar Data Center

5.1 DNS: the address book of the online world

Earlier we talked about the usual scenes such as watching news, paying, live broadcasting, downloading, etc. Now there are a lot of websites, and there are 20 or 30 commonly used websites. If all of them are accessed through the I address, it may be difficult to remember. Therefore, we need an address book to view specific addresses based on the website name.

For example, "Grandma's house by the West Lake" is the name. Through the address book, we can check which road it is located on and what the house number is.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

5.2 HTTPDNS: The address book of the online world will also point the wrong way

In the previous section, we learned about the two functions of DNS. The first function is to find a specific IP address based on the website name, and the other function is to load balance for multiple addresses, and you can select a distance from multiple addresses. Near address access.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

5.3 CDN: Have you ever picked up express delivery from the canteen?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

5.4 Data Center: I am a developer, and I take the land to build a villa by myself

Whether it is watching news, placing orders, watching videos, or downloading files, the final destination is the data center. We have learned so much knowledge related to network protocols, are you curious about what the data center looks like?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

5.5 VPN: There are people in the DPRK who are good officials

Earlier we talked about data centers, which are very complicated. Some companies have multiple data centers and need to connect multiple data centers, or connect offices and data centers. What should I do at this time?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

5.6 Mobile network: I can’t access "Facebook" on my mobile phone when I go to Barcelona

What I've talked about before is the computer surfing the Internet, what is the difference between using a mobile phone to surf the Internet?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

 

Chapter 6 is the network in cloud computing

6.1 Cloud Network: The cost of owning land is high, and buying apartments is more flexible

In Section 5.4, we learned that there are large tracts of machines piled up in the data center, which are connected to each other by a network. If the number of machines is very large, it is still troublesome to maintain, and there are many inflexible places, such as the following points.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

6.2 Software Defined Network: Community Property Management Measures for Shared Infrastructure

In the previous section, we learned about the use of native VLAN and Linux bridges for cloud platform management, but this method is slightly insufficient in flexibility and isolation, and the entire network lacks a unified view and unified management .

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

6.3 Network security in the cloud: Although it is not a local tyrant, it also needs basic protection

As we saw in the previous section, it is not easy to maintain a shared environment for everyone in a community property. It's okay if everyone is consciously abiding by the rules, but it will be very troublesome if you encounter unconscious residents.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

6.4 QoS in the Cloud Network: What should I do if my roommate downloads movies crazy

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

6.5 Isolation of Networks in the Cloud GRE, VXLAN: Even if you live in a community, you must protect privacy

Regarding the isolation problem in the cloud platform, the previous strategies used are all VLANs, but we have also mentioned the problem with this strategy: VLANs are only 12 bits, 4096. Although it seemed sufficient at the time of design, it is definitely not enough now. So what should I do?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 7 Networks in Container Technology

7.1 Container Network: When you come and go freely, don’t buy an apartment and share a lease

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

7.2 Flannel of container network: one acre of land per person

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

7.3 Calico of Container Networks: Telling white lies for efficiency

In Section 7.2, we talked about how Flannel solves the problem of cross-host intercommunication of containers. This solution is actually similar to the network intercommunication mode of virtual machines, which is carried out through tunnels. But Flannel has a very good mode, which is to set different network segments for different physical machines. This is completely different from the Overlay mode of virtual machines. In the virtual machine scenario, the entire network segment can be "floating around" among all physical machines. Different network segments give us the possibility to make routing strategies.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

7.4 Overview of RPC: Far in the sky, close in front of you

Earlier we talked about how container networks can achieve cross-host intercommunication and the mutual calls between microservices.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 8 There are microservice related agreements

8.1 XML-based SOAP: Don't talk about NBA, please talk about American Basketball League

In Section 7.4, we talked about the classic model and design points of RPC, and took the early ONC RPC as an example to detail the specific implementation.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

8.2 RESTful interface protocol based on JSON: I don't care about the process, please give me the result

In Section 8.1, we talked about SOAP based on XML. The S in SOAP means Simple, but it doesn't seem to be simple at all!

You will find that for SOAP, no matter what function is called in XML, it is mostly sent through HTTP's POST method. But when learning HTTP before, we knew that in addition to POST, HTTP also has PUT, DELETE, GET and other methods. These can also be actions one by one, and basically meet the needs of adding, deleting, checking and modifying-adding POST, deleting DELETE, checking GET, modifying PUT.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

8.3 Binary RPC protocol: Let's call it NBA, it's always hard to say the full name

I talked about two commonly used text-based RPC protocols. For communication between strangers, using abbreviations such as NBA and CBA will make the agreement very inconvenient.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

8.4 Cross-language RPC protocol: Before the exchange, the two parties first exchange the glossary of professional terms

So far, we have explained 4 RPC protocols, namely ONC RPC, XML-based SOAP, JSON-based RESTful and Hessian2.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Chapter 9 Network Protocol Knowledge Series

9.1 Knowledge stringing: use the "Double 11" story to string together fragmented knowledge of network protocols (part 1)

The basic network knowledge is finished. Remember the example of placing an order on "Double 11"? This chapter will explain this process in detail, and use this process to connect the network protocol knowledge we have talked about.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

9.2 Knowledge stringing: use the "Double 11" story to string together fragmented knowledge of network protocols (in)

We mentioned in the previous section that the mobile app has gone through a complicated process and finally got the IP address of the SLB of the e-commerce website. Is it time to place an order?

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

9.3 Knowledge stringing: use the "Double 11" story to string together fragmented knowledge of network protocols (part 2)

In the last section, we encapsulated a long network packet, and the "Cannon" is ready to be sent.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

9.4 Build a network experimental environment: teaching people to fish is worse than teaching people to fish.

Internet is a highly experimental subject, as I always say: I understand when I read it, play the drum when I ask, and I get confused when I use it. In the process of writing this book, I have also deeply experienced it myself. At this time, I often use a realistic environment to get started, grab a bag and have a look, so that I will have a conclusion.

Huawei's 18th-level engineers lasted five years to sum up interesting talks about network protocols (Da Niu Jing)

Because the content of this book is too much! There is no way to show it all to everyone, the friends who need to get it can directly like + follow and add the assistant to get the above notes for free

Guess you like

Origin blog.csdn.net/weixin_50205273/article/details/108869934