Bobcares

pfSense IGMP Snooping | A Case Study

by | Aug 20, 2024

IGMP snooping in pfSense can be used to improve multicast performance on a network. Read the article to learn more about the process. Bobcares, as a part of our pfSense Support Services offers solutions to every query that comes our way.

Overview
  1. IGMP Snooping in pfSense
  2. Understanding IGMP Snooping and Querier Role
  3. Configuration Overview
  4. Case Study
  5. Conclusion

IGMP Snooping in pfSense

What is IGMP Snooping?

IGMP (Internet Group Management Protocol) snooping is crucial for managing multicast traffic within a network. It ensures that multicast data, like IPTV streams, only reaches to devices that need it. This prevents unnecessary traffic from flooding the entire network. However, correctly configuring IGMP snooping, especially in a complex setup involving pfSense, Proxmox, and managed switches, can be challenging. Here’s a guide based on a real-world scenario.

Role of pfSense in IGMP Snooping

pfSense can route multicast traffic using the IGMP Proxy service, which is essential for scenarios where multicast streams need to cross network boundaries (e.g., from a WAN to a LAN). However, the actual IGMP snooping functionality to limit multicast traffic within a VLAN is typically handled by a managed switch. Using IGMP Proxy in pfSense includes:

1. IGMP Proxy Service: pfSense includes an IGMP Proxy service that can forward multicast traffic between interfaces. This is commonly present in setups where IPTV or other multicast services need to be routed from one network segment to another.

2. Configuration: To use the IGMP Proxy in pfSense, we need to configure the upstream and downstream interfaces. The upstream interface then connects to the multicast source (like an ISP), and the downstream interfaces are the networks that should receive the multicast traffic.

3. Limitations: While pfSense can forward multicast traffic, it doesn’t manage multicast at Layer 2. This means that pfSense won’t control which devices on the LAN receive multicast traffic—that’s where IGMP snooping on a switch comes into play.

pfsense igmp snooping

An Example
  • Setup: Imagine we have an IPTV service provided by the ISP that uses multicast. The pfSense router is configured to forward this multicast traffic from the ISP to the internal network.
  • Problem Without IGMP Snooping: Without IGMP snooping, all devices on the LAN might receive the multicast stream, even those that don’t need it, causing network congestion.
  • Solution with IGMP Snooping: By enabling IGMP snooping on the switches, only the devices that are actively using the IPTV service will receive the multicast stream. This reduces unnecessary network traffic.

Understanding IGMP Snooping and Querier Role

IGMP snooping operates by “listening” to IGMP conversations between devices and the multicast router. It learns which devices (clients) are interested in specific multicast groups and ensures that multicast traffic is only forwarded to those devices.

Querier Role: Typically, a router sends IGMP general queries to identify all multicast group members in a VLAN. However, if there’s no router in the network, switches can be configured to perform this role. The switch will send these queries, and all devices must reply, ensuring that the switch knows which ports should receive multicast traffic.

Configuration Overview

In this setup, two switches are setup to handle IGMP snooping:

1. IGMP Snooping and Querier Enabled: Both switches have IGMP snooping and IGMP querier enabled to manage multicast traffic efficiently within VLANs.

2. VLAN Configuration: The switches have IGMP snooping enabled in specific VLANs, with the IGMP querier configured to use IGMPv2.

3. Switch Settings: The switches can auto-learn multicast router ports, disable immediate leave, and use specific IGMP settings to ensure robustness in querying.

Case Study

The Issue: IPTV Stream Stopping with IGMP Snooping Enabled

A user running a pfSense firewall within a Proxmox environment encountered an issue where IPTV streams stopped working after enabling IGMP snooping on the network switch. The setup worked fine before enabling IGMP snooping, but with it enabled, the pfSense logs only showed IGMP leave packets from the client, with no member reports from the switch or the client.

Root Cause and Solution

After thorough checking, we find that the problem is from Proxmox itself. By default, Proxmox blocks multicast traffic to virtual machines, which is necessary for IGMP snooping to function correctly.

Solution:

To resolve this issue, the user needed to disable multicast snooping on the Proxmox bridge interface. We can do this using the following command:

bash

echo 0 > /sys/class/net/vmbrX/bridge/multicast_snooping

Replace vmbrX with the appropriate bridge interface on the Proxmox host.

[Want to learn more? Click here to reach us.]

Conclusion

IGMP snooping can greatly improve network efficiency by controlling multicast traffic, but it requires proper configuration across all network devices, including virtual environments like Proxmox. When using pfSense as a firewall/router in such setups, we must ensure that Proxmox is setup to allow multicast traffic to reach the virtual machines. By following the correct steps and commands, as shown above, multicast-dependent services like IPTV can function seamlessly in a network with IGMP snooping enabled.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF