InBGP/MPLS IP VPN, whenOSPF is used as the PE-CE routing protocol,Domain IDsare used to determine whether theOSPF routes imported into the VPN instancebelong to the same OSPF domain.
How Domain ID Works in OSPF and MPLS VPN:
Same Domain ID (OSPF Intra-domain routes)
If thePE router's Domain ID matches the OSPF Domain ID, routes aretreated as intra-area routes.
The routes retainOSPF attributeswhen redistributed into the VPN.
Different Domain ID (OSPF Inter-domain routes)
If theDomain ID does not match, routes aretreated as external routes (Type 3 or Type 5 LSAs).
The PE router redistributes these routes asOSPF external routes.
Example Huawei Configuration for Domain ID in OSPF VPN:
ospf 1 vpn-instance VPN1
domain-id 1.1.1.1
This ensuresconsistent OSPF route typeswhen exchanging routes between PE and CE.
Reference from Huawei HCIE-Datacom Documentation:
Huawei MPLS VPN Configuration Guide – OSPF Domain ID in PE-CE Routing
HCIE-Datacom Study Material – OSPF & MPLS VPN Route Redistribution
Submit