This section provides an example for configuring across-Layer-3 MAC identification on the CLI.
The FW functions as the egress gateway on the enterprise network. Intranet users connect to the FW through a Layer-3 switch and access the Internet through the FW. You need to configure security policies, policy-based routes, and traffic policies on the FW for it to control intranet traffic matching the specified MAC address.

If the FW is connected to an intranet PC with a Layer-3 switch in between, the FW cannot directly obtain the MAC address of the intranet PC. In such cases, you need to configure across-Layer-3 MAC identification on the FW for it to use SNMP to learn the ARP table of the switch and thus obtain the MAC address of the intranet PC.
Configure basic SNMP functions on the switch.
Configure across-Layer-3 MAC identification on the FW.
<FW> display snmp-server arp-sync table
2018-01-04 18:58:08.370
Synchronization status of the IP-MAC address mapping table: Done
The start time of synchronizing IP-MAC mapping table: 2018/1/4 18:58:04
The end time of synchronizing IP-MAC mapping table: 2018/1/4 18:58:04
-----------------------------------------------------------------
IP Address MAC Address Expire(M) VPN Instance
-----------------------------------------------------------------
10.1.141.1 e468-****-6cbc 20
10.1.141.132 00e0-****-0010 20
10.1.141.152 000c-****-f4ca 20
10.1.141.153 000c-****-e75f 20
10.1.141.165 0050-****-2329 20
10.1.141.201 80fb-****-928e 20
10.1.141.202 80fb-****-928e 20
192.168.2.100 000c-****-d3f4 20
192.168.2.110 000c-****-f4de 20
192.168.4.100 xxxx-xxxx-xxxx 20
192.168.4.110 yyyy-yyyy-yyyy 20
-----------------------------------------------------------------
Total:11
A security policy is used as an example to set an intranet MAC address as a source address.
[FW] ip address-set MAC type object [FW-object-address-set-MAC] address 0 xxxx-xxxx-xxxx [FW-object-address-set-MAC] address 1 yyyy-yyyy-yyyy [FW-object-address-set-MAC] quit [FW] security-policy [FW-policy-security] rule name policy_sec2 [FW-policy-security-rule-policy_sec2] source-address address-set MAC [FW-policy-security-rule-policy_sec2] action permit [FW-policy-security-rule-policy_sec2] quit
# sysname FW # interface GigabitEthernet0/0/2 ip address 192.168.2.100 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/2 # snmp-server arp-sync enable snmp-server arp-sync interval 5 timeout 3 snmp-server target-host arp-sync address 192.168.2.110 community %$%$9]8wKc7.fV7EYJ=LCG[WP,#w%$%$ v2c # ip address-set MAC type object address 0 xxxx-xxxx-xxxx address 1 yyyy-yyyy-yyyy # security-policy rule name policy_sec source-zone local destination-zone trust destination-address 192.168.2.110 255.255.255.255 action permit rule name policy_sec2 source-address address-set MAC action permit # return