Documentos de Académico
Documentos de Profesional
Documentos de Cultura
MPLS 2
MPLS 2
Rogelio Alvez
ralvez@tiagora.com
Qu es una VPN ?
Es una red privada en trminos lgicos, montada
sobre un medio potencialmente compartido
Un conjunto de sitios a los que les es permitido
comunicarse mutuamente
Es el mbito alcanzable por una tabla de rutas
MPLS-VPN
Su base es el modelo de peers, pero
PEs reciben y mantienen informacin de rutas de las
VPNs directamente conectadas
Reduce la cantidad de informacin que tiene que
almacenar un PE
Se usa MPLS para rutear en el backbone (no se
necesita conocer informacin del cliente)
MPLS-VPN: Terminologa
Red de Proveedor (Red P)
Backbone controlado por un Proveedor MPLS
Router CE
Customer Edge. Parte de la Red C, que hace interfaz
con la Red P
MPLS-VPN: Terminologa
Sitio
Conjunto de redes de la Red C, ubicadas en el mbito de un
PE
Un sitio se conecta al backbone MPLS a travs de uno o ms
enlaces PE/CE
Router PE
Provider Edge router. Parte de la Red P; hace interfaz con los
routers CE
Router P
Provider (core) router; no tiene conocimientos de las VPNs
P
PE
PE
P
P
PE
PE
Sitio
CE
PE
PE
Sitio
CE
CEb
CEa
VRF
VRF
LDP
VRF
P
LDP
LDP
PE
VRF
PE
CEa
CEb
1. Activacin de VPNs (tantas VRFs por site como VPNs distintas)
2. CEs ensean sus rutas a cada PE, que las ubica en la VRF correspondiente
3. PE incorpora informacin de cada VPN al proceso BGP
4. PE asigna una etiqueta diferente a cada VPN, e informa lo que conoce a otros PEs
5. PE receptor distribuye adecuadamente lo recibido de otro PE a cada CE, segn
corresponda a la VPN de destino
MPLS-VPN: Terminologa
VRF (Virtual Routing and Forwarding)
Tabla de rutas ms su tabla de forwarding
Alimentada por procesos de routing contextualizados
VPN-Aware network
El backbone de un proveedor, en el cual se ha implementado
MPLS-VPN
VPN_A
11.5.0.0
iBGP
10.2.0.0
CE
CE
VPN_B
10.2.0.0
CE
VPN_A
11.6.0.0
PE
CE
PE
CE
VPN_B
PE
VPN_B
VPN_A
10.1.0.0
PE
CE
10.3.0.0
CE
10.1.0.0
12
Sitio1
VPN-C
VPN-A
Sitio3
Sitio2
VPN-B
PE
Intercambio de rutas
CE
Sitio-2
PE
Intercambio de rutas
CE
Backbone MPLS/VPN
Sitio-2
PE
CE
Sitio2
PE
Intercambio de rutas
Backbone MPLS/VPN
CE
Sitio2
PE
PE
Backbone MPLS
64 bits
Le da unicidad global al prefijo IPv4
RD es configurado en el PE para cada VRF
RD puede estar (o no) relacionado a un sitio o una VPN
P
PE-2
PE-1
VPN Backbone IGP
Sitio1
CE-1
CE-2
Sitio2
VPN-IPv4 update:
RD:Net1, Next-hop=PE-1
RT=verde, Label=(intCE1)
P
PE-2
PE-1
update para Net1
Next-Hop=CE-1
Sitio1
CE-1
CE-2
Sitio2
Update VPN-IPv4:
RD:Net1, Next-hop=PE-1
RT=verde, Label=(intCE1)
MPLS/VPN: Forwarding
26
Forwarding de paquetes
Forwarding
VPN_A
VPN_A
10.2.0.0
CE
CE
VPN_B
10.2.0.0 CE
PE2
11.5.0.0
VPN_A
PE
CE
10.1.0.0
VPN_A
11.6.0.0
VPN_B
CE
T8T2Data
Data
CE
PE1
10.1.0.0 CE
VPN_B
10.3.0.0
<RD_B,10.1>,, iBGP
iBGP next
hop
PE1, T2
<RD_B,10.2>
NH=
PE2
T1 T7 T8
T8
T9
T7
TB
TB
T8
Forwarding
VPN_A
VPN_A
10.2.0.0
CE
Data
T2 Data
VPN_B
10.2.0.0 CE
PE2
CE
TB T2 Data
VPN_A
11.6.0.0
VPN_B
CE
10.1.0.0 CE
P
TAT2 Data
VPN_A
PE
CE
10.1.0.0
T8T2 Data
CE
PE1
11.5.0.0
VPN_B
10.3.0.0
in / out
T7 Tu
T8,
T8 TA
Tw
T9 Tx
Ta Ty
Tb Tz
CE1
IP
packet
P conmuta paquetes
basado en el label IGP
label (tope del stack)
PE1
CE2
IGP
Label(PE2)
VPN Label
IP
packet
IP
packet
P1
PE1 recibe paquete IP
Se hace lookup en la VRF del site
Hay ruta BGP con label y nextHop
next-hop (PE2) es alcanzable va
IGP con un label asociado
IGP
Label(PE2)
VPN Label
IP
packet
VPN Label
P2
IP
packet
PE2
CE3
33
Procesos
de
routing
BGP
OSPF
Static
Contextos
de routing
Tablas de VRF
Forwarding VRF
VPN-C
VPN-A
Sitio3
Sitio2
MP-iBGP
VPN-B
P
PE
Vista de routing
PE
VRF
de Sitio1
VRF
de Sitio2
Rutas de Site1
Rutas de Site2
Rutas de Site1
Rutas de Site2
Rutas de Site3
Sitio1
Sitio2
VRF
de Sitio3
Rutas de Site2
Rutas de Site3
Rutas de Site4
Sitio3
VRF
de Sitio4
Rutas de Site3
Rutas de Site4
Sitio4
MPLS/VPN: Topologas
39
Topologas
iBGP
VPN_A
VPN_A
10.2.0.0
CE
CE
VPN_B
10.2.0.0 CE
PE
11.5.0.0
VPN_A
PE
CE
10.1.0.0
VPN_A
11.6.0.0
VPN_B
CE
PE
PE
CE
VPN_B
10.3.0.0
10.1.0.0 CE
IntCE3
VRF de Sitio3
N1,NH=PE1
N2,NH=PE2
N3,NH=CE3
PE3
VPN-IPv4s intercambiados entre PEs
RD:N1, NH=PE1,Label=IntCE1, RT=Blue
RD:N2, NH=PE2,Label=IntCE2, RT=Blue
RD:N3, NH=PE3,Label=IntCE3, RT=Blue
PE1
VRF de Sitio1
N1,NH=CE1
N2,NH=PE2
N3,NH=PE3
N2,NH=CE2
Sitio2
IntCE1
Sitio1
N1
IntCE2
N1
NH=CE1
PE2
VRFde Sitio2
N1,NH=PE1
N2,NH=CE2
N3,NH=PE3
N2
Routing Table de CE2
N1,NH=PE2
N2,Local
N3,NH=PE2
Sitio1
N1
CE1
Sitio2
N2
CE2
IntCE1 VRF
(Import RT=Spoke)
(Export RT=Hub)
N1,NH=CE1 (exported)
N2,NH=PE3 (imported)
N3,NH=PE3 (imported
IntCE2 VRF
(Import RT=Spoke)
(Export RT=Hub)
N1,NH=PE3 (imported)
N2,NH=CE2 (exported)
N3,NH=PE3 (imported)
BGP/RIPv2
IntCE3-Hub VRF
(Import RT=Hub)
N1,NH=PE1
N2,NH=PE2
PE1
PE3
PE2
CE3-Hub
Sitio3
N3
IntCE3-Spoke VRF
(Export RT=Spoke)
N1,NH=CE3-Spoke
N2,NH=CE3-Spoke
N3,NH=CE3-Spoke
CE3-Spoke
BGP/RIPv2
CE1
IntCE1 VRF
(Import RT=Spoke)
(Export RT=Hub)
N1,NH=CE1 (exported)
N2,NH=PE3 (imported)
N3,NH=PE3 (imported
PE1
BGP/RIPv2
CE3-Hub
Sitio3
N3
PE3
Sitio2
N2
IntCE3-Hub VRF
(Import RT=Hub)
N1,NH=PE1
N2,NH=PE2
CE3-Spoke
CE2
PE2
IntCE2 VRF
(Import RT=Spoke)
(Export RT=Hub)
N1,NH=PE3 (imported)
N2,NH=CE2 (exported)
N3,NH=PE3 (imported)
IntCE3-Spoke VRF
(Export RT=Spoke)
N1,NH=CE3-Spoke
N2,NH=CE3-Spoke
N3,NH=CE3-Spoke
BGP/RIPv2
MPLS/VPN: Configuracin en
plataformas Cisco
46
Configuracin
Conocimiento de VPNs en todos los PEs
Al PE hay que configurarle
VPN-C
VPN-A
Sitio2
VPN-B
Sitio3
Multihop MP-iBGP
P
PE1
VRF
for Sitio1
(100:1)
Rutas de Site1
Rutas de Site2
Sitio1
ip vrf site3
rd 100:2
route-target export 100:2
route-target import 100:2
route-target import 100:3
route-target export 100:3
ip vrf Sitio4
rd 100:3
route-target export 100:3
route-target import 100:3
PE2
VRF
for Sitio2
(100:2)
Rutas de Site1
Rutas de Site2
Rutas de Site3
Sitio2
VRF
for Sitio3
(100:2)
Rutas de Site2
Rutas de Site3
Rutas de Site4
Sitio3
VRF
for Sitio4
(100:3)
Rutas de Site3
Rutas de Site4
Sitio4
Configuracin (PE/CE)
PE/CE: casi cualquier protocolo de routing
Se usa un routing context en cada VRF
Routing contexts son definidos dentro de la
instancia de un protocolo de routing
router rip
version 2
address-family ipv4 vrf <vrf-symbolic-name>
Configuracin: PE/CE
BGP usa el mismo comando address-family
router BGP <asn>
...
address-family ipv4 vrf <vrf-symbolic-name>
Configuracin: PE
show pero basados en VRF
Configuracin: PE/CE
ip vrf site1
rd 100:1
route-target export 100:1
route-target import 100:1
ip vrf site2
rd 100:2
route-target export 100:2
route-target import 100:2
route-target import 100:1
route-target export 100:1
!
interface Serial3/6
ip vrf forwarding site1
ip address 192.168.61.6 255.255.255.0
encapsulation ppp
!
interface Serial3/7
ip vrf forwarding site2
ip address 192.168.62.6 255.255.255.0
encapsulation ppp
Sitio4
Sitio1
VPN-C
VPN-A
Sitio2
Sitio3
VPN-B
MP-iBGP
PE1
P
PE2
VRF
de Sitio1
(100:1)
Rutas de
Site1
Rutas de
Site2
Sitio1
VRF
de Sitio2
(100:2)
Rutas de
Site1
Rutas de
Site2
Rutas de
Site3
Sitio2
VRF
de Sitio3
(100:2)
Rutas de
Site2
Rutas de
Site3
Rutas de
Site4
Sitio3
VRF de Sitio4
(100:3)
Rutas de Site3
Rutas de Site4
Sitio4
ip vrf site3
rd 100:2
route-target export 100:2
route-target import 100:2
route-target import 100:3
route-target export 100:3
ip vrf Sitio4
rd 100:3
route-target export 100:3
route-target import 100:3
!
interface Serial4/6
ip vrf forwarding site3
ip address 192.168.73.7 255.255.255.0
encapsulation ppp
!
interface Serial4/7
ip vrf forwarding site4
ip address 192.168.74.7 255.255.255.0
encapsulation ppp
Configuracin PE/CE
router bgp 100
no bgp default ipv4-unicast
neighbor 7.7.7.7 remote-as 100
neighbor 7.7.7.7 update-source Loop0
!
address-family ipv4 vrf site2
neighbor 192.168.62.2 remote-as 65502
neighbor 192.168.62.2 activate
exit-address-family
!
address-family ipv4 vrf site1
neighbor 192.168.61.1 remote-as 65501
neighbor 192.168.61.1 activate
exit-address-family
!
address-family vpnv4
neighbor 7.7.7.7 activate
neighbor 7.7.7.7 next-hop-self
exit-address-family
VRF de Sitio1
(100:1)
Rutas de Site1
Rutas de Site2
Sitio4
Sitio1
VPN-C
VPN-A
Sitio2
Sitio3
VPN-B
MP-iBGP
PE1
P
PE2
VRF de Sitio2
(100:2)
Rutas de Site1
Rutas de Site2
Rutas de Site3
Sitio1
Sitio2
VRFde Sitio3
(100:2)
Rutas de Site2
Rutas de Site3
Rutas de Site4
Sitio3
VRF de Sitio4
(100:3)
Rutas de Site3
Rutas de Site4
Sitio4
55
CE-Spoke
PE-1
CE-Spoke
PE-2
CE-Spoke
Ruta esttica
P-network
CE-Spoke
CE-Spoke
PE-1
CE-Spoke
PE-2
CE-Spoke
CE-Spoke
PE-1
CE-Spoke
PE-2
CE-Spoke
Dinmico entre PE y CE
Rutas del CE redistribuidas en MP-BGP, pasadas por el
backbone y redistribuidas de PE a CE
Todo dinmico
Util cuando los CEs necesitan todas las rutas
CE-Spoke
PE-1
PE-2
CE-Spoke
CE-Spoke
60
No es necesario redistribucin
Uso de as-override
router bgp 115
address-family ipv4 vrf Customer_A
neighbor 10.200.2.1 remote-as 213
neighbor 10.200.2.1 activate
neighbor 10.200.2.1 as-override
Site A
AS 213
AS 115
CE-Spkoe
10.1.0.0/16 213
Site B
AS 213
PE-1
PE-2
i 10.1.0.0/16 213
CE-Spoke
65
Label
IP
Backbone MPLS