• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 84
  • Last Modified:

Filtering with Route Map and prefix-list

I have EIGRP routes advertised from R1 to R2 as shown below:

R2#sh ip route eigrp 1      


      10.0.0.0/8 is variably subnetted, 13 subnets, 7 masks
D        10.10.10.10/32 
           [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
      20.0.0.0/32 is subnetted, 1 subnets
D        20.20.20.20 [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
      172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
D        172.16.0.0/24 [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
D        172.16.2.0/24 [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
D        172.16.3.0/24 [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
D        172.16.12.0/22 
           [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
D        172.16.22.0/26 
           [90/156160] via 192.168.12.1, 00:00:09, FastEthernet0/0
R2#

Open in new window


on R1 I have configured route map and prefix list to block (filter out)network 172.16.0.0 /16 le 26,  but it does not seem to work

route-map FILTER_OUT deny 10
 match ip address prefix-list SMALL_PREFIXES
ip prefix-list SMALL_PREFIXES seq 10 permit 172.16.0.0/16 le 26

route-map FILTER_OUT permit 20

Open in new window


Any Help ?

thank you
0
jskfan
Asked:
jskfan
  • 4
  • 2
  • 2
  • +1
5 Solutions
 
Hemil AquinoNetwork EngineerCommented:
Did you apply it to eigrp?

It will look like this:

NewYork(config-router)#distribute-list prefi
NewYork(config-router)#distribute-list ?
  <1-199>      IP access list number
  <1300-2699>  IP expanded access list number
  WORD         Access-list name
  gateway      Filtering incoming address updates based on gateway
  prefix       Filter prefixes in address updates
  route-map    Filter prefixes based on the route-map
0
 
Mitul PrajapatiJunior IT EngineerCommented:
Try this on router R1

R1(config)# access-list 1 permit 172.16.0.0 0.0.255.255
R1(config)#
R1(config)# router eigrp 1
R1(config-router)# distribute-list 1 out Exit-Interface
R1(config-router)#
0
 
jskfanAuthor Commented:
route-map FILTER_OUT deny 10
 match ip address prefix-list SMALL_PREFIXES
ip prefix-list SMALL_PREFIXES seq 10 permit 172.16.0.0/16 le 26

route-map FILTER_OUT permit 20

Open in new window


it is route map that matches a prefix list
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
jskfanAuthor Commented:
my configuration above should deny 172.16.0.0/16 le 26
but it is not
0
 
Mitul PrajapatiJunior IT EngineerCommented:
The configuration which i have written here, doesn’t display 172.16.0.0 network routes in R2 routing table. It will filter out after exiting at R1
0
 
JustInCaseCommented:
Tested it, works properly. Compare it to your configuration.
R1:
interface Loopback0
 ip address 172.16.0.1 255.255.255.0
!
interface Loopback1
 ip address 172.16.3.1 255.255.255.0
!
interface Loopback2
 ip address 172.16.2.1 255.255.255.240
!
interface Loopback3
 ip address 172.16.4.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0
!
router eigrp 1
 network 0.0.0.0
 distribute-list route-map FILTER_OUT out
 no auto-summary
!
ip prefix-list SMALL_PREFIXES seq 10 permit 172.16.0.0/16 le 26
!
route-map FILTER_OUT deny 10
 match ip address prefix-list SMALL_PREFIXES
!
route-map FILTER_OUT permit 20

Open in new window

R1 routing table:
R1#sh ip route
     172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C       172.16.4.0/24 is directly connected, Loopback3
C       172.16.0.0/24 is directly connected, Loopback0
C       172.16.2.0/28 is directly connected, Loopback2
C       172.16.3.0/24 is directly connected, Loopback1
C    192.168.0.0/24 is directly connected, FastEthernet0/0

Open in new window


R2:
interface FastEthernet0/0
 ip address 192.168.0.2 255.255.255.0
!
router eigrp 1
 network 0.0.0.0
 no auto-summary

Open in new window

R2 routing table:
R2(config-router)#do sh ip route
     172.16.0.0/28 is subnetted, 1 subnets
D       172.16.2.0 [90/409600] via 192.168.0.1, 00:00:02, FastEthernet0/0
C    192.168.0.0/24 is directly connected, FastEthernet0/0

Open in new window

0
 
jskfanAuthor Commented:
router eigrp 1
 network 0.0.0.0
distribute-list route-map FILTER_OUT out

no auto-summary

I did not have the Distribute-List in my Configuration. Do I have to add it ?
0
 
JustInCaseCommented:
Without distribution list will not work. :)
Distribute list actually applies filtering to eigrp.

PS
You had it in your configuration few days ago - in this question.
0
 
jskfanAuthor Commented:
Thank you very much Guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now