Example: Configuring IGMP Snooping

This example shows how to configure IGMP snooping. IGMP snooping can reduce unnecessary traffic from IP multicast applications.

Requirements

This example uses the following hardware components:

Before you begin:

Overview and Topology

IGMP snooping controls multicast traffic in a switched network. When IGMP snooping is not enabled, the Layer 2 device broadcasts multicast traffic out all of its ports, even if the hosts on the network are not interested in receiving multicast traffic. With IGMP snooping enabled, a Layer 2 device monitors the IGMP join and leave messages sent from each connected host to a multicast router. This enables the Layer 2 device to keep track of the multicast groups and associated member ports. The Layer 2 device uses this information to make intelligent decisions and forward multicast traffic to only the intended destination hosts.

This example includes the following statements:

Figure 31 shows networks without IGMP snooping. Suppose host A is an IP multicast sender and hosts B and C are multicast receivers. The router forwards IP multicast traffic only to those segments with registered receivers (hosts B and C). However, the Layer 2 devices flood the traffic to all hosts on all interfaces.

Figure 31: Networks without IGMP Snooping Configured

Image g040612.gif

Figure 32 shows the same networks with IGMP snooping configured. The Layer 2 devices forward multicast traffic to registered receivers only.

Figure 32: Networks with IGMP Snooping Configured

Image g040613.gif

Configuration

CLI Quick Configuration

To quickly configure IGMP snooping, copy the following commands and paste the commands into the CLI.

[edit]set bridge-domains domain1 domain-type bridge set bridge-domains domain1 interface ge-0/0/1.1 set bridge-domains domain1 interface ge-0/0/2.1 set bridge-domains domain1 interface ge-0/0/3.1 set bridge-domains domain1 protocols igmp-snooping query-interval 200 set bridge-domains domain1 protocols igmp-snooping query-response-interval 0.4 set bridge-domains domain1 protocols igmp-snooping query-last-member-interval 0.1 set bridge-domains domain1 protocols igmp-snooping robust-count 4 set bridge-domains domain1 protocols igmp-snooping immediate-leave set bridge-domains domain1 protocols igmp-snooping proxy set bridge-domains domain1 protocols igmp-snooping interface ge-0/0/1.1 host-only-interface set bridge-domains domain1 protocols igmp-snooping interface ge-0/0/1.1 group-limit 50 set bridge-domains domain1 protocols igmp-snooping interface ge-0/0/3.1 static group 225.100.100.100 set bridge-domains domain1 protocols igmp-snooping interface ge-0/0/2.1 multicast-router-interface

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Modification of the Junos OS Configuration in Junos OS CLI, Release 10.3.

To configure IGMP snooping:

  1. Configure the bridge domain.

    [edit]user@host# edit bridge-domains domain1[edit bridge-domains domain1]user@host# set domain-type bridge[edit bridge-domains domain1]user@host# set interface ge-0/0/1.1[edit bridge-domains domain1]user@host# set interface ge-0/0/2.1[edit bridge-domains domain1]user@host# set interface ge-0/0/3.1[edit bridge-domains domain1]
  2. Enable IGMP snooping and configure the router to serve as a proxy.

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping proxy
  3. Configure the limit for the number of multicast groups allowed on the ge-0/0/1.1 interface to 50.

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping interface ge-0/0/1.1group-limit 50
  4. Configure the router to immediately remove a group membership from an interface when it receives a leave message from that interface without waiting for any other IGMP messages to be exchanged.

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping immediate-leave
  5. Statically configure IGMP group membership on a port.

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping interface ge-0/0/3.1 static group 225.100.100.100
  6. Configure an interface to be an exclusively router-facing interface (to receive multicast traffic).

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping interface ge-0/0/2.1 multicast-router-interface
  7. Configure an interface to be an exclusively host-facing interface (to drop IGMP query messages).

    [edit bridge-domains domain1]user@host# set protocols igmp-snooping interface ge-0/0/1.1 host-only-interface
  8. Configure the IGMP message intervals and robustness count.

    [edit bridge-domains domain1]user@host# set protocols igmp-snoopingrobust-count 4[edit bridge-domains domain1]user@host# set protocols igmp-snooping query-last-member-interval 0.1[edit bridge-domains domain1]user@host# set protocols igmp-snooping query-interval 200[edit bridge-domains domain1]user@host# set protocols igmp-snooping query-response-interval 0.4
  9. If you are done configuring the device, commit the configuration.

    [edit routing-instances]user@host# commit

Results

Confirm your configuration by entering the show bridge-domains command.

user@host# show bridge-domainsdomain1 {domain-type bridge;interface ge-0/0/1.1; interface ge-0/0/2.1; interface ge-0/0/3.1;protocols {igmp-snooping {query-interval 200;query-response-interval 0.4;query-last-member-interval 0.1;robust-count 4;immediate-leave;proxy;interface ge-0/0/1.1 {host-only-interface;group-limit 50;}interface ge-0/0/3.1 {static {group 225.100.100.100;}}interface ge-0/0/2.1 {multicast-router-interface;}}}}

Verification

To verify the configuration, run the following commands:

Related Topics