What is MPLS? What are the applications. Can you tell me in detail?

Multi-Protocol Label Switching

Multi-Protocol Label Switching

(MPLS: Multi-Protocol Label Switching)

Introduction

Multiprotocol Label Switching (MPLS) is a system for fast packet switching and routing. It provides destination, routing, forwarding and switching capabilities for network data traffic. More specifically, it has mechanisms for managing various forms of communication flows. MPLS is independent of layer 2 and 3 protocols such as ATM and IP. It provides a way to map IP addresses to simple fixed-length labels for use with different packet forwarding and packet switching technologies. It is an interface to existing routing and switching protocols such as IP, ATM, Frame Relay, Resource Reservation Protocol (RSVP), Open Shortest Path First (OSPF), and others.

In MPLS, data transmission occurs on Label Switched Paths (LSPs). An LSP is a sequence of labels for each node along the path from the source to the destination. There are some label distribution protocols in use today, such as Label Distribution Protocol (LDP), RSVP or some protocols built on routing protocols, such as Border Gateway Protocol (BGP) and OSPF. Fast exchange of data is possible because fixed-length tags are inserted at the beginning of each packet or cell and can be used by hardware to quickly exchange packets between two links.

MPLS is mainly designed to solve network problems, such as network speed, scalability, quality of service (QoS) management and traffic engineering. It also solves broadband management and service requests for the next generation IP backbone network. question.

In this section, we focus on the general MPLS framework. Specific information on LDP, CR-LDP and RSVP-TE can be found in individual documents.

Multi-protocol label switching MPLS was originally proposed to improve forwarding speed. Compared with traditional IP routing, it only analyzes IP headers at the edge of the network when forwarding data, instead of analyzing IP headers at every hop, thus saving processing time.

MPLS originated from IPv4 (Internet Protocol version 4), and its core technology can be extended to a variety of network protocols, including IPX (Internet Packet Exchange), Appletalk, DECnet, CLNP (Connectionless Network Protocol), etc. The "Multiprotocol" in "MPLS" refers to supporting multiple network protocols.

Protocol structure

MPLS label structure:

20 23 24 32 bit

Label Exp S TTL

Label - The Label value conveys the actual value of the label. When a labeled packet is received, the label value at the top of the stack can be found, and the system knows: A. the next hop to which the packet will be forwarded; B. operations that may be performed on the label stack before forwarding, such as returning to Push the label to the top of the stack and push one label off the stack; or return to the label to the top of the stack and push one or more labels onto the stack.

Exp - trial. Reserved for trial use.

S - the bottom of the stack. The last entered label position in the label stack. The value is 0, which provides all other labels to be pushed onto the stack.

TTL - Time to Live field, used to encode the lifetime value.

Structure protocol group

MPLS: related signaling protocols, such as OSPF, BGP, ATM PNNI, etc.

LDP: Label Distribution Protocol

CR-LDP: Route-based Constraint-Based LDP

RSVP- TE: Resource Reservation Protocol – Traffic Engineering based on traffic engineering extension

MPLS-based VPN

Traditional VPN generally uses GRE (Generic Routing Encapsulation), Tunnel protocols such as L2TP (Layer 2 Tunneling Protocol), PPTP (Point to Point Tunneling Protocol), and IPSec protocols are used to realize the transmission of data flows between private networks on the public network. The LSP itself is a tunnel on the public network, so using MPLS to implement VPN has natural advantages.

MPLS-based VPN connects different branches of the private network through LSP to form a unified network, as shown in Figure 1-6. MPLS-based VPNs also support interworking control between different VPNs. In Figure 1-6:

l CE (Customer Edge) is a user edge device, which can be a router, switch or host;

l PE (Provider Edge) is a service Business edge routers are located in the backbone network.

In the backbone network, there is also P (Provider), which is the backbone router in the service provider network and is not directly connected to the CE. The P device only needs to have basic MPLS forwarding capabilities and does not maintain VPN information.

MPLS-based VPN has the following characteristics:

l PE is responsible for managing VPN users, establishing LSP connections between PEs, and allocating routes between branches of the same VPN user.

l Route distribution between PEs is usually implemented using LDP or extended BGP protocol.

