IP Multicast
此内容尚不支持你的语言。
mcast-snooping enable
Section titled “mcast-snooping enable”[Command] mcast-snooping enable
[Purpose] Enable multicast function
[View] System view
[Usage Scenario] The multicast container is initially disabled by default. If the device needs to forward and learn multicast data, this command must be issued in advance.
[Use Cases]
sonic(config)# mcast-snooping enableshow l2-multicast-table
Section titled “show l2-multicast-table”[Command] show l2-multicast-table
[Purpose] View information about a multicast group
[View] System view
[Use Cases]
sonic# show l2-multicast-tableTotal L2_multicast_forwarding_group counters: 2(Source,Group) Interface Vlan-------------------- ----------- --------(0.0.0.0, 224.1.1.1) Ethernet31 20 Ethernet30 20show vlan igmp-snooping
Section titled “show vlan igmp-snooping”[Command] show vlan igmp-snooping [ vlan-id ]
[Purpose] Display IGMP snooping information
[View] System view
[Use Cases]
sonic# show vlan igmp-snooping+-----------+------------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+| VLAN ID | IGMP SNP | Proxy | version | Fast-leave | Querier | Querier-ip | robustness | Query-interval(s) | Last-member-query-interval(ms) | Query-max-response-time(s) |+===========+============+==========+===========+==============+===========+==============+==============+=====================+==================================+==============================+| Vlan1000 | enabled | disabled | 2 | disabled | disabled | 0.0.0.0 | 2 | 125 | 1000 | 10 |+-----------+------------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+show vlan igmp-snooping mrouter
Section titled “show vlan igmp-snooping mrouter”[Command] show vlan igmp-snooping mrouter
[Purpose] Display the router port information of IGMP snooping
[View] System view
[Use Cases]
sonic# show vlan igmp-snooping mrouter+-----------+-----------+--------+---------+| VLAN ID | Mrouter | Type | Aging |+===========+===========+========+=========+| 10 | Ethernet1 | static | 180 |+-----------+-----------+--------+---------+mcast-snooping enable
Section titled “mcast-snooping enable”[Command] mcast-snooping enable no mcast-snooping enable
[Purpose] Enable multicast function
[View] System view
[Usage Scenario] The multicast container is initially disabled by default. If the device needs to forward and learn multicast data, this command must be issued in advance.
[Use Cases]
sonic(config)# mcast-snooping enableigmp-snooping enable
Section titled “igmp-snooping enable”[Command] igmp-snooping enable no igmp-snooping enable
[Purpose] Enable IGMP snooping for VLAN
[View] VLAN view
[Usage Scenario] IGMP Snooping functionality is typically used in Layer 2 switching networks. It maintains a multicast forwarding table by listening to multicast protocol messages sent by routers and user terminals. This ensures that multicast packets are correctly propagated among specific interfaces within a VLAN. It helps optimize the transmission of multicast data by ensuring that only the necessary interfaces receive this data, rather than broadcasting it to all interfaces, thereby reducing network bandwidth wastage.
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# igmp-snooping enableigmp-snooping version
Section titled “igmp-snooping version”[Command] igmp-snooping version 1-3
[Purpose] Configure the IGMP version
[View] VLAN view
[Use Cases]
sonic(config-vlan-10)# igmp-snooping version 2mcast-snooping group-limit ethernet
Section titled “mcast-snooping group-limit ethernet”[Command] mcast-snooping group-limit ethernet interface_name limit no mcast-snooping group-limit ethernet interface_name limit
[Purpose] Specify the maximum number of multicast table entries that the interface can learn
[Parameter]
| Parameter | Description |
|---|---|
| interface_name | Interface name |
| limit | Value range: 1-4094 |
[View]
VLAN view
[Comment] When the maximum learning table entries on the interface are modified, entries exceeding the limit will be learned into the IGMP process memory space but will not be forwarded to the chip. Additionally, these entries will not be relearned during the aging period
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# mcast-snooping group-limit ethernet 1 20igmp-snooping-proxy enable
Section titled “igmp-snooping-proxy enable”[Command] igmp-snooping-proxy enable no igmp-snooping-proxy enable
[Purpose] Enable IGMP snooping for VLAN
[View] Vlan view
[Usage Scenario] Enabling IGMP Snooping Proxy functionality allows the switch to take on the role of the router in sending IGMP Query messages and receiving IGMP Report/Leave messages from users. This helps alleviate the load on the router, especially in scenarios where there are a large number of terminals in the network.
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# igmp-snooping-proxy enableigmp-snooping querier enable
Section titled “igmp-snooping querier enable”[Command] igmp-snooping querier enable no igmp-snooping querier enable
[Purpose] Enable IGMP query function
[View] VLAN view
[Usage Scenario] On the device, configuring the querier involves enabling the device to send IGMP Query messages in place of the upstream device. The device will periodically broadcast IGMP Query messages to all interfaces within the VLAN, including router ports
[Comment] If an IGMP querier already exists in the multicast network, enabling the IGMP querier on another device may trigger a re-election process for the IGMP querier role.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping querier enableigmp-snooping querier-ip
Section titled “igmp-snooping querier-ip”[Command] igmp-snooping querier-ip A.B.C.D no igmp-snooping querier-ip A.B.C.D
[Purpose] Configuring the source IP address of IGMP query messages.
[View] VLAN view
[Usage Scenario] When there are multiple queriers in the network, you can control the selection of the querier by modifying the IP address of the device’s query messages.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping querier enablesonic(config-vlan-10)# igmp-snooping querier-ip 10.110.1.1igmp-snooping fast-leave enable
Section titled “igmp-snooping fast-leave enable”[Command] igmp-snooping fast-leave enable no igmp-snooping fast-leave enable
[Purpose] Enable member interfaces to quickly leave a multicast group
[View] VLAN view
[Usage Scenario] When an IGMP Leave packet is received from a host leaving a multicast group, the corresponding member host list table entry is deleted directly.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping fast-leave enableigmp-snooping robustness
Section titled “igmp-snooping robustness”[Command] igmp-snooping robustness count
[Purpose] Configure robustness
[Parameter]
| Parameter | Description |
|---|---|
| count | Default 2, range:1~255 |
[View] VLAN view
[Usage Scenario] This command adjusts robustness in two ways:
- Adjusts the number of specific group query messages sent by the querier to avoid potential network packet loss. When an IGMP Leave message is received from a user for a specific multicast group, the command sends a specific group query message for a configured number of times, inquiring whether there are still members in that multicast group.
- Adjusts the member aging time. After receiving a report message from a downstream host, the member aging time is set to: specific group query message count × general query message interval + maximum response time for downstream hosts to reply to the querier.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping robustness 100igmp-snooping query-interval
Section titled “igmp-snooping query-interval”[Command] igmp-snooping query-interval interval
[Purpose] Configure the interval at which the device sends general query messages
[Parameter]
| Parameter | Description |
|---|---|
| interval | Unit: s, the default value is: 125s, range:1~18000 |
[View] VLAN view
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping query-interval 200igmp-snooping query-max-response-time
Section titled “igmp-snooping query-max-response-time”[Command] igmp-snooping query-max-response-time time
[Purpose] Configure the maximum response time for query messages
[Parameter]
| Parameter | Description |
|---|---|
| time | Unit: s, the default value is: 10s, range:1~25 |
[View] VLAN view
[Comment] It should be ensured that the interval at which the querier sends general query messages is greater than the maximum response time for downstream hosts to reply to the querier. Otherwise, there is a possibility of the device mistakenly deleting entries in the member table.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping query-max-response-time 20igmp-snooping last-member-query-interval
Section titled “igmp-snooping last-member-query-interval”[Command] igmp-snooping last-member-query-interval last_query_interval
[Purpose] Configure the interval at which the querier sends specific group query messages.
[Parameter]
| Parameter | Description |
|---|---|
| last_query_interval | Unit: ms, the default value is: 1000ms,range:100-22500 |
[View] VLAN view
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping last-member-query-interval 2000interface l2mc-static-group
Section titled “interface l2mc-static-group”[Command] interface l2mc-static-group ethernet interface_name vlan_id A.B.C.D no interface l2mc-static-group ethernet interface_name vlan_id A.B.C.D
[Purpose] Static addition of interfaces to multicast groups
[Parameter]
| Parameter | Description |
|---|---|
| interface_name | Interface name |
| vlan_id | VLAN ID of the interface |
| A.B.C.D | Interface statically added multicast group address |
[View] System configuration view
[Comment] After configuring the interface to statically add a multicast group, users under the interface can receive multicast data from the group in a long-term and stable manner, and need to enable the IGMP Snooping function.
[Use Cases]
sonic(config)# interface l2mc-static-group ethernet 2 20 224.1.1.1[Command] igmp-snooping mroute ethernet interface_name no igmp-snooping mroute ethernet interface_name
[Purpose] Configure the interface as a static router port for VLAN
[Parameter]
| Parameter | Description |
|---|---|
| interface_name | Interface name |
[View] VLAN view
[Use Cases]
sonic(config-vlan-10)# igmp-snooping mrouter ethernet 1MLD Snooping Configuration
Section titled “MLD Snooping Configuration”show vlan mld-snooping
Section titled “show vlan mld-snooping”[Command] show vlan mld-snooping [ vlan-id ]
[Purpose] Display MLD snooping information
[View] System view
[Use Cases]
sonic(config)# do show vlan mld-snooping+-----------+-----------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+| VLAN ID | MLD SNP | Proxy | version | Fast-leave | Querier | Querier-ip | robustness | Query-interval(s) | Last-member-query-interval(ms) | Query-max-response-time(s) |+===========+===========+==========+===========+==============+===========+==============+==============+=====================+==================================+==============================+| 10 | enabled | disabled | 1 | disabled | disabled | 0.0.0.0 | 2 | 125 | 1000 | 10 |+-----------+-----------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+show vlan mld-snooping mrouter
Section titled “show vlan mld-snooping mrouter”[Command] show vlan mld-snooping mrouter
[Purpose] Display the router port information of MLD snooping
[View] System view
[Use Cases]
sonic# show vlan mld-snooping mrouter+-----------+-----------+--------+---------+| VLAN ID | Mrouter | Type | Aging |+===========+===========+========+=========+| 10 | Ethernet1 | static | 180 |+-----------+-----------+--------+---------+mld-snooping enable
Section titled “mld-snooping enable”[Command] mld-snooping enable no mld-snooping enable
[Purpose] Enable MLD snooping for VLAN
[View] VLAN view
[Usage Scenario] MLD Snooping operates on a Layer 2 switching network between routers and user terminals. It maintains multicast forwarding tables by listening to IPv6 multicast protocol messages from routers and user terminals, allowing multicast packets to be broadcast between specified interfaces within the VLAN
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# mld-snooping enablemld-snooping version
Section titled “mld-snooping version”[Command] mld-snooping version 1-2
[Purpose] Configure the MLD version
[View] VLAN view
[Use Cases]
sonic(config-vlan-10)# mld-snooping version 1mld-snooping proxy enable
Section titled “mld-snooping proxy enable”[Command] mld-snooping proxy enable
[Purpose] Enable MLD snooping proxy for VLAN
[View] VLAN view
[Usage Scenario] Enabling MLD Snooping Proxy functionality allows the switch to substitute for routers in sending MLD Query messages and receiving MLD Report/Leave messages from users. This alleviates the burden on router devices when there are numerous terminals in the network
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# mld-snooping proxy enablemld-snooping querier enable
Section titled “mld-snooping querier enable”[Command] mld-snooping querier enable
[Purpose] Enable MLD querier functionality
[View] VLAN view
[Usage Scenario] Configuring a querier on the device allows it to replace upstream devices in sending MLD Query messages. The device will periodically broadcast MLD Query messages to all interfaces within the VLAN, including router ports
[Comment] If an MLD querier already exists in the multicast network, it may trigger a re-election of the MLD querier
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# mld-snooping proxy enablemld-snooping querier-ip
Section titled “mld-snooping querier-ip”[Command] mld-snooping querier-ip X:X::X:X no mld-snooping querier-ip X:X::X:X
[Purpose] Configuring the source IP address of MLD Query messages
[View] VLAN view
[Usage Scenario] When there are multiple queriers in the network, you can control the selection of the querier by modifying the IP address of the device’s query messages.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping querier enablesonic(config-vlan-10)# mld-snooping querier-ip 1000::1mld-snooping fast-leave enable
Section titled “mld-snooping fast-leave enable”[Command] mld-snooping fast-leave enable no mld-snooping fast-leave enable
[Purpose] Enable fast leave of multicast groups on member interfaces
[View] VLAN view
[Usage Scenario] Upon receiving an MLD Leave message from a host indicating departure from a multicast group, the corresponding multicast forwarding table entry for that host is removed immediately without waiting for aging time
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping fast-leave enablemld-snooping robustness
Section titled “mld-snooping robustness”[Command] mld-snooping robustness count
[Purpose] Configure robustness
[Parameter]
| Parameter | Description |
|---|---|
| count | Default 2, range:1~255 |
[View] VLAN view
[Usage Scenario] This command adjusts robustness in two ways:
- Adjusts the number of specific group query messages sent by the querier to avoid potential network packet loss. When an MLD Leave message is received from a user for a specific multicast group, the command sends a specific group query message for a configured number of times, inquiring whether there are still members in that multicast group.
- Adjusts the member aging time. After receiving a report message from a downstream host, the member aging time is set to: specific group query message count × general query message interval for downstream hosts to reply to the querier.
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping robustness 100mld-snooping query-interval
Section titled “mld-snooping query-interval”[Command] mld-snooping query-interval interval
[Purpose] Configure the interval at which the device sends general query messages
[Parameter]
| Parameter | Description |
|---|---|
| interval | Unit: s, the default value is: 125s,range:1-18000 |
[View] VLAN view
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping query-interval 200mld-snooping query-max-response-time
Section titled “mld-snooping query-max-response-time”[Command] mld-snooping query-max-response-time time
[Purpose] Configure the maximum response time for query messages
[Parameter]
| Parameter | Description |
|---|---|
| time | Unit: s, the default value is: 10s, range:1~25 |
[View] VLAN view
[Comment] It should be ensured that the interval at which the querier sends general query messages is greater than the maximum response time for downstream hosts to reply to the querier. Otherwise, there is a possibility of the device mistakenly deleting entries in the member table
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping query-max-response-time 20mld-snooping last-member-query-interval
Section titled “mld-snooping last-member-query-interval”[Command] mld-snooping last-member-query-interval last_query_interval
[Purpose] Configure the interval at which the querier sends specific group query messages.
[Parameter]
| Parameter | Description |
|---|---|
| last_query_interval | Unit: ms, the default value is: 1000ms,range:100-25500 |
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping last-member-query-interval 2000l2mc-static-group
Section titled “l2mc-static-group”[Command] l2mc-static-group etherne interface_name vlan_id X:X::X:X no l2mc-static-group ethernet interface_name vlan_id X:X::X:X
[Purpose] Static addition of interfaces to multicast groups
[Parameter]
| Parameter | Description |
|---|---|
| interface_name | Interface name |
| vlan_id | VLAN ID of the interface |
| X:X::X:X | Interface statically added multicast group address |
[View] System configuration view
[Comment] After configuring the interface to statically add a multicast group, users under the interface can receive multicast data from the group in a long-term and stable manner, and need to enable the MLD Snooping function.
[Use Cases]
sonic(config)# interface l2mc-static-group ethernet 11 10 ff1e:0:0:0:0:0:0:1mld-snooping mrouter ethernet
Section titled “mld-snooping mrouter ethernet”[Command] mld-snooping mrouter ethernet interface_name no mld-snooping mrouter ethernet interface_name
[Purpose] Configure the interface as a static router port for VLAN
[View] VLAN view
[Use Cases]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping mrouter ethernet 1Multicast VLAN Configuration
Section titled “Multicast VLAN Configuration”show vlan igmp-snooping mvlan
Section titled “show vlan igmp-snooping mvlan”[Command] show vlan igmp-snooping mvlan vlan_id
[Purpose] Show the binding relationship between VLAN and multicast VLAN
[View] System view
[Use Cases]
sonic# show vlan igmp-snooping mvlan+------------+-------------+| MVLAN ID | UVLAN IDS |+============+=============+| 2 | 3 |+------------+-------------+igmp-snooping mvlan
Section titled “igmp-snooping mvlan”[Command] igmp-snooping mvlan mvlan_id uvlan_id no igmp-snooping mvlan mvlan_id uvlan_ids
[Purpose] Configure the VLAN as a multicast VLAN
[Parameter]
| Parameter | Description |
|---|---|
| mvlan_id | Multicast VLAN |
| uvlan_ids | User VLAN, support multiple configurations at intervals, or connection range configuration |
[View] System configuration view
[Usage Scenario] When users from different VLANs need to receive multicast data from the same multicast source, the device needs to replicate the data for each VLAN. In this scenario, you can configure multicast VLANs, where the VLAN where users are located is configured as the user VLAN and the VLAN where the router interface is located is configured as the multicast VLAN. Data is replicated from the multicast VLAN to the user VLAN.
[Comment] IGMP Snooping needs to be enabled in both the multicast VLAN and the user VLAN for this configuration to work.
[Use Cases]
sonic(config)# igmp-snooping mvlan 20 200,201