OSPF : distribute-list and route-map

Hi all,

   Is it possible to use set command within route-map that is bound with distribute-list ?

For example, i tried to change OSPF route type of default routes that are sourced from different routers. FOr instance, default route that is sourced from router B will be external type 1 meanwhile default route that is sourced from router C will be external type 2. The goal is to prefer the default route from router B. I tried using below config, but however i still can see all default routes that are sourced from both routers (B and C).

  Here is the config that i tried

ip prefix-list default-route seq 5 permit 0.0.0.0/0
access-list 10 permit 172.24.255.12 log  //router B address
access-list 20 permit 172.24.255.13 log  //router C address
route-map defroute permit 10
 match ip address prefix-list default-route
 match ip route-source 10
 set metric-type type-1
!
route-map defroute permit 20
 match ip address prefix-list default-route
 match ip route-source 20
 set metric-type type-2
!
route-map defroute permit 30

router ospf 100
 router-id 172.24.255.10
 log-adjacency-changes
 network 172.24.0.0 0.0.255.255 area 0
 distribute-list route-map defroute in
!

 

So, anyone who can help me out, i do really appreciate

 

Regards

 

Wisnu

Comments

Sign In or Register to comment.