DHCP Snooping Configuration Commands

Use these commands to configure DHCP Snooping.

ip dhcp snooping

M4250

M4350

Use this command to enable DHCP Snooping globally.

Default Disabled
Format ip dhcp snooping
Mode Global Config

no ip dhcp snooping

Use this command to disable DHCP Snooping globally.

Format no ip dhcp snooping
Mode Global Config

ip dhcp snooping vlan

M4250

M4350

Use this command to enable DHCP Snooping on a VLAN or a list of comma-separated VLAN ranges.

Default Disabled
Format ip dhcp snooping vlan vlan-list
Mode Global Config

no ip dhcp snooping vlan

Use this command to disable DHCP Snooping on VLANs.

Format no ip dhcp snooping vlan vlan-list
Mode Global Config

ip dhcp snooping verify mac-address

M4250

M4350

Use this command to enable verification of the source MAC address with the client hardware address in the received DHCP message.

Default Enabled
Format ip dhcp snooping verify mac-address
Mode Global Config

no ip dhcp snooping verify mac-address

Use this command to disable verification of the source MAC address with the client hardware address.

Format no ip dhcp snooping verify mac-address
Mode Global Config

ip dhcp snooping database

M4250

M4350

Use this command to configure the persistent location of the DHCP Snooping database. This can be local or a remote file.

