Example for Configuring Multi-Interface ARP (NLB Cluster Working in IGMP Multicast Mode)
Networking Requirements
As shown in Figure 2-24, the Switch connects to three NLB servers through three interfaces in VLAN 10: GE1/0/1, GE1/0/2, and GE1/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.
Configuration Roadmap
The configuration roadmap is as follows:
- Create a VLAN and add interfaces to the VLAN. Configure an IP address for the VLANIF interface.
- Configure the Switch to forward multicast data in the VLAN based on MAC addresses and enable IGMP snooping in the VLAN so that the Switch can dynamically learn the MAC address entry mapping multiple outbound interfaces.
- Configure a static ARP entry to enable the Switch to send the packet destined for the cluster IP address to all the three servers in the NLB cluster.
Procedure
- Create a VLAN and add interfaces to the VLAN.# Create a VLAN on the Switch and add interfaces to the VLAN.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] interface gigabitethernet 1/0/1 [Switch-GigabitEthernet1/0/1] port link-type access [Switch-GigabitEthernet1/0/1] quit [Switch] interface gigabitethernet 1/0/2 [Switch-GigabitEthernet1/0/2] port link-type access [Switch-GigabitEthernet1/0/2] quit [Switch] interface gigabitethernet 1/0/3 [Switch-GigabitEthernet1/0/3] port link-type access [Switch-GigabitEthernet1/0/3] quit [Switch] vlan 10 [Switch-vlan10] port gigabitethernet 1/0/1 to 1/0/3 [Switch-vlan10] quit
- # Create a VLANIF interface on the Switch and assign an IP address to the VLANIF interface.
[Switch] interface vlanif 10 [Switch-Vlanif10] ip address 10.128.246.251 24 [Switch-Vlanif10] quit
- Enable IGMP snooping globally on the Switch.
[Switch] igmp-snooping enable
- Configure the Switch to forward multicast data in the VLAN based on MAC addresses and enable IGMP snooping in the VLAN.
[Switch] vlan 10 [Switch-vlan10] l2-multicast forwarding-mode mac [Switch-vlan10] igmp-snooping enable [Switch-vlan10] quit
- Configure a static ARP entry on the Switch.
[Switch] arp static 10.128.246.252 0100-5e00-0002 [Switch] quit
- Verify the configuration.
# 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 GigabitEthernet1/0/1, GigabitEthernet1/0/2, and GigabitEthernet1/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 GigabitEthernet1/0/1 10 GigabitEthernet1/0/2 10 GigabitEthernet1/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
Configuration Files
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 GigabitEthernet1/0/1 port link-type access port default vlan 10 # interface GigabitEthernet1/0/2 port link-type access port default vlan 10 # interface GigabitEthernet1/0/3 port link-type access port default vlan 10 # arp static 10.128.246.252 0100-5e00-0002 # return