ARP Configuration
show arp
Section titled “show arp”[Command]
show arp
[Purpose]
Show IP ARP table
[View]
System view
[Use Cases]
sonic# show arpAddress MacAddress Iface vlan Type------------- ----------------- ------- ---- --------192.168.0.1 6c:b3:11:33:aa:6c mgmt - Dynamic192.168.0.237 8c:ec:4b:67:ae:42 mgmt - Dynamic192.168.14.35 00:0c:29:89:bc:9b mgmt - DynamicTotal number of entries 3show arp-aging
Section titled “show arp-aging”[Command] show arp-aging
[Purpose] Show ARP aging configuration
[View] System View
[Use Cases]
sonic# show arp-agingARP aging timer: 345show arp-proxy count
Section titled “show arp-proxy count”[Command]
**show arp-proxy count ** [ second ]
[Purpose]
Show the number of ARP proxy replies
[Parameter]
| Parameter | Description |
|---|---|
| second | Specify the number of seconds to view, range: 1-3600 |
[View]
System view
[Use Cases]
sonic# show arp-proxy countshow interface arp-proxy status
Section titled “show interface arp-proxy status”[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 |+--------------+------------+clear neighbor
Section titled “clear neighbor”[Command]
clear neighbor {all|static|dynamic}
clear neighbor interface { interface_type } interface_name
[Purpose]
Clear ARP, NDP table entries
[Parameter]
| Parameter | Description |
|---|---|
| interface_type | Interface type, optional ethernet, vlan, link-aggregation |
| interface_name | optional interface_num, vlan_id, lag_id |
[View]
System view
[Use Cases]
sonic# clear neighbor allarp static
Section titled “arp static”[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]
| Parameter | Description |
|---|---|
| A.B.C.D | IP address |
| HH:HH:HH:HH:HH:HH | MAC address |
| interface_type | Interface type, optional ethernet, vlan, link-aggregation |
| interface_name | Interface name, optional interface_num, vlan_id, lag_id |
[View]
System configuration view
[Use Cases]
sonic# configure terminalsonic(config)# arp static 3.3.3.3 00:00:00:00:00:01 vlan 5sonic(config)# arp static 4.4.4.4 00:00:00:00:00:02 ethernet 1sonic(config)# arp static 5.5.5.5 00:00:00:00:00:03 link-aggregation 1arp timeout
Section titled “arp timeout”[Command]
arp timeout expire_time
[Purpose]
Configure ARP table entry aging time
[Parameter]
| Parameter | Description |
|---|---|
| expire_time | Time value, range 60-7200, unit s |
[View]
System configuration view
[Use Cases]
sonic# configure terminalsonic(config)# arp timeout 500arp-proxy
Section titled “arp-proxy”[Command]
arp-proxy mode { mode_type }
no arp-proxy
[Purpose]
Enable the ARP proxy function of the interface
[Parameter]
| Parameter | Description |
|---|---|
| mode_type | default/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 terminalsonic(config)# interface vlan 400sonic(config-vlanif-400)# arp-proxy mode anycast_gwarp broadcast {copy|trap}
Section titled “arp broadcast {copy|trap}”[Command]
arp broadcast {copy|trap}
[Purpose]
Configure the handling actions for ARP broadcast messages on the device.
[Parameter]
| Parameter | Description |
|---|---|
| copy | Copy ARP broadcast messages, one for CPU processing and another broadcast to other interfaces |
| trap | Only 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 terminalsonic(config)# arp broadcast trap