Default Local
Format ip dhcp snooping database {local | tftp://hostIP/filename}
Mode Global Config

ip dhcp snooping database write-delay (DHCP)

M4250

M4350

Use this command to configure the interval in seconds at which the DHCP Snooping database persists. The interval value ranges from 15 to 86400 seconds.

Default 300 seconds
Format ip dhcp snooping database write-delay seconds
Mode Global Config

no ip dhcp snooping database write-delay

Use this command to set the write delay value to the default value.

Format no ip dhcp snooping database write-delay
Mode Global Config

ip dhcp snooping binding

M4250

M4350

Use this command to configure a static DHCP Snooping binding. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format ip dhcp snooping binding mac-address vlan vlan-id ipaddress interface {unit/slot/port | lag lag-group-id} [expiry lease-in-seconds]
Mode Global Config

no ip dhcp snooping binding

Use this command to remove a DHCP static entry from the DHCP Snooping database.

Format no ip dhcp snooping binding mac-address
Mode Global Config

ip verify binding

M4250

M4350

Use this command to configure static IP source guard (IPSG) entries. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format ip verify binding mac-address vlan vlan-id ipaddress interface {unit/slot/port | lag lag-group-id}
Mode Global Config

no ip verify binding

Use this command to remove the IPSG static entry from the IPSG database.

Format no ip verify binding mac-address vlan vlan-id ipaddress interface {unit/slot/port | lag lag-group-id}
Mode Global Config

ip dhcp snooping limit

M4250

M4350

Use this command to control the rate at which the DHCP Snooping messages come on an interface or range of interfaces. By default, rate limiting is disabled. When enabled, the rate can range from 0 to 300 packets per second (pps). The burst level range is 1 to 15 seconds. You can also use the none keyword to set no limit.

Default Disabled (no limit)
Format ip dhcp snooping limit {rate pps [burst interval seconds] | none}
Mode Interface Config

no ip dhcp snooping limit

Use this command to set the rate at which the DHCP Snooping messages come, and the burst level, to the defaults.

Format no ip dhcp snooping limit
Mode Interface Config

ip dhcp snooping log-invalid

M4250

M4350

Use this command to control the logging DHCP messages filtration by the DHCP Snooping application. This command can be used to configure a single interface or a range of interfaces.

Default Disabled
Format ip dhcp snooping log-invalid
Mode Interface Config

no ip dhcp snooping log-invalid

Use this command to disable the logging DHCP messages filtration by the DHCP Snooping application.

Format no ip dhcp snooping log-invalid
Mode Interface Config

ip dhcp snooping trust

M4250

M4350

Use this command to configure an interface or range of interfaces as trusted.

Default Disabled
Format ip dhcp snooping trust
Mode Interface Config

no ip dhcp snooping trust

Use this command to configure the port as untrusted.

Format no ip dhcp snooping trust
Mode Interface Config

ip verify source

M4250

M4350

Use this command to configure the IPSG source ID attribute to filter the data traffic in the hardware. Source ID is the combination of IP address and MAC address. Normal command allows data traffic filtration based on the IP address. With the port-security option, the data traffic will be filtered based on the IP and MAC addresses.

This command can be used to configure a single interface or a range of interfaces.

Default The source ID is the IP address
Format ip verify source [port-security]
Mode Interface Config

no ip verify source

Use this command to disable the IPSG configuration in the hardware. You cannot disable port-security alone if it is configured.

Format no ip verify source
Mode Interface Config

show ip dhcp snooping

M4250

M4350

Use this command to display the DHCP Snooping global configurations and per port configurations.

Format show ip dhcp snooping
Mode

Privileged EXEC

User EXEC

Term Definition
Interface The interface for which data is displayed.
Trusted If it is enabled, DHCP snooping considers the port as trusted. The factory default is disabled.
Log Invalid Pkts If it is enabled, DHCP snooping application logs invalid packets on the specified interface.

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping

DHCP snooping is Disabled
DHCP snooping source MAC verification is enabled
DHCP snooping is enabled on the following VLANs:
11 - 30, 40

Interface   Trusted    Log Invalid Pkts
---------   --------   ----------------
0/1          Yes             No
0/2          No              Yes
0/3          No              Yes
0/4          No              No
0/6          No              No

show ip dhcp snooping binding

M4250

M4350

Use this command to display the DHCP Snooping binding entries.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.

To restrict the output, use the following options:

  • static. Restrict the output based on static entries.
  • dynamic. Restrict the output based on DHCP snooping.
  • interface unit/slot/port. Restrict the output based on a specific interface.
  • vlan-id. Restrict the output based on a VLAN.
Format show ip dhcp snooping binding [static | dynamic] [interface unit/slot/port] [vlan-id]
Mode

Privileged EXEC

User EXEC

Term Definition
MAC Address Displays the MAC address for the binding that was added. The MAC address is the key to the binding database.
IP Address Displays the valid IP address for the binding rule.
VLAN The VLAN for the binding rule.
Interface The interface to add a binding into the DHCP snooping interface.
Type Binding type; statically configured from the CLI or dynamically learned.
Lease (sec) The remaining lease time for the entry.

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping binding

Total number of bindings: 2

MAC Address          IP Address   VLAN  Interface  Type  Lease time (Secs)
------------------  ------------  ----  ---------  ---- ------------------
00:02:B3:06:60:80   210.1.1.3      10   0/1                    86400
00:0F:FE:00:13:04   210.1.1.4      10   0/1                    86400

show ip dhcp snooping database

M4250

M4350

Use this command to display the DHCP Snooping configuration related to the database persistency.

Format show ip dhcp snooping database
Mode

Privileged EXEC

User EXEC

Term Definition
Agent URL Bindings database agent URL.
Write Delay The maximum write time to write the database into local or remote.

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping database
agent url:  /10.131.13.79:/sai1.txt
write-delay:  5000

show ip dhcp snooping interfaces

M4250

M4350

Use this command to show the DHCP Snooping status of the interfaces or of a specific interface. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format show ip dhcp snooping interfaces [unit/slot/port]
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping interfaces

 Interface    Trust State  Rate Limit   Burst Interval
                              (pps)       (seconds)
-----------   ----------   ----------   --------------
1/0/1             No             15            1
1/0/2             No             15            1
1/0/3             No             15            1

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping interfaces ethernet 1/0/15

 Interface    Trust State  Rate Limit   Burst Interval
                              (pps)       (seconds)
-----------   ----------   ----------   --------------
1/0/15            Yes            15            1

show ip dhcp snooping statistics

M4250

M4350

Use this command to list statistics for DHCP Snooping security violations on untrusted ports.

Format show ip dhcp snooping statistics
Mode

Privileged EXEC

User EXEC

Term Definition
Interface The IP address of the interface in unit/slot/port format.
MAC Verify Failures Represents the number of DHCP messages that were filtered on an untrusted interface because of source MAC address and client HW address mismatch.
Client Ifc Mismatch Represents the number of DHCP release and Deny messages received on the different ports than learned previously.
DHCP Server Msgs Rec’d Represents the number of DHCP server messages received on Untrusted ports.

Command example:

CODE
(NETGEAR Switch) #show ip dhcp snooping statistics

 Interface    MAC Verify   Client Ifc   DHCP Server
               Failures     Mismatch    Msgs Rec'd
-----------   ----------   ----------   -----------
1/0/2                  0            0             0
1/0/3                  0            0             0
1/0/4                  0            0             0
1/0/5                  0            0             0
1/0/6                  0            0             0
1/0/7                  0            0             0
1/0/8                  0            0             0
1/0/9                  0            0             0
1/0/10                 0            0             0
1/0/11                 0            0             0
1/0/12                 0            0             0
1/0/13                 0            0             0
1/0/14                 0            0             0
1/0/15                 0            0             0
1/0/16                 0            0             0
1/0/17                 0            0             0
1/0/18                 0            0             0
1/0/19                 0            0             0
1/0/20                 0            0             0

clear ip dhcp snooping binding

M4250

M4350

Use this command to clear all DHCP Snooping bindings on all interfaces or on a specific interface. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format clear ip dhcp snooping binding [interface unit/slot/port]
Mode

Privileged EXEC

User EXEC

clear ip dhcp snooping statistics

M4250

M4350

Use this command to clear all DHCP Snooping statistics.

Format clear ip dhcp snooping statistics
Mode

Privileged EXEC

User EXEC

show ip verify

M4250

M4350

Use this command to display the IPSG filter type for all interfaces or for a specific interface. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format show ip verify [interface unit/slot/port]
Mode

Privileged EXEC

User EXEC

Term Definition
Interface The interface.
Filter Type

One of two values:

ip-mac: User has configured MAC address filtering on this interface.

ip: Only IP address filtering on this interface.

show ip verify source

M4250

M4350

Use this command to display the IPSG configurations on all interfaces or for a specific interface. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format show ip verify source [interface unit/slot/port]
Mode

Privileged EXEC

User EXEC

Term Definition
Interface The Interface.
Filter Type

One of two values:

ip-mac: User has configured MAC address filtering on this interface.

ip: Only IP address filtering on this interface.

IP Address IP address of the interface.
MAC Address If MAC address filtering is not configured on the interface, the MAC Address field is empty. If port security is disabled on the interface, then the MAC Address field displays “permit-all.”
VLAN The VLAN for the binding rule.

Command example:

CODE
(NETGEAR Switch) #show ip verify source

Interface  Filter Type    IP Address       MAC Address      Vlan
---------  -----------  ---------------  -----------------  -----
    0/1     ip-mac       210.1.1.3       00:02:B3:06:60:80     10
    0/1     ip-mac       210.1.1.4       00:0F:FE:00:13:04     10

show ip source binding

M4250

M4350

Use this command to display the IPSG bindings. As an option, you can display the DHCP snooping bindings or static bindings, the bindings for a specific interface, or the bindings for a VLAN. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format show ip source binding [dhcp-snooping | static] [interface unit/slot/port | vlan vlan-id]
Mode

Privileged EXEC

User EXEC

Term Definition
MAC Address The MAC address for the entry that is added.
IP Address The IP address of the entry that is added.
Type Entry type; statically configured from CLI or dynamically learned from DHCP Snooping.
VLAN VLAN for the entry.
Interface IP address of the interface in unit/slot/port format.

Command example:

CODE
(NETGEAR Switch) #show ip source binding

MAC Address             IP Address         Type       Vlan      Interface
-----------------  ---------------    -------------  -----  -------------
00:00:00:00:00:08          1.2.3.4    dhcp-snooping     2        1/0/1
00:00:00:00:00:09          1.2.3.4    dhcp-snooping     3        1/0/1
00:00:00:00:00:0A          1.2.3.4    dhcp-snooping     4        1/0/1