Filtering PIM Neighbors
Problem
You want to prevent your router from accepting PIM packets from another device.
Solution
In this example, we will configure a neighbor filter on Router1
’s FastEthernet interface, which it
uses to connect to a foreign router called Router2
:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip multicast-routing
Router1(config)#interface
Router1(config-if)#
FastEthernet0/0
ip address
Router1(config-if)#
192.168.1.1 255.255.255.0
ip pim sparse-mode
Router1(config-if)#ip pim neighbor-filter
Router1(config-if)#
18
exit
Router1(config)#access-list
18
deny any
Router1(config)#end
Router1#
Then, on the foreign router, we must configure an igmp helper-address:
Router2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip multicast-routing
Router2(config)#interface
Router2(config-if)#
FastEthernet0/0
ip address
Router2(config-if)#
192.168.1.2 255.255.255.0
ip pim dense-mode
Router2(config-if)#ip igmp helper-address
Router2(config-if)#
192.168.1.1
end
Router2#
Discussion
There are two main reasons for configuring a PIM neighbor filter. The first and most obvious reason is security. If you don’t control all of the routers on a network segment, but you want to maintain administrative control over your multicast routing trees, you might want to prevent the foreign devices from taking part in PIM. In particular, since PIM elects a Designated Router (DR) to handle multicast forwarding ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.