Вы находитесь на странице: 1из 49

MPLS

Multi Protocol Label Switching

MPLS
MPLS provides optimal routing between sites. y With MPLS, a site requires only one connection to the MPLS SP. y MPLS provides a blend of Layer 2 switching and Layer 3 routing to forward packets using short, fixed-length labels.
y

MPLS

MPLS
Figure illustrates how MPLS provides fast routing for large networks. Only the edge routers perform a routing lookup, and core routers forward packets based on the labels.

MPLS

MPLS
Three events occur for both process switching and fast switching:
y

Step 1 When a BGP update is received and processed in the BGP table, if the update is selected as the best route, an entry is created in the routing table.

Step 2 When the first packet arrives for this destination, the router tries to find the destination in the fast-switching cache. Because the destination is not in the fastswitching cache, process switching has to switch the packet and a recursive lookup is performed to find the outgoing interface. Once the pathway is found, an entry is created in the fast-switching cache.

Step 3 All subsequent packets for the same destination are fast switched according to a three-step procedure: The router processes the packet immediately because switching occurs in the interrupt code. The router performs fast destination lookup, but not recursive lookup. The encapsulation uses a pregenerated Layer 2 header that contains the destination and Layer 2 source (MAC) address.

MPLS

MPLS
y y y y

CEF uses a complete IP switching table and the FIB table. The FIB table holds the same information that the IP routing table holds. When something changes in the IP routing table, the change is also reflected in the FIB table. Because the FIB contains the complete IP switching table, the router can make definitive decisions based on the information in the FIB table. Whenever a router receives a packet that should be CEF-switched but the destination is not in the FIB, the packet is dropped.

MPLS
The FIB table is also different from other fastswitching caches. This table does not contain information about the outgoing interface and the corresponding Layer 2 header. y The layer 2 information is stored in a separate table called the Adjacency Table. y The Adjacency Table provides a copy of the ARP cache, but instead of holding only the destination MAC address, the table holds the Layer 2 header.
y

MPLS

MPLS
y

When IP packets enter the MPLS domain, the Edge LSR converts IP packets into MPLS packets by adding a label. When packets leave the MPLS domain, the Edge LSR converts the packets back from MPLS packets to IP packets by removing the label. Inside the, domain LSRs forward MPLS packets following instructions that the label contains.

MPLS
The Label Forwarding Information Base [LFIB] table y The LSR can switch the frame based on the content in the LFIB and do not need to perform the usual routing operation.
y

MPLS

MPLS
Level Stack: y A label does not contain any information about the Layer 3 protocol that is being carried in a packet. y However for Layer-2 protocols that have TYPE or PID fields new values indicate the MPLS-enabled Layer-3 protocol. y A PPP frame carrying unicast MPLS would have a Protocol ID field set to 0x2081. y In most cases only one label is assigned to a packet.

MPLS
There are some instances where more than one label is used: y MPLS VPNs: Multiprotocol BGP (MP-BGP) is used to propagate a second label that identifies the VPN in addition to the label that is propagated by Label Distribution Protocol (LDP) to identify the path. y MPLS Traffic Engineering (MPLS TE): Uses Resource Reservation Protocol (RSVP) to establish label switched path (LSP) tunnels. RSVP propagates labels that are used to identify the tunnel LSP. This label is in addition to the label that is propagated by LDP to identify the underlying LSP. y MPLS VPNs combined with MPLS TE: Three or more labels are used to identify the VPN, tunnel LSP, and the underlying LSP.

MPLS

MPLS
y y

y y y

When the ingress edge router receives an IP packet, the router performs these tasks: Does a routing lookup to determine the outgoing interface. Assigns and inserts a label between the Layer 2 frame header and the Layer 3 packet header if the outgoing interface is enabled for MPLS and if a next-hop label for the destination exists. The router then changes the Layer 2 Ethertype value to indicate that the packet is a labeled packet. Sends the labeled packet. Using labels, allows forwarding decisions about the packet to be made.

MPLS

MPLS
To support multiple protocols, MPLS divides the classic router architecture into two major components: y Control plane: Controls the routing information exchange and the label exchange between adjacent devices. y Data plane: Also known as the forwarding plane, this plane controls forwarding based on either destination addresses or labels.

MPLS
The LFIB table stores the label information that the forwarding engine uses to forward packets. y The LFIB table is populated by the label exchange protocol that is used, which is LDP, BGP, or RSVP.
y

MPLS

MPLS
y y y

When discussing MPLS, there are two commonly used terms: LSR: A device that forwards packets primarily based on labels. Edge LSR: A device that primarily labels packets or removes labels. LSRs and Edge LSRs forward packets by making switching decisions based on the MPLS label. LSRs and Edge LSRs are usually capable of doing both label switching and IP routing.

MPLS

MPLS
y

The control plane and data plane in an LSR interact and enable label switching and forwarding of labeled packets to occur.

MPLS
y

The primary function of an LSR is to forward labeled packets.

MPLS
y

Edge LSRs also forward IP packets based on the IP destination addresses of the packet and, optionally, label the packets if a label exists

MPLS
y y y

There are several possible combinations of forwarding and labeling packets (Edge LSRs) : Forward the received IP packet based on the IP destination address and send as an IP packet Forward the received IP packet based on the IP destination address and send as a labeled packet Forward the received labeled packet based on the label, change (swap) the label, and send the labeled packet Forward the received labeled packet based on the label, remove the label, and send the IP packet

MPLS
These scenarios are possible if the network is not configured properly: y A received labeled packet is dropped if the label is not found in the LFIB table, even if the IP destination exists in the IP forwarding table, also called the FIB. y A received IP packet is dropped if the destination is not found in the IP forwarding table (FIB table), even if there is an MPLS label-switched path toward the destination.

MPLS
Four steps a router uses for label allocation and distribution in a Unicast IP routing network and MPLS functionality: y Step 1 The routers exchange information using standard or vendor-specific Interior Gateway Protocol (IGP), such as OSPF, IS-IS, and EIGRP. y Step 2 Local labels are generated. One locally unique label is assigned to each IP destination that is found in the main routing table and stored in the Label Information Base (LIB) table.

MPLS
Step 3 Local labels are propagated to adjacent routers, where these labels might be used as next-hop labels (stored in the Forwarding Information Base [FIB] and LFIB tables to enable label switching). y Step 4 Every LSR builds its LIB, LFIB, and FIB data structures based on received labels.
y

MPLS
The LIB, in the control plane, is the database that LDP uses. This database is where an IP prefix is assigned a locally significant label that is mapped to a next-hop label that has been learned from a downstream neighbor. y The LFIB, in the data plane, is the database used to forward labeled packets. Local labels, previously advertised to upstream neighbors, are mapped to next-hop labels, previously received from downstream neighbors. y The FIB, in the data plane, is the database used to forward unlabeled IP packets.
y

MPLS

MPLS

MPLS

MPLS
y

IETF to create a new protocol that is dedicated to exchanging labels. The LDP in the control plane exchanges labels and stores them in the LIB.

MPLS

MPLS
y

Sometimes a packet arrives at an MPLS network before all routers have learned the label to Network X.

MPLS

MPLS

MPLS

MPLS

MPLS

MPLS

MPLS

Tag Distribution Protocol (TDP) :TDP is Cisco proprietary protocol.

Label Distribution Protocol (LDP)

MPLS

MPLS

MPLS

MPLS

MPLS

Оценить