Before formally learning MPLS, let us review the IP forwarding principles that we have repeatedly learned in NA and NP. In the above figure, during the process of PC-A and PC-B accessing each other:
The ARP query of the Layer 2 MAC address and the content of the rewritten data frame are omitted. In short: during the transmission of IP datagrams, the routing table is queried according to the destination IP address, and the outbound interface is obtained to send the data. The source and destination IP addresses remain unchanged, and the MAC address is rewritten hop by hop. The above is the IP forwarding principle that we are familiar with. For ease of understanding, we have hidden the real scene in the forwarding process, that is, when the router receives an IP packet, it actually queries the forwarding table (LIB) rather than the routing table (RIB). We need to review the working principle of exchange discussed in the NP exchange part. In the early days, the switching method used by switches when exchanging data frames was called process switching. All messages needed to be queried and processed by the CPU during switching, which resulted in the inability to improve switching efficiency. Subsequently, a new generation of switching methods emerged, which adopted the data flow switching method. We call the traffic with the same source and destination IP, source and destination MAC, source and destination port, and inbound interface the same data flow. When processing this data, the switch only needs to use the CPU to query the first message, and all subsequent messages are processed according to the switching method of the first message, which greatly improves the switching efficiency. Cisco has launched its own unique switching method based on the data flow switching method. In process switching, there is a problem, that is, the corresponding switching cache will only be generated after traffic is triggered. If a large number of different data flows are processed, the switching efficiency is actually as slow as process switching. In order to solve this problem, Cisco has optimized and improved it, using the idle resources of the switch to calculate the forwarding information of the data flow that may be received in advance and load it into the cache. When the data flow is received, the pre-cached forwarding information is directly used to process the message, realizing a true hardware-based switching method. Cisco calls this method Cisco Express Forwarding (CEF). Due to the high efficiency of CEF, Cisco has also transplanted this function into its new routing products, so now all Cisco devices that everyone can access have the CEF function. What we call the forwarding table is actually the CEF table. CEF means it is generated based on the routing table. Unlike the routing table, it does not have a large amount of recursive content. The CEF table shows which interface a data packet should be sent from next if it is matched. It is simple and efficient. For example, the following routing table (RIB): Routing will require recursive queries. And let's take a look at the CEF table (FIB): When the router is idle, it will calculate the forwarding information in advance based on the information in the routing table, and directly send the data packet destined for 4.4.4.4 from the outbound interface F0/0.
The above is what we learned about the IP forwarding principles in NA and NP, and here are some supplements. Next, we begin to unveil the mystery of MPLS and take a look at its inner workings. MPLS (Multiprotocol Label Switch) was originally a protocol proposed to improve the forwarding speed of routers. However, with the development of technology, the forwarding performance of equipment has become stronger and stronger, and its advantage of accelerating forwarding speed has gradually weakened. The design of nested multi-layer MPLS headers has become its most outstanding feature. Currently, it is mainly used in solving BGP routing black hole problems and MPLS VPN data forwarding. First of all, we need to have a general understanding of MPLS. When MPLS transmits messages, it inserts the MPLS header between the layer 2 frame header and the layer 3 header, so many people call it layer 2.5. Its message structure is much simpler than the IP header and much smaller, only 4 bytes (32 bits). The structure is as follows:
I believe TTL does not need to be explained I believe you will be able to remember such a simple interface after seeing it once. Similarly, the device will be more efficient in processing MPLS packets than IP packets. There are some professional terms that must be understood in MPLS.
Now that we know the above terms, let's look at how data is transmitted through MPLS and what the differences are between MPLS and IP: In the above picture, we need to solve several problems:
(1) How are labels generated?
(2) How do IP packets become MPLS packets? On the LER, push the label (the label of the route corresponding to the destination IP address of the IP message) (3) How are messages transmitted from source to destination?
There are several actions involved:
If there is no penultimate hop popping mechanism, and the label is popped on the last device, the LFIB table needs to be queried on the last device first to find out that the label needs to be popped. After the label is popped, it becomes an IP packet and the FIB table needs to be queried again, a total of two queries are required. However, after the label is popped on the penultimate hop device and becomes an IP packet, the last device only needs to query the FIB table once. These are the principles of MPLS. Next time we will continue to study the MPLS protocol. |
<<: "Resonance" Connecting Everything Ruijie Networks 2019 Internet Technology Summit Opens
>>: Network streaming media protocol - RTSP protocol
Megalayer was founded in 2019. It is a Chinese-ow...
Everyone has their responsibilities, but what to ...
HTTP security headers are a fundamental part of w...
2019 is the first year of 5G commercialization. S...
Starlink will provide 10Gbps network speeds in th...
[[271457]] Dong Tao, senior operation and mainten...
With the development of science and technology, t...
This month, RAKsmart continues the previous activ...
Indoor coverage is the new battlefield for 5G. Mo...
When it comes to data centers, most people will f...
In the middle of last month, we shared the news t...
On November 28, 2019, in order to accelerate the ...
What is 5G messaging? Is it an upgraded version o...
Organizations need strong SLAs to meet their UCaa...
Beijing time on the 24th, Russian Deputy Minister...