Network Requirements
- Device1 configures multicast routing protocol; Device2 configures L2 static multicast in VLAN2; PC1 is the receiver of multicast service; PC2 and PC3 are not the receiver of multicast service.
- Multicast Server sends multicast service packets; PC1 can receive multicast service packets correctly; PC2 and PC3 cannot receive multicast service packets.
Network Topology
Figure 1-1 Network topology of configuring L2 static multicast
Configuration Steps
Step 1: Device1 configures interface IP address and enables multicast routing protocol. (omitted)
Step 2: Configure Device2.
#Create VLAN2 on Device2.
Device2#configure terminal
Device2(config)#vlan 2
Device2(config-vlan2)#exit
|
#Configure the link type of port gigabitethernet0/2 - gigabitethernet0/4 on Device2 as Access, permitting the services of VLAN2 to pass.
Device2(config)#interface gigabitethernet 0/2-0/4
Device2(config-if-range)#switchport access vlan 2
Device2(config-if-range)#exit
|
#Configure the link type of port gigabitethernet0/1 on Device2 as Trunk, permitting the services of VLAN2 to pass. Configure PVID as 1.
Device2(config)#interface gigabitethernet 0/1
Device2(config-if-gigabitethernet0/1)#switchport mode trunk
Device2(config-if-gigabitethernet0/1)#switchport trunk allowed vlan add 2
Device2(config-if-gigabitethernet0/1)#switchport trunk pvid vlan 1
Device2(config-if-gigabitethernet0/1)#exit
|
# Enable dropping unknown multicast in VLAN2.
Device2(config)#vlan 2
Device2(config-vlan2)#l2-multicast drop-unknown
Device2(config-vlan2)#exit
|
#Configure the members of L2 static multicast group.
Device2(config)#l2-multicast mac-entry static 0100.5E01.0101 vlan 2
Device2(config-mcast)#interface gigabitethernet 0/2 member
Device2(config-mcast)#exit
Device2(config)#l2-multicast mac-entry static 0100.5E01.0101 vlan 2
Device2(config-mcast)#interface gigabitethernet 0/3 forbidden
Device2(config-mcast)#exit
|
Step 3: Check the result.
#View the L2 static multicast entry of Device2.
Device2#show l2-multicast mac-entry static
Current L2 Static Multicast 2 entries
---- ---- ---------------- ---------------
NO. VID Group MAC address Interface Name
1 2 0100.5E01.0101 [M] gi0/2
2 2 0100.5E01.0101 [F] gi0/3
#Multicast Server sends the multicast service packets with destination address 224.1.1.1. PC1 can receive the multicast service packets correctly; PC2 and PC3 cannot receive multicast service packets.