This section provides a sample of configuring IGMP snooping-based Layer 2 multicast using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Item |
Data |
Description |
---|---|---|
VPN instance address family |
ipv4unicast |
- |
VLAN ID for which IGMP snooping is enabled |
10 |
- |
Version of IGMP messages that can be processed |
1 |
- |
Multicast data forwarding mode in a VLAN |
ip |
- |
Multicast VLAN ID |
10 |
- |
Whether to enable the multicast VLAN |
true |
- |
User VLAN ID |
15,20-30 |
- |
Configure IGMP snooping-based Layer 2 multicast.
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <edit-config> <target> <running/> </target> <config> <l2mc:l2mc xmlns:l2mc="http://www.huawei.com/netconf/vrp/huawei-l2mc"> <l2mc:l2McSnpgEnables> <l2mc:l2McSnpgEnable> <l2mc:addrFamily>ipv4unicast</l2mc:addrFamily> </l2mc:l2McSnpgEnable> </l2mc:l2McSnpgEnables> <l2mc:vlan> <l2mc:l2McVlanCfgs> <l2mc:l2McVlanCfg> <l2mc:addrFamily>ipv4unicast</l2mc:addrFamily> <l2mc:vlanId>10</l2mc:vlanId> <l2mc:version>1</l2mc:version> <l2mc:fwdMode>ip</l2mc:fwdMode> </l2mc:l2McVlanCfg> </l2mc:l2McVlanCfgs> <l2mc:l2McMVlanCfgs> <l2mc:l2McMVlanCfg> <l2mc:vlanId>10</l2mc:vlanId> <l2mc:mcastVlanEnable>true</l2mc:mcastVlanEnable> <l2mc:userVlans>15,20-30</l2mc:userVlans> </l2mc:l2McMVlanCfg> </l2mc:l2McMVlanCfgs> </l2mc:vlan> </l2mc:l2mc> </config> </edit-config> </rpc>
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> This VLAN 10 is not a multicast VLAN. </error-message> </rpc-error> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> This VLAN 10 is not a multicast VLAN. </error-message> <error-info>Error on node /huawei-l2mc:l2mc/vlan/l2McMVlanCfgs/l2McMVlanCfg[vlanId="10"]</error-info> </rpc-error> </rpc-reply>