Example for Configuring a Static Multicast MAC Address
This section provides an example for configuring a static multicast MAC address.
Networking Requirements
As shown in Figure 8-118, the Router connects to a user network through the Switch Module. There are three receivers on the network: HostA, HostB, and HostC. As service requires, HostA and HostC receive packets with destination address 0x0100-5A0A-0A0A but HostB cannot.
Configuration Roadmap
To meet the preceding requirement, configure static multicast MAC addresses on the Layer 2 Switch Module. The configuration roadmap is as follows:
- Create a VLAN on the Switch Module and add interfaces to the VLAN.
- Configure the static multicast MAC address: 0x0100-5A0A-0A0A on 10GE1/17/1 and 10GE1/17/2.
Procedure
- Create a VLAN and add the interface to the VLAN.
<HUAWEI> system-view [~HUAWEI] sysname Switch Module [*HUAWEI] commit [~Switch Module] vlan 10 [*Switch Module-vlan10] quit [*Switch Module] interface 10GE 1/17/1 [*Switch Module-10GE1/17/1] port default vlan 10 [*Switch Module-10GE1/17/1] quit [*Switch Module] interface 10GE 1/17/2 [*Switch Module-10GE1/17/2] port default vlan 10 [*Switch Module-10GE1/17/2] quit [*Switch Module] interface 10GE 1/17/3 [*Switch Module-10GE1/17/3] port default vlan 10 [*Switch Module-10GE1/17/3] quit [*Switch Module] interface 10GE 1/17/4 [*Switch Module-10GE1/17/4] port link-type trunk [*Switch Module-10GE1/17/4] port trunk allow-pass vlan 10 [*Switch Module-10GE1/17/4] quit [*Switch Module] commit
- Configure a static multicast MAC address.
[~Switch Module] interface 10GE 1/17/1 [~Switch Module-10GE1/17/1] mac-address multicast 0100-5a0a-0a0a vlan 10 [*Switch Module-10GE1/17/1] quit [*Switch Module] interface 10GE 1/17/2 [*Switch Module-10GE1/17/2] mac-address multicast 0100-5a0a-0a0a vlan 10 [*Switch Module-10GE1/17/2] quit [*Switch Module] commit
- Verify the configuration.
# Display configured MAC address entries.
[~Switch Module] display mac-address multicast -------------------------------------------------------------------- MAC Address VLANID Out-Interface -------------------------------------------------------------------- 0100-5a0a-0a0a 10 10GE1/17/1 10GE1/17/2 2 port(s) -------------------------------------------------------------------- Total Group(s) : 1
The command output shows that static multicast MAC address entries are configured on 10GE1/17/1 and 10GE1/17/2.
Configuration Files
Configuration file of the Switch Module
# sysname Switch Module # vlan batch 10 # interface 10GE1/17/1 port default vlan 10 mac-address multicast 0100-5a0a-0a0a vlan 10 # interface 10GE1/17/2 port default vlan 10 mac-address multicast 0100-5a0a-0a0a vlan 10 # interface 10GE1/17/3 port default vlan 10 # interface 10GE1/17/4 port link-type trunk port trunk allow-pass vlan 10 # return