Route filtering with RIP
Its really no coincidence that im not very handy with RIP, yet. Its just not that commonly used nowadays, not at any customer I have worked with so far at least. Lack of real life experience sure makes it more to learn. So is route filtering with RIP so I made some notes on the topic.
You can filter with several different methods, route-filtering with distribute-lists, offset metric, advertising router, passive interfaces etc. But im focusing here on different distribute-lists
- With standard ACL
- With extended ACL
- With Prefix-list
The syntax lets you address an acl of any kind and also state a gatewa which to accept or not accept those routes from. Depending on how you filter, what kind of acl, the behaviour is slightly different. If you can mix prefix and gateway depends on type, and how to do it is also different depending on acl type.
with the standard acl, you can filter on routes stated in the ACL. simple as that. You can not use both a standard ACL for prefixes and filter on gateway at the same time. Then move to another approach.
With the extended ACL you can filter on prefix and gateway in the ACL. The ACL syntax is handled different here than to usual usage. The Source statement in the ACL refers to the source of the advertising router and destination refers to the actual prefix. You can either declare the prefix as “host” and state the networkaddress only and it will match as long as the netaddress is correct regardless of the prefix-length. Still you can if you prefer use network address and wildcard mask to do exact matching on prefix + lenght. or other obscure matching as you can do with acl’s.
12345 ip access-list extended 100permit ip host 10.1.2.3 host 172.16.0.0 - [10.1.2.3 meaning a router with source address 10.1.2.3 and the 172-host is actually the network]router ripdistribute-list 100 in
The prefix-list is in my opinion the easiest to create, understand and read. You configure the prefix-list with normal prefix statements, permit to match and deny to not match. The apply it with distribute-list prefix command. If you want to you can use the gateway command separately.
12345 ip prefix-list prefixespermit 172.16.0.0/16router ripdistribute-list prefix prefixes_acl gateway gateway_acl
Coming back with another post on other filtering methods later. or not. I havent decided yet.