As shown in Figure 1, the Switch connects to three NLB servers through three interfaces in VLAN 10: GE0/0/1, GE0/0/2, and GE0/0/3. The NLB cluster works in IGMP multicast mode. Each server in the NLB cluster has an IP address and a MAC address. All servers in the cluster share the cluster IP address (10.128.246.252/24) and cluster MAC address (0100-5e00-0002). There are reachable routes between the Switch and Client.
The customer requires that the Switch send the packet destined for the cluster IP address to each server in the NLB cluster.
The configuration roadmap is as follows:
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type access [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type access [Switch-GigabitEthernet0/0/2] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] port link-type access [Switch-GigabitEthernet0/0/3] quit [Switch] vlan 10 [Switch-vlan10] port gigabitethernet 0/0/1 to 0/0/3 [Switch-vlan10] quit
[Switch] interface vlanif 10 [Switch-Vlanif10] ip address 10.128.246.251 24 [Switch-Vlanif10] quit
[Switch] igmp-snooping enable
[Switch] vlan 10 [Switch-vlan10] l2-multicast forwarding-mode mac [Switch-vlan10] igmp-snooping enable [Switch-vlan10] quit
[Switch] arp static 10.128.246.252 0100-5e00-0002 [Switch] quit
# Display the MAC address entry mapping multiple outbound interfaces learned through protocol packets on the Switch. According to the command output, the MAC address of the IGMP multicast cluster is 0100-5e00-0002, the outbound interfaces are GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3, and the VLAN ID of packets is 10.
<Switch> display l2-multicast forwarding-table vlan 10 VLAN ID : 10, Forwarding Mode : MAC Total Group(s) : 1 -------------------------------------------------------------------------------- Group(Mac) Interface Out-Vlan -------------------------------------------------------------------------------- 0100-5e00-0002 GigabitEthernet0/0/1 10 GigabitEthernet0/0/2 10 GigabitEthernet0/0/3 10 --------------------------------------------------------------------------------
# Display information about the static ARP entry.
<Switch> display arp static
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN(SIP/DIP)
------------------------------------------------------------------------------
10.128.246.252 0100-5e00-0002 S-- Multi-port:3
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:1 Interface:0
Switch configuration file
# sysname Switch # vlan batch 10 # igmp-snooping enable # vlan 10 l2-multicast forwarding-mode mac igmp-snooping enable # interface Vlanif10 ip address 10.128.246.251 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type access port default vlan 10 # interface GigabitEthernet0/0/2 port link-type access port default vlan 10 # interface GigabitEthernet0/0/3 port link-type access port default vlan 10 # arp static 10.128.246.252 0100-5e00-0002 # return