Mpls vpn route propagation and data forwarding

Source: Internet
Author: User

I won't talk about the configuration. Read the previous blog!
1. propagation of CE and pe vrf private networks
The IPV4 route in the CE global route table is transmitted to the corresponding VRF route table of PE through the routing protocol (such as RIP, OSPF, OSPF, and BGP) between PE-CE. On PE, the routing protocol (Routing Protocol process or routing protocol instance) for routing exchange with CE must be bound to the corresponding VRF. On the bound VRF interface, only the VRF routing protocol can be started. Therefore, on the PE, the routing information advertised by CE will be handed over to the corresponding VRF routing process or routing instance for processing, add the calculated IPV4 route to the VRF route table corresponding to the process or instance.
2. pe vrf route export to MP_BGP table
IPV4 routing in the VRF route table, when published to MP_BGP through network/redistribute, is marked with RD and RT (export) and changed to VPNv4 routing, and distribute the MPLS private network labels (MP_BGP is randomly distributed from the global Label space and does not overlap with the public network labels), and add them to the MP_BGP table. At the same time, these MPLS private network labels are stored in the MPLS label forwarding table of the PE.
3. PE-PE MP_BGP VPNv4 route Propagation
PE updates the VPNv4 route in the MP_BGP table to form the MP_BGP route, and transmits it to the remote PE through the MP_IBGP neighbor between PE-PE. After the remote PE receives the route update, add the VPNv4 route to the MP_BGP table.
4. MP_BGP VPNv4 route matching import VRF
On PE, The VPNv4 route in the MP_BGP table automatically matches with the RT (import) of VRF, matches the VPNv4 route, removes RD and RT, and changes it to an ipv4 route, import to the corresponding VRF route table. At the same time, store the MPLS private network labels carried by these VPNv4 routes into the VRF route table or VRF label forwarding table.
5. PE VRF-CE private network by Propagation
Routes imported from MP_BGP VPNv4 in the vrf route table are republished to the database of the routing process or routing instance of the VRF through redistribute (except for the PE-CE EBGP ), after the inter-PE-EC routing protocol (RIP, OSPF, BGP, etc.) Announcement to CE, CE route calculation, add these routes to the global routing table, such.

LDP distribution label:
First, the PE1 global route table contains a direct connection route of 1.1.1.1/32, and then LDP distributes tags for all IGP routes. Because it is the last hop, a special label 3 is distributed. (Please note that, the table I wrote above cannot be seen in the MPLS Forwarding Table,
Because label 3 will not be added to MPLS, it will not form a forwarding table.) After P2 receives the message, it will be saved to the MPLS Forwarding Table, and P2 can also learn the 1.1.1.1 route through the IGP routing protocol, the distribution label is 25, so the MPLS Forwarding Table of P2 is as follows (of course, P2 will select the same one as the next hop in the IGP route table if it can receive multiple labels of this route ). Similarly, P3 and PE4 both receive and distribute tags, and then optimize them into the forwarding table! See!
Mpls vpn data forwarding
Analyze the CE5 access to CE6 based on the above two figures:
1. CE receives the IP packet, searches for global route table forwarding, and forwards it to the VRF interface of PE.
CE5 receives the IP packet and looks for the global route table. It finds that the interface is S8 and the next hop is S7. It forwards the IP packet to the VRF interface of PE4.
2. When the pe vrf interface receives an IP packet, it looks for the VRF route table and presses it into the private network label and public network label.
On PE4, an interface bound to VRF receives an IP packet, searches for the VRF route table or tag forwarding table of this VRF, and finds that the private network OUT tag of the route matched by this packet is 33, the next hop is the LOOPBACK address 1.1.1.1 of the remote PE1. If the next hop is not directly connected to PE4, You need to perform recursive search. Search for the global route table and MPLS label forwarding table of the PE with 1.1.1.1 as the target address, and find the Internet OUT label 26 of 1.1.1.1, and the output interface and next hop. In PE4, IP packets are first tagged with the private network tag 33 and then with the public network tag 26 (note that the public network tag is on the outermost side, the stack base is 0, and the private network tag stack bottom is 1 ), then forward it to the next LSR, that is, P3.
3. The P device receives the MPLS packet, searches for the label forwarding table, and switches the public network label.
PE3 receives the packet, queries the forwarding table, switches the public network label, replaces 26 with 25, the TTL-1 forwards the data to the next LSR.
4. The second-to-second hop receives the MPLS packet, searches for the tag forwarding table, and the public network label is displayed.
P2 receives the MPLS packet, queries the MPLS Forwarding Table, and finds that the label is 3. The public network label is displayed, and then forwards the packet to the last hop.
5. When the remote PE receives the MPLS data packet and finds the tag forwarding table, the private network label is displayed.
When PE1 receives an MPLS packet and looks for the tag forwarding table, it finds that the OUT tag is Untagged. Delete the tag and send the data according to the next hop forwarding. (If the OUT label is Aggregate, delete the label and check the IP route table for forwarding, because there is no output interface or next hop in the MPLS Forwarding Table)
 
6. The remote CE receives the IP packet and searches for global route table forwarding.
CE6 receives an IP packet from PE1, finds the global route table for data forwarding, and sends back the response packet. The above process is inverse!

Additional: MPLS label operations
PUSH pushes one or more layers of MPLS labels to IP addresses or MPLS packets, and forwards the MPLS packets directly to the next LSR.
SWAP switches the outermost MPLS label of the MPLS packet to the next MPLS label required by the LSR, and forwards the MPLS packet directly to the next LSR.
POP deletes the outermost MPLS label of the MPLS packet and forwards the packet directly to the next LSR.
Untag deletes the MPLS label and forwards the IP packet to the next hop router.
Aggreate deletes the MPLS label, finds the IP route table, and forwards the packet to the next hop router.

If the image above is unclear, download the attachment and enlarge the image!

Author: "Mortal World"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.