Troubleshoot #3 (OSPF)
Load vpnv4.intra-as.tshoot3.init.cfg
#IOS-XE
config replace flash:vpnv4.intra-as.tshoot3.init.cfg
#IOS-XR
configure
load bootflash:vpnv4.intra-as.tshoot3.init.cfg
commit replace
y

All OSPFv2 routes are appearing as E2 on R1 and R2. Explain why, and change this so that the Lo0 prefixes are inter-area and the Lo1 prefixes are E2.
OSPFv3 routes are working as intended though already. Why is this?
Also, are all routes present on the CEs?
Answer
#XR1
router ospf 100
vrf A
domain-id type 0005 value 000000640200
#R2
router bgp 100
address-family ipv4 vrf A
redistribute ospf 100 match internal external
address-family ipv6 vrf A
redistribute ospf 100 match internal external
Explanation
For OSPFv2, IOS-XE defaults to using the process ID for the domain ID. IOS-XR defaults to a null domain ID.
We can see this by looking at the OSPF process and VPN routes:


XR1 is not inserting a domain ID on VPN routes:

To fix this we can simply add the domain ID to XR1 to match what is auto-generated on R2.
#XR1
router ospf 100
vrf A
domain-id type 0005 value 000000640200

With the domain IDs matching on both sides, both PEs redistribute the BGP routes into OSPF as IA if they came from BGP as type 1, 2 or 3. (This is known via the OSPF route type extcommunity).


Notice above that XR2 is missing the E2 route for 10.1.1.1/32. This is because when you redistribute OSPF into BGP on IOS-XE, the external routes are not matched by default.
router bgp 100
address-family ipv4 vrf A
redistribute ospf 100 match internal external
Now we have the E2 route on XR2:

OSPFv3
By default for both IOS-XE and IOS-XR, the domain ID is null. IOS-XE does not use the OSPFv3 process ID for the domain ID. Both PEs consider the domain ID to therefore be matching (since both are “null”) so routes appear as IA and E2 as desired by default. The danger with this however, is that by default, other sites that are not supposed to be the same domain, will be by default. So in practice, you likely want to manually define the domain ID value.


The only issue is that IOS-XE is again not redistributing external routes.
router bgp 100
add ipv6 vrf A
redistribute ospf 100 match internal external

If you also want to see the 2001:10:1:2::/64 prefix, you need to include connected as well:
router bgp 100
add ipv6 vrf A
redistribute ospf 100 match internal external include-connected

Last updated