Skip to content
Ask AI

ARP Configuration

[Command]

show arp

[Purpose]

Show IP ARP table

[View]

System view

[Use Cases]

sonic# show arp
Address MacAddress Iface vlan Type
------------- ----------------- ------- ---- --------
192.168.0.1 6c:b3:11:33:aa:6c mgmt - Dynamic
192.168.0.237 8c:ec:4b:67:ae:42 mgmt - Dynamic
192.168.14.35 00:0c:29:89:bc:9b mgmt - Dynamic
Total number of entries 3

[Command] show arp-aging

[Purpose] Show ARP aging configuration

[View] System View

[Use Cases]

Terminal window
sonic# show arp-aging
ARP aging timer: 345

[Command]

**show arp-proxy count ** [ second ]

[Purpose]

Show the number of ARP proxy replies

[Parameter]

ParameterDescription
secondSpecify the number of seconds to view, range: 1-3600

[View]

System view

[Use Cases]

sonic# show arp-proxy count

[Command]

show interface arp-proxy status

[Purpose]

Show interface ARP proxy status

[View]

System view

[Use Cases]

sonic# show interface arp-proxy status
+--------------+------------+
| Interfaces | Status |
+==============+============+
| Vlan100 | disable |
+--------------+------------+
| Vlan200 | disable |
+--------------+------------+
| Vlan400 | anycast_gw |
+--------------+------------+

[Command]

clear neighbor {all|static|dynamic}

clear neighbor interface { interface_type } interface_name

[Purpose]

Clear ARP, NDP table entries

[Parameter]

ParameterDescription
interface_typeInterface type, optional ethernet, vlan, link-aggregation
interface_nameoptional interface_num, vlan_id, lag_id

[View]

System view

[Use Cases]

sonic# clear neighbor all

[Command]

arp static A.B.C.D HH:HH:HH:HH:HH:HH { interface_type } interface_name

no arp static A.B.C.D { interface_type } interface_name

[Purpose]

Configure static ARP

[Parameter]

ParameterDescription
A.B.C.DIP address
HH:HH:HH:HH:HH:HHMAC address
interface_typeInterface type, optional ethernet, vlan, link-aggregation
interface_nameInterface name, optional interface_num, vlan_id, lag_id

[View]

System configuration view

[Use Cases]

sonic# configure terminal
sonic(config)# arp static 3.3.3.3 00:00:00:00:00:01 vlan 5
sonic(config)# arp static 4.4.4.4 00:00:00:00:00:02 ethernet 1
sonic(config)# arp static 5.5.5.5 00:00:00:00:00:03 link-aggregation 1

[Command]

arp timeout expire_time

[Purpose]

Configure ARP table entry aging time

[Parameter]

ParameterDescription
expire_timeTime value, range 60-7200, unit s

[View]

System configuration view

[Use Cases]

sonic# configure terminal
sonic(config)# arp timeout 500

[Command]

arp-proxy mode { mode_type }

no arp-proxy

[Purpose]

Enable the ARP proxy function of the interface

[Parameter]

ParameterDescription
mode_typedefault/evpn/anycast_gw,default mode by “default”.

[View]

Interface view

[Usage Scenario] In scenarios where Layer 2 broadcast isolation is enabled, allowing communication between devices in the same LAN requires a common approach. One common method is to enable ARP proxy on the interface acting as the gateway. This allows the gateway’s MAC address to be sent to devices initiating ARP requests, effectively converting local Layer 2 communication into Layer 3 routed communication.

In a VxLAN scenario, enabling the arp-proxy evpn mode allows the local VTEP to use the ARP information synchronized from the remote end via EVPN to perform proxy responses for local terminal ARP requests

[Notes]

On devices with ARP proxy enabled, you may need to use the arp-to-host convert enable command to convert learned ARP entries into host routes, ensuring proper routing.

[Use Cases]

sonic# configure terminal
sonic(config)# interface vlan 400
sonic(config-vlanif-400)# arp-proxy mode anycast_gw

[Command]

arp broadcast {copy|trap}

[Purpose]

Configure the handling actions for ARP broadcast messages on the device.

[Parameter]

ParameterDescription
copyCopy ARP broadcast messages, one for CPU processing and another broadcast to other interfaces
trapOnly send ARP messages to the CPU for processing

[View]

System configuration view

[Usage Scenario] This command is commonly used in conjunction with the “broadcast drop” command to change the processing method of ARP messages to only send to the CPU without forwarding, completely isolating Layer 2 broadcast messages between terminals.

[Use Cases]

sonic# configure terminal
sonic(config)# arp broadcast trap