miércoles, 21 de julio de 2010

Lab MPLS 1.3 LDP

Sección 2: MPLS IPv4

· Configurar las etiquetas Incoming (Local) en los LRSs con la siguiente disposición:
R1 label 102 -> 10.0.0.2 ; label 103 -> 10.0.0.3 ; label 104 -> 10.0.0.4 ; label 105 -> 10.0.0.5
R2 label 201 -> 10.0.0.1 ; label 203 -> 10.0.0.3 ; label 204 -> 10.0.0.4 ; label 205 -> 10.0.0.5
R3 label 301 -> 10.0.0.1 ; label 302 -> 10.0.0.2 ; label 304 -> 10.0.0.4 ; label 305 -> 10.0.0.5
R4 label 401 -> 10.0.0.1 ; label 402 -> 10.0.0.2 ; label 403 -> 10.0.0.3 ; label 405 -> 10.0.0.5
R5 label 501 -> 10.0.0.1 ; label 502 -> 10.0.0.2 ; label 503 -> 10.0.0.3 ; label 504 -> 10.0.0.4

· Configurar LDP en R1/R2/R3/R4/R5 sin usar el comando mpls ip en las interfaces.

· Utilizar la loopback 0 como ID LDP.


EL primer paso es habilitar CEF globalmente con el comando ip cef.
LDP es el protocolo encargado de distribuir etiquetas a través del Label Switched Path (LSP), usamos el comando global mpls label protocol ldp.

Nota: TDP es otro protocolo de intercambio de etiquetas, pero se considera obsoleto y es propietario de Cisco.

El IOS de Cisco permite asignar etiquetas estáticamente. La configuración implica dos pasos:

1. Especificar un rango de etiquetas con el comando:
mpls label range min-label max-label [static min-static-label max-static-label]

2. Asignar etiquetas a prefijos:
mpls static binding ipv4 prefix mask [input | output nexthop] label

El comando mpls ldp router-id Loopback0 force especifica el ID que LDP utiliza para formar sesiones. Si no definimos la interface, el proceso LDP crea la sesion usando la loopback con la IP mayor. La palabra opcional force indica que el ID LDP se activará sin necesiadad de reiniciar el router.

Normalmente habilitamos el intercambio de etiquetas en la interface con el comando mpls ip, pero el enunciado no nos permite esta opción. Una manera más sencilla y directa de habilitar LDP es configurar LDP Autoconfig en el proceso OSPF con el comando mpls ldp autoconfig area.

Si deseamos habilitar/deshabilitar LDP Autoconfig individualmente en cada interface usamos el comando mpls ldp igp autoconfig.

Nota: IS-IS soporta LDP Autoconfig a partire del IOS 15.0

Ejemplo 2-1 Configuración inicial LDP

─────────────────────────────────────────────────────────────────

R1
ip cef
mpls ip
mpls label protocol ldp
mpls label range 110 199 static 100 109
mpls static binding ipv4 10.0.0.2 255.255.255.255 102
mpls static binding ipv4 10.0.0.3 255.255.255.255 103
mpls static binding ipv4 10.0.0.4 255.255.255.255 104
mpls static binding ipv4 10.0.0.5 255.255.255.255 105
mpls ldp router-id Loopback0 force

router ospf 1
mpls ldp autoconfig area 0.0.0.0

R2
ip cef
mpls ip
mpls label protocol ldp
mpls label range 210 299 static 200 209
mpls static binding ipv4 10.0.0.1 255.255.255.255 201
mpls static binding ipv4 10.0.0.3 255.255.255.255 203
mpls static binding ipv4 10.0.0.4 255.255.255.255 204
mpls static binding ipv4 10.0.0.5 255.255.255.255 205

router ospf 1
mpls ldp autoconfig area 0


R3
ip cef
mpls ip
mpls label protocol ldp
mpls label range 310 399 static 300 309
mpls static binding ipv4 10.0.0.1 255.255.255.255 301
mpls static binding ipv4 10.0.0.2 255.255.255.255 302
mpls static binding ipv4 10.0.0.4 255.255.255.255 304
mpls static binding ipv4 10.0.0.5 255.255.255.255 305
mpls ldp router-id Loopback0 force

