121Configuring VRRP for IPv4Configuring the association between virtual IP address andMAC addressAfter the virtual IP address of a VRRP group is associated with a MAC address, the master takesthe configured MAC address as the source MAC address of the packets to be sent, so that thehosts in the internal network can learn the association between the IP address and the MACaddress and forward the packets to be forwarded to the other network segments to the master.There are two types of association between virtual IP address and MAC address:• Virtual IP address is associated with virtual router MAC addressBy default, a MAC address is created for a VRRP group after the VRRP group is created, andthe virtual IP address is associated with the virtual MAC address. With such associationadopted, the hosts in the internal network do not need to update the association between IPaddress and MAC address when the master changes.• Virtual IP address is associated with real MAC address of the interfaceIf an IP address owner exists in a VRRP group and you associate the virtual IP address withthe virtual MAC address, two MAC addresses are associated with an IP address. In thiscase, you can associate the virtual IP address of the VRRP group with the real MAC address,so that the packets from a host are forwarded to the IP address owner according the realMAC address.To configure the association between MAC address and virtual IP address:To do… Use the command… Remarks1. Enter system view system-view —2. Configure the associationbetween virtual IP address andMAC addressvrrp method { real-mac |virtual-mac }OptionalThe virtual MAC address isassociated with the virtual IPaddress by default.• When VRRP works in load balancing mode, the association between the virtual IP address and the MACaddress cannot be configured. In this mode, the virtual IP address is always associated with the virtualMAC address.• You should configure this function before creating a VRRP group. Otherwise, you cannot modify themapping between the virtual IP address and the MAC address.Configuring VRRP working modeVRRP works in one of the following two modes: