In Figure 1, the Switch connects to three NLB servers respectively through GE0/0/1, GE0/0/2, and GE0/0/3 in VLAN 10.
The NLB cluster works in 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 (03bf-0a80-f6fc). 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] mac-address multiport 03bf-0a80-f6fc interface gigabitethernet 0/0/1 to gigabitethernet 0/0/3 vlan 10
[Switch] arp static 10.128.246.252 03bf-0a80-f6fc [Switch] quit
# Run the display mac-address multiport vlan 10 command on the Switch to check the configured MAC address entry mapping multiple outbound interfaces.
<Switch> display mac-address multiport vlan 10 -------------------------------------------------------------------------------- MAC Address VLANID Out-Interface Status -------------------------------------------------------------------------------- 03bf-0a80-f6fc 10 GigabitEthernet0/0/1 Active GigabitEthernet0/0/2 Active GigabitEthernet0/0/3 Active 3 port(s) -------------------------------------------------------------------------------- Total Group(s) : 1
# Run the display arp static command on the Switch to check static ARP entries.
<Switch> display arp static
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN(SIP/DIP)
------------------------------------------------------------------------------
10.128.246.252 03bf-0a80-f6fc S-- Multi-port:3
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:1 Interface:0
Switch configuration file
# sysname Switch # vlan batch 10 # interface Vlanif10 ip address 10.128.246.251 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type access port default vlan 10 mac-address multiport 03bf-0a80-f6fc vlan 10 # interface GigabitEthernet0/0/2 port link-type access port default vlan 10 mac-address multiport 03bf-0a80-f6fc vlan 10 # interface GigabitEthernet0/0/3 port link-type access port default vlan 10 mac-address multiport 03bf-0a80-f6fc vlan 10 # arp static 10.128.246.252 03bf-0a80-f6fc # return