Syntax

dhcp-server group

no dhcp-server group

Default

DHCP VLAN Interface Group setting is disabled

Mode

In Global configuration for Management VLAN. VLAN Interface Configuration for other than management VLAN.

Example

The example shows how to set DHCP VLAN Interface Group setting for Management VLAN .

You can verify settings by the following show run command.

Switch#configure terminal

 Switch(config)# dhcp-server group 1

Switch(config)# dhcp-server group 1 ip 192.168.0.1

The example shows how to set DHCP VLAN Interface Group setting for other than management VLAN .

Switch#configure terminal

Switch(config)#interface vlan2

Switch(config-if)# dhcp-server group 1

Switch(config)# dhcp-server group 1 ip 192.168.0.1

Verifying the DHCP Server

Switch# sh dhcp-server

Verifying the DHCP Client

Switch# sh dhcp-client

Note:- Only Static binded clients are shown.

 

6.5 IP DHCP SNOOPING

Use the ip dhcp snooping command to enable DHCP Snooping function. Use the “no” form of this command to disable.

Switch#configure terminal

Switch(config)# ip dhcp snooping

Switch(config)# no ip dhcp snooping

Syntax

ip dhcp snooping

no ip dhcp snooping

Default

DHCP snooping is disabled

Mode

Global Configuration

Example

The example shows how to enable DHCP Snooping on VLAN 1. You can verify settings by the following show ip dhcp snooping command.

Switch#configure terminal

Switch(config)# ip dhcp snooping

Switch(config)# ip dhcp snooping vlan 1

Switch# show ip dhcp snooping

 

6.6 IP DHCP SNOOPING VLAN

Use the ip dhcp snooping vlan command to enable VLANs on DHCP Snooping function. Use the “no” form of this command to disable VLANs on DHCP Snooping function.

Switch#configure terminal

Switch(config)# ip dhcp snooping vlan {VLAN-LIST}

Syntax

ip dhcp snooping vlan {VLAN-LIST}

Parameter

VLAN-LIST Specify VLAN ID or a range of VLANs to enable or disable dynamic Arp inspection

Default

Default is disabled on all VLANs

Mode

Global Configuration

Example

The example shows how to enable VLAN 1-100 on DHCP Snooping, and then disable VLAN 30-40 on DHCP Snooping. You can verify settings by the following show ip dhcp snooping command.

Example 1:-

Switch#configure terminal

Switch(config)# vlan 1-100

Switch(config)# exit

Switch(config)# ip dhcp snooping

Switch(config)# ip dhcp snooping vlan 1-100

Switch# show ip dhcp snooping

Example 2:-

Switch#configure terminal

Switch(config)# no ip dhcp snooping vlan 30-40

Switch(config)# show ip dhcp snooping

 

6.7 IP DHCP SNOOPING TRUST

Use the ip dhcp snooping trust command to set trusted interface. The switch does not check DHCP packets that are received on the trusted interface; it simply forwards it. Use the “no” form of this command to set untrusted interface.

Switch#configure terminal

Switch(config)# ip dhcp snooping trust

Switch(config)# no ip dhcp snooping trust

Syntax

ip dhcp snooping trust

no ip dhcp snooping trust

Default

DHCP snooping trust is disabled

Mode

Interface Configuration

Example

The example shows how to set interface gi1 to trust. You can verify settings by the following show ip dhcp snooping interface command.

Switch#configure terminal

Switch(config)# interface gi2

Switch(config-if)# ip dhcp snooping trust

Switch(config-if)# do show ip dhcp snooping interface gi1

 

6.8 IP DHCP SNOOPING VERIFY

Use the ip dhcp snooping verify command to verify MAC address function on interface.The “mac-address” drop DHCP packets that chaddr and ethernet-source-mac is not match.

Switch#configure terminal

Switch(config)#interface {Interface-ID}

Switch(config-if)# ip dhcp snooping verify mac-address

Switch(config-if)# no ip dhcp snooping verify mac-address

Syntax

ip dhcp snooping verify mac-address

no ip dhcp snooping verify mac-address

Default

DHCP snooping verify mac-address is disabled

Mode

Interface Configuration

Example

The example shows how to set interface gi1 to validate “mac- address”. You can verify settings by the following show ip dhcp snooping interface command.

Switch#configure terminal

Switch(config)# interface gi2

Switch(config-if)# ip dhcp snooping verify mac-address

Switch(config-if)# do show ip dhcp snooping interface gi2

 

6.9 IP DHCP SNOOPING RATE-LIMIT

Use the ip dhcp snooping rate-limit command to set rate limitation on interface. The switch drop DHCP packets after receives more than configured rate of packets per second. Use the “no” form of this command to return to default settings.

Switch#configure terminal

Switch(config)#interface {Interface-ID}

Switch(config-if)# ip dhcp snooping rate-limit <1-300>

Switch(config-if)# no ip dhcp snooping rate-limit

Syntax

ip dhcp snooping rate-limit <1-300>

no ip dhcp snooping rate-limit

Parameter

<1-300> Set 1 to 300 PPS of DHCP packet rate limitation

Default

Default is un-limited of DHCP packet

Mode

Interface Configuration

Example

The example shows how to set rate limit to 30 pps on interface gi1. You can verify settings by the following show ip dhcp snooping interface command.

Switch#configure terminal

Switch(config)# interface gi2

Switch(config-if)# ip dhcp snooping rate-limit 30

Switch(config-if)# do show ip dhcp snooping interfaces gi2

 

6.10 CLEAR IP DHCP SNOOPING STATISTICS

Use the clear ip dhcp snooping interfaces statistics command to clear statistics that are recorded on interface.

Switch# clear ip dhcp snooping interfaces {IF_PORTS} statistics

Syntax

clear ip dhcp snooping interfaces {IF_PORTS}statistics

Parameter

IF_PORTS specifies ports to clear statistics

Mode

Privileged EXEC

Example

The example shows how to clear statistics on interface gi1. You can verify settings by the following show ip dhcp snooping interface statistics command.

Switch# clear ip dhcp snooping interfaces gi1 statistics

Switch# show ip dhcp snooping interfaces gi1 statistics

 

6.11 SHOW IP DHCP SNOOPING

Use the show ip dhcp snooping command to show settings of DHCP Snooping.

Switch#show ip dhcp snooping

Syntax

show ip dhcp snooping

Mode

Privileged EXEC

Example

The example shows how to show settings of DHCP Snooping

Switch# show ip dhcp snooping

 

6.12 SHOW IP DHCP SNOOPING INTERFACE

Use the show ip dhcp snooping interfaces command to show settings or statistics of interface.

Switch# show ip dhcp snooping interfaces {IF_PORTS}

Switch# show ip dhcp snooping interfaces {IF_PORTS} statistics

Syntax

show ip dhcp snooping interfaces {IF_PORTS}

show ip dhcp snooping interfaces {IF_PORTS} statistics

Parameter

IF_PORTS specifies ports to show statistics

Mode

Privileged EXEC

Example

The example shows how to show settings of interface gi1.

Switch# show ip dhcp snooping interface gi2

 

6.13 SHOW IP DHCP SNOOPING BINDING

Use the show ip dhcp snooping binding command to show binding entries that learned by DHCP Snooping.

Switch# show ip dhcp snooping binding

Syntax

show ip dhcp snooping binding

Mode

Privileged EXEC

Example

The example shows how to show binding entries that learned by DHCP Snooping.

Switch# show ip dhcp snooping binding

 

6.14 IP DHCP SNOOPING OPTION

Use the ip dhcp snooping option command to enable that insert option82 content into packet. Use the “no” form of this command to disable.

Switch#configure terminal

Switch(config)#interface {Interface-ID}

Switch(config-if)# ip dhcp snooping option

Switch(config-if)# no ip dhcp snooping option

Syntax

ip dhcp snooping option

no ip dhcp snooping option

Default

DHCP snooping option82 is disabled

Mode

Interface Configuration

Example

The example shows how to enable option82 insertion. You can verify settings by the following show ip dhcp snooping interface command.

