Tuesday, January 3, 2017

CCIE SPv4 - MPLS L3 VPN - VRF Lite - OSPFv2 and OSPFv3

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
This post will focus on OSPFv2 and OSPFv3 in the context of VRF Lite. Both IOS and IOS XR both fully support IPv4 and IPv6 VRF aware routing for OSPF. 

One caveat, IOS XR does not support the IPv6 AFI under the ospf router context, unlike IOS, which  supports IPv4 and IPv6 under OSPFv3. IOS XR requires IPv4 under the OSPFv2 AFI and IPv6 under the OSPFv3 AFI.

R1
router ospf 2 vrf CCIE
 network 0.0.0.0 255.255.255.255 area 0
!
interface GigabitEthernet1.100
 ospfv3 2 ipv6 area 0
!
interface GigabitEthernet1.100
 ospfv3 2 ipv6 area 0


XR5
router ospf 2
 vrf CCIE
  area 0
   interface Loopback100
   !
   interface GigabitEthernet0/0/0/0.100
   !
   interface GigabitEthernet0/0/0/0.101
!
router ospfv3 2
 vrf CCIE
  area 0
   interface Loopback100
   !
   interface GigabitEthernet0/0/0/0.100
   !
   interface GigabitEthernet0/0/0/0.101


R4
router ospf 2 vrf CCIE
 network 0.0.0.0 255.255.255.255 area 0
!
interface GigabitEthernet1.101
 ospfv3 2 ipv6 area 0
interface GigabitEthernet1.102
 ospfv3 2 ipv6 area 0
!
interface Loopback100
 ospfv3 2 ipv6 area 0


R3
router ospf 2 vrf CCIE
 network 0.0.0.0 255.255.255.255 area 0
!
interface Loopback100
 ospfv3 2 ipv6 area 0
!
interface GigabitEthernet1.102
 ospfv3 2 ipv6 area 0



RP/0/0/CPU0:XR5#sh ospf vrf CCIE neighbor
Tue Jan  3 22:06:31.330 UTC

* Indicates MADJ interface

Neighbors for OSPF 2, VRF CCIE

Neighbor ID     Pri   State           Dead Time   Address         Interface
100.100.100.1   1     FULL/DR         00:00:31    192.168.15.1    GigabitEthernet0/0/0/0.100
    Neighbor is up for 00:11:54
100.100.100.4   1     FULL/BDR        00:00:34    192.168.45.4    GigabitEthernet0/0/0/0.101
    Neighbor is up for 00:11:16
Total neighbor count: 2


RP/0/0/CPU0:XR5#sh ospfv3 vrf CCIE neighbor
Tue Jan  3 22:06:51.949 UTC

Neighbors for OSPFv3 2, VRF CCIE

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
100.100.100.4   1     FULL/BDR        00:00:38    15              GigabitEthernet0/0/0/0.101
    Neighbor is up for 00:11:25
100.100.100.1   1     FULL/DR         00:00:34    30              GigabitEthernet0/0/0/0.100
    Neighbor is up for 00:12:14
Total neighbor count: 2

The outputs above are specific to the IPv4 and IPv6 VRF aware processes, you can see there are 2 neighbors per AFI.


R4#sh ospf 2 vrf CCIE neighbor

          OSPFv3 2 address-family ipv6 vrf CCIE (router-id 100.100.100.4)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
100.100.100.3     1   FULL/BDR        00:00:32    18              GigabitEthernet1.102
192.168.1.15      1   FULL/DR         00:00:38    15              GigabitEthernet1.101


R4#sh ip ospf 2 neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
100.100.100.3     1   FULL/BDR        00:00:37    192.168.34.3    GigabitEthernet1.102
192.168.1.15      1   FULL/DR         00:00:33    192.168.45.15   GigabitEthernet1.101

You should take notice to something, with IPv6, you can specify the VRF to pull the correct information. You do not specify the VRF with IPv4, you specify the OSPF process ID. 


R1#sh ip route vrf CCIE ospf | b Gateway
Gateway of last resort is not set

      100.0.0.0/32 is subnetted, 4 subnets
O        100.100.100.3
           [110/4] via 192.168.15.15, 00:11:04, GigabitEthernet1.100
O        100.100.100.4
           [110/3] via 192.168.15.15, 00:12:44, GigabitEthernet1.100
O        100.100.100.15
           [110/2] via 192.168.15.15, 00:14:07, GigabitEthernet1.100
O     192.168.34.0/24
           [110/3] via 192.168.15.15, 00:12:44, GigabitEthernet1.100
O     192.168.45.0/24
           [110/2] via 192.168.15.15, 00:14:07, GigabitEthernet1.100


R1#sh ipv6 route vrf CCIE ospf
IPv6 Routing Table - CCIE - 9 entries

O   2100:34::/64 [110/3]
     via FE80::20C:29FF:FEB7:44DF, GigabitEthernet1.100
O   2100:45::/64 [110/2]
     via FE80::20C:29FF:FEB7:44DF, GigabitEthernet1.100
O   FC00::3/128 [110/3]
     via FE80::20C:29FF:FEB7:44DF, GigabitEthernet1.100
O   FC00::4/128 [110/2]
     via FE80::20C:29FF:FEB7:44DF, GigabitEthernet1.100
O   FC00::15/128 [110/1]
     via FE80::20C:29FF:FEB7:44DF, GigabitEthernet1.100

The outputs above prove that we are connected via IPv4 and IPv6.

Thanks for stopping by!
Rob Riker, CCIE #50693

No comments:

Post a Comment