Configuring IP Routing Policy 487
Table 567 Display and Debug of IP Routing Policy
Configuring IP
Routing Policy
This example explains how an OSPF protocol selectively imports an RIP route.
As shown in the following figure, the router connects a campus network which
uses RIP as its internal routing protocol and an external area network which uses
OSPF routing protocol. The router advertises some routing information of the
campus network around the external area network. To implement this, the OSPF
protocol imports a routing policy to perform route filtering in order to import the
RIP information. The routing policy consists of two nodes, and the routing
information of 192.1.0.0/24 and 128.2.0.0/16 is advertised by the OSPF protocol
with different weighting values.
Figure 157 Networking diagram of OSPF importing route distributed by RIP
1 Define IP prefix lists
[Router]ip ip-prefix p1 permit 192.1.1.0/24
[Router]ip ip-prefix p2 permit 128.2.0.0/16
2 Configure Routing policy
[Router]route-policy r1 permit 10
[Router-route-policy]if-match ip address ip-prefix p1
[Router-route-policy]route-policy r1 permit 20
[Router-route-policy]if-match ip address ip-prefix p2
[Router-route-policy]quit
3 Configure OSPF
[Router]ospf enable
[Router-ospf]import-route rip route-policy r1
[Router-ospf]interface ethernet 0
[Router-Ethernet0]ip address 128.1.0.1 255.255.255.0
[Router-Ethernet0]ospf enable area 0
Configuring Filtering
Route Information for
OSPF
I. Networking requirements
■ Router A is connected to Router B, and the link layer encapsulates PPP
protocol.
■ Router A receives three static routes and the next hop is an Ethernet interface.
■ Router B is configured with filtering rules, making the three static routes
partially visible and partially shielded. The routes of network segments 20.0.0.0
and 40.0.0.0 are visible and those of network segment 30.0.0.0 are filtered.
Operation Command
Display routing policy display route-policy [ policy-name ]
Display IP prefix list information display ip ip-prefix [
prefix-list-name ]
campus
net wor k
ext ernal ar ea
net wor k
128.1.0.1
128. 2. 0. 0/ 16
192. 1. 0. 0/ 24
128.1.0.0/16