router ospf 1
mpls ldp autoconfig area 0

R4
ip cef
mpls ip
mpls label protocol ldp
mpls label range 410 499 static 400 409
mpls static binding ipv4 10.0.0.1 255.255.255.255 401
mpls static binding ipv4 10.0.0.2 255.255.255.255 402
mpls static binding ipv4 10.0.0.3 255.255.255.255 403
mpls static binding ipv4 10.0.0.5 255.255.255.255 405

router ospf 1
mpls ldp autoconfig area 0

R1# show mpls label range
Downstream Generic label region: Min/Max label: 110/199
Range for static labels: Min/Max label: 100/109

R2# show mpls label range
Downstream Generic label region: Min/Max label: 210/299
Range for static labels: Min/Max label: 200/209

R3# show mpls label range
Downstream Generic label region: Min/Max label: 310/399
Range for static labels: Min/Max label: 300/309

R4# show mpls label range
Downstream Generic label region: Min/Max label: 410/499
Range for static labels: Min/Max label: 400/409

R5# show mpls label range
Downstream Generic label region: Min/Max label: 510/599
Range for static labels: Min/Max label: 500/509

─────────────────────────────────────────────────────────────────

· Verificación LDP


Para comprobar que LDP Autoconfig está habilitado usamos el comando show mpls interfaces detail (Ejemplo 2-2). El campo IGP config nos indica que LDP Autoconfig está activo en las interfaces que participan en MPLS.


Ejemplo 2-2
─────────────────────────────────────────────────────────────────
R1# show mpls interfaces detail all
Interface FastEthernet0/0:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500
Interface FastEthernet0/1:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500
Interface FastEthernet1/0:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500
Interface FastEthernet2/0:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500

R2# show mpls interfaces fastEthernet 0/1 detail
Interface FastEthernet0/1:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500

R3# show mpls interfaces fastEthernet 0/1 detail
Interface FastEthernet0/1:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500

R4# show mpls interfaces fastEthernet 0/1 detail
Interface FastEthernet0/1:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500

R5#show mpls interfaces fastEthernet 0/1 detail
Interface FastEthernet0/1:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS operational
MTU = 1500

─────────────────────────────────────────────────────────────────

El comando show mpls ldp discovery muestra que los LSRs tienen comunicación por medio del envio de mensajes hello LDP Discovery. Un resultado distinto a xmit/recv entre LSRs direcamente conectados indica un problema entre vecinos.

El ejemplo 2-3 muestra un problema habitual. R4 no ha publicado su LDP ID en OSPF. R4 advierte (por medio de mensajes hello) a R1 que su ID LDP es la loopback 0 (10.0.0.4), pero R1 no tiene este prefijo en su tabla RIB. El comando show running-config interface loopback 0 confirma que R4 no está publicando la loopback 0, el ID LDP. Configuramos OSPF en la interface loopback y el ID de R4 ya es visible.

Ejemplo 2-3

─────────────────────────────────────────────────────────────────

R1# show mpls ldp discovery
Local LDP Identifier:
10.0.0.1:0
Discovery Sources:
Interfaces:
FastEthernet0/0 (ldp): xmit/recv
LDP Id: 10.0.0.2:0
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.3:0
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.0.0.4:0; no route
FastEthernet2/0 (ldp): xmit/recv
LDP Id: 10.0.0.5:0

R1# sh ip route 10.0.0.4
% Subnet not in table

R4# show running-config interface loopback 0
Building configuration...

Current configuration : 64 bytes
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255


R4(config)#interface loopback 0
R4(config-if)#ip ospf 1 area 0
─────────────────────────────────────────────────────────────────

Activamos la loopback0 de R4 para OSPF 1 area0.

Ejemplo 2-3

─────────────────────────────────────────────────────────────────

R4# show running-config interface loopback 0
Building configuration...