l Supports IP address reuse between different branches and intercommunication between different VPNs.

MPLS-based QoS

NE80E supports MPLS-based traffic engineering and differential service Diff-Serv features. While ensuring high network utilization, it can adjust the priority of different data flows according to the priority of the data flow. Realize differentiated services to provide bandwidth-guaranteed low-latency and low-packet-loss services for voice and video data streams.

Since it is difficult to implement traffic engineering on the entire network, QoS is often implemented through a differentiated service model in actual networking solutions.

The basic mechanism of Diff-Serv is to map the service to a certain service category at the edge of the network according to the service quality requirements of the service, using the DS (Differentiated Service) field in the IP packet (composed of the ToS domain (from) to uniquely mark this type of business; then, each node in the backbone network adopts preset service policies for various services based on this field to ensure corresponding service quality.

Diff-Serv’s classification and labeling mechanism for quality of service is very similar to MPLS label allocation. In fact, MPLS-based Diff-Serv is achieved by combining the allocation of DS with the label allocation process of MPLS. of.

Basic working process:

1. LDP works together with traditional routing protocols (such as OSPF, ISIS, etc.) to establish routing tables and label mappings in each LSR for FECs with business needs. Table;

2. The ingress node Ingress receives the packet, completes the third layer function, determines the FEC to which the packet belongs, and adds a label to the packet to form an MPLS label packet, which is forwarded to the intermediate node Transit;

3. Transit forwards according to the label on the group and the label forwarding table, and does not perform any third-level processing on the label group;

4. Remove the label in the group at the egress node Egress and continue. forwarding later.

It can be seen from this that MPLS is not a service or application. It is actually a tunnel technology and a routing and switching that integrates label switching forwarding and network layer routing technology. Technology platform. This platform not only supports a variety of high-level protocols and services, but also ensures the security of information transmission to a certain extent.

Architecture

In the MPLS architecture:

l The control plane (Control Plane) is based on connectionless services and is implemented using the existing IP network ;

l The Forwarding Plane, also known as the Data Plane, is connection-oriented and can use Layer 2 networks such as ATM and Frame Relay.

MPLS uses short and fixed-length labels to encapsulate packets and achieve fast forwarding on the data plane.

On the control plane, MPLS has the powerful and flexible routing function of IP networks, which can meet the network requirements of various new applications.

For core LSR, only label packets need to be forwarded on the forwarding plane.

For LER, not only label packets but also IP packets need to be forwarded on the forwarding plane. The former uses the label forwarding table LFIB, and the latter uses the traditional forwarding table FIB (Forwarding Information Base).

MPLS and routing protocols

LDP uses routing and forwarding tables to establish LSPs

When LDP establishes LSPs in a hop-by-hop manner, it uses the routing and forwarding tables of each LSR along the way. Information is used to determine the next hop, and the information in the routing forwarding table is generally collected through routing protocols such as IGP and BGP. LDP is not directly associated with various routing protocols, but only uses routing information indirectly.

Supports MPLS label distribution through extensions of existing protocols

Although LDP is a protocol specifically used to implement label distribution, LDP is not the only label distribution protocol. By extending existing protocols such as BGP and RSVP (Resource Reservation Protocol), MPLS label distribution can also be supported.

Support MPLS applications through the extension of certain routing protocols

In the application of MPLS, it may also be necessary to extend certain routing protocols. For example, MPLS-based VPN applications need to extend BGP so that BGP can propagate VPN routing information; MPLS-based traffic engineering (TE) needs to extend OSPF or IS-IS protocols to carry link status information.

LSPM: LSP Management

Forwarding Equivalence Class

As a classified forwarding technology, MPLS classifies packets with the same forwarding processing method into one category. It is called Forwarding Equivalence Class FEC (Forwarding Equivalence Class). Packets of the same forwarding equivalence class will receive exactly the same treatment in the MPLS network.

The way of dividing forwarding equivalence classes is very flexible and can be any combination of source address, destination address, source port, destination port, protocol type, VPN, etc. For example, in traditional IP forwarding using the longest match algorithm, all packets to the same destination address are a forwarding equivalence class.

Label

A label is a short identifier with a fixed length and only local significance. It is used to uniquely identify the forwarding equivalence class FEC to which a packet belongs. In some cases, such as load balancing, there may be multiple labels corresponding to one FEC, but one label can only represent one FEC.

The label is carried in the header of the packet, does not contain topology information, and has only local meaning. The length of the tag is 4 bytes, and the encapsulation structure is shown in Figure 1-1.

Label *** has 4 fields:

l Label: 20 bits, label value field, pointer for forwarding;

l Exp: 3 Bit, reserved for testing, now usually used as CoS (Class of Service);

l S: 1 bit, stack bottom identification. MPLS supports the hierarchical structure of labels, that is, multiple labels. When the S value is 1, it indicates the bottom label;

l TTL: 8 bits, which has the same meaning as TTL (Time To Live) in IP packets.

The tag is similar to ATM's VPI/VCI and Frame Relay's DLCI, and is a connection identifier.

l If the link layer protocol has a label field, such as ATM's VPI/VCI or Frame Relay's DLCI, the label is encapsulated in these fields;

l If the link layer protocol If there is no label field, the label is encapsulated in a cushion layer between the link layer and the IP layer

Frame mode: frame mode

Cell mode: cell mode

Label Switching Router

Label Switching Router (LSR) is the basic element in the MPLS network. All LSRs support the MPLS protocol.

LSR consists of two parts: control unit and forwarding unit.

l The control unit is responsible for label distribution, route selection, establishment of label forwarding tables, establishment and teardown of label switching paths, etc.;

l The forwarding unit is based on the label forwarding table Forward the received packet.

Label Publishing Protocol

Label Publishing Protocol is the control protocol of MPLS. It is equivalent to the signaling protocol in traditional networks and is responsible for FEC classification, label distribution, and LSP establishment and Maintenance and a series of operations.

MPLS can use a variety of label publishing protocols.

l Including protocols specially developed for label release, such as: LDP (Label Distribution Protocol), CR-LDP (Constraint-Routing Label Distribution Protocol);

l Also includes current There are protocols that have been extended to support label publishing, such as BGP (Border Gateway Protocol) and RSVP (Resource Reservation Protocol).

NE80E supports the above label publishing protocol and supports manual configuration of labels.

Label Switched Path

The path that a forwarding equivalence class takes in the MPLS network is called Label Switched Path (LSP).

LSP is functionally the same as the virtual circuit of ATM and Frame Relay. It is a one-way path from entrance to egress.

Each node in the LSP is composed of LSRs. According to the direction of data transmission, the adjacent LSRs are called upstream LSR and downstream LSR respectively.

Label switching path LSP is divided into two types: static LSP and dynamic LSP. Static LSPs are manually configured by administrators, while dynamic LSPs are dynamically generated using routing protocols and label publishing protocols.

.

The LSR located at the edge of the MPLS domain and connected to other user networks is called edge LSR, that is, LER (Label Edge Router). The LSR inside the area is called core LSR. The core LSR can be a router that supports MPLS, or it can be an ATM-LSR upgraded from an ATM switch. MPLS communication is used between LSRs within the domain, and the edge of the MPLS domain is adapted by LER and traditional IP technology.

After the packet is labeled, it is transmitted along the label switching path LSP composed of a series of LSRs. Among them, the incoming node LER is called Ingress, the outgoing node LER is called Egress, and the intermediate nodes are called for Transit.

Reference information

If you want to know more about the principles of MPLS, please refer to the following documents.

RFC3031: Multiprotocol Label Switching Architecture

MPLS Application

With the development of ASIC technology, route lookup speed is no longer a bottleneck hindering network development. This makes MPLS no longer have obvious advantages in improving forwarding speed.

However, because MPLS combines the powerful Layer 3 routing function of the IP network with the efficient forwarding mechanism of the traditional Layer 2 network, it adopts a connection-oriented mode in the forwarding plane, which is very similar to the existing Layer 2 network forwarding mode. Features enable MPLS to easily achieve seamless integration of IP, ATM, Frame Relay and other layer 2 networks, and provide services for TE (Traffic Engineering), VPN (Virtual Private Network), QoS (Quality of Service) Applications such as Service provide better solutions.