Switch#configure terminal

Switch(config)# interface gi2

Switch(config-if)# ip dhcp snooping option

Switch(config-if)# do show ip dhcp snooping interfaces gi2

 

6.15 IP DHCP SNOOPING OPTION ACTION

Use the ip dhcp snooping option action command to set the action when receive packets that with option82 content. Use the “no” form of this command to default setting.

Switch#configure terminal

Switch(config)#interface {Interface-ID}

Switch(config-if)#ip dhcp snooping option action (drop|keep|replace)

Switch(config-if)#no ip dhcp snooping option action

Syntax

ip dhcp snooping option action (drop|keep|replace)

no ip dhcp snooping option action

Parameter

Drop Drop packets with option82 that are received from un trusted port.

Keep Keep original option82 content in packet.

Replace Replace option82 content by switch setting.

Default

DHCP snooping option82 is drop

Mode

Interface Configuration

Example

The example shows how to set action to replace option82 content. You can verify settings by the following show running-config command.

Switch#configure terminal

switch(config)# interface gi2

switch(config-if)# ip dhcp snooping option action replace

 

6.16 IP DHCP SNOOPING OPTION CIRCUIT-ID

Use the ip dhcp snooping option circuit-id command to set user-defined circuit-id string. Circuit-id is per port per VLAN setting. If a VLAN is not found user-defined circuit-id then use per port circuit-id string. Use the “no” form of this command to default setting.

Switch#configure terminal

Switch(config-if)# ip dhcp snooping [vlan <1-4094>] option circuit-id {STRING}

Switch(config-if)# no ip dhcp snooping [vlan <1-4094>] option circuit-id

Syntax

ip dhcp snooping [vlan <1-4094>] option circuit-id STRING

no ip dhcp snooping [vlan <1-4094>] option circuit-id

Parameter

 Vlan<1-4094>VLAN ID to set user defined circuit-id string STRING Circuit-id string, 1 to 63 ASCII characters, no spaces.

Default

Default circuit-id is port id + vlan id in byte format.

Mode

Interface Configuration

Example

The example shows how to set a user-defined circuit-id string on interface gi1 and VLAN 1. You can verify settings by the following show running-config command.

Switch#configure terminal

switch(config)# interface gi2

switch(config-if)# ip dhcp snooping vlan 1 option circuit-id test

 

6.17 IP DHCP SNOOPING OPTION REMOTE-ID

Use the ip dhcp snooping option remote-id command to set user-defined remote-id string. Remote-id is a global and unique string. Use the “no” form of this command to default setting.

Switch#configure terminal

Switch(config)# ip dhcp snooping option remote-id {STRING}

Switch(config)# no ip dhcp snooping option remote-id

Syntax

ip dhcp snooping option remote-id {STRING}

no ip dhcp snooping option remote-id

Parameter

STRING Remote-id string, 1 to 63 ASCII characters, no spaces.

Default

Default remote-id is the switch MAC address in byte order

Mode

Global Configuration

Example

The example shows how to set a user-defined remote-id string on switch. You can verify settings by the following show ip dhcp snooping option remote- id.

Switch#configure terminal

Switch(config)# ip dhcp snooping option remote-id test_remote

switch(config)# do show ip dhcp snooping option remote-id

 

6.18 SHOW IP DHCP SNOOPING OPTION

Use the show ip dhcp snooping option remote-id command to show remote-id string.

Switch#show ip dhcp snooping option remote-id

Syntax

show ip dhcp snooping option remote-id

Mode

Privileged EXEC

Example

The example shows how to show remote-id string

Switch# show ip dhcp snooping option remote-id

 

6.19 IP DHCP SNOOPING DATABASE

Use the ip dhcp snooping database command to enable DHCP Snooping database agent. The “flash” means that write backup file to switch local drive. The “tftp” means that write backup file to remote TFTP server. Use the “no” form of this command to disable.

Switch#configure terminal

Switch(config)# ip dhcp snooping database flash

Switch(config)# ip dhcp snooping database tftp (A.B.C.D|HOSTNAME) {NAME}

