Sunday, July 3, 2011

LAB: OSPF Filtering with Route-maps

 - Configure route-map filtering on R6 so that traffic going towards the Loopback0 network of R3 is sent towards R1.

using route-map with distribute-list command extends the filtering capability with additional match criteria
-outgoing interface in the routing table
- ip address
-ip next-hop
- ip route-source
- router-id
- metric
- route type (intra, inter etc.)
- tag

@ R6

Rack1R6#show ip route 150.1.3.3
Routing entry for 150.1.3.3/32
  Known via "ospf 1", distance 110, metric 130, type intra area
  Redistributing via eigrp 10
  Advertised by eigrp 10 metric 10000 1000 255 1 1500
  Last update from 155.1.146.1 on FastEthernet0/0.146, 00:31:23 ago
  Routing Descriptor Blocks:
    155.1.146.4, from 150.1.3.3, 00:31:23 ago, via FastEthernet0/0.146
      Route metric is 130, traffic share count is 1
  * 155.1.146.1, from 150.1.3.3, 00:31:23 ago, via FastEthernet0/0.146
      Route metric is 130, traffic share count is 1

adding the filter to eliminate route to 150.1.3.3 via R4


Rack1R6(config)#access-list 3 permit 150.1.3.3
Rack1R6(config)#access-list 4 permit 155.1.146.4

Rack1R6(config)#route-map DENY_R3_LOOPBACK_FROM_R4 deny 10
Rack1R6(config-route-map)#match ip address 3
Rack1R6(config-route-map)#match ip next-hop 4
Rack1R6(config-route-map)#route-map DENY_R3_LOOPBACK_FROM_R4 permit 20


Rack1R6(config)#router ospf 1
Rack1R6(config-router)#distribute-list route-map DENY_R3_LOOPBACK_FROM_R4 in


verification: route to 150.1.3.3 via R4 is not installed in the routing table.

Rack1R6#show ip route 150.1.3.3
Routing entry for 150.1.3.3/32
  Known via "ospf 1", distance 110, metric 130, type intra area
  Redistributing via eigrp 10
  Advertised by eigrp 10 metric 10000 1000 255 1 1500
  Last update from 155.1.146.1 on FastEthernet0/0.146, 00:00:06 ago
  Routing Descriptor Blocks:
  * 155.1.146.1, from 150.1.3.3, 00:00:06 ago, via FastEthernet0/0.146
      Route metric is 130, traffic share count is 1

No comments:

Post a Comment