Este proceso se lleva a cabo por defecto para la tabla de ruteo global y todas las interfaces conectadas a una red participan de esta tabla de ruteo.
La tecnología Virtual Routing Forwarding nos permite separa información de ruteo en el control plane en diferentes instancias, aislando la tabla de ruteo global de la tabla de ruteo de otra VRF. Cuando se utiliza únicamente para aislar las tablas de ruteo, se llama VRF Lite.
Esto permite que el router se comporte como si fueran varios router a la vez, haciendo posible la existencia virtual de varios dispositivos.
Para configurar una vrf hay varios métodos, utilizaré el que recomienda Cisco, aunque hay uno más reciente que de momento no sé que se incluya en alguna certificación.
Definimos el nombre de la VRF, le asignamos un Route Distinguisher y la familia de direcciones que se relaciona con la VRF, con el método anterior sólo podía utilizarse IPv4, con este método se soporta IPv4 e IPv6.
**Este no es el caso, pero cuando se utilizan las address families en conjunto mBGP (u OSPF) se pueden formar VPN layer 3 de MPLS utilizando route-targets.
Pueden ver que ambos routers están conectados directamente del puerto E0/0 al puerto E0/3, y he creado 4 subinterfaces y una instancia de OSPF en 2 VRF para simular que tenemos una red compleja, la prueba será un ping desde el R1 Loopback1 a la Loopback 2 en el mismo R1, el traceroute nos mostrará el camino entre las diferentes VRF y podemos ver que aunque ambas interfaces están en el mismo router, no pueden comunicarse directamente pues el proceso de virtualización las mantiene aisladas:
R1#sh cdp neighbors
Device ID Local Intrfce Holdtme Capability Platform Port ID
R2 Eth 0/0.1 135 R B Linux Uni Eth 0/3.1
Total cdp entries displayed : 1
R1!vrf definition RIB01 rd 2:1 ! address-family ipv4 exit-address-family!vrf definition RIB02 rd 2:2 ! address-family ipv4 exit-address-family! interface Loopback1 vrf forwarding RIB01 ip address 1.1.1.1 255.255.255.255!interface Loopback2 ip address 2.2.2.2 255.255.255.255!interface Ethernet0/0 no ip address!interface Ethernet0/0.1 encapsulation dot1Q 1 native vrf forwarding RIB01 ip address 10.0.1.1 255.255.255.248!interface Ethernet0/0.2 encapsulation dot1Q 2 vrf forwarding RIB02 ip address 10.0.2.1 255.255.255.248!interface Ethernet0/0.3 encapsulation dot1Q 3 vrf forwarding RIB02 ip address 10.0.3.1 255.255.255.248!interface Ethernet0/0.4 encapsulation dot1Q 4 ip address 10.0.4.1 255.255.255.248!router ospf 1 vrf RIB01 network 0.0.0.0 255.255.255.255 area 0! router ospf 2 vrf RIB02 network 0.0.0.0 255.255.255.255 area 0! router ospf 3 network 0.0.0.0 255.255.255.255 area 0!
R2!vrf definition RIB01 rd 2:1 ! address-family ipv4 exit-address-family!vrf definition RIB02 rd 2:2 ! address-family ipv4 exit-address-family!interface Loopback0 ip address 123.2.2.2 255.255.255.255!interface Ethernet0/3 no ip address!interface Ethernet0/3.1 encapsulation dot1Q 1 native vrf forwarding RIB01 ip address 10.0.1.2 255.255.255.248!interface Ethernet0/3.2 encapsulation dot1Q 2 vrf forwarding RIB01 ip address 10.0.2.2 255.255.255.248!interface Ethernet0/3.3 encapsulation dot1Q 3 vrf forwarding RIB02 ip address 10.0.3.2 255.255.255.248!interface Ethernet0/3.4 encapsulation dot1Q 4 vrf forwarding RIB02 ip address 10.0.4.2 255.255.255.248!router ospf 1 vrf RIB01 network 0.0.0.0 255.255.255.255 area 0!router ospf 2 vrf RIB02 network 0.0.0.0 255.255.255.255 area 0!
R1#traceroute 1.1.1.1 sou l2
Tracing the route to 1.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.0.4.2 0 msec 5 msec 0 msec
2 10.0.3.1 1 msec 0 msec 0 msec
3 10.0.2.2 0 msec 0 msec 1 msec
4 10.0.1.1 0 msec * 3 msec
R1#traceroute vrf RIB01 2.2.2.2 source Loopback 1
Tracing the route to 2.2.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.0.1.2 1 msec 0 msec 0 msec
2 10.0.2.1 0 msec 0 msec 0 msec
3 10.0.3.2 1 msec 0 msec 1 msec
4 10.0.4.1 0 msec * 1 msec
R1#sh ip route | b Gateway
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/41] via 10.0.4.2, 00:13:40, Ethernet0/0.4
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback2
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 10.0.1.0/29 [110/40] via 10.0.4.2, 00:13:40, Ethernet0/0.4
O 10.0.2.0/29 [110/30] via 10.0.4.2, 00:13:40, Ethernet0/0.4
O 10.0.3.0/29 [110/20] via 10.0.4.2, 00:13:40, Ethernet0/0.4
C 10.0.4.0/29 is directly connected, Ethernet0/0.4
L 10.0.4.1/32 is directly connected, Ethernet0/0.4
123.0.0.0/32 is subnetted, 1 subnets
C 123.20.20.20 is directly connected, Loopback0
R1#sh ip route vrf RIB02 | b Gateway
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/21] via 10.0.2.2, 00:14:03, Ethernet0/0.2
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/21] via 10.0.3.2, 00:13:48, Ethernet0/0.3
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.0.1.0/29 [110/20] via 10.0.2.2, 00:14:03, Ethernet0/0.2
C 10.0.2.0/29 is directly connected, Ethernet0/0.2
L 10.0.2.1/32 is directly connected, Ethernet0/0.2
C 10.0.3.0/29 is directly connected, Ethernet0/0.3
L 10.0.3.1/32 is directly connected, Ethernet0/0.3
O 10.0.4.0/29 [110/20] via 10.0.3.2, 00:13:48, Ethernet0/0.3
123.0.0.0/32 is subnetted, 1 subnets
O 123.20.20.20 [110/21] via 10.0.3.2, 00:13:48, Ethernet0/0.3
R1#sh ip route vrf RIB01 | b Gateway
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/41] via 10.0.1.2, 00:13:36, Ethernet0/0.1
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.0.1.0/29 is directly connected, Ethernet0/0.1
L 10.0.1.1/32 is directly connected, Ethernet0/0.1
O 10.0.2.0/29 [110/20] via 10.0.1.2, 00:14:01, Ethernet0/0.1
O 10.0.3.0/29 [110/30] via 10.0.1.2, 00:14:01, Ethernet0/0.1
O 10.0.4.0/29 [110/40] via 10.0.1.2, 00:13:46, Ethernet0/0.1
123.0.0.0/32 is subnetted, 1 subnets
O 123.20.20.20 [110/41] via 10.0.1.2, 00:13:36, Ethernet0/0.1
R1#sh vrf
Name Default RD Protocols Interfaces
RIB01 2:1 ipv4 Et0/0.1
Lo1
RIB02 2:2 ipv4 Et0/0.2
Et0/0.3
R2#sh vrf ipv4 detail
VRF RIB01 (VRF Id = 6); default RD 2:1; default VPNID
New CLI format, supports multiple address-families
Flags: 0x180C
Interfaces:
Et0/3.1 Et0/3.2
Address family ipv4 (Table ID = 6 (0x6)):
Flags: 0x0
No Export VPN route-target communities
No Import VPN route-target communities
No import route-map
No global export route-map
No export route-map
VRF label distribution protocol: not configured
VRF label allocation mode: per-prefix
VRF RIB02 (VRF Id = 7); default RD 2:2; default VPNID
New CLI format, supports multiple address-families
Flags: 0x180C
Interfaces:
Et0/3.3 Et0/3.4
Address family ipv4 (Table ID = 7 (0x7)):
Flags: 0x0
No Export VPN route-target communities
No Import VPN route-target communities
No import route-map
No global export route-map
No export route-map
VRF label distribution protocol: not configured
VRF label allocation mode: per-prefix
R2#
No hay comentarios. :
Publicar un comentario