Technical Tip: How to add static ARP entry in IPv4 and Neighbor Cache in IPv6
Description
This article describes to add static/persistent IP/MAC address bindings on the FortiGate for both IPv4 and IPv6.
Scope
FortiGate.
Solution
For both IPv4 and IPv6, persistent and static IP/MAC associations must be configured from the CLI:
For IPv4:
config system arp-table
edit <id>
set interface <interface_name>
set ip <ip_address>
set mac <mac_address>
next
end
Example:
FortiGate # show system arp-table
config system arp-table
edit 1
set interface internal
set ip 192.168.1.50
set mac 00:00:5E:00:53:00
next
end
For IPv6:
To configure IPv6/MAC bindings that will persist between reboots of the FortiGate:
config system ipv6-neighbor-cache
edit <id>
set interface <interface_name>
set ipv6 <ip_address>
set mac <mac_address>
next
end
Example:
FortiGate # show system ipv6-neighbor-cache
config system ipv6-neighbor-cache
edit 1
set interface internal
set ipv6 2001:db8:1::50
set mac 00:00:5E:00:53:00
set ipv6 2001:db8:1::50
set mac 00:00:5E:00:53:00
next
end
The FortiGate also supports adding/removing non-persistent manual entries for ARP (IPv4) and the neighbor-cache (IPv6) using the following commands (these will be lost if the FortiGate reboots):
IPv4:
diagnose ip arp list
diagnose ip arp add <interface_name> <ip_address> <mac_address>
diagnose ip arp delete <interface_name> <ip_address> <mac_address>
IPv6:
diagnose ipv6 neighbor-cache list
diagnose ipv6 neighbor-cache flush
diagnose ipv6 neighbor-cache add <interface_name> <ipv6_address> <mac_address>
diagnose ipv6 neighbor-cache delete <interface_name> <ipv6_address> <mac_address>
Verification of Configuration and Troubleshooting:
To verify the existing ARP entries in IPv4:
FortiGate # get system arp
Address Age(min) Hardware Addr Interface
192.168.1.50 - 00:00:5E:00:53:00 internal
192.168.1.50 - 00:00:5E:00:53:00 internal
To verify the existing Neighbor Cache entries in IPv6:
FortiGate # diagnose ipv6 neighbor-cache list
ifindex=3 ifname=internal 2001:db8:1::50 00:00:5E:00:53:00 state=00000080 use=942 confirm=942 update=942 ref=0
Related Documents:
