Configuring OSPFv3 to Import External Routes
Context
OSPFv3 is a link-state routing protocol and cannot directly filter advertised LSAs, therefore OSPFv3 must filter routes when importing them. In this way, only the routes that pass the filtering criteria can be advertised.
Carry out the following steps on the switch that runs OSPFv3.
Procedure
- Run system-view
The system view is displayed.
- Run ospfv3 [ process-id ]
The OSPFv3 view is displayed.
- Run default { cost cost | tag tag | type type }*
Default parameters of imported routes are set.
- Run import-route { bgp [ permit-ibgp ] | direct | ripng help-process-id | static | isis help-process-id | ospfv3 help-process-id } [ cost cost | type type | tag tag | route-policy route-policy-name ]*
External routes are imported.
Importing IBGP routes in an OSPFv3 process may lead to routing loops.
After the import-route command is executed on an OSPFv3 switch to import external routes, the switch becomes an ASBR.
- (Optional) Run default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | tag tag | distribute-delay delay | route-policy route-policy-name ]*
Default routes are advertised to the OSPFv3 routing area.
- (Optional) Run filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]
Imported external routes are filtered.
To filter a certain type of routes, you must specify protocol. If protocol is not specified, OSPFv3 filters all imported routes.
The filter-policy command takes effect only for the routes imported by an ASBR using the import-route command. That is, the ASBR filters routes when importing the routes. The routes that are filtered out do not generate LSAs and cannot be advertised by OSPFv3. If the import-route command is not configured to import other external routes (including OSPFv3 routes in different processes), the filter-policy command does not take effect.
- Run import-route limit limit-number [ threshold-alarm { upper-limit upper-limit-value | lower-limit lower-limit-value } * ]
A limit is configured on the number of LSAs generated when an OSPFv3 process imports external routes.
If OSPFv3 imports a large number of external routes and advertises them to a device with a smaller routing table capacity, the device may restart unexpectedly. To address this problem, run the import-route limit command to configure a limit on the number of LSAs generated when an OSPFv3 process imports external routes.
Ensure that upper-limit-value is greater than or equal to lower-limit-value.
- Run commit
The configuration is committed.