Before learning MPLS VPN, many students will ask, what exactly does MPLS do? Why do we need MPLS?
First of all, what is MPLS? The full name is: Multi-Protocol Label Switching, abbreviated as MPLS, which is multi-protocol label switching. It is a new technology that uses tags to guide high-speed and efficient data transmission on an open communication network. The meaning of multi-protocol means that MPLS can not only support multiple protocols at the network layer level, but also compatible with multiple data link layer technologies at the second layer. To understand this problem, we must first understand the traditional IP data forwarding.
Traditional network layer packet forwarding (such as forwarding IP packets on the Internet) relies on forwarding information provided by network layer routing protocols (such as OSPF or other IGP protocols, BGP) or static routing protocols, and each hop device on the network is independent Make forwarding decisions. The forwarding decision is only made based on the goal of unicast forwarding. The router performs data forwarding for IP packets, participates in the three-layer information exchange, and then performs path selection. Since the devices on the path must perform table lookup, routing and forwarding based on the three-layer information of the IP data packet, this means that when the data packet reaches a router, the three-layer decapsulation, re-encapsulation and forwarding must be carried out. Reduce the efficiency of forwarding. To give a simple example, it is as if we go to a certain place by car. If we follow the traditional forwarding method, then we need to get off the car at every stop between arriving at the destination, and then get on the car again according to the information on the station sign. It will be very troublesome.
How can we make forwarding easier and more efficient? Simply put, it is to establish a forwarding line from the source to the destination. This is equivalent to going to a certain place, as long as we take a fixed bus line from the source to a certain place, instead of getting off at every stop on the way, and then getting on the bus again according to the information on the station sign. The original intention of MPLS is based on this idea. This technology combines the advantages of packet forwarding technology based on layer 2 switching and layer 3 routing technology. MPLS assigns labels to packets so that the packets can be transmitted in a packet or cell-based network. The forwarding mechanism throughout the entire network is label swapping. In this technology, data units (such as packets or cells) carry A label with a fixed length tells the switching node on the packet path how to process and forward data. The forwarding path, namely LSP, is constructed through label switching. Each LSP can be compared to a bus line in real life, so as to avoid the three-layer encapsulation and decapsulation process, so as to realize data forwarding through labels.