Distribution list with prefix and gw on RIP



Can anyone give an example where i should use a distribution list with preflix-list and gateway at the same time? There is a specific task in ATC labs where they asked you to filter all the prefixes based on the next hop router :


This is the resolution :

ip prefix-list NOT_FROM_R4 seq 5 deny
ip prefix-list NOT_FROM_R4 seq 10 permit le 32
ip prefix-list PERMIT_ALL seq 5 permit le 32
router rip
distribute-list prefix PERMIT_ALL gateway NOT_FROM_R4 in

Another way to do that is :
router rip
distribute-list gateway NOT_FROM_R4 in

So, when i use only gateway and when i should rely on prefix-list + gateway ?


  • You will see, in many of these solutions, that there are many different ways of doing these tasks.  If you've seen that leaving the "deny all prefixes" prefix-list portion of your solution works, then you've successfully completed the task.

  • HI Bogdan,


    my understnading is that you would use the prefix only when you want to filter prefixes, no matter what GW is advertising them. Then you would add the Gateway parameter when you want to control from which Advertising router you want to apply to filter.

    Let me know if I missed something,


  • I concur on this as well. I would have explained it the same way and then demo'd the variations.

Sign In or Register to comment.