Created on 06-24-2024 09:41 AM Edited on 07-24-2024 07:22 AM By Jean-Philippe_P
Description | This article describes how to setup PIM sparse mode and a rendezvous point on FortiGate. |
Scope | FortiGate v7.4.4 +. 7.2 7.0. |
Solution |
Diagram:
Objective:
The querier will receive stream 239.0.0.2 thanks to the IGMP (*, G) report, PIM Sparse Mode, and Rendezvous Point.
Prerequisites:
PIM Spare Mode configuration:
PIM neighborship must be formed between the nodes as shown on network diagram. This can be verified with the command 'get router info multicast pim sparse-mode neighbour'.
Below is an example with RTR output:
get router info multicast pim sparse-mode neighbour
FHR Configuration:
show router multicast config router multicast set multicast-routing enable config pim-sm-global config rp-address edit 1 set ip-address 9.9.9.9 next end end edit "port2" set pim-mode sparse-mode next edit "port3" set pim-mode sparse-mode next end end
RTR Configuration:
config router multicast set multicast-routing enable config pim-sm-global config rp-address edit 1 set ip-address 9.9.9.9 next end end config interface edit "port2" set pim-mode sparse-mode next edit "port3" set pim-mode sparse-mode next set pim-mode sparse-mode next end end
Rendezvous Point Configuration:
show router multicast config router multicast set multicast-routing enable config pim-sm-global config rp-address edit 1 set ip-address 9.9.9.9 next end end edit "RP" set pim-mode sparse-mode next edit "port2" set pim-mode sparse-mode next end end
LHR Configuration:
config router multicast set multicast-routing enable config pim-sm-global config rp-address edit 1 set ip-address 9.9.9.9 next end end config interface edit "port2" set pim-mode sparse-mode next set pim-mode sparse-mode set passive enable next end end
Multicast firewall policy:
Each FortiGate should have a multicast firewall policy like this:
config firewall multicast-policy edit 1 set srcintf "portX" (toward source interface) next end
RP specific configuration:
As soon as the source streams a flow to the multicast group, the first hop router will register this source to the RP.
This is with a unicast PIM packet, meaning that the packet needs to be authorized through the network.
Through the network example:
show firewall policy config firewall policy edit 1 set srcintf "portX" (ingress toward the source) next end
At the Rendezvous Point example:
config firewall policy edit 2 set srcintf "portX" (ingress toward the source) next end edit "RP" set vdom "ISP01" next end
Verification:
To verify that the register packet is sent to the RP IP 9.9.9.9, follow these steps:
diagnose sniffer packet any 'host 9.9.9.9' 6 0 l
This packet capture could be translated to PCAP format and it will give something similar.
The source of the packet is the closest interface to the source having PIM enabled. The destination is then the RP IP address 9.9.9.9. This is a PIM packet with the register flag on. Multicast flow 10.163.11.196 to 239.0.0.2 is encapsulated in this packet. It will allow the RP to match the source with the group. Consequently, this information is registered on the RP multicast table.
get router info multicast pim sparse-mode table 239.0.0.2 (*,*,RP) Entries: 0 (10.163.11.196, 239.0.0.2) - 3
Stream reception on a Linux client:
Now that the RP and shared tree is setup and populated, a client can receive that stream from anywhere on the network. The client 10.96.11.197 is directly connected to the Last Hop Router and it will request the stream 239.0.0.2. Some multicast debugs can show the IGMP report from the receiver:
diagnose ip router igmp all enable
get router info multicast pim sparse-mode table 239.0.0.2 (*,*,RP) Entries: 0 (*, 239.0.0.2) - 3 # this entry corresponds to the PIM Join (*,G) sent by the LHP upon reception of IGMP report (*,G)
IGMP info can be seen on LHR with this command.
get router info multicast igmp groups 239.0.0.2
Focus at the PIM level:
The last hop router (closest to the receiver) will first send a (*, G) PIM Join. Then, it will receive the first multicast packet from source 10.163.11.196. After, it will know the source for group 239.0.0.2 and then will send a (S, G) PIM Join toward the source. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.