Related article: IPv6 Series - 10 Common Problems for Beginners This article uses packet capture analysis to deeply observe each step of the network card startup process, so as to gradually grasp the communication principles. 1. Why can’t you ignore the network card startup process? To master network technology, in addition to reading RFC protocols, the most direct and efficient way is to "see it with your own eyes". Among them, packet capture analysis is the most critical method, which can help us understand:
Network card startup is the first step in network communication. Only by laying a solid foundation can you spread your wings and take off. 2. Experimental Environment This article uses CentOS 7 as the experimental environment, creates two network namespaces (named ns1 and ns2), and bridges them to the same Linux bridge (named br0) through a veth network card to simulate the simplest environment, that is, two servers on the same layer 2. 1. Post the mac address first:
2. Experimental steps:
3. Observation:
This article will also include the download address of the experimental script and the packet capture file. 3. Network card appearance before and after startup 1. What the network card looks like before it is started Before starting the network card in ns2, check the network environment in ns2 first. The command is as follows
You can see that eth0 is in DOWN state. Next, bring eth0 up. 2. What the network card looks like after startup
Enter ns2 to view As you can see, the network card is now started and has obtained a link local address (starting with fe80 in the figure) 3. What packages were captured? Please read on to learn what these packages mean, how they are generated, and why they are generated. 4. Conclusion first There are 5 steps in the network card startup process, as shown in the diagram (the number on the right indicates the number of packets in the corresponding packet capture diagram): Next, these 5 steps will be explained step by step. Step 1. Generate a "link-local address" (No data packet is generated in this step) (1) What is a link-local address?
(2) What is the role of a link-local address?
Step 2. Generate the "requested node multicast address" (No data packet is generated in this step) (1) What is a Solicited-Node Multicast Address? In the IPv6 world, every time an IP address (or unicast address to be precise) is generated, regardless of its type, a "Solicited-Node multicast address" will be generated accordingly. Composition: FF02::1:FF00:0/104 + the first 24 bits of the unicast address. As you can see, this address is derived from the unicast address and is not random. The address in the red box in the figure above is the "requested node multicast address" corresponding to the "link local address". (2) Why do we need a “solicited node multicast address”? Just four words: "Address resolution"
(3) Working principle of “Requested Node Multicast Address” When someone wants to resolve my MAC address, they send an "address resolution request packet" to this multicast address, and then the member of the multicast address (that is, "me") will receive the data packet and ask "me" to return the MAC address to the other party. This completes the "address resolution" process. (4) What do the five words “requested node” mean? If someone requests to resolve my address, then I am the requested node. The purpose of generating the "requested node multicast address" is to allow others to request me. Step 3. "Multicast Membership Report" (Corresponding to No. 1/2/4/6 in the packet capture diagram) (1) What is a multicast membership report?
(2) Why do we need to perform a multicast member report?
(3) Which member is being reported?
Step 4. "Duplicate address detection" (Corresponding to No. 3 in the packet capture diagram) (1) What is "Duplicate Address Detection"?
(2) When to perform “duplicate address detection”
(3) How “Duplicate Address Detection” works
Step 5. "Stateless Address Autoconfiguration" (Corresponding to No. 5/7/8 in the packet capture diagram) (1) What is “stateless address autoconfiguration”? In IPv6, there are two methods of automatically configuring IP addresses:
(2) What is the role of SLAAC?
Note: The IP address mentioned here refers to the "global unicast address" or "unique local address", which is commonly known as the public network address and private network address, not the "link local address". (3) Working principle Involving these two types of messages:
When receiving the RA message from the router, it will automatically generate an IP address based on the IP prefix information in the message and point the gateway to the "link local address" of the router. (4) How to receive RA messages? There are 2 ways:
Since there is no router in this experiment, only the RS message sent actively can be seen in the screenshot, but no response is received. Questions for consideration
The above questions will be answered in the next article of the "IPv6 Series". |
<<: Network Programming - Another Look at TCP's Four Waves
>>: VLAN Centralized Management Protocol (VCMP) You should know
What is Communication? Simply put, communication ...
Since the advent of Wi-Fi, users have had to face...
The VoLTE function was once a major feature promo...
In the past decade, the field of machine learning...
[[393766]] What is 5G network? "5G" act...
Today, China Telecom released the "5G SA Sec...
After nearly 20 years of development, the integra...
The pandemic has exposed gaps in nearly every ind...
Although Internet company stocks have skyrocketed...
1. The difference between Category 5 and Category...
Before the global outbreak of the coronavirus, ed...
TNAHosting is a foreign hosting company founded i...
[51CTO.com original article] In fairy tales, when...
Various promotional activities are being carried ...
AI technology is sweeping every field at an unpre...