R2 là một RP và sẽ gởi multicast ping
R3 là một PIM DR cho segment 192.168.135.0
Chúng ta sẽ chống lại việc R5 join vào group 239.0.0.1
Mô tả R1 thì Ip là 192.168.135.1 , R5 thì IP là 192.168.135.5
Đầu tiên chúng ta tạo profile:
SW1(config)#ip igmp profile 1
SW1(config-igmp-profile)#deny
SW1(config-igmp-profile)#range 239.0.0.1 239.0.0.5
SW1(config-igmp-profile)#exit
Profile 1 : cấm không cho gia nhập vào nhóm multicast 239.0.0.1 239.0.0.5
Sau đó chúng ta attach vào port tương ứng trên switch.:
SW1(config)#int f0/5
SW1(config-if)#ip igmp filter 1
Bây giờ bạn có thể kiểm tra xem bằng cách cho R1 và R5 join vào range 239.0.0.1 - 239.0.0.5
R1(config)#int e0/0
R1(config-if)#ip igmp join-group 239.0.0.1
R5(config)#int e0/0
R5(config-if)#ip igmp join-group 239.0.0.1
Để xem các thông báo xảy ra, ta dùng lệnh sau trên SW1:
SW1#debug ip igmp filter
Trang 2event debugging is on
SW1#
03:26:30: IGMPFILTER: igmp_filter_process_pkt(): checking group 239.0.0.1 from Fa0/5: deny
03:26:31: IGMPFILTER: igmp_filter_process_pkt() checking group from Fa0/3 : no profile attached
03:26:33: IGMPFILTER: igmp_filter_process_pkt() checking group from Fa0/1 : no profile attached
Chúng ta kiểm tra trên R3 để xem xét xem việc join vào group của R1 tại interface f0/0
R3#show ip igmp groups
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter
239.0.0.1 Ethernet0/0 00:09:28 00:02:30 192.168.135.1
224.0.1.40 Ethernet0/1 00:29:57 00:02:09 192.168.23.2
224.0.1.40 Ethernet0/0 00:30:01 00:02:37 192.168.135.3
Để chắc ăn hơn, bạn có thể kiểm tra trên R2 và sẽ thấy chỉ có mình R1 trả lời:
R2#ping 239.0.0.1
Type escape sequence to abort
Sending 1, 100-byte ICMP Echos to 239.0.0.1, timeout is 2 seconds:
Reply to request 0 from 192.168.135.1, 8 ms
R2#