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
jskfanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 PrajapatiIT SupervisorCommented:
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

jskfanAuthor Commented:
my configuration above should deny 172.16.0.0/16 le 26
but it is not
0
Mitul PrajapatiIT SupervisorCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
Thank you very much Guys!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.