lunes, 8 de junio de 2015

[MPLS para Dummies] RIP entre PE y CE


Este artículo forma parte de un grupo de artículos llamado MPLS para Dummies en el que se pretende dar una iniciación práctica de como  configurar una red MPLS básica. Si sigues los pasos uno a uno, con las configuraciones que aquí se presentan es imposible que no puedas montar tu propia red MPLS :) .



Configuración:

Aquí vamos a configurar RIP contra el cliente, en otros artículos configuraremos otros protocolos de routing diferentes. Lo cierto es que esta es la parte más fácil, configuramos RIP en los PE y CE, para luego redistribuir entre RIP y BGP en los PE.

R7:
router rip
 version 2
 network 100.0.0.0
 network 192.168.47.0
 no auto-summary
R8:
router rip
 version 2
 network 100.0.0.0
 network 192.168.58.0
 no auto-summary
R4:
router rip
 address-family ipv4 vrf VPN78
  redistribute bgp 40905 metric 10
  network 192.168.47.0
  no auto-summary
  version 2
 exit-address-family
  redistribute rip

router bgp 40905
 address-family ipv4 vrf VPN78
  redistribute connected
  redistribute rip
 exit-address-family
R5:

router rip
 !
 address-family ipv4 vrf VPN78
  redistribute bgp 40905 metric 10
  network 192.168.58.0
  no auto-summary
  version 2
 exit-address-family
  redistribute rip
   
router bgp 40905
 address-family ipv4 vrf VPN78
  redistribute connected
  redistribute rip
 exit-address-family


Verificación:

Como se puede ver, tenemos las rutas en la tabla de rutas de los clientes, y no hay rutas de otros clientes. Se puede hacer ping, se puede hacer tracert…etc.
El único detalle importante es en los PE, que para alcanzar las redes del otro site tenemos una dirección IP de la tabla de routing global. Si lo miramos a nivel de CEF se ve cual es la etiqueta de MPLS que vamos a usar para llegar al otro site. Ahí está la magia.




R7:

R7#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      100.0.0.0/32 is subnetted, 2 subnets
C        100.0.0.7 is directly connected, Loopback0
R        100.0.0.8 [120/10] via 192.168.47.4, 00:00:10, Ethernet0/0.47
      192.168.47.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.47.0/24 is directly connected, Ethernet0/0.47
L        192.168.47.7/32 is directly connected, Ethernet0/0.47
R     192.168.58.0/24 [120/10] via 192.168.47.4, 00:00:10, Ethernet0/0.47

R7#ping 100.0.0.8 source loo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.0.8, timeout is 2 seconds:
Packet sent with a source address of 100.0.0.7
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms

R7#trace 100.0.0.8
Type escape sequence to abort.
Tracing the route to 100.0.0.8
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.47.4 1 msec 1 msec 1 msec
  2 20.0.14.1 4 msec 4 msec 5 msec
  3 192.168.58.5 [MPLS: Label 24 Exp 0] 3 msec 3 msec 3 msec
  4 192.168.58.8 3 msec 3 msec *


R8:

 R8#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      100.0.0.0/32 is subnetted, 2 subnets
R        100.0.0.7 [120/10] via 192.168.58.5, 00:00:02, Ethernet0/0.58
C        100.0.0.8 is directly connected, Loopback0
R     192.168.47.0/24 [120/10] via 192.168.58.5, 00:00:02, Ethernet0/0.58
      192.168.58.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.58.0/24 is directly connected, Ethernet0/0.58
L        192.168.58.8/32 is directly connected, Ethernet0/0.58



R8#ping 100.0.0.7   
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.0.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/3/5 ms

R8#trace 100.0.0.7  
Type escape sequence to abort.
Tracing the route to 100.0.0.7
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.58.5 1 msec 1 msec 1 msec
  2 20.0.15.1 3 msec 4 msec 4 msec
  3 192.168.47.4 [MPLS: Label 23 Exp 0] 3 msec 4 msec 3 msec
  4 192.168.47.7 3 msec 3 msec *
 
 

R4:

R4#show ip route vrf VPN78
Routing Table: VPN78
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      100.0.0.0/32 is subnetted, 2 subnets
R        100.0.0.7 [120/1] via 192.168.47.7, 00:00:08, Ethernet0/0.47
B        100.0.0.8 [200/1] via 100.0.0.5, 00:10:21
      192.168.47.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.47.0/24 is directly connected, Ethernet0/0.47
L        192.168.47.4/32 is directly connected, Ethernet0/0.47
B     192.168.58.0/24 [200/0] via 100.0.0.5, 00:10:21

R4#show ip cef vrf VPN78 100.0.0.8 detail
100.0.0.8/32, epoch 0, flags rib defined all labels
  recursive via 100.0.0.5 label 24
    nexthop 20.0.14.1 Ethernet0/0.14 label 16005

R5:

R5#show ip route vrf VPN78
Routing Table: VPN78
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      100.0.0.0/32 is subnetted, 2 subnets
B        100.0.0.7 [200/1] via 100.0.0.4, 00:12:03
R        100.0.0.8 [120/1] via 192.168.58.8, 00:00:26, Ethernet0/0.58
B     192.168.47.0/24 [200/0] via 100.0.0.4, 00:12:03
      192.168.58.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.58.0/24 is directly connected, Ethernet0/0.58
L        192.168.58.5/32 is directly connected, Ethernet0/0.58

 R5#show ip cef vrf VPN78 100.0.0.7 detail
100.0.0.7/32, epoch 0, flags rib defined all labels
  recursive via 100.0.0.4 label 23
    nexthop 20.0.15.1 Ethernet0/0.15 label 16001

No hay comentarios:

Publicar un comentario