Switch(config)# no ip dhcp snooping database

Syntax

ip dhcp snooping database flash

ip dhcp snooping database tftp (A.B.C.D|HOSTNAME) {NAME}

no ip dhcp snooping database

Parameter

(A.B.C.D|HOSTNAME)Specify the IP address or hostname of remote TFTP server

NAME Input name of backup file

Default

DHCP snooping database is disabled

Mode

Global Configuration

Example

The example shows how to enable DHCP Snooping database agent and write backup file to remote TFTP server with file name “backup_file”. You can verify settings by the following show ip dhcp snooping database command.

Switch#configure terminal

Switch(config)# ip dhcp snooping database tftp 192.168.1.50 backup_file

Switch(config)# do show ip dhcp snooping database

 

6.20 IP DHCP SNOOPING DATABASE WRITE-DELAY

Use the ip dhcp snooping database write-delay command to modify the write-delay timer. Use the “no” form of this command to default setting.

Switch#configure terminal

Switch(config)# ip dhcp snooping database write-delay<15-86400>

Switch(config)# no ip dhcp snooping database write-delay

Syntax

ip dhcp snooping database write-delay<15-86400>

no ip dhcp snooping database write-delay

Parameter

<15-86400>Specifies the seconds of timeout. Specify the duration for which the transfer should be delayed after the binding database changes

Default

DHCP snooping database write-delay is 300 seconds

Mode

Global Configuration

Example

The example shows how to set write-delay timer to 60 seconds. You can verify settings by the following show ip dhcp snooping database command.

Switch#configure terminal

Switch(config)# ip dhcp snooping database write-delay 60

Switch(config)# do show ip dhcp snooping database

6.21 IP DHCP SNOOPING DATABASE TIMEOUT

Use the ip dhcp snooping database timeout command to modify the timeout timer. Use the “no” form of this command to default setting.

Switch#configure terminal

Switch(config)# ip dhcp snooping database timeout<0-86400>

Switch(config)# no ip dhcp snooping database timeout

Syntax

ip dhcp snooping database timeout<0-86400>

no ip dhcp snooping database timeout

Parameter

<15-86400>Specifies the seconds of timeout.Specify (in seconds)how long to wait for the database transfer process to finish before stopping the process. Use 0 to define an infinite duration, which means to continue trying the transfer indefinitely

Default

DHCP snooping database timeout is 300 seconds

Mode

Global Configuration

Example

The example shows how to set timeout timer to 60 seconds. You can verify settings by the following show ip dhcp snooping database command.

Switch#configure terminal

Switch(config)# ip dhcp snooping database timeout 60

Switch(config)#do show ip dhcp snooping

 

6.22 CLEAR IP DHCP SNOOPING DATABASE STATISTICS

Use the clear ip dhcp snooping database statistics command to clear statistics of DHCP Snooping database.

Switch# clear ip dhcp snooping database statistics

Syntax

clear ip dhcp snooping database statistics

Mode

Privileged EXEC

Example

The example shows how to clear statistics of DHCP Snooping agent. You can verify settings by the following show ip dhcp snooping database command.

switch# clear ip dhcp snooping database statistics

switch# show ip dhcp snooping database

 

6.23 RENEW IP DHCP SNOOPING DATABASE

Use the renew ip dhcp snooping database command to renew DHCP Snooping database from backup file.

Switch# renew ip dhcp snooping database

Syntax

renew ip dhcp snooping database

Mode

Privileged EXEC

Example

The example shows how to renew DHCP Snooping database. You can verify settings by the following show ip dhcp snooping database and show ip dhcp snooping binding command.

Switch# renew ip dhcp snooping database

Switch# show ip dhcp snooping database

 

6.24 SHOW IP DHCP SNOOPING DATABASE

Use the show ip dhcp snooping database command to show settings of DHCP Snooping agent.

Switch# show ip dhcp snooping database

Syntax

show ip dhcp snooping database

Mode

Privileged EXEC

Example

The example shows how to show settings of DHCP Snooping agent.

Switch # show ip dhcp snooping database