Related Documentation
- EX Series
- Understanding DHCP Snooping for Port Security
- QFX Series standalone switches
- Understanding DHCP Snooping for Port Security
Configuring Persistent Bindings in the DHCP or DHCPv6 Snooping Database (CLI Procedure)
![]() | Note: This task uses Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that does not support ELS, see Making IP-MAC Bindings in the DHCP Snooping Database Persistent (CLI Procedure). For ELS details, see Getting Started with Enhanced Layer 2 Software. |
By default, IP-MAC address bindings in the DHCP snooping database do not persist through switch reboots. You can configure the IP-MAC address bindings in the DHCP snooping database to persist through switch reboots by configuring a storage location for the DHCP snooping database file. When you configure the storage location, you must specify how frequently the switch writes the database entries into the DHCP snooping database file. You can also configure the IPv6-MAC address bindings to persist through switch reboots on switches that support DHCPv6 snooping.
The DHCP snooping database of IP-MAC address bindings is created when you enable any of the port security features for a specific VLAN in the [edit vlans vlan-name forwarding-options dhcp-security] hierarchy. On switches that support DHCPv6, enabling any of these features also creates the DHCPv6 snooping database. DHCP snooping and DHCPv6 snooping are not enabled by default.
To configure a local storage location for the DHCP snooping database file:
- For DHCP snooping:
[edit system processes]
user@switch# set dhcp-service dhcp-snooping-file local-pathname write-interval secondsFor example:
[edit system processes]
user@switch# set dhcp-service dhcp-snooping-file /var/tmp/test.log write-interval 60 - For DHCPv6 snooping:
[edit system processes]
user@switch# set dhcp-service dhcpv6-snooping-file local-pathname write-interval secondsFor example:
[edit system processes]
user@switch# set dhcp-service dhcpv6-snooping-file /var/tmp/test.log write-interval 60
To configure a remote storage location for IP-MAC bindings, use tftp://ip-address or ftp://hostname/path as the remote URL or the local pathname for the storage location of the DHCP or DHCPv6 snooping database file:
- For DHCP snooping:
[edit system processes]
user@switch# set dhcp-service dhcp-snooping-file remote_url write-interval secondsFor example:
[edit system processes]
user@switch# set dhcp-service dhcp-snooping-file tftp://test:Test123@14.1.2.1 write-interval 60 - For DHCPv6 snooping:
[edit system processes]
user@switch# set dhcp-service dhcpv6-snooping-file remote_url write-interval secondsFor example:
[edit system processes]
user@switch# set dhcp-service dhcpv6-snooping-file tftp://test:Test123@14.1.2.1 write-interval 60
![]() | Note: Specify any requisite user credentials for the FTP server before you specify the IP address or hostname. In this example, test is the username and Test123 is the password for FTP server 14.1.2.1. |
Related Documentation
- EX Series
- Understanding DHCP Snooping for Port Security
- QFX Series standalone switches
- Understanding DHCP Snooping for Port Security
