Professional Documents
Culture Documents
Posted by Nicolas | viernes 5 de junio de 2009 | Category: BGP, IPv4, Layer 3 VPNs, MPLS, OSPF, Redistribution | Share Corresponde ahora configurar los clientes. Cada CE ser configurado por ahora con una ruta default al PE.
Para hacer visibles ambos extremos, BGP se encargar de anunciar las redes de la VRF entre los PEs gracias a la definicin del RFC 2858 (Multiprotocol Extensions for BGP-4). Esto siempre y
cuando las redes sean insertadas en la tabla de BGP. Para esto es necesario redistribuir las redes existentes, que por ahora son slo directamente conectadas, por lo tanto se utilizar redistribute connected dentro del address-family ipv4 correspondiente.
router bgp 64512 ! address-family ipv4 vrf Customer no synchronization redistribute connected exit-address-family !
El siguiente paso ser levantar un protocolo de ruteo. Se utilizar OSPF y se anunciar direcciones de loopback entre los CEs.
CE1#conf t Enter configuration commands, one per line. End with CNTL/Z. CE1(config)#int loop 0 CE1(config-if)#ip add 10.1.1.1 255.255.255.255 CE1(config)#router ospf 1 CE1(config-router)#net 10.0.0.0 0.255.255.255 area 0 CE1(config-router)#passive-interface loop0 CE1(config-router)#^Z CE1# CE2#conf t Enter configuration commands, one per line. End with CNTL/Z. CE2(config)#int loop 0 CE2(config-if)#ip add 10.2.2.2 255.255.255.255 CE2(config-if)#router ospf 1 CE2(config-router)#net 10.0.0.0 0.255.255.255 area 0 CE2(config-router)#passive-interface loop 0 CE2(config-router)#^Z CE2#
Basta con esto?. No, los CEs deben formar vecindades con los PEs que distribuirn los anuncios en BGP.
PE1#conf t Enter configuration commands, one per line. End with CNTL/Z. PE1(config)#router ospf 2 vrf Customer PE1(config-router)#net 10.0.0.0 0.0.0.255 area 0 PE1(config-router)#^Z PE1# PE2#conf t Enter configuration commands, one per line. End with CNTL/Z. PE2(config)#router ospf 3 vrf Customer PE2(config-router)#net 10.0.0.0 0.255.255.255 area 0 PE2(config-router)#^Z PE2#
Notar que los nmeros de proceso de OSPF tienen significancia slo para el router local. Se revisan las vecindades con show ip ospf neighbor.
CE1#sh ip ospf nei Neighbor ID Pri 10.0.0.1 1 FastEthernet0/0 CE1# PE1#sh ip ospf nei Neighbor ID Pri 10.1.1.1 1 FastEthernet2/0 PE1# State FULL/DR Dead Time 00:00:37 Address 10.0.0.2 Interface State FULL/BDR Dead Time 00:00:36 Address 10.0.0.1 Interface
Se comprueba que se est recibiendo la ruta del CE conectado directamente. Para recibir la del otro extremo hay que redistribuir en BGP tal como se hizo para las directamente conectadas.
PE1# conf t Enter configuration commands, one per line. End with CNTL/Z. PE1(config)#router bgp 64512 PE1(config-router)# address-family ipv4 vrf Customer PE1(config-router-af)#redistribute ospf 2 PE1(config-router-af)#end PE1# PE2#conf t Enter configuration commands, one per line. End with CNTL/Z. PE2(config-router)#router bgp 64512 PE2(config-router)#address-family ipv4 vrf Customer PE2(config-router-af)#redistribute ospf 3 PE2(config-router-af)#end PE2#
Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks C 10.0.0.0/30 is directly connected, FastEthernet2/0 L 10.0.0.1/32 is directly connected, FastEthernet2/0 B 10.0.0.4/30 [200/0] via 2.2.2.2, 00:13:25 O 10.1.1.1/32 [110/2] via 10.0.0.2, 00:15:37, FastEthernet2/0 B 10.2.2.2/32 [200/2] via 2.2.2.2, 00:04:25 PE1#
Ahora se prueba conectividad eliminando la ruta default para asegurar que sea la ruta recin aprendida quin encamina los paquetes.
CE1#conf t Enter configuration commands, one per line. End with CNTL/Z. CE1(config)#no ip route 0.0.0.0 0.0.0.0 10.0.0.1 CE1(config)#end CE1#ping 10.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) CE1#
Lo anterior es lgico si se hace un seguimiento secuencial de anuncio y redistribucin de las redes. Si bien el PE aprende la ruta por BGP, no se ha distribuido de vuelta en OSPF para que pueda llegar al CE.
PE1#conf t Enter configuration commands, one per line. End with CNTL/Z. PE1(config)#router ospf 2 PE1(config-router)#redistribute bgp 64512 subnets PE1(config-router)#end PE1#
O E2 CE1>
Al probar nuevamente.
CE1>ping 10.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 52/104/124 ms CE1>
Mucha precaucin hay que tener al redistribuir entre dos protocolos de ruteo en ambos sentido de modo de evitar Loops. Para la implementacin de OSPF en VRFs, automticamente se generan dos medidas de proteccin; Down Bit y Tag Field (Loop Prevention). Zarar Ismail explica muy bien su funcionamiento, por qu exsiten dos tipos y el caso del VRF-Lite en OSPF down bit and domain tag. Area 0 discontinua?. Bsicamente la implementacin de OSPF sobre MPLS agrega un nuevo nivel jeracquico por sobre el rea 0 (backbone) denominada Superbackbone.
PE1#sh ip ospf | i VRF Connected to MPLS VPN Superbackbone, VRF Customer PE1#