Application Scenarios for Routing Policies
Filtering Specific Routes
Figure 10-2 shows an OSPF-enabled network where RouterA receives routes from the Internet and advertises some of the routes to RouterB. Networking configurations to consider are as follows:
RouterA advertises only routes 172.16.17.0/24, 172.16.18.0/24, and 172.16.19.0/24 to RouterB.
RouterC accepts only the route 172.16.18.0/24.
RouterD accepts all the routes advertised by RouterB.
Use IP prefix lists.
- Configure an IP prefix list on RouterA and configure the IP prefix list as an export policy of RouterA to be used by OSPF.
- Configure another IP prefix list on RouterC and configure the IP prefix list as an import policy of RouterC to be used by OSPF.
Use routing policies.
- Configure a routing policy (the matching rules can be the IP prefix list, cost, or route tag) on RouterA and configure this routing policy as an export policy of RouterA to be used by OSPF.
- Configure another routing policy on RouterC. Configure this routing policy as an import policy of RouterC to be used by OSPF.
Compared with an IP prefix list, a routing policy allows route attributes to be modified and can be used to control routes more flexibly, but it is more complex to configure.
Transparently Transmitting Routes of Other Protocols Through an OSPF AS
On the network shown in Figure 10-3, an autonomous system (AS) runs OSPF and functions as a transit AS for other areas. Routes from the IS-IS area connected to RouterA need to be transparently transmitted through the OSPF AS to the IS-IS area connected to RouterD.
To meet the preceding requirements, configure a routing policy on RouterA to set a tag for the imported IS-IS routes. RouterD then identifies the IS-IS routes from OSPF routes based on the tag.