Thedocumentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
To implement the MPLS feature, you must have a router from the range of Cisco 2600 or higher. To select the required Cisco IOS with MPLS feature, use the Software Research tool. Also check for the additional RAM and Flash memory required to run the MPLS feature in the routers. WIC-1T, WIC-2T, and serial interfaces can be used.
When used with MPLS, the VPN feature allows several sites to interconnect transparently through a service provider network. One Service Provider network can support several different IP VPNs. Each of these appears to its users as a private network, separate from all other networks. Within a VPN, each site can send IP packets to any other site in the same VPN.
Each VPN is associated with one or more Virtual Routing and Forwarding (VRF) instances. A VRF consists of an IP routing table, a derived Cisco Express Forwarding (CEF) table, and a set of interfaces that use this forwarding table. The router maintains a separate Routing Information Base (RIB) and CEF table for each VRF. Therefore, the information is not sent outside the VPN and allows the same subnet to be used in several VPNs and does not cause duplicate IP address problems. The router that uses Multiprotocol BGP (MP-BGP) distributes the VPN routing information with the MP-BGP extended communities.
2. Configure an IGP on the service provider core, either Open Shortest Path First (OSPF) or Intermediate System-to-Intermediate System (IS-IS) protocols are the recommended options, and advertise the Loopback0 from each P and PE routers.
Set up the import and export properties for the MP-BGP extended communities. These are used to filter the import and export process with the command route-target both as shown in the next output:
There are several ways to configure BGP, for example, you can configure PE routers as BGP neighbors or use a Route Reflector (RR) or Confederation methods. A Route Reflector is used in the next example, which is more scalable than the use of direct neighbors between PE routers:
In this next sample, the show ip route vrf commands show the same prefix
10.0.6.0/24 in both the outputs. This is because the remote PE has the same network for two Cisco clients, CE_B2 and CE_A3, which is allowed in a typical MPLS VPN solution.
When you run a traceroute between two sites, in this example two sites of Client_A (CE-A1 to CE-A3), it is possible to see the label stack used by the MPLS network (if it is configured to do so by mpls ip propagate-ttl ).
Thanks for the feedback. However, as I mentioned in my post, I already got a working solution where the labels were configured statically (using the commands you mentioned). However, even so, the LDP still distributes these labels.
What is missing from the complete solution is the static configuration of the label switched path (LSP). I found that this can be done on Cisco Carrier Routing System type equipment or with IOS XR (which is not my case).
I'm working on a master's project and we've developed a packet forwarding solution (still in its initial phase).
My goal is to test interop with legacy devices. As I have more affinity with Cisco equipment, I started my approach here.
From what meager knowledge of Junos I have, the first command will configure the router to accept MPLS/labeled packets. By default, the interface can only accept IP packets so this command is needed to activate MPLS on the forwarding plane.
From the perspective or the Routing/Forwarding Engine, MPLS is also a protocol, needing its own LIB/LFIB ("show route table mpls.0") where all the labels including the default labels such as Router Alert and explicit nulls will be stored.
Thus, as far as I understand, the redundant configuration is needed to keep the configuration in line with the Junos philosophy of separate forwarding and control planes. First command for the forwarding plane, second to activate the control plane.
My reasoning (completely subjective) was that IPv4 is on by default on Junos so it does not need to be explicitly turned on. I would extend that reasoning (again completely subjective and I cannot back this up via independent sources) for IPv6.
Regarding ISO, Junos to my knowledge does not support CLNS as data traffic but only the IS-IS implementation. For that, the configuration would be congruent to the MPLS configuration in that IS-IS has to be turned on by "set protocols is-is" to enable the only ISO protocol supported.
Generally if a corporate company takes MPLS from any service provider, I heard that mostly we use BGP as routing protocol for mpls which is called MP -BGP. We need to work with service provider for completing configuration part and establishing neighbor relationships with ISP routers.
I think , ISP will give us some AS numbers to be configured on our routers. we need to configure that AS number and IP addresses on our routers in BGP processes. Later my doubt is do we have to configure MPLS commands on our router interfaces ? or will ISP do that part assuming their routers as Edge routers.
You are not going to run MPLS. The MPLS is used and seen only on ISP routers. Your routers will not use MPLS. Also, no MPLS will be run between your and ISP's edge routers. The MPLS is purely the stuff of your ISP and you do not need to care about it at all.
Why are we allocated AS number in the private range. Is it not a problem for routing private AS numbers over internet. Generally if we take leasedlines also, ISP will give a public ip to configure on our routers . (point to point) Then what is the exception here coming to BGP. Why are we getting private AS numbers ?
You said that some automated process will take care of Label assignment for customer routes . Where does it happen ? on ISP router ? If so in what form ? is it VRF ? can you give me more info on this ?
It is because you do not need any unique AS. You are not a standalone AS, rather, you are simply a part (a customer) of your ISP. You will either use your ISP's AS number, or you will be assigned a private AS. If you are assigned a private AS number, your ISP will take care of removing that private AS when - and if - it advertises your company networks to other providers and out to public internet. If you are purchasing only an MPLS VPN service then your company routes won't probably be advertised to public internet, in which case having a unique AS number would be completely useless.
Yes, the ISP will create a VRF on his PE routers where your company is connected. Each network learned from your company and stored in the VRF will be assigned a unique label value and advertised to other PE routers via BGP. This unique enumeration of entries in different VRFs is performed by the IOS running on the PE router.
Multiprotocol label switching (MPLS) is a telecom routing technique that uses labels to direct data between nodes. It is supported by the Linux networking stack, and many articles and tutorials have been written about how to configure it with ip route. However, you can also handle MPLS at a lower level with tc.
Real deployments typically use control plane software to configure MPLS dynamically. However, it's useful to be able to execute tc commands manually for learning, experimenting, and testing Linux kernel features.
This article explains how to match different fields in MPLS headers with tc-flower, covers the different MPLS actions that tc supports for adding, modifying, or removing MPLS headers, and finally shows how to encapsulate MPLS into the User Datagram Protocol (UDP).
All commands are based on Linux v5.14 and iproute2 v5.10.0 (you can use an iproute2 version older than the kernel because v5.10.0 implements all the required Netlink features). Also, the upcoming Red Hat Enterprise Linux (RHEL) 8.5 will have these features in tech preview. Sysadmins will have to install the kernel-modules-extra package.
The bos 1 option makes the filter match only packets that have exactly two LSEs. You don't need to add a bos 0 option for the first LSE: Having another LSE with depth 2 means that it only considers MPLS packets that have at least two LSEs.
Conversely, you could use bos 0 to match packets with more than three LSEs. More technically, the filter would match MPLS packets where an LSE exists at depth 3, and that LSE doesn't have the S bit set.
Since MPLS labels have only local significance, tc and the networking stack have no way to figure out which type of header follows the MPLS header. That's why pop requires the protocol option to tell the kernel how to handle the resulting packet. The mpls_bos 1 option ensures the LSE you're removing is the only one in the stack.
The push action inserts an LSE right after the Ethernet header. But sometimes MPLS is used to encapsulate packets with their Ethernet header. The mac_push action was developed for this use case. It behaves like push but adds the LSE before the MAC header (usually Ethernet) instead of after it. It's important to keep in mind that after applying the mac_push action, the packet doesn't have any MAC header at all since it now starts with an MPLS header (the original MAC header is just payload now). Therefore you also need to push a new Ethernet header. That's what the push_eth action does: It takes the source and destination MAC addresses as parameters, but not Ethertype, as the kernel sets it automatically. It looks like this:
3a8082e126