Analyzing MPLS VPN Security
In this chapter, you learn about the following:
- How MPLS provides security (VPN separation, robustness against attacks, core hiding, and spoofing protection)
- How the different Inter-AS and Carrier's Carrier models work, and how secure they are compared to each other
- Which security mechanisms the MPLS architecture does not provide
- How MPLS VPNs compare in security to ATM or Frame Relay VPNs.
VPN users have certain expectations and requirements for their VPN service. In a nutshell, they want their service to be both private and secure. In other words, they want their VPN to be as secure as with dedicated circuits while gaining the scalability benefits of a shared infrastructure. Both concepts, of privacy and security, are not black and white, and need to be defined for a real world implementation.
This chapter defines typical VPN security requirements, based on the threat model developed in the previous chapter, and discusses in detail how MPLS can fulfill them. The typical VPN security requirements are
- VPN separation (addressing and traffic)
- Robustness against attacks
- Hiding of the core infrastructure
- Protection against VPN spoofing
We also explain which security features MPLS VPNs do not provide, and compare the security capabilities of MPLS VPNs with Layer 2–based VPN services such as ATM and Frame Relay.
The most important security requirement for VPN users is typically that their traffic be kept separate from other VPN traffic and core traffic. This refers to both its traffic not being seen in other VPNs, and also other VPNs traffic or core traffic not intruding into their VPN. Referring to the threat model from the previous chapter, this section analyses a threat against a VPN, specifically intrusions into and from other VPNs.
Another requirement is that each VPN be able to use the complete IP address space without affecting or being affected by other VPNs or the core.
The service provider has the requirement that the core remain separate from the VPNs in the sense that the address space in use does not conflict with any VPN and that VPN traffic remains separate on the core from the control plane traffic on the core.
In other words, a given VPN must be completely separate from other VPNs or the core in terms of traffic separation and address space separation. We will now analyze how the standard, RFC 2547bis, meets these requirements. In the first section, we see how it achieves address space separation, and in the following section how data and control traffic are kept architecturally separate—between VPNs, but also between a VPN and the core.
Address Space Separation
To be able to distinguish between addresses from different VPNs, RFC 2547bis does not use standard IPv4 (or IPv6) addressing on the control plane for VPNs on the core. Instead, the standard introduces the concept of the VPN -IPv4 or VPN -IPv6 address family. A VPN-IPv4 address consists of an 8-byte route distinguisher (RD) followed by a 4-byte IPv4 address, as shown in Figure 3-1. Similarly, a VPN-IPv6 address consists of an 8-byte route distinguisher (RD) followed by a 16-byte IPv6 address.
Figure 3-1 Structure of VPN-IPv4 Addresses
The purpose of the RD is to allow the entire IPv4 space to be used in different contexts (for VPNs, in our example). On a given router, a single RD can define a VPN routing/forwarding instance (VRF), in which the entire IPv4 address space may be used independently.
Due to the architecture of MPLS IP VPNs, only the PE routers have to know the VPN routes. Because PE routers use VPN-IPv4 addresses exclusively for VPNs, the address space is separated between VPNs. In addition, because they use IPv4 internally in the core, which is a different address family from the VPN-IPv4 address family, the core also has independent address space from the VPNs. This provides a clear separation between VPNs, and between VPNs and the core. Figure 3-2 illustrates how different address spaces are used on an MPLS IP VPN core.
Figure 3-2 Address Planes in an MPLS VPN Network
There is one special case in this model. The attachment circuit on a PE, which connects a VPN CE, is part of the VRF of that VPN and thus belongs to the VPN. However, the address of this PE interface is part of the VPN-IPv4 address space of the VPN and therefore not accessible from other interfaces on the same PE, from other core routers, or from other VPNs.
For practical purposes, this means that address space separation between VPNs and between a VPN and the core is still perfect because this PE interface to the CE belongs to the VPN and is treated as a VPN address. However, this also means that addresses exist in the VPN that belong to a PE. Consequently, a PE can by default be reached from a VPN, which might be used to attack that PE. This is a very important case and is discussed in detail in Chapter 5, "Security Recommendations."
VPN traffic consists of VPN data plane and control plane traffic. For the sake of this discussion, both will be examined together. The VPN user's requirement is that their traffic (both types) does not mix with other VPNs' traffic or core traffic, that their packets are not sent to another VPN, and that other VPNs cannot send traffic into their VPN.
On the service provider network, this definition needs to be refined because VPN traffic will obviously have to be transported on the MPLS core. Here, we distinguish between control plane and data plane traffic, where the control plane is traffic originating and terminating within the core and the data plane contains the traffic from the various VPNs. This VPN traffic is encapsulated, typically in an LSP, and sent from PE to PE. Due to this encapsulation, the core never sees the VPN traffic. Figure 3-3 illustrates the various traffic types on the MPLS VPN core.
Figure 3-3 Traffic Separation
VPN traffic consists of traffic from and to end stations in a VPN and traffic between CEs (for example, if IPsec is implemented between the CEs).
Each interface can only belong to one single VRF, depending on its configuration. So for VPN customer "red," connected to the PE on a fast Ethernet interface, the interface command ip vrf forwarding VPN determines the VRF. Example 3-1 shows the configuration for this.
Example 3-1. VRF Configuration of an Interface
interface FastEthernet1/0 ip vrf forwarding red ip address 220.127.116.11 255.255.255.0
Traffic separation on a PE router is implemented differently, depending on the type of interface on which the packet enters the router.
- Non-VRF interface— If the packet enters on an interface associated with the global routing table (no ip vrf forwarding command), the forwarding decision is made based on the global routing table, and the packet is treated like a normal IP packet. Only core traffic uses non-VRF interfaces, thus no further separation is required. (Inter-AS and Carrier's Carrier scenarios make an exception to this rule and are discussed later in this chapter.)
If the packet enters on an interface linked to a VRF using the ip vrf forwarding
VPN command, then a forwarding decision is made based on the forwarding table (or forwarding information base, FIB) of that VRF. The next hop from a PE perspective always points to another PE router, and the FIB entry contains the encapsulation method for the packet on the core. Traffic separation between various VPNs is then achieved by encapsulating the received packet with a VPN-specific header. There are various options for how to encapsulate and forward VPN packets on the core—through a Label Switch Path (LSP), an IPsec tunnel, an L2TPv3 tunnel, or a simple IPinIP or GRE tunnel. All of the methods keep various VPNs separate, either by using different tunnels for different VPNs or by tagging each packet with a VPN-specific header. Figure 3-4 shows how packets are encapsulated within the MPLS core.
Figure 3-4 Encapsulation on the Core
P routers have no active role in keeping traffic from VPNs separate: they just connect the PE routers together through LSPs or the other methods just described. It is one of the key advantages of the MPLS VPN architecture that P routers do not keep VPN-specific information. This aids the scalability of the core, but it also helps security because by not having visibility of VPNs the P routers also have no way to interfere with VPN separation. Therefore, P routers have no impact on the security of an MPLS core.
In summary, VPN users can expect their VPN to be separate from other VPNs and the core because
- An interface on a PE (for example, the interface holding the user's attachment circuit) can only belong to a single VRF or the core.
- The attachment circuit (PE-CE link) to this interface belongs logically to the VPN of the user. No other VPN has access to it.
- On the PE the address information of the VPN is held as VPN-IPv4 addresses, making each VPN unique through unique route distinguishers. VPN-IPv4 addresses are only held on PE routers and route reflectors.
- VPN traffic is forwarded through the core through VPN-specific paths or tunnels, typically tagging each packet with a VPN-specific label.
- P routers have no knowledge of VPNs, thus they cannot interfere with VPN separation.
The service provider can expect its core to be separate from the VPNs because
- PE and P addresses are IPv4 addresses. VPNs use exclusively VPN-IPv4 addresses and cannot access PE and P routers. (Exception: The attachment circuit on the PE, which needs to be secured. See Chapter 4, "Secure MPLS VPN Designs.")
For more technical details on how VPN separation is technically implemented, please refer to RFC 2547bis.