When you redistribute OSPF routes into BGP on the MCE, BGP adds the configured OSPF domain ID to
the redistributed BGP VPN routes as a BGP extended community attribute and advertises the routes to the
BGP peer. When you redistribute the BGP VPN routes into OSPF on the BGP peer, OSPF uses the domain
ID to determine whether the routes belong to the same OSPF routing domain. If the domain ID is the same
and the routes are intra-area or inter-area routes, OSPF advertises these routes in Type-3 LSAs. If the
domain ID is the same but the routes are not intra-area or inter-area routes, OSPF advertises these routes
in Type-5 or Type-7 LSAs. If the domain ID is different, OSPF advertises the routes in Type-5 or Type-7
With no parameter specified, the undo domain-id command deletes all domain IDs.
# Configure the OSPF domain ID as 234 for VPN instance vpn1.
[Sysname] ospf 100 vpn-instance vpn1
[Sysname-ospf-100] domain-id 234
Use export route-policy to apply a routing policy to filter outgoing routes for the VPN instance. Such a
routing policy is referred to as an export routing policy.
Use undo export route-policy to remove the application.
export route-policy route-policy
undo export route-policy
No routing policy is applied to filter the routes to be advertised.
VPN instance view, IPv4 VPN view, IPv6 VPN view
Predefined user roles
route-policy: Specifies the name of a routing policy, a case-sensitive string of 1 to 63 characters.
Use this command to apply a routing policy to a VPN instance for more precise and flexible route
advertisement of the VPN instance. When the device advertises routes of the VPN instance, it filters the
advertised routes and modifies attributes for the advertised routes according to the specified routing
If you execute this command multiple times, the most recent configuration takes effect.
A routing policy specified in VPN instance view applies to both the IPv4 VPN and IPv6 VPN. A routing
policy specified in IPv4 VPN view applies only to the IPv4 VPN. A routing policy specified in IPv6 VPN
view applies only to the IPv6 VPN.