Current configuration : 82 bytes
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255
ip ospf 1 area 0

R1# sh ip route 10.0.0.4
Routing entry for 10.0.0.4/32
Known via "ospf 1", distance 110, metric 2, type intra area
Last update from 10.1.14.4 on FastEthernet1/0, 00:01:19 ago
Routing Descriptor Blocks:
* 10.1.14.4, from 10.0.0.4, 00:01:19 ago, via FastEthernet1/0
Route metric is 2, traffic share count is 1

R1# show mpls ldp discovery
Local LDP Identifier:
10.0.0.1:0
Discovery Sources:
Interfaces:
FastEthernet0/0 (ldp): xmit/recv
LDP Id: 10.0.0.2:0
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.3:0
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.0.0.4:0
FastEthernet2/0 (ldp): xmit/recv
LDP Id: 10.0.0.5:0

─────────────────────────────────────────────────────────────────

El ejmplo 2-4 muestra que todos los LSR dentro del AS1 tienen comunicación bidireccional (xmit/recv).

Ejemplo 2-4
─────────────────────────────────────────────────────────────────

R1# show mpls ldp discovery
Local LDP Identifier:
10.0.0.1:0
Discovery Sources:
Interfaces:
FastEthernet0/0 (ldp): xmit/recv
LDP Id: 10.0.0.2:0
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.3:0
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.0.0.4:0
FastEthernet2/0 (ldp): xmit/recv
LDP Id: 10.0.0.5:0

R2# show mpls ldp discovery
Local LDP Identifier:
10.0.0.2:0
Discovery Sources:
Interfaces:
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.1:0

R3# show mpls ldp discovery
Local LDP Identifier:
10.0.0.3:0
Discovery Sources:
Interfaces:
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.1:0

─────────────────────────────────────────────────────────────────

Comunicación LDP discovery R4/R1 y R5/R1.

Nota: Si R1 falla nos dejará inhabilitada toda la red del Proveedor, no es un buen diseño y debería tener redundancia, sin embargo este diseño tiene intenciones didácticas.


Ejemplo 2-4
─────────────────────────────────────────────────────────────────
R4# show mpls ldp discovery
Local LDP Identifier:
10.0.0.4:0
Discovery Sources:
Interfaces:
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.1:0


R5# show mpls ldp discovery
Local LDP Identifier:
10.0.0.5:0
Discovery Sources:
Interfaces:
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 10.0.0.1:0

─────────────────────────────────────────────────────────────────

El paso siguiente es comprobar que existe intercambio de etiquetas (labels) con el comando show mpls forwarding-table (ejemplo 2-5). Este comando muestra la tabla Label Forwarding Information Base (LFIB) que deriva de la tabla Forwarding Information Base (FIB).

El Ejemplo.. muestra el resultado de establecer manualmente una etiqueta (Local Label) con un prefijo dentro del dominio MPLS, por ejemplo en el LSR R2 el prefijo 10.0.0.3 tiene asociado la etiqueta 203, y el LSR R1 publica el prefijo con la etiqueta 103. La ventaja de est

Ejemplo 2-5

─────────────────────────────────────────────────────────────────
R1# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
102 Pop Label 10.0.0.2/32 0 Fa0/0 10.1.12.2
103 Pop Label 10.0.0.3/32 0 Fa0/1 10.1.13.3
104 Pop Label 10.0.0.4/32 0 Fa1/0 10.1.14.4
105 Pop Label 10.0.0.5/32 0 Fa2/0 10.1.15.5

R2# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
201 Pop Label 10.0.0.1/32 0 Fa0/1 10.1.12.1
203 103 10.0.0.3/32 0 Fa0/1 10.1.12.1
204 104 10.0.0.4/32 0 Fa0/1 10.1.12.1
205 105 10.0.0.5/32 0 Fa0/1 10.1.12.1
214 Pop Label 10.1.13.0/24 0 Fa0/1 10.1.12.1
215 Pop Label 10.1.14.0/24 0 Fa0/1 10.1.12.1
216 Pop Label 10.1.15.0/24 0 Fa0/1 10.1.12.1

R3# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
301 Pop Label 10.0.0.1/32 0 Fa0/1 10.1.13.1
302 102 10.0.0.2/32 0 Fa0/1 10.1.13.1
304 104 10.0.0.4/32 0 Fa0/1 10.1.13.1
305 105 10.0.0.5/32 0 Fa0/1 10.1.13.1
314 Pop Label 10.1.12.0/24 0 Fa0/1 10.1.13.1
315 Pop Label 10.1.14.0/24 0 Fa0/1 10.1.13.1
316 Pop Label 10.1.15.0/24 0 Fa0/1 10.1.13.1

R4# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
401 Pop Label 10.0.0.1/32 0 Fa0/1 10.1.14.1
402 102 10.0.0.2/32 0 Fa0/1 10.1.14.1
403 103 10.0.0.3/32 0 Fa0/1 10.1.14.1
405 105 10.0.0.5/32 0 Fa0/1 10.1.14.1
414 Pop Label 10.1.12.0/24 0 Fa0/1 10.1.14.1
415 Pop Label 10.1.13.0/24 0 Fa0/1 10.1.14.1
416 Pop Label 10.1.15.0/24 0 Fa0/1 10.1.14.1

─────────────────────────────────────────────────────────────────

Revisamos la LFIB en R5

Ejemplo 2-5

─────────────────────────────────────────────────────────────────
R5# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
501 Pop Label 10.0.0.1/32 0 Fa0/1 10.1.15.1
502 102 10.0.0.2/32 0 Fa0/1 10.1.15.1
503 103 10.0.0.3/32 0 Fa0/1 10.1.15.1
504 104 10.0.0.4/32 0 Fa0/1 10.1.15.1
514 Pop Label 10.1.12.0/24 0 Fa0/1 10.1.15.1
515 Pop Label 10.1.13.0/24 0 Fa0/1 10.1.15.1
516 Pop Label 10.1.14.0/24 0 Fa0/1 10.1.15.1

─────────────────────────────────────────────────────────────────

Un LSR asigna una etiqueta a cada prefijo que se encuentre en la tabla RIB, estas etiquetas se guardan en la tabla Forward Information Base (FIB), y posteriormente LDP publica la tabla FIB. El ejemplo 2-7 muestra que:

1. El prefijo 10.0.0.2/32 está instalado en la tabla FIB de R1.

2. El prefijo es publicado por R2 con la etiqueta null 0

3. R1 publica el prefijo con la etiqueta 1000 (tabla LFIB).

La tabla FIB almacena todos los posibles path para un prefijo, incluso prefijos locales.


Ejemplo 2-7
─────────────────────────────────────────────────────────────────
R1# show mpls ldp bindings 10.0.0.2 32
lib entry: 10.0.0.2/32, rev 20
local binding: label: 102
remote binding: lsr: 10.0.0.3:0, label: 302
remote binding: lsr: 10.0.0.5:0, label: 502
remote binding: lsr: 10.0.0.4:0, label: 402
remote binding: lsr: 10.0.0.2:0, label: imp-null

R2# show mpls ldp bindings 10.0.0.2 32
lib entry: 10.0.0.2/32, rev 4
local binding: label: imp-null
remote binding: lsr: 10.0.0.1:0, label: 102

R3# show mpls ldp bindings 10.0.0.2 32
lib entry: 10.0.0.2/32, rev 24
local binding: label: 302
remote binding: lsr: 10.0.0.1:0, label: 102

R4# show mpls ldp bindings 10.0.0.2 32
lib entry: 10.0.0.2/32, rev 24
local binding: label: 402
remote binding: lsr: 10.0.0.1:0, label: 102

R5# show mpls ldp bindings 10.0.0.2 32
lib entry: 10.0.0.2/32, rev 24
local binding: label: 502
remote binding: lsr: 10.0.0.1:0, label: 102

─────────────────────────────────────────────────────────────────

No hay comentarios:

Publicar un comentario