08-06-2012 04:02 PM - edited 03-07-2019 08:10 AM
My question is as follows:
I am using a route-map to filter redistribution. Within the route-map I am using the match ip route-source <<ACL>> command.
My CCNP book states that it matches the "Advertising routers IP address". But what does the ACL have to be configured as?
Does the destination or source of the ACL have to match the advertising routers IP? And which interface? The interface the redistributed routes go out on? Or the interface the redistributed routes come from?
In the below nextwork I am trying to redistribute all EIGRP routes (right side) into OSPF. I have configured a route-map to match an ACL that uses R1s interface to R2 as the destination. No routes are being redistributed. I have tried other combinations and they are not being redistributed either.
Can anyone help?
If you are interested the config is as follows:
R1#show run | s router
router eigrp 2
network 172.30.0.0
no auto-summary
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
redistribute eigrp 2 subnets route-map MATCH_ROUTER_1_IP_RM
network 172.16.12.0 0.0.0.3 area 0
R1#show run | s route-map
route-map MATCH_ROUTER_1_IP_RM permit 5
match ip route-source MATCH_ROUTER_1_IP
set metric 111
R1#show run | s access-list
ip access-list extended MATCH_ROUTER_1_IP
permit ip any host 172.16.12.1
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
O E2 192.168.61.0/24 [110/20] via 172.16.12.2, 02:00:30, Serial0/0
172.16.0.0/30 is subnetted, 3 subnets
O IA 172.16.36.0 [110/192] via 172.16.12.2, 02:00:34, Serial0/0
O 172.16.23.0 [110/128] via 172.16.12.2, 02:00:34, Serial0/0
C 172.16.12.0 is directly connected, Serial0/0
172.31.0.0/30 is subnetted, 1 subnets
O E2 172.31.67.0 [110/20] via 172.16.12.2, 02:00:30, Serial0/0
172.30.0.0/30 is subnetted, 3 subnets
D 172.30.45.0 [90/2195456] via 172.30.15.2, 02:00:49, Serial0/2
[90/2195456] via 172.30.14.2, 02:00:51, Serial0/1
C 172.30.14.0 is directly connected, Serial0/1
C 172.30.15.0 is directly connected, Serial0/2
D 192.168.4.0/24 [90/2297856] via 172.30.14.2, 02:00:50, Serial0/1
D 192.168.5.0/24 [90/2297856] via 172.30.15.2, 02:00:51, Serial0/2
O IA 192.168.6.0/24 [110/193] via 172.16.12.2, 02:00:38, Serial0/0
O E2 192.168.7.0/24 [110/20] via 172.16.12.2, 02:00:33, Serial0/0
Solved! Go to Solution.
08-06-2012 06:20 PM
Your source would be configured like any acl. Your source address is where you're receiving the routes from. Suppose you were receiving routes from R4 and it's address is 172.30.4.1. On R1, you should be able to configure something like:
access-list 10 permit host 172.30.4.1
route-map OnlyR1 permit 10
match ip route-source 10
set tag 1111
router ospf 1
redistribute eigrp 100 route-map OnlyR1 subnets
The IOS that I have doesn't support extended acls for route-source, but if yours does the concept should be the same:
access-list 101 permit ip host 172.30.4.1 any
HTH,
John
08-06-2012 06:20 PM
Your source would be configured like any acl. Your source address is where you're receiving the routes from. Suppose you were receiving routes from R4 and it's address is 172.30.4.1. On R1, you should be able to configure something like:
access-list 10 permit host 172.30.4.1
route-map OnlyR1 permit 10
match ip route-source 10
set tag 1111
router ospf 1
redistribute eigrp 100 route-map OnlyR1 subnets
The IOS that I have doesn't support extended acls for route-source, but if yours does the concept should be the same:
access-list 101 permit ip host 172.30.4.1 any
HTH,
John
08-07-2012 07:01 AM
It worked!
Interestingly, the ACL can either reference the IP of the interface of Router 4 (using the host keyword) or cover a range using a wildcard mask within which the IP of the R4 interface is included. This makes sense given how ACLs work but I just wanted to be sure.
Thank you very much for the help. My successful output is below of you are interested:
R1(config)#ip access-list extended PERMIT_ROUTER_4_ONLY_ACL
R1(config-ext-nacl)#5 permit ip host 172.30.14.2 any
R1(config-ext-nacl)#exit
R1(config)#route-map PERMIT_ROUTER_4_ONLY_ROUTE_MAP permit 5
R1(config-route-map)#match ip route-source PERMIT_ROUTER_4_ONLY_ACL
R1(config-route-map)#set metric 1234
R1(config-route-map)#exit
R1(config)#router ospf 1
R1(config-router)#redistribute eigrp 2 subnets route-map PERMIT_ROUTER_4_ONLY_ROUTE_MAP
R2#show ip route 192.168.4.0
Routing entry for 192.168.4.0/24
Known via "ospf 1", distance 110, metric 1234, type extern 2, forward metric 64
Last update from 172.16.12.1 on Serial0/0, 00:04:32 ago
Routing Descriptor Blocks:
* 172.16.12.1, from 1.1.1.1, 00:04:32 ago, via Serial0/0
Route metric is 1234, traffic share count is 1
R2#
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide