The igmp-snooping router-learning command enables router port learning on an interface.
The undo igmp-snooping router-learning command disables router port learning on an interface.
By default, router port learning is enabled on an interface.
igmp-snooping router-learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
undo igmp-snooping router-learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
Parameter |
Description |
Value |
---|---|---|
vlan vlan-id1 [ to vlan-id2 ] |
Enables an interface to function as a router port in the specified VLANs. |
vlan-id1 and vlan-id2 are integers that range from 1 to 4094. |
all | Enables an interface to function as a router port in all the VLANs. |
- |
MultiGE interface view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view
Usage Scenario
A router port is located on a Layer 2 device and connects to an upstream Layer 3 device (a multicast router or Layer 3 switch). A switch running IGMP snooping considers an interface as a dynamic router port when the interface receives an IGMP General Query message with any source IP address except 0.0.0.0 or a PIM Hello message. If the switch does not need to receive Query messages or PIM Hello messages from a VLAN, disable router port learning in the VLAN. A router port provides the following functions:
By default, router port learning is enabled on an interface. To prevent an interface from becoming a router port, disable router port learning on the interface.
Prerequisites
IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.
Follow-up Procedure
After router port learning is disabled on an interface, the interface no longer listens on IGMP Query or PIM Hello messages. Run the igmp-snooping static-router-port command to configure a static router port.
Precautions
This command takes effect only when the interface has been added to the specified VLANs and IGMP snooping has been enabled in these VLANs using the igmp-snooping enable (VLAN view) command.
You can also disable router port learning by running the undo igmp-snooping router-learning (VLAN view) command. The undo igmp-snooping router-learning (VLAN view) command is the same as the undo igmp-snooping router-learning (interface view) command only except for the scopes they take effect. The command used in the VLAN view disables router port learning on all interfaces in a VLAN, whereas the command used in the interface view disables router port learning on a specific interface in a VLAN.
# Disable router port learning on GE0/0/1 in VLAN 10.
<HUAWEI> system-view [HUAWEI] igmp-snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] igmp-snooping enable [HUAWEI-vlan10] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo igmp-snooping router-learning vlan 10