ARP 表
2026/3/27大约 4 分钟
ARP 表
功能介绍
ARP 表用于确定目标节点对应的 MAC 地址,以及该节点可达的 VLAN 和接口端口。
在 FortiGate 上,ARP 相关信息获取的方式主要通过如下命令:
get system arp:查看当前 ARP 表(偏运维视图)。diagnose ip arp list:查看系统 ARP 缓存(包含状态、引用等细节)。diagnose sys device list <vdom_name>:查看 ARP/ARP6 的表规模与使用摘要。
查看 ARP 信息
查看 ARP 表
# get system arp
Address Age(min) Hardware Addr Interface
10.10.1.3 1 50:b7:c3:75:ea:dd internal7
192.168.0.190 0 28:f1:0e:03:2a:97 wan1
192.168.0.97 0 f4:f2:6d:37:b0:99 wan1查看 ARP 缓存明细
# diagnose ip arp list
index=7 ifname=dmz 169.254.0.1 94:f3:92:53:ae:7c state=00000080 use=198045467 confirm=148592500 update=148592500 ref=0
index=28 ifname=to_Home_WAN11 0.0.0.0 state=00000040 use=2078 confirm=2078 update=107680361 ref=1
index=12 ifname=internal5 10.10.12.2 00:01:02:03:04:05 state=00000002 use=0 confirm=0 update=1366 ref=84
index=12 ifname=internal5 10.10.12.254 08:5b:0e:b2:5e:69 state=00000004 use=4787 confirm=4787 update=150 ref=5
index=6 ifname=wan2 172.22.6.1 00:09:0f:09:01:18 state=00000002 use=34 confirm=1190 update=2268 ref=5
index=5 ifname=wan1 172.22.6.255 state=00000000 use=79961 confirm=85961 update=79961 ref=2
index=5 ifname=wan1 172.22.6.1 00:09:0f:09:01:18 state=00000002 use=24 confirm=234 update=2268 ref=108state:ARP 条目状态。ref:表示当前被其他对象引用次数。常见 ARP 状态位:
提示
ARP 状态迁移受 ARP 请求/应答、邻居查找、路由与会话行为等多因素影响。单次抓到的状态需要结合
ref与时间维度一起判断。状态值 含义 说明 0x02REACHABLE 已收到 ARP 响应 0x04STALE 预期时间内未收到 ARP 响应 0x08DELAY 从 STALE 过渡到 REACHABLE 前的中间状态 0x20FAILED 在最大探测次数内仍未解析成功 0x40NOARP 设备不支持 ARP(如 IPsec 接口) 0x80PERMANENT 静态 ARP 项
查看某个 VDOM 下 ARP/ARP6 摘要
diagnose sys device list <vdom_name>
#diagnose sys device list root
list virtual firewall root info:
ip4 route_cache: table_size=65536 max_depth=3 used=164 total=171
arp: table_size=16 max_depth=2 used=9 total=10
proxy_arp: table_size=256 max_depth=0 used=0 total=0
arp6: table_size=64 max_depth=1 used=11 total=11
proxy_arp6: table_size=256 max_depth=0 used=0 total=0
local table version=00000000 main table version=0000d5ea rpdb version=0000002b
vf=root dev=root vrf=0
vf=root dev=naf.root vrf=0
vf=root dev=l2t.root vrf=0
vf=root dev=ssl.root vrf=0
vf=root dev=fortilink vrf=0
vf=root dev=emacvlan1 vrf=0
vf=root dev=internal vrf=0
vf=root dev=to_Home_WAN11 vrf=0
vf=root dev=dhcp vrf=0
vf=root dev=test111 vrf=0
vf=root dev=Loopback1 vrf=0
vf=root dev=a vrf=0
vf=root dev=b vrf=0
vf=root dev=dmz vrf=0
vf=root dev=internal2 vrf=0
vf=root dev=internal3 vrf=0
vf=root dev=internal4 vrf=0
vf=root dev=internal5 vrf=0
vf=root dev=modem vrf=0
vf=root dev=wan1 vrf=0
vf=root dev=wan2 vrf=0
vf=root dev=havdlink1 vrf=0
ses=0/0 ses6=0/0 rt=0/0 rt6=0/0ARP 缓存时间
当 FortiGate 访问新目的地址时:
- 目的地址直连:对目标 IP 发起 ARP 请求。
- 目的地址非直连:对出口接口网关 IP 发起 ARP 请求。
ARP 应答成功后会生成缓存项。缓存有效期由“实际可达时间(actual reachable time)”决定:
实际可达时间 = 基准可达时间(base reachable time)的 50%~150% 随机确定。
默认基准值为 30 秒(可以通过如下 CLI 进行修改,取值范围:
30000~3600000ms),因此默认实际范围是 15~45 秒。config system interface edit port1 set reachable-time <integer> next end实际可达时间每 5 分钟重新计算一次。
ARP 缓存回收与容量阈值
满足以下条件的 ARP 项会进入垃圾回收候选:
- 状态为
STALE (0x04)或FAILED (0x20)。 ref=0(无引用)。
ARP 表项回收机制:
- 垃圾回收每 30 秒运行一次。
- 已 stale/failed/无引用超过 60 秒的项会被清理。
- 当 ARP 项数量超过阈值时,也会触发回收。
- 若超出阈值,新的 ARP 项将无法加入 ARP 表。
配置 ARP 表阈值
arp-max-entry 范围:131072~2147483647,默认 131072。
config system global
set arp-max-entry <integer>
endNP 会话的 ARP/ICMP6 探测
默认情况下,FortiOS 不会对 NP 已加速会话持续发送 ARP 探测。长时间无流量时,可能出现:
- FortiGate 侧 ARP 条目老化。
- 交换机 MAC 表老化。
- 后续流量触发广播 ARP,引入额外泛洪。
可以开启邻居更新探测,npu-neighbor-update 默认关闭。
相关信息
config system global
set npu-neighbor-update enable
end手动维护 ARP 表
添加静态 ARP 表项
config system arp-table
edit 1
set interface "internal"
set ip 192.168.50.8
set mac bc:14:01:e9:77:02
next
end删除单条 ARP 表项
# diagnose ip arp delete <interface name> <IP address>清空 ARP 表
# execute clear system arp table排障建议
- 先用
get system arp看是否存在目标项。 - 再用
diagnose ip arp list看state与ref是否异常。 - 如怀疑容量问题,检查
arp-max-entry与diagnose sys device list root摘要。 - 如为 NP 卸载的长连接场景,评估是否启用
npu-neighbor-update。