488 CHAPTER 31: CONFIGURING IP ROUTING POLICY
Figure 158 Networking diagram of configuring OSPF route filtering
1Configure Router A:
aConfigure static routes:
[RouterA]ip route-static 20.0.0.1 32 ethernet 0
[RouterA]ip route-static 30.0.0.1 32 ethernet 0
[RouterA]ip route-static 40.0.0.1 32 ethernet 0
bStart OSPF protocol.
[RouterA]router id 1.1.1.1
[RouterA]ospf enable
cImport static route
[RouterA-ospf]import-route static
dConfigure Serial 0, and specify id of area including the interface.
[RouterA-ospf]interface serial 0
[RouterA-Serial0]ip address 10.0.0.1 255.0.0.0
[RouterA-Serial0]link-protocol ppp
[RouterA-Serial0]interface serial 0
[RouterA-Serial0]ospf enable area 0
2Configure Router B:
aConfigure an access list:
[RouterB]acl 1
[RouterB-acl-1]rule deny source 30.0.0.0 255.255.255.0
[RouterB-acl-1]permit any
[RouterB-acl-1]quit
bStart OSPF protocol and configure the area number of this interface
[RouterB]router id 2.2.2.2
[RouterB]ospf enable
cConfigure filtering route information received for OSPF
[RouterB-ospf]filter-policy 1 import
dConfigure IP address of Serial0, encapsulated to PPP protocol.
[RouterB-ospf]interface serial 0
[RouterB-Serial0]link-protocol ppp
[RouterB-Serial0]ip address 10.0.0.2 255.0.0.0
[RouterB-Serial0]ospf enable area 0
Configuring Filtering
Route Information This example describes how OSPF imports RIP route selectively.
The router connects campus network A and campus network B, both of which use
RIP as the internal routing protocol. The router needs to distribute the routes
192.1.1.0/24 and 192.1.2.0/24 of campus A in the local network. To achieve this
function, RIP protocol on the router defines a filter-policy to filter the routing
information, perform the route filtering function through quoting a prefix list.
area 0
S0
S0
static 20.0.0.1
30.0.0.1
40.0.0.1 Router A Router B