0% found this document useful (0 votes)
18 views85 pages

07-Commands For DHCP Server Configuration

Uploaded by

pasqualekapantow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views85 pages

07-Commands For DHCP Server Configuration

Uploaded by

pasqualekapantow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Commands for DHCP

Server Configuration Content

Content

CHAPTER 1 COMMANDS FOR DHCP ..................................... 1-1

1.1 COMMANDS FOR DHCP SERVER CONFIGURATION .................................. 1-1

1.1.1 bootfile......................................................................................................1-1
1.1.2 clear ip dhcp binding ..............................................................................1-1
1.1.3 clear ip dhcp conflict ..............................................................................1-2
1.1.4 clear ip dhcp server statistics ...............................................................1-2
1.1.5 client-identifier ........................................................................................1-2
1.1.6 debug ip dhcp client ...............................................................................1-3
1.1.7 debug ip dhcp relay ................................................................................1-3
1.1.8 debug ip dhcp server ..............................................................................1-3
1.1.9 default-router ...........................................................................................1-4
1.1.10 dns-server ..............................................................................................1-4
1.1.11 domain-name .........................................................................................1-4
1.1.12 hardware-address .................................................................................1-5
1.1.13 host .........................................................................................................1-5
1.1.14 ip dhcp conflict logging .......................................................................1-6
1.1.15 ip dhcp disable ......................................................................................1-6
1.1.16 ip dhcp excluded-address....................................................................1-7
1.1.17 ip dhcp pool ...........................................................................................1-7
1.1.18 ip dhcp conflict ping-detection enable ...............................................1-7
1.1.19 ip dhcp ping packets ............................................................................1-8
1.1.20 ip dhcp ping timeout .............................................................................1-8
1.1.21 lease .......................................................................................................1-9
1.1.22 max-lease-time ......................................................................................1-9
1.1.23 netbios-name-server ...........................................................................1-10
1.1.24 netbios-node-type ...............................................................................1-10
1.1.25 network-address .................................................................................1-11
1.1.26 next-server ...........................................................................................1-11
1.1.27 option ...................................................................................................1-11
1.1.28 service dhcp ........................................................................................1-12
1.1.29 show ip dhcp binding .........................................................................1-12
1.1.30 show ip dhcp conflict .........................................................................1-13
1.1.31 show ip dhcp relay information option.............................................1-13

1
Commands for DHCP
Server Configuration Content

1.1.32 show ip dhcp server statistics...........................................................1-14

1.2 COMMANDS FOR DHCP RELAY CONFIGURATION .................................. 1-15

1.2.1 ip dhcp broadcast suppress ................................................................1-15


1.2.2 ip dhcp relay share-vlan <vlanid> sub-vlan <vlanlist> .....................1-16
1.2.3 ip forward-protocol udp bootps...........................................................1-16
1.2.4 ip helper-address ..................................................................................1-16
1.2.5 show ip forward-protocol .....................................................................1-17
1.2.6 show ip helper-address ........................................................................1-17

CHAPTER 2 COMMANDS FOR DHCPV6 ................................. 2-1

2.1 CLEAR IPV6 DHCP BINDING ..................................................................... 2-1

2.2 CLEAR IPV6 DHCP CONFLICT ................................................................... 2-1

2.3 CLEAR IPV6 DHCP STATISTICS ................................................................. 2-2

2.4 DEBUG IPV6 DHCP CLIENT PACKET .......................................................... 2-2

2.5 DEBUG IPV6 DHCP DETAIL ....................................................................... 2-2

2.6 DEBUG IPV6 DHCP RELAY PACKET ........................................................... 2-3

2.7 DEBUG IPV6 DHCP SERVER ..................................................................... 2-3

2.8 DNS- SERVER .......................................................................................... 2-3

2.9 DOMAIN-NAME........................................................................................ 2-4

2.10 EXCLUDED-ADDRESS ............................................................................ 2-4

2.11 IPV6 ADDRESS ...................................................................................... 2-5

2.12 IPV6 DHCP CLIENT PD ........................................................................... 2-5

2.13 IPV6 DHCP CLIENT PD HINT.................................................................... 2-6

2.14 IPV6 DHCP POOL .................................................................................. 2-6

2.15 IPV6 DHCP RELAY DESTINATION ............................................................. 2-7

2.16 IPV6 DHCP SERVER ............................................................................... 2-8

2.17 IPV6 GENERAL-PREFIX.......................................................................... 2-8

2.18 IPV6 LOCAL POOL ................................................................................. 2-9

2.19 LIFETIME .............................................................................................. 2-9

2.20 NETWORK-ADDRESS........................................................................... 2-10

2.21 PREFIX-DELEGATION .......................................................................... 2-11


2
Commands for DHCP
Server Configuration Content

2.22 PREFIX-DELEGATION POOL ................................................................. 2-11

2.23 SERVICE DHCPV6 ............................................................................... 2-12

2.24 SHOW IPV6 DHCP ............................................................................... 2-13

2.25 SHOW IPV6 DHCP BINDING .................................................................. 2-13

2.26 SHOW IPV6 DHCP CONFLICT ................................................................ 2-13

2.27 SHOW IPV6 DHCP INTERFACE .............................................................. 2-14

2.28 SHOW IPV6 DHCP POOL ...................................................................... 2-14

2.29 SHOW IPV6 DHCP STATISTICS .............................................................. 2-15

2.30 SHOW IPV6 GENERAL-PREFIX .............................................................. 2-17

2.31 SHOW IPV6 LOCAL POOL ..................................................................... 2-17

CHAPTER 3 COMMANDS FOR DHCP OPTION 82 .................. 3-1

3.1 DEBUG IP DHCP RELAY PACKET ............................................................... 3-1

3.2 IP DHCP RELAY INFORMATION OPTION ...................................................... 3-1

3.3 IP DHCP RELAY INFORMATION OPTION DELIMITER ..................................... 3-2

3.4 IP DHCP RELAY INFORMATION OPTION REMOTE-ID .................................... 3-2

3.5 IP DHCP RELAY INFORMATION OPTION REMOTE-ID FORMAT ....................... 3-2

3.6 IP DHCP RELAY INFORMATION OPTION SELF-DEFINED REMOTE-ID .............. 3-3

3.7 IP DHCP RELAY INFORMATION OPTION SELF-DEFINED REMOTE-ID FORMAT . 3-4

3.8 IP DHCP RELAY INFORMATION OPTION SELF-DEFINED SUBSCRIBER-ID ....... 3-4

3.9 IP DHCP RELAY INFORMATION OPTION SELF-DEFINED SUBSCRIBER-ID FORMAT


................................................................................................................... 3-5

3.10 IP DHCP RELAY INFORMATION OPTION SUBSCRIBER-ID ........................... 3-5

3.11 IP DHCP RELAY INFORMATION OPTION SUBSCRIBER-ID FORMAT .............. 3-6

3.12 IP DHCP RELAY INFORMATION POLICY .................................................... 3-7

3.13 IP DHCP SERVER RELAY INFORMATION ENABLE ...................................... 3-7

3.14 SHOW IP DHCP RELAY INFORMATION OPTION .......................................... 3-8

CHAPTER 4 COMMANDS FOR DHCP OPTION 60 AND OPTION

43 ............................................................................................... 4-1

3
Commands for DHCP
Server Configuration Content

4.1 OPTION 43 ASCII LINE ........................................................................... 4-1

4.2 OPTION 43 HEX WORD .......................................................................... 4-1

4.3 OPTION 43 IP A.B.C.D ........................................................................... 4-2

4.4 OPTION 60 ASCII LINE ........................................................................... 4-2

4.5 OPTION 60 HEX WORD .......................................................................... 4-2

4.6 OPTION 60 IP A.B.C.D ........................................................................... 4-3

CHAPTER 5 COMMANDS FOR DHCPV6 OPTION37, 38 ........ 5-1

5.1 COMMANDS FOR DHCPV6 OPTION37, 38 ............................................... 5-1

5.1.1 address range ..........................................................................................5-1


5.1.2 class .........................................................................................................5-1
5.1.3 ipv6 dhcp class .......................................................................................5-2
5.1.4 ipv6 dhcp relay remote-id ......................................................................5-2
5.1.5 ipv6 dhcp relay remote-id option ..........................................................5-3
5.1.6 ipv6 dhcp relay subscriber-id ................................................................5-3
5.1.7 ipv6 dhcp relay subscriber-id option ....................................................5-4
5.1.8 ipv6 dhcp relay subscriber-id select delimiter ....................................5-4
5.1.9 ipv6 dhcp server remote-id option ........................................................5-5
5.1.10 ipv6 dhcp server select relay-forw ......................................................5-5
5.1.11 ipv6 dhcp server subscriber-id option................................................5-5
5.1.12 ipv6 dhcp snooping remote-id ............................................................5-6
5.1.13 ipv6 dhcp snooping remote-id option ................................................5-6
5.1.14 ipv6 dhcp snooping remote-id policy .................................................5-7
5.1.15 ipv6 dhcp snooping subscriber-id ......................................................5-7
5.1.16 ipv6 dhcp snooping subscriber-id option ..........................................5-8
5.1.17 ipv6 dhcp snooping subscriber-id policy ..........................................5-8
5.1.18 ipv6 dhcp snooping subscriber-id select delimiter ..........................5-9
5.1.19 ipv6 dhcp use class ..............................................................................5-9
5.1.20 remote-id subscriber-id ......................................................................5-10

5.2 COMMANDS FOR M ONITORING AND DEBUGGING ................................... 5-11

5.2.1 debug ipv6 dhcp detail .........................................................................5-11


5.2.2 debug ipv6 dhcp relay packet ..............................................................5-11
5.2.3 debug ipv6 dhcp snooping packet ......................................................5-12
5.2.4 show ipv6 dhcp relay option................................................................5-13
5.2.5 show ipv6 dhcp snooping option........................................................5-13

4
Commands for DHCP
Server Configuration Content

CHAPTER 6 COMMANDS FOR DHCP SNOOPING ................. 6-1

6.1 DEBUG IP DHCP SNOOPING BINDING ........................................................ 6-1

6.2 DEBUG IP DHCP SNOOPING EVENT ........................................................... 6-1

6.3 DEBUG IP DHCP SNOOPING PACKET ......................................................... 6-1

6.4 DEBUG IP DHCP SNOOPING PACKET INTERFACE ....................................... 6-2

6.5 DEBUG IP DHCP SNOOPING UPDATE ......................................................... 6-2

6.6 ENABLE TRUSTVIEW KEY ........................................................................ 6-2

6.7 IP DHCP SNOOPING ................................................................................. 6-3

6.8 IP DHCP SNOOPING ACTION ..................................................................... 6-3

6.9 IP DHCP SNOOPING ACTION M AXNUM ...................................................... 6-4

6.10 IP DHCP SNOOPING BINDING .................................................................. 6-4

6.11 IP DHCP SNOOPING BINDING ARP ........................................................... 6-5

6.12 IP DHCP SNOOPING BINDING DOT1X ....................................................... 6-5

6.13 IP DHCP SNOOPING BINDING USER ......................................................... 6-5

6.14 IP DHCP SNOOPING BINDING USER-CONTROL ......................................... 6-6

6.15 IP DHCP SNOOPING BINDING USER-CONTROL MAX-USER ........................ 6-6

6.16 IP DHCP SNOOPING INFORMATION ENABLE ............................................. 6-7

6.17 IP DHCP SNOOPING INFORMATION OPTION ALLOW-UNTRUSTED (REPLACE|)


................................................................................................................... 6-8

6.18 IP DHCP SNOOPING INFORMATION OPTION DELIMITER ............................. 6-8

6.19 IP DHCP SNOOPING INFORMATION OPTION REMOTE-ID ............................ 6-9

6.20 IP DHCP SNOOPING INFORMATION OPTION SELF-DEFINED REMOTE-ID ...... 6-9

6.21 IP DHCP SNOOPING INFORMATION OPTION SELF-DEFINED REMOTE-ID


FORMAT ..................................................................................................... 6-10

6.22 IP DHCP SNOOPING INFORMATION OPTION SELF-DEFINED SUBSCRIBER- ID


................................................................................................................. 6-10

6.23 IP DHCP SNOOPING INFORMATION OPTION SELF-DEFINED SUBSCRIBER- ID


FORMAT ..................................................................................................... 6-11

6.24 IP DHCP SNOOPING INFORMATION OPTION SUBSCRIBER-ID ................... 6-11

5
Commands for DHCP
Server Configuration Content

6.25 IP DHCP SNOOPING INFORMATION OPTION SUBSCRIBER-ID FORMAT ...... 6-12

6.26 IP DHCP SNOOPING LIMIT-RATE............................................................ 6-13

6.27 IP DHCP SNOOPING TRUST .................................................................. 6-13

6.28 IP USER HELPER-ADDRESS ................................................................. 6-14

6.29 IP USER PRIVATE PACKET VERSION TWO .............................................. 6-15

6.30 SHOW IP DHCP SNOOPING ................................................................... 6-15

6.31 SHOW IP DHCP SNOOPING BINDING ALL ............................................... 6-18

6.32 SHOW TRUSTVIEW STATUS .................................................................. 6-19

CHAPTER 7 COMMANDS FOR DHCP SNOOPING OPTION 82

................................................................................................... 7-1

7.1 IP DHCP SNOOPING INFORMATION ENABLE ............................................... 7-1

6
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Chapter 1 Commands for DHCP

1.1 Commands for DHCP Server Configuration

1.1.1 bootfile

Command: bootfile <filename>


no bootfile
Function: Sets the file name for DHCP client to import on boot up; the “no bootfile
“command deletes this setting.
Parameters: <filename> is the name of the file to be imported, up to 255 characters are
allowed.
Command Mode: DHCP Address Pool Mode
Usage Guide: Specify the name of the file to be imported for the client. This is usually
used for diskless workstations that need to download a configuration file from the server
on boot up. This command is together with the “next sever”.
Example: The path and filename for the file to be imported is “c:\temp\nos.img”
Switch(dhcp-1-config)#bootfile c:\temp\nos.img
Related Command: next-server

1.1.2 clear ip dhcp binding

Command: clear ip dhcp binding {<address> | all}


Function: Deletes the specified IP address-hardware address binding record or all IP
address-hardware address binding records.
Parameters: <address> is the IP address that has a binding record in decimal format. all
refers to all IP addresses that have a binding record.
Command mode: Admin Mode.
Usage Guide: “show ip dhcp binding” command can be used to view binding
information for IP addresses and corresponding DHCP client hardware addresses. If the
DHCP server is informed that a DHCP client is not using the assigned IP address for
some reason before the lease period expires, the DHCP server would not remove the
binding information automatically. The system administrator can use this command to
delete that IP address-client hardware address binding manually, if “all” is specified, then
all auto binding records will be deleted, thus all addresses in the DHCP address pool will

1-1
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

be reallocated.
Example: Removing all IP-hardware address binding records.
Switch#clear ip dhcp binding all
Related Command: show ip dhcp binding

1.1.3 clear ip dhcp conflict

Command: clear ip dhcp conflict {<address> | all }


Function: Deletes an address present in the address conflict log.
Parameters: <address> is the IP address that has a conflict record; all stands for all
addresses that have conflict records.
Command mode: Admin Mode.
Usage Guide: “show ip dhcp conflict” command can be used to check which IP
addresses are conflicting for use. The “clear ip dhcp conflict” command can be used to
delete the conflict record for an address. If "all” is specified, then all conflict records in the
log will be removed. When records are removed from the log, the addresses are available
for allocation by the DHCP server.
Example: The network administrator finds 10.1.128.160 that has a conflict record in the
log and is no longer used by anyone, so he deletes the record from the address conflict
log.
Switch#clear ip dhcp conflict 10.1.128.160
Related Command: ip dhcp conflict logging, show ip dhcp conflict

1.1.4 clear ip dhcp server statistics

Command: clear ip dhcp server statistics


Function: Deletes the statistics for DHCP server, clears the DHCP server count.
Parameters: None
Command mode: Admin Mode.
Usage Guide: DHCP count statistics can be viewed with “show ip dhcp server
statistics” command, all information is accumulated. You can use the “clear ip dhcp
server statistics” command to clear the count for easier statistics checking.
Example: Clearing the count for DHCP server.
Switch#clear ip dhcp server statistics
Related Command: show ip dhcp server statistics

1.1.5 client-identifier

Command: client-identifier <unique-identifier>

1-2
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

no client-identifier
Function: Specifies the unique ID of the user when binding an address manually; the “no
client-identifier” command deletes the identifier.
Parameters: <unique-identifier> is the user identifier, in dotted Hex format.
Command Mode: DHCP Address Pool Mode
Usage Guide: This command is used with “host” when binding an address manually. If
the requesting client identifier matches the specified identifier, DHCP server assigns the
IP address defined in “host” command to the client.
Example: Specifying the IP address 10.1.128.160 to be bound to user with the unique id
of 00-10-5a-60-af-12 in manual address binding.
Switch(dhcp-1-config)#client-identifier 00-10-5a-60-af-12
Switch(dhcp-1-config)#host 10.1.128.160 24
Related Command: host

1.1.6 debug ip dhcp client

Command: debug ip dhcp client {event | packet}


no debug ip dhcp server {event | packet}
Function: Enable the debugging of DHCP client, no command disables the debugging of
DHCP client.
Command mode: Admin Mode
Default: Disable the debugging.

1.1.7 debug ip dhcp relay

Command: debug ip dhcp server packet


no debug ip dhcp server packet
Function: Enable the debugging of DHCP relay, no command disables the debugging of
DHCP relay.
Command mode: Admin Mode
Default: Disable the debugging.

1.1.8 debug ip dhcp server

Command: debug ip dhcp server { events | linkage | packets }


no debug ip dhcp server { events | linkage | packets }
Function: Enables DHCP server debug information: the “no debug ip dhcp server
{events | linkage | packets}” command disables the debug information for DHCP server.
Default: Debug information is disabled by default.

1-3
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Command mode: Admin Mode.

1.1.9 default-router

Command: default-router <address1>[<address2>[…<address8>]]


no default-router
Function: Configures default gateway(s) for DHCP clients; the “no default-router”
command deletes the default gateway.
Parameters: <address1>…<address8> are IP addresses, in decimal format.
Default: No default gateway is configured for DHCP clients by default.
Command Mode: DHCP Address Pool Mode
Usage Guide: The IP address of default gateway(s) should be in the same subnet as the
DHCP client IP, the switch supports up to 8 gateway addresses. The gateway address
assigned first has the highest priority, and therefore address1 has the highest priority, and
address2 has the second, and so on.
Example: Configuring the default gateway for DHCP clients to be 10.1.128.2 and
10.1.128.100.
Switch(dhcp-1-config)#default-router 10.1.128.2 10.1.128.100

1.1.10 dns-server

Command: dns-server <address1>[<address2>[…<address8>]]


no dns-server
Function: Configure DNS servers for DHCP clients; the “no dns-server” command
deletes the default gateway.
Parameters: <address1>…<address8> are IP addresses, in decimal format.
Default: No DNS server is configured for DHCP clients by default.
Command Mode: DHCP Address Pool Mode
Usage Guide: Up to 8 DNS server addresses can be configured. The DNS server
address assigned first has the highest priority, therefore address 1 has the highest priority,
and address 2 has the second, and so on.
Example: Set 10.1.128.3 as the DNS server address for DHCP clients.
Switch(dhcp-1-config)#dns-server 10.1.128.3

1.1.11 domain-name

Command: domain-name <domain>


no domain-name
Function: Configures the Domain name for DHCP clients; the “no domain-name”

1-4
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

command deletes the domain name.


Parameters: <domain> is the domain name, up to 255 characters are allowed.
Command Mode: DHCP Address Pool Mode
Default: None
Usage Guide: Specifies a domain name for the client.
Example: Specifying “switch.com.cn" as the DHCP clients’ domain name.
Switch(dhcp-1-config)#domain-name switch.com.cn

1.1.12 hardware-address

Command: hardware-address <hardware-address> [{Ethernet |


IEEE802|<type-number>}]
no hardware-address
Function: Specifies the hardware address of the user when binding address manually;
the “no hardware-address” command deletes the setting.
Parameters: <hardware-address> is the hardware address in Hex; Ethernet | IEEE802
is the Ethernet protocol type, <type-number> should be the RFC number defined for
protocol types, from 1 to 255, e.g., 0 for Ethernet and 6 for IEEE 802.
Default: The default protocol type is Ethernet,
Command Mode: DHCP Address Pool Mode
Usage Guide: This command is used with the “host” when binding address manually. If
the requesting client hardware address matches the specified hardware address, the
DHCP server assigns the IP address defined in “host” command to the client.
Example: Specify IP address 10.1.128.160 to be bound to the user with hardware
address 00-00-e2-3a-26-04 in manual address binding.
Switch(dhcp-1-config)#hardware-address 00-00-e2-3a-26-04
Switch(dhcp-1-config)#host 10.1.128.160 24
Related Command: host

1.1.13 host

Command: host <address> [<mask> | <prefix-length>]


no host
Function: Specifies the IP address to be assigned to the user when binding addresses
manually; the “no host” command deletes the IP address.
Parameters: <address> is the IP address in decimal format; <mask> is the subnet mask
in decimal format; <prefix-length> means mask is indicated by prefix. For example, mask
255.255.255.0 in prefix is “24”, and mask 255.255.255.252 in prefix is “30”.
Command Mode: DHCP Address Pool Mode

1-5
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Default: None
Usage Guide: If no mask or prefix is configured when configuring the IP address, and no
information in the IP address pool indicates anything about the mask, the system will
assign a mask automatically according to the IP address class.
This command is used with “hardware address” command or “client identifier” command
when binding addresses manually. If the identifier or hardware address of the requesting
client matches the specified identifier or hardware address, the DHCP server assigns the
IP address defined in “host” command to the client.
Example: Specifying IP address 10.1.128.160 to be bound to user with hardware address
00-10-5a-60-af-12 in manual address binding.
Switch(dhcp-1-config)#hardware-address 00-10-5a-60-af-12
Switch(dhcp-1-config)#host 10.1.128.160 24
Related command: hardware-address, client-identifier

1.1.14 ip dhcp conflict logging

Command: ip dhcp conflict logging


no ip dhcp conflict logging
Function: Enables logging for address conflicts detected by the DHCP server; the “no ip
dhcp conflict logging” command disables the logging.
Default: Logging for address conflict is enabled by default.
Command mode: Global Mode
Usage Guide: When logging is enabled, once the address conflict is detected by the
DHCP server, the conflicting address will be logged. Addresses present in the log for
conflicts will not be assigned dynamically by the DHCP server until the conflicting records
are deleted.
Example: Disable logging for DHCP server.
Switch(config)#no ip dhcp conflict logging
Related Command: clear ip dhcp conflict

1.1.15 ip dhcp disable

Command: ip dhcp disbale


no ip dhcp disable
Function: The port disables DHCP services, the no command enables DHCP services.
Parameter: None.
Default: Enable.
Command Mode: Port mode.
Usage Guide: After the port disables DHCP services, directly drop all DHCP packets sent

1-6
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

by the port.
Example: The port disables DHCP services.
switch(config-if-ethernet1/3)#ip dhcp disable

1.1.16 ip dhcp excluded-address

Command: ip dhcp excluded-address <low-address> [<high-address>]


no ip dhcp excluded-address <low-address> [<high-address>]
Function: Specifies addresses excluding from dynamic assignment; the “no ip dhcp
excluded-address <low-address> [<high-address>]” command cancels the setting.
Parameters: <low-address> is the starting IP address, [<high-address>] is the ending
IP address.
Default: Only individual address is excluded by default.
Command mode: Global Mode
Usage Guide: This command can be used to exclude one or several consecutive
addresses in the pool from being assigned dynamically so that those addresses can be
used by the administrator for other purposes.
Example: Reserving addresses from 10.1.128.1 to 10.1.128.10 from dynamic
assignment.
Switch(config)#ip dhcp excluded-address 10.1.128.1 10.1.128.10

1.1.17 ip dhcp pool

Command: ip dhcp pool <name>


no ip dhcp pool <name>
Function: Configures a DHCP address pool and enter the pool mode; the “no ip dhcp
pool <name>“command deletes the specified address pool.
Parameters: <name> is the address pool name, up to 32 characters are allowed.
Command mode: Global Mode
Usage Guide: This command is used to configure a DHCP address pool under Global
Mode and enter the DHCP address configuration mode.
Example: Defining an address pool named “1”.
Switch(config)#ip dhcp pool 1
Switch(dhcp-1-config)#

1.1.18 ip dhcp conflict ping-detection enable

Command: ip dhcp conflict ping-detection enable


no ip dhcp conflict ping-detection enable

1-7
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Function: Enable Ping-detection of conflict on DHCP server; the no operation of this


command will disable the function.
Parameters: None.
Default Settings: By default, Ping-detection of conflict is disabled.
Command Mode: Global Configuration Mode.
Usage Guide: To enable Ping-detection of conflict, one should enable the log of conflict
addresses, when which is disabled, so will the ping-detection of conflict. When a client is
unable to receive Ping request messages (when blocked by firewall, for example), this
function will check local ARP according to allocated IP: if a designated IP has a
corresponding ARP, then an address conflict exists; otherwise, allocate it to the client.
Examples: Enable Ping-detection of conflict.
Switch(config)#ip dhcp conflict ping-detection enable
Related Command: ip dhcp conflict logging, ip dhcp ping packets, ip dhcp ping
timeout

1.1.19 ip dhcp ping packets

Command: ip dhcp ping packets <request-num>


no ip dhcp ping packets
Function: Set the max number of Ping request (Echo Request) message to be sent in
Ping-detection of conflict on DHCP server, whose default value is 2; the no operation of
this command will restore the default value.
Parameters: <request-num> is the number of Ping request message to be sent in
Ping-detection of conflict.
Default Settings: No more than 2 Ping request messages will be sent by default.
Command Mode: Global Configuration Mode.
Examples: Set the max number of Ping request (Echo Request) message to be sent in
Ping-detection of conflict on DHCP server as 3.
Switch(config)#ip dhcp ping packets 3
Related Command: ip dhcp conflict ping-detection enable, ip dhcp ping timeout

1.1.20 ip dhcp ping timeout

Command: ip dhcp ping timeout <timeout-value>


no ip dhcp ping timeout
Function: Set the timeout period (in ms) of waiting for a reply message (Echo Request)
after each Ping request message (Echo Request) in Ping-detection of conflict on DHCP
server, whose default value is 500ms. The no operation of this command will restore the
default value.

1-8
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Parameters: <timeout-value> is the timeout period of waiting for a reply message after
each Ping request message in Ping-detection of conflict.
Default Settings: The timeout period is 500ms by default.
Command Mode: Global Configuration Mode.
Examples: Set the timeout period (in ms) of waiting for each reply message (Echo
Request) in Ping-detection of conflict on DHCP server as 600ms.
Switch(config)# ip dhcp ping time out 600
Related Command: ip dhcp conflict ping-detection enable, ip dhcp ping packets

1.1.21 lease

Command: lease { [<days>] [<hours>][<minutes>] | infinite }


no lease
Function: Sets the lease time for addresses in the address pool; the “no lease”
command restores the default setting.
Parameters: <days> is number of days from 0 to 365; <hours> is number of hours from
0 to 23; <minutes> is number of minutes from 0 to 59; infinite means perpetual use.
Default: The default lease duration is 1 day.
Command Mode: DHCP Address Pool Mode
Usage Guide: DHCP is the protocol to assign network addresses dynamically instead of
permanently, hence the introduction of ease duration. Lease settings should be decided
based on network conditions: too long lease duration offsets the flexibility of DHCP, while
too short duration results in increased network traffic and overhead. The default lease
duration of switch is 1 day.
Example: Setting the lease of DHCP pool “1” to 3 days 12 hours and 30 minutes.
Switch(dhcp-1-config)#lease 3 12 30

1.1.22 max-lease-time

Command: max-lease-time {[<days>] [<hours>] [<minutes>] | infinite}


no max-lease-time
Function: Set the maximum lease time for the addresses in the address pool; the no
command restores the default setting.
Parameters: <days> is number of days from 0 to 365; <hours> is number of hours from
0 to 23; <minutes> is number of minutes from 0 to 59; infinite means perpetual use.
Default: The default lease time is 1 day.
Command Mode: DHCP Address Pool Mode
Usage Guide: This command is used to DHCP request packets with option51. If the lease
time (user requests the address) exceeds the maximum lease time configured, the lease

1-9
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

that DHCP server assigns the address is the maximum lease time configured. If the lease
time requested by the user is less than the maximum lease time configured, the lease that
DHCP server assigns the address is the lease time requested by the user. The maximum
lease time is able to be set by the administrator according to the actual network condition,
and the maximum lease time is 1 day by default.
Example: Set the maximum lease time of DHCP address pool1 to 3 days 12 hours and 30
minutes.
Switch(dhcp-1-config)#max-lease-time 3 12 30

1.1.23 netbios-name-server

Command: netbios-name-server <address1>[<address2>[…<address8>]]


no netbios-name-server
Function: Configures WINS servers’ address; the “no netbios-name-server” command
deletes the WINS server.
Parameters: <address1>…<address8> are IP addresses, in decimal format.
Default: No WINS server is configured by default.
Command Mode: DHCP Address Pool Mode
Usage Guide: This command is used to specify WINS server for the client, up to 8 WINS
server addresses can be configured. The WINS server address assigned first has the
highest priority. Therefore, address 1 has the highest priority, and address 2 the second,
and so on.
Example: Setting the server address of DHCP pool “1” to 192.168.1.1.
Switch(dhcp-1-config)#netbios-name-server 192.168.1.1

1.1.24 netbios-node-type

Command: netbios-node-type {b-node | h-node | m-node | p-node | <type-number>}


no netbios-node-type
Function: Sets the node type for the specified port; the “no netbios-node-type”
command cancels the setting.
Parameters: b-node stands for broadcasting node, h-node for hybrid node that
broadcasts after point-to-point communication; m-node for hybrid node to communicate in
point-to-point after broadcast; p-node for point-to-point node; <type-number> is the node
type in Hex from 0 to FF.
Default: No client node type is specified by default.
Command Mode: DHCP Address Pool Mode
Usage Guide: If client node type is to be specified, it is recommended to set the client
node type to h-node that broadcasts after point-to-point communication.

1-10
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Example: Setting the node type for client of pool 1 to broadcasting node.
Switch(dhcp-1-config)#netbios-node-type b-node

1.1.25 network-address

Command: network-address <network-number> [<mask> | <prefix-length>]


no network-address
Function: Sets the scope for assignment for addresses in the pool; the “no
network-address” command cancels the setting.
Parameters: <network-number> is the network number; <mask> is the subnet mask in
the decimal format; <prefix-length> stands for mask in prefix form. For example, mask
255.255.255.0 in prefix is “24”, and mask 255.255.255.252 in prefix is “30”. Note: When
using DHCP server, the pool mask should be longer or equal to that of layer 3 interface IP
address in the corresponding segment.
Default: If no mask is specified, default mask will be assigned according to the address
class.
Command Mode: DHCP Address Pool Mode
Usage Guide: This command sets the scope of addresses that can be used for dynamic
assignment by the DHCP server; one address pool can only have one corresponding
segment. This command is exclusive with the manual address binding command
“hardware address” and “host”.
Example: Configuring the assignable address in pool 1 to be 10.1.128.0/24.
Switch(dhcp-1-config)#network-address 10.1.128.0 24

1.1.26 next-server

Command: next-server <address1>[<address2>[…<address8>]]


no next-server
Function: Sets the server address for storing the client import file; the “no next-server”
command cancels the setting.
Parameters: <address1>…<address8> are IP addresses, in the decimal format.
Command Mode: DHCP Address Pool Mode
Usage Guide: This command configures the address for the server hosting client import
file. This is usually used for diskless workstations that need to download configuration files
from the server on boot up. This command is used together with “bootfile”.
Example: Setting the hosting server address as 10.1.128.4.
Switch(dhcp-1-config)#next-server 10.1.128.4

1.1.27 option
1-11
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Command: option <code> {ascii <string> | hex <hex> | ipaddress <ipaddress>}


no option <code>
Function: Sets the network parameter specified by the option code; the “no option
<code>“command cancels the setting for option.
Parameters: <code> is the code for network parameters; <string> is the ASCII string up
to 255 characters; <hex> is a value in Hex that is no greater than 510 and must be of even
length; <ipaddress> is the IP address in decimal format, up to 63 IP addresses can be
configured.
Command Mode: DHCP Address Pool Mode
Default: None
Usage Guide: The switch provides common commands for network parameter
configuration as well as various commands useful in network configuration to meet
different user needs. The definition of option code is described in detail in RFC2123.
Example: Setting the WWW server address as 10.1.128.240.
Switch(dhcp-1-config)#option 72 ip 10.1.128.240

1.1.28 service dhcp

Command: service dhcp


no service dhcp
Function: Enables DHCP server; the “no service dhcp” command disables the DHCP
service.
Parameters: None
Default: DHCP service is disabled by default.
Command mode: Global Mode
Usage Guide: Both DHCP server and DHCP relay are included in the DHCP service.
When DHCP services are enabled, both DHCP server and DHCP relay are enabled.
Switch can only assign IP address for the DHCP clients and enable DHCP relay when
DHCP server function is enabled.
Example: Enabling DHCP server.
Switch(config)#service dhcp

1.1.29 show ip dhcp binding

Command: show ip dhcp binding [[<ip-addr>] [type {all | manual | dynamic}]


[count] ]
Function: Displays IP-MAC binding information.
Parameters: <ip-addr> is a specified IP address in decimal format; all stands for all
binding types (manual binding and dynamic assignment); manual for manual binding;

1-12
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

dynamic for dynamic assignment; count displays statistics for DHCP address binding
entries.
Command mode: Admin and Configuration Mode.
Example:
Switch# show ip dhcp binding
IP address Hardware address Lease expiration Type
10.1.1.233 00-00-E2-3A-26-04 Infinite Manual
10.1.1.254 00-00-E2-3A-5C-D3 60 Automatic
Displayed information Explanation
IP address IP address assigned to a DHCP client
Hardware address MAC address of a DHCP client
Lease expiration Valid time for the DHCP client to hold the IP
address
Type Type of assignment: manual binding or dynamic
assignment.

1.1.30 show ip dhcp conflict

Command: show ip dhcp conflict


Function: Displays log information for addresses that have a conflict record.
Command mode: Admin and Configuration Mode.
Example:
Switch# show ip dhcp conflict
IP Address Detection method Detection Time
10.1.1.1 Ping FRI JAN 02 00:07:01 2002
Displayed information Explanation
IP Address Conflicting IP address
Detection method Method in which the conflict is detected.
Detection Time Time when the conflict is detected.

1.1.31 show ip dhcp relay information option

Command: show ip dhcp relay information option


Function: Show the relative configuration for DHCP relay option82.
Parameters: None.
Command mode: Admin and configuration mode
Default: None.
Usage guide: None.
Example: Set the admin mode timeout value to 6 minutes.

1-13
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Switch#show ip dhcp relay information option


ip dhcp server relay information option(i.e. option 82) is enabled
ip dhcp relay information option(i.e. option 82) is enabled

1.1.32 show ip dhcp server statistics

Command: show ip dhcp server statistics


Function: Displays statistics of all DHCP packets for a DHCP server.
Command mode: Admin and Configuration Mode.
Example:
Switch# show ip dhcp server statistics
Address pools 3
Database agents 0
Automatic bindings 2
Manual bindings 0
Conflict bindings 0
Expired bindings 0
Malformed message 0

Message Received
BOOTREQUEST 3814
DHCPDISCOVER 1899
DHCPREQUEST 6
DHCPDECLINE 0
DHCPRELEASE 1
DHCPINFORM 1

Message Send
BOOTREPLY 1911
DHCPOFFER 6
DHCPACK 6
DHCPNAK 0
DHCPRELAY 1907
DHCPFORWARD 0
Switch#
Displayed information Explanation
Address pools Number of DHCP address pools
configured.

1-14
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

Database agents Number of database agents.


Automatic bindings Number of addresses assigned
automatically
Manual bindings Number of addresses bound manually
Conflict bindings Number of conflicting addresses
Expired bindings Number of addresses whose leases are
expired
Malformed message Number of error messages.
Message Received Statistics for DHCP packets received
BOOTREQUEST Total packets received
DHCPDISCOVER Number of DHCPDISCOVER packets
DHCPREQUEST Number of DHCPREQUEST packets
DHCPDECLINE Number of DHCPDECLINE packets
DHCPRELEASE Number of DHCPRELEASE packets
DHCPINFORM Number of DHCPINFORM packets
Message Send Statistics for DHCP packets sent
BOOTREPLY Total packets sent
DHCPOFFER Number of DHCPOFFER packets
DHCPACK Number of DHCPACK packets
DHCPNAK Number of DHCPNAK packets
DHCPRELAY Number of DHCPRELAY packets
DHCPFORWARD Number of DHCPFORWARD packets

1.2 Commands for DHCP Relay Configuration

1.2.1 ip dhcp broadcast suppress

Command: ip dhcp broadcast suppress


no ip dhcp broadcast suppress
Function: Enable DHCP broadcast suppress function, the no command disables the
function.
Parameter: None.
Default: Disable.
Command Mode: Global mode
Usage Guide: Suppress the forwarding about DHCP broadcast packets, namely, drop or

1-15
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

copy DHCP broadcast packets to CPU.


Example: Enable DHCP broadcast suppress function.
Switch(config)#ip dhcp broadcast suppress

1.2.2 ip dhcp relay share-vlan <vlanid> sub-vlan


<vlanlist>

Command: ip dhcp relay share-vlan <vlanid> sub-vlan <vlanlist>


no ip dhcp relay share-vlan
Function: Specify sub-vlan of a share-vlan, the no command cancels sub-vlan.
Parameter: <vlanid> is VLAN ID of share-vlan, <vlanlist> is sub-vlan list.
Default: None.
Command Mode: Global mode.
Usage Guide: share-vlan may include many sub-vlan, but a sub-vlan only corresponds to
a share-vlan. When layer 2 device of DHCP Relay receive DHCP Request, firstly judge
whether VLAN with layer 3 interface for receiving package. If there is layer 3 interface in
package, use the interface to process DHCP Relay, or else use layer 3 interface of
share-vlan to process DHCP Relay when the vlan is sub-vlan of share-vlan.

1.2.3 ip forward-protocol udp bootps

Command: ip forward-protocol udp bootps


no ip forward-protocol udp bootps
Function: Sets DHCP relay to forward UPD broadcast packets on the port; the “no ip
forward-protocol udp bootps”command cancels the service.
Parameter: bootps forwarding UDP port as 67 DHCP broadcast packets.
Default: Not forward UPD broadcast packets by default.
Command mode: Global Mode
Usage Guide: The forwarding destination address is set in the “ip helper-address”
command and described later.
Example: Setting DHCP packets to be forwarded to 192.168.1.5.
Switch(config)#ip forward-protocol udp boots
Switch(config)#interface vlan 1
Switch(Config-if-Vlan1)#ip helper-address 192.168.1.5

1.2.4 ip helper-address

Command: ip helper-address <ip-address>

1-16
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP

no ip helper-address <ip-address>
Function: Specifies the destination address for the DHCP relay to forward UDP packets.
The “no ip helper-address <ip-address>” command cancels the setting.
Default: None.
Command mode: Interface Configuration Mode
Usage Guide: The DHCP relay forwarding server address corresponds to the port
forwarding UDP, i.e. DHCP relay forwards corresponding UDP packets only to the
corresponding server instead of all UDP packets to all servers. When this command is run
after “ip forward-protocol udp <port>” command, the forwarding address configured by
this command receives the UDP packets from <port>. The combination of “ip
forward-protocol udp <port>” command and this command should be used for
configuration.

1.2.5 show ip forward-protocol

Command: show ip forward-protocol


Function: Show the configured port ID of the protocol which support the forwarding of
broadcast packets, it means the port ID for forwarding DHCP packets.
Command mode: Admin and configuration mode
Example:
Switch#show ip forward-protocol
Forward protocol(UDP port): 67(active)

1.2.6 show ip helper-address

Command: show ip helper-address


Function: Show the configuration relation for the port ID of the protocol (It can forward
broadcast packets), the interface (It supports forwarding function) and the forwarded
destination IP.
Command mode: Admin and configuration mode
Example:
Switch#show ip helper-address
Forward protocol Interface Forward server
67(active) Vlan1 192.168.1.1

1-17
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Chapter 2 Commands for DHCPv6

2.1 clear ipv6 dhcp binding

Command: clear ipv6 dhcp binding [<ipv6-address>] [pd <ipv6-prefix |


prefix-length>]
Function: To clear one specified DHCPv6 assigned address binding record or all the IPv6
address binding records.
Parameter: <ipv6-address> is the specified IPv6 address with binding record;
<ipv6-prefix| prefix-length> is the specified IPv6 prefix with binding record; To clear all
IPv6 address binding record if there is no specified record.
Command Mode: Admin Configuration Mode.
Usage Guide: DHCPv6 IPv6 address binding information can be displayed through the
command show ipv6 dhcp binding. If DHCPv6 client does not use the DHCPv6
allocated IPv6 address but when the life time of the IPv6 address does not end, the
DHCPv6 server will not remove its bind for this address. In this situation, the address
binding information can be removed manually through this command; and if no parameter
is appended, this command will remove all the address binding information, then all
addresses and prefix will be assigned again in the DHCPv6 address pool.
Example: To delete all binding record of IPv6 address and prefix.
Switch#clear ipv6 dhcp binding
Relative Command: show ipv6 dhcp binding

2.2 clear ipv6 dhcp conflict

Command: clear ipv6 dhcp conflict [<address>]


Function: Clear the address with the conflict record in address conflict log.
Parameter: <address> is the specified address with the conflict record, no specified
address will clear all conflict records.
Command mode: Admin Mode
Usage Guide: With show ipv6 dhcp conflict command, the user can check the conflict
in which IP addresses. With this command, the user can clears the conflict record of an
address. If no specified address will clear the conflict record of all addresses in log. After
the conflict records are cleared in log, these addresses can be used by DHCPv6 server
again.
Example: When administrator checks the conflict logs, administrator discovers that

2-1
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

address 2001::1 with the conflict record is not used, so its record will be cleared from
address conflict files.
Switch#clear ipv6 dhcp conflict 2001::1

2.3 clear ipv6 dhcp statistics

Command: clear ipv6 dhcp statistics


Function: Clear the statistic records of DHCPv6 packets, the statistic counter of DHCPv6
packets is cleared.
Parameter: None.
Command mode: Admin Mode
Usage Guide: With show ipv6 dhcp statistics command, the user can check the
statistic information of the counter for DHCPv6 packets, all statistic information is an
accumulative value. With this command will clear the counter to check the debugging
conveniently.
Example: Clear the counter of DHCPv6 packets.
Switch#clear ipv6 dhcp statistics
Relative Command: show ipv6 dhcp statistics

2.4 debug ipv6 dhcp client packet

Command: debug ipv6 dhcp client {event | packet}


no debug ipv6 dhcp client {event | packet}
Function: To enable the debugging messages for protocol packets of DHCPv6 prefix
delegation client, the no form of this command will disable the debugging information.
Default: Disabled.
Command Mode: Admin Mode.
Example:
Switch# debug ipv6 dhcp client packet

2.5 debug ipv6 dhcp detail

Command: debug ipv6 dhcp detail


no debug ipv6 dhcp detail
Function: To display the debug information of all kinds of packets received or sent by
DHCPv6, the no form of this command disabled this function.
Default: Disabled.

2-2
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Command Mode: Admin Mode.


Example:
Switch# debug ipv6 dhcp detail

2.6 debug ipv6 dhcp relay packet

Command: debug ipv6 dhcp relay packet


no debug ipv6 dhcp relay packet
Function: To enable the debugging information for protocol packets of DHCPv6 relay, the
no form of this command will disable the debugging.
Default: Disabled.
Command Mode: Admin Mode.
Example:
Switch# debug ipv6 dhcp relay packet

2.7 debug ipv6 dhcp server

Command: debug ipv6 dhcp server { event | packet }


no debug ipv6 dhcp server { event | packet }
Function: To enable the debugging information of DHCPv6 server, the no form of this
command will disable the debugging.
Parameter: event is to enable debugging messages for DHCPv6 server events, such as
address allocation; packet is for debugging messages of protocol packets of DHCPv6
server.
Default: Disabled.
Command Mode: Admin Mode.
Example:
Switch#debug ipv6 dhcp server packet

2.8 dns-server

Command: dns-server <ipv6-address>


no dns-server <ipv6-address>
Function: To configure the IPv6 address of the DNS server for DHCPv6 client; the no
form of this command will remove the DNS configuration.
Parameter: <ipv6-address> is the IPv6 address of DNS Server.
Default: No configured address pool of DNS Server by default.

2-3
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Command Mode: DHCPv6 Address Pool Configuration Mode.


Usage Guide: For each address pool, at most three DNS server can be configured, and
the addresses of the DNS server must be valid IPv6 addresses.
Example: To configure the DNS Server address of DHCPv6 client as 2001:da8::1.
Switch(dhcp-1-config)#dns-server 2001:da8::1

2.9 domain-name

Command: domain-name <domain-name>


no domain-name <domain-name>
Function: To configure domain name of DHCPv6 client; the no form of this command will
delete the domain name.
Parameter: <domain-name> is the domain name, less than 32 characters.
Command Mode: DHCPv6 Address Pool Configuration Mode.
Default: The domain name parameter of address pool is not configured by default.
Usage Guide: At most 3 domain names can be configured for each address pool.
Example: To set the domain name of DHCPv6 client as test.com.cn
Switch(dhcp-1-config)#domain-name test.com.cn

2.10 excluded-address

Command: excluded-address <ipv6-address>


no excluded-address <ipv6-address>
Function: To configure the specified IPv6 address to be excluded from the address pool,
the excluded address will not be allocated to any hosts; the no form of this command will
remove the configuration.
Parameter: <ipv6-address> is the IPv6 address to be excluded from being allocated to
hosts in the address pool.
Default: Disabled
Command Mode: DHCPv6 address pool configuration mode.
Usage Guide: This command is used to preserve the specified address from DHCPv6
address allocation.
Example: To configure to exclude 2001:da8:123::1 from DHCPv6 address allocation.
Switch(config)#excluded-address 2001:da8:123::1

2-4
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

2.11 ipv6 address

Command: ipv6 address <prefix-name> <ipv6-prefix/prefix-length>


no ipv6 address <prefix-name> <ipv6-prefix/prefix-length>
Function: To configure the specified interface to use prefix delegation for address
allocation. The no form of this command will disable the using of prefix delegation for
address allocation.
Parameters: <prefix-name> is a string with its length no more than 32, designating or
manual configuring the name of the address prefix defined in the prefix pool.
<ipv6-prefix/prefix-length> is latter part of the IPv6 address excluding the address prefix,
as well as its length.
Command Mode: Interface Configuration Mode.
Default: No global address is configured for interfaces by default.
Usage Guide: The IPv6 address of an interface falls into two parts: <prefix-name> and
<ipv6-prefix>/<prefix-length>. If routing advertisement has been enabled, the first 64
bits of the addresses will be advertised. The address generated by <prefix-name> and
<ipv6-prefix/prefix-length> combination will be removed, and the advertising of the
prefix will be disabled. Only one <ipv6-prefix/prefix-length> can be configured for one
prefix name.
Example: If the prefix name my-prefix designates 2001:da8:221::/48, then the following
command will add the address 2001:da8:221:2008::2008 to interface VLAN1.
Switch(Config-if-Vlan1)# ipv6 address my-prefix 0:0:0:2008::2008/64

2.12 ipv6 dhcp client pd

Command: ipv6 dhcp client pd <prefix-name> [rapid-commit]


no ipv6 dhcp client pd
Function: To configure DHCPv6 prefix delegation client for the specified interface. The no
form of this command will disable the DHCPv6 prefix delegation client and remove the
allocated address prefix.
Parameters: <prefix-name> is the string with its length no more than 32, which
designates the name of the address prefix. If rapid-commit optional is specified and the
prefix delegation server enables the rapid-commit function, then the prefix delegation
server will reply the prefix delegation client with the REPLY message directly. And the
prefix delegation request will be accomplished by exchanging messages once.
Command Mode: Interface Configuration Mode.
Default: DHCPv6 prefix delegation client is not enabled by default.

2-5
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Usage Guide: This command is used to configure the prefix delegation client on the
specified interface, an interface with prefix delegation client enabled will send SOLICIT
packets to try to get address prefix from the server. If the prefix is retrieved correctly, the
address prefix in the global address pool can be used by the ipv6 address command to
generate a valid IPv6 address. This command is exclusive with ipv6 dhcp server and
ipv6 dhcp relay destination. If the prefix delegation client is disabled for an interface,
then the address prefix which is get from this interface through prefix delegation client, will
be removed from the global address pool. Also the interface address which is generated
by the prefix delegation client will be removed, and routing advertisement with the prefix
will be disabled. If any general prefix has been configured by the ipv6 general-prefix
command, the same prefix learnt from prefix delegation will be disagreed.
Example:
Switch(Config-if-Vlan1)#ipv6 dhcp client pd ClientA rapid-commit

2.13 ipv6 dhcp client pd hint

Command: ipv6 dhcp client pd hint <prefix|prefix-length>


no ipv6 dhcp client pd hint <prefix|prefix-length>
Function: Designate the prefix demanded by the client and its length. The no operation of
this command will delete that prefix and its length from the specified interface.
Parameters: <prefix|prefix-length> means the prefix demanded by the client and its
length.
Command Mode: Interface Configure Mode.
Default Settings: There is no such configuration in the system by default.
Usage Guide: The system designates a prefix and its length on the interface for a client. If
client prefix-proxy demanding function is enabled on the interface and hint function is
enabled on the switch, the user will have prior claim to the prefix it demands and the prefix
length when the server allocates them. Only one hint prefix is allowed in the system.
Examples:
Switch(vlan-1-config)#ipv6 dhcp client pd hint 2001::/48

2.14 ipv6 dhcp pool

Command: ipv6 dhcp pool <poolname>


no ipv6 dhcp pool <poolname>
Function: To configure the address pool for DHCPv6, and enter the DHCPv6 address
pool configuration mode. In this mode, information such as the address prefix to be

2-6
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

allocated, the DNS server addresses, and domain names, can be configured for the
DHCPv6 client. The no form of this command will remove the configuration of the address
pool.
Parameter: < poolname> is the address pool name of DHCPv6 with its length no more
than 32.
Default: Any DHCPv6 address pool are not configured by default.
Command Mode: Global Mode.
Usage Guide: This command should be launched in global configuration mode, and falls
in DHCPv6 address pool configuration mode if launched successfully. To remove a
configured address pool, interface bindings related to the address pool, as well as the
related address bindings will be removed.
Example: To define an address pool, named 1.
Switch(config)#ipv6 dhcp pool 1

2.15 ipv6 dhcp relay destination

Command: ipv6 dhcp relay destination {[<ipv6-address>] [interface


{ <interface-name> | vlan <1-4096> } ] }
no ipv6 dhcp relay destination { [<ipv6-address>] [ interface
{ <interface-name> | vlan <1-4096> } ] }
Function: To configure the destination to which the DHCPv6 relay forwards the DHCPv6
requests from the clients, the destination should be the address of an external DHCPv6
relay or the DHCPv6 server. The no form of this command will remove the configuration.
Parameters: <ipv6-address> is the address of the destination to which the DHCPv6
relay forwards; <interface-name> or VLAN is the interface name or VLAN id which is
used for forwarding of DHCPv6 requests, <interface-name> should be a lay three VLAN
name, and the VLAN id is limited between 1 and 4096. If <ipv6-addess> is a global
unicast address, the interface parameter should not be configured; If <ipv6-address> is
an local address, the interface parameter is required be configured; The destination
address for the DHCPv6 server will be the multicast address of ALL_DHCP_Servers
(FF05::1:3), if the interface parameter is configured only.
Command Mode: Interface Configuration Mode.
Default: By default, destination address for DHCPv6 relay is not configured.
Usage Guide: This command is used to configure the DHCPv6 relay for the specified
interface, the address should be the address of another DHCPv6 relay or the address
DHCPv6 server. At most three relay addresses can be configured for an interface. To be
mentioned, the DHCPv6 relay stops working only if all the relay destination address
configurations have been removed. This command is mutually exclusive to “ipv6 dhcp

2-7
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

server” and “ipv6 dhcp client pd” commands.


Example:
Switch(Config-if-Vlan1)#ipv6 dhcp relay destination 2001:da8::1

2.16 ipv6 dhcp server

Command: ipv6 dhcp server <poolname> [preference <value>] [rapid-commit]


[allow-hint]
no ipv6 dhcp server <poolname>
Function: This command configures the address pool which will be allocated by the
DHCPv6 server through the specified interface. The no form of this command will remove
the address pool configuration.
Parameters: <poolname> is a string with its length less than 32, which designates the
name of the address pool which is associated with the specified interface. If the
rapid-commit option has been specified, the DHCPv6 server send a REPLY packet to the
client immediately after receiving the SOLICIT packet. If the preference option has been
specified, <value> will be the priority of the DHCPv6 server, with its value allowed
between 0 and 255, and with 0 by default, the bigger the preference value is, the higher
the priority of the DHCPv6 server. If the allow-hint option has been specified, the client
expected value of parameters will be appended in its request packets.
Command Mode: Interface Configuration Mode.
Default: DHCPv6 address pool based on port is not configured by default.
Usage Guide: This command configure the DHCPv6 address pool which is applied by the
DHCPv6 server for the specified interface, as well as optional parameters. One VLAN can
bind many DHCPv6 address pools and assign the address for DHCPv6 request packet
from direct-link and relay delegation.
Example:
Switch(Config-if-Vlan1)#ipv6 dhcp server PoolA preference 80 rapid-commit allow-hint

2.17 ipv6 general-prefix

Command: ipv6 general-prefix <prefix-name> <ipv6-prefix/prefix-length>


no ipv6 general-prefix <prefix-name>
Function: To define an IPv6 general prefix. The no form of this command will delete the
configuration.
Parameter: <prefix-name> is a character string less than 32 characters, to use as IPv6
general prefix name. <ipv6-prefix/prefix-length> is defined as IPv6 general prefix.

2-8
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Command Mode: Global Mode.


Default: IPv6 general prefix is not configured by default.
Usage Guide: If IPv6 general prefix is configured, the interface will use the configured
prefix for IPv6 address generating. Commonly, the general prefix is used for enterprise
IPv6 prefix, and when entering an IPv6 address, users can simply add the address suffix
of to the name of the general prefix. The configured address prefix will be reserved in the
general address prefix pool. At most 8 general prefix can be configured at the same time.
When trying to remove a configured general prefix name, the operation will fail if any
interfaces used the configured prefix. Only one general prefix for a prefix name. The
general prefix cannot use the same prefix definition with prefixes learnt from prefix
delegation.
Example: To set the prefix of 2001:da8:221::/48 to general prefix my-prefix.
Switch(config)# ipv6 general-prefix my-prefix 2001:da8:221::/48

2.18 ipv6 local pool

Command: ipv6 local pool <poolname> <prefix/prefix-length> <assigned-length>


no ipv6 local pool <poolname>
Function: To configure the address pool for prefix delegation. The no form of this
command will remove the IPv6 prefix delegation configuration.
Parameters: <poolname> is the name for the IPv6 address pool of the prefix delegation,
the length name string should be less than 32. <prefix/prefix-length> is the address
prefix and its length of the prefix delegation. <assigned-length> is the length of the prefix
in the address pool which can be retrieved by the client, the assigned prefix length should
be no less than the value of <prefix-length>
Command Mode: Global Mode.
Default: No IPv6 prefix delegation address pool is configured by default.
Usage Guide: This command should be used with the “prefix delegation pool”
command to allocate address prefixes to the clients. If IPv6 prefix delegation is removed,
the associated “prefix delegation” command will be in-effective either.

2.19 lifetime

Command: lifetime {<valid-time> | infinity} {<preferred-time> | infinity}


no lifetime
Function: To configure the life time for the addresses or the address prefixes allocated by
DHCPv6. The no form of this command will restore the default setting.

2-9
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Parameters: <valid-time> and <preferred-time> are the valid life time and preferred life
time respectively for the allocated IPv6 addresses in the local address pool. Its value is
allowed to be between 1 and 31536000 in seconds, and <preferred-time> should never
be bigger than <valid-time>. The infinity parameter designates the maximum life time.
Command Mode: DHCPv6 Address Pool Configuration Mode.
Default: The default valid life time and preferred life time are 2592000 seconds (30 days)
and 604800 seconds (7 days) respectively.
Example: To configure the valid life time as 1000 seconds, and the preferred life time as
600 seconds.
Switch(config)#lifetime 1000 600

2.20 network-address

Command: network-address <ipv6-pool-start-address> {<ipv6-pool-end-address> |


<prefix-length>} [eui-64]
no network-address
Function: To configure the DHCPv6 address pool; the no form of this command will
remove the address pool configuration.
Parameters: <ipv6-pool-start-adderss> is the start of the address pool;
<ipv6-pool-end-address> is the end of the address pool; <prefix-length> is the length of
the address prefix, which is allowed to be between 3 and 128, and 64 by default, the size
of the pool will be determined by <prefix-length> if it has been specified.
<ipv6-pool-end-address> and <prefix-length> alternative options to determine the size
of the IPv6 address pool. If <prefix-length> is 64 and the eui-64 option has been
configured, the DHCPv6 server will allocate IPv6 addresses according to the EUI-64
standard, or the DHCPv6 server will be allocating addresses sequentially.
Default: No address pool is configured by default.
Command Mode: DHCPv6 Address Pool Configuration Mode.
Usage Guide: This command configures the address pool for the DHCPv6 server to
allocate addresses, only one address range can be configured for each address pool. To
be noticed, if the DHCPv6 server has been enabled, and the length of the IPv6 address
prefix has been configured, the length of the prefix in the address pool should be no less
than the length of the prefix of the IPv6 address of the respective layer three interfaces in
the switch. If <ipv6-pool-end-address> is bigger than <ipv6-pool-start-address>, this
command returns at once.
Example: To configure the address range for address pool as
2001:da8:123::100-2001:da8:123::200.
Switch(dhcp-1-config)#network-address 2001:da8:123::100 2001:da8:123::200

2-10
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Relative Command: excluded-address

2.21 prefix-delegation

Command: prefix-delegation <ipv6-prefix/prefix-length> <client-DUID> [iaid


<iaid>] [lifetime <valid-time> <preferred-time>]
no prefix-delegation <ipv6-prefix/prefix-length> <client-DUID> [iaid <iaid>]
Function: To configure dedicated prefix delegation for the specified user. The no form of
this command will remove the dedicated prefix delegation.
Parameters: <ipv6-prefix/prefix-length> is the length of the prefix to be allocated to the
client. <client-DUID> is the DUID of the client. DUID with the type of DUID-LLT and
DUID-LL are supported, the DUID of DUID-LLT type should be of 14 characters. <iaid> is
the value to be appended in the IA_PD field of the clients’ requests. <valid-time> and
<preferred-time> are the valid life time and the preferred life time of the IPv6 address
allocated to the clients respectively, in seconds, and its value is allowed between 1 and
31536000. However <preferred-time> should be less than <valid-time>. If not
configured, the default <valid-time> will be 2592000, while <preferred-time> will be
604800.
Command Mode: DHCPv6 Address Pool Configuration Mode.
Default: Disabled.
Usage Guide: This command configures the specified IPv6 address prefix to bind with
the specified client. If no IAID is configured, any IA of any clients will be able get this
address prefix. At most eight static binding address prefix can be configured for each
address pool. For prefix delegation, static binding is of higher priority than the prefix
address pool.
Example: The following command will allocate 2001:da8::/48 to the client with DUID as
0001000600000005000BBFAA2408, and IAID as 12.
Switch(dhcp-1-config)#prefix-delegation 2001:da8::/48
0001000600000005000BBFAA240812

2.22 prefix-delegation pool

Command: prefix-delegation pool <poolname> [lifetime <valid-time>


<preferred-time>]
no prefix-delegation pool <poolname>
Function: To configure prefix delegation name used by DHCPv6 address pool. The no
form of this command deletes the configuration.

2-11
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Parameters: <poolname> is the name of the address prefix pool, the length name string
should be less than 32. <valid-time> and <preferred-time> are the valid life time and the
preferred life time of the IPv6 address allocated to the clients respectively, in seconds, and
its value is allowed between 1 and 31536000.However <preferred-time> should be less
than <valid-time>, if not configured, the default <valid-time> will be 2592000, while
<preferred-time> will be 604800.
Command Mode: DHCPv6 address pool configuration mode.
Default: The prefix delegation name used by DHCPv6 address pool is not configured.
Usage Guide: This command configures the name of the address prefix pool for address
allocation. If configured, the addresses in the prefix address pool will be allocated to the
clients. This command can be used in association with the ipv6 local pool command. For
one address pool, only one prefix delegation pool can be bound. When trying to remove
the prefix name configuration, the prefix delegation service of the server will be
unavailable, if both the address pool is not associated with the prefix delegation pool and
no static prefix delegation binding is enabled.
Example:
Switch(dhcp-1-config)#prefix-delegation pool abc

2.23 service dhcpv6

Command: service dhcpv6


no service dhcpv6
Function: To enable DHCPv6 server function; the no form of this command disables the
configuration.
Parameter: None.
Default: Disabled.
Command Mode: Global Mode.
Usage Guide: The DHCPv6 services include DHCPv6 server function, DHCPv6 relay
function, DHCPv6 prefix delegation function. All of the above services are configured on
ports. Only when DHCPv6 server function is enabled, the IP address assignment of
DHCPv6 client, DHCPv6 relay and DHCPv6 prefix delegation functions enabled can be
configured on ports.
Example: To enable DHCPv6 server.
Switch(config)#service dhcpv6

2-12
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

2.24 show ipv6 dhcp

Command: show ipv6 dhcp


Function: To show the enable switch and DUID of DHCPv6 service.
Command Mode: Admin and Configuration Mode.
Usage Guide: To show the enable switch and DUID of DHCPv6 service, server identifier
options only use DUID of DUID-LLT type.
Example:
Switch#show ipv6 dhcp
DHCPv6 is enabled
LLT DUID is <00:01:00:01:43:b7:1b:81:00:03:0f:01:5f:9d>
LL DUID is <00:03:00:01:00:03:0f:01:5f:9d>

2.25 show ipv6 dhcp binding

Command: show ipv6 dhcp binding [<ipv6-address>| pd


<ipv6-prefix|prefix-length>|count]
Function: To show all the address and prefix binding information of DHCPv6.
Parameter: <ipv6-address> is the specified IPv6 address; count show the number of
DHCPv6 address bindings.
Command Mode: Admin and Configuration Mode.
Usage Guide: To show all the address and prefix binding information of DHCPv6, include
type, DUID, IAID, prefix, valid time and so on.
Example:
Switch#show ipv6 dhcp binding
Client: iatype IANA, iaid 0x0e001d92
DUID: 00:01:00:01:0f:55:82:4f:00:19:e0:3f:d1:83
IANA leased address: 2001:da8::10
Preferred lifetime 604800 seconds, valid lifetime 2592000 seconds
Lease obtained at %Jan 01 01:34:44 1970
Lease expires at %Jan 31 01:34:44 1970 (2592000 seconds left)

The number of DHCPv6 bindings is 1

2.26 show ipv6 dhcp conflict

Command: show ipv6 dhcp conflict

2-13
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Function: Show the log for the address that have a conflict record.
Command mode: Admin and Configuration Mode.
Example:
Switch# show ipv6 dhcp conflict

2.27 show ipv6 dhcp interface

Command: show ipv6 dhcp interface [<interface-name>]


Function: To show the information for DHCPv6 interface.
Parameter: <interface-name> is the name and number of interface, if
the<interface-name> parameter is not provided, then all the DHCPv6 interface
information will be shown.
Command Mode: Admin and Configuration Mode.
Usage Guide: To show the information for DHCPv6 interface, include Port Mode (Prefix
delegation client 、 DHCPv6 server 、 DHCPv6 relay) , and the relative conformation
information under all kinds of mode.
Example:
Switch#show ipv6 dhcp interface vlan10
Vlan10 is in server mode
Using pool: poolv6
Preference value: 20
Rapid-Commit is disabled

2.28 show ipv6 dhcp pool

Command: show ipv6 dhcp pool [<poolname>]


Function: To show the DHCPv6 address pool information.
Parameter: <poolname> is the DHCPv6 address pool name which configured already,
and the length less than 32 characters. If the <poolname> parameter is not provided,
then all the DHCPv6 address pool information will be shown.
Command Mode: Admin and Configuration Mode.
Usage Guide: To display the configuration and dynamic assignment information for
DHCPv6 address pool, include the name of DHCPv6 address pool, the prefix of DHCPv6
address pool, excluded address, DNS server configuration, relative prefix information and
so on. To display assigned address binding number of address pool that is used as
address assignment server. To display assigned prefix number of address pool that is
used as prefix delegation server.

2-14
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

Example:
Switch#show ipv6 dhcp pool poolv6

2.29 show ipv6 dhcp statistics

Command: show ipv6 dhcp statistics


Function: To show the statistic of all kinds of DHCPv6 packets by DHCPv6 server.
Command Mode: Admin and Configuration Mode.
Example:
Switch#show ipv6 dhcp server statistics
Address pools 1
Active bindings 0
Expiried bindings 0
Malformed message 0

Message Recieved
DHCP6SOLICIT 0
DHCP6ADVERTISE 0
DHCP6REQUEST 0
DHCP6REPLY 0
DHCP6RENEW 0
DHCP6REBIND 0
DHCP6RELEASE 0
DHCP6DECLINE 0
DHCP6CONFIRM 0
DHCP6RECONFIGURE 0
DHCP6INFORMREQ 0
DHCP6RELAYFORW 0
DHCP6RELAYREPLY 0

Message Send
DHCP6SOLICIT 0
DHCP6ADVERTISE 0
DHCP6REQUEST 0
DHCP6REPLY 0
DHCP6RENEW 0
DHCP6REBIND 0
DHCP6RELEASE 0

2-15
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

DHCP6DECLINE 0
DHCP6CONFIRM 0
DHCP6RECONFIGURE 0
DHCP6INFORMREQ 0
DHCP6RELAYFORW 0
DHCP6RELAYREPLY 0

Show information Explanation


Address pools To configure the number of DHCPv6 address pools;
Active bindings The number of auto assign addresses;
Expiried bindings The number of expiried bindings;
Malformed message The number of malformed messages;
Message Recieved The statistic of received DHCPv6 packets.
DHCP6SOLICIT The number of DHCPv6 SOLICIT packets.
DHCP6ADVERTISE The number of DHCPv6 ADVERTISE packets.
DHCPv6REQUEST The number of DHCPv6 REQUEST packets.
DHCP6REPLY The number of DHCPv6 REPLY packets.
DHCP6RENEW The number of DHCPv6 RENEW packets.
DHCP6REBIND The number of DHCPv6 REBIND packets.
DHCP6RELEASE The number of DHCPv6 RELEASE packets.
DHCP6DECLINE The number of DHCPv6 DECLINE packets.
DHCP6CONFIRM The number of DHCPv6 CONFIRM packets.
DHCP6RECONFIGURE The number of DHCPv6 RECONFIGURE packets.
DHCP6INFORMREQ The number of DHCPv6 INFORMREQ packets.
DHCP6RELAYFORW The number of DHCPv6 RELAYFORW packets.
DHCP6RELAYREPLY The number of DHCPv6 RELAYREPLY packets.
Message Send The statistic of sending DHCPv6 packets
DHCP6SOLICIT The number of DHCPv6 SOLICIT packets.
DHCP6ADVERTISE The number of DHCPv6 ADVERTISE packets.
DHCPv6REQUEST The number of DHCPv6 REQUEST packets.
DHCP6REPLY The number of DHCPv6 REPLY packets.
DHCP6RENEW The number of DHCPv6 RENEW packets.
DHCP6REBIND The number of DHCPv6 REBIND packets.
DHCP6RELEASE The number of DHCPv6 RELEASE packets.
DHCP6DECLINE The number of DHCPv6 DECLINE packets.
DHCP6CONFIRM The number of DHCPv6 CONFIRM packets.
DHCP6RECONFIGURE The number of DHCPv6 RECONFIGURE packets.

2-16
Commands for DHCP
Server Configuration Chapter 2 Commands for DHCPv6

DHCP6INFORMREQ The number of DHCPv6 INFORMREQ packets.


DHCP6RELAYFORW The number of DHCPv6 RELAYFORW packets.

2.30 show ipv6 general-prefix

Command: show ipv6 general-prefix


Function: To show the IPv6 general prefix pool information.
Command Mode: Admin and Configuration Mode.
Usage Guide: To show the IPv6 general prefix pool information, include the prefix number
in general prefix pool, the name of every prefix, the interface of prefix obtained, and the
prefix value.
Example:
Switch#show ipv6 general-prefix

2.31 show ipv6 local pool

Command: show ipv6 local pool


Function: To show the statistic information of DHCPv6 prefix pool.
Command Mode: Admin and Configuration Mode.
Usage Guide: To show the statistic information of DHCPv6 prefix pool, include the name
of prefix pool, the prefix and prefix length as well as assigned prefix length, the number of
assigned prefix and information in DHCPv6 address pool.
Example:
Switch#show ipv6 local pool
Pool Prefix Free In use
a 2010::1/48 65536 0

2-17
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

Chapter 3 Commands for DHCP Option


82

3.1 debug ip dhcp relay packet

Command: debug ip dhcp relay packet


Function: This command is used to display the information of data packets processing in
DHCP Relay Agent, including the “add” and “peel” action of option 82.
Parameters: None
Command Mode: Admin Mode.
User Guide: Use this command during the operation to display the procedure of data
packets processing of the server and to display the corresponding option82 operation
information. Identified option 82 information of the request message and the option 82
information returned by the reply message.
Example: Display the information of data packets processing in DHCP Relay Agent.
Switch(config)# debug ip dhcp relay packet

3.2 ip dhcp relay information option

Command: ip dhcp relay information option


no ip dhcp relay information option
Function: Set this command to enable the option82 function of the switch Relay Agent.
The “no ip dhcp relay information option” command is used to disable the option82
function of the switch Relay Agent.
Parameters: None.
Default Settings: The system disables the option82 function by default.
Command Mode: Global configuration mode
Usage Guide: Only the DHCP Relay Agents configuring with this command can add
option82 to the DHCP request message, and let the server to process it. Before enabling
this function, users should make sure that the DHCP service is enabled and the Relay
Agent will transmit the udp broadcast messages whose destination port is 67.
Example: Enable the option82 function of the Relay Agent.
Switch(config)#service dhcp
Switch(config)# ip forward-protocol udp bootps
Switch(config)# ip dhcp relay information option

3-1
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

3.3 ip dhcp relay information option delimiter

Command: ip dhcp relay information option delimiter [colon | dot | slash | space]
no ip dhcp relay information option delimiter
Function: Set the delimiter of each parameter for suboption of option82 in global mode,
no command restores the delimiter as slash.
Parameters: None.
Default Settings: slash (“/”).
Command Mode: Global mode
Usage Guide: Divide the parameters with the configured delimiters after users have
defined them which are used to create suboption (remot-de, circuit-id) of option82 in
global mode.
Example: Set the parameter delimiters as dot (“.”) for suboption of option82.
Switch(config)#ip dhcp relay information option delimiter dot

3.4 ip dhcp relay information option remote-id

Command: ip dhcp relay information option remote-id {standard | <remote-id>}


no ip dhcp relay information option remote-id
Function: Set the suboption2 (remote ID option) content of option 82 added by DHCP
request packets (They are received by the interface). The no command sets the additive
suboption2 (remote ID option) format of option 82 as standard.
Parameters: standard means the default VLAN MAC format. <remote-id> means the
remote-id content of option 82 specified by users, its length cannot exceed 64 characters.
Command Mode: Global Mode
Default: Use standard format to set remote-id of option 82.
Usage Guide: The additive option 82 information needs to associate with third-party
DHCP server, it is used to specify the remote-id content by users when the standard
remote-id format cannot satisfy server’s request.
Example: Set the suboption remote-id of DHCP option82 as street-1-1.
Switch(config)#ip dhcp relay information option remote-id street-1-1

3.5 ip dhcp relay information option remote-id format

Command: ip dhcp relay information option remote-id format {default | vs-hp}


Function: Set remote-id format of Relay Agent option82.
Parameters: default means that remote-id is the VLAN MAC address with hexadecimal

3-2
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

format, vs-hp means that remote-id is compatible with the remote-id format of HP
manufacturer.
Default: default.
Command Mode: Global mode
Usage Guide: The default remote-id format defined as below:
Remote option
Length
type

2 6 MAC

1 byte 1 byte 6 byte

MAC means VLAN MAC address.


The compatible remote-id format with HP manufacturer defined as below:
Remote option
Length
type

2 4 IP

1 byte 1 byte 4 byte

IP means the primary IP address of layer 3 interface where DHCP packets from.
Example: Set remote-id of Relay Agent option82 as the compatible format with HP
manufacturer.
Switch(config)#ip dhcp relay information option remote-id format vs-hp

3.6 ip dhcp relay information option self-defined


remote-id

Command: ip dhcp relay information option self-defined remote-id {hostname | mac


| string WORD}
no ip dhcp relay information option self-defined remote-id
Function: Set creation method for option82, users can define the parameters of remote-id
suboption by themselves.
Parameters: WORD the defined character string of remote-id by themselves, the
maximum length is 64.
Command Mode: Global Mode
Default: Using standard method.
Usage Guide: After configure this command, if users do not configure remote-id on
interface, it will create remote-id suboption for option82 according to self-defined method.
For mac, use the format such as 00-02-d1-2e-3a-0d if it is filled to packets with ascii

3-3
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

format, but hex format occupies 6 bytes. Each option will be filled to packets according to
the configured order of the commands and divide them with delimiter (delimiter is ip dhcp
relay information option delimiter configuration).
Example: Set self-defined method and character string of remote-id suboption are
hostname and abc respectively for option82.
Switch(config)#ip dhcp relay information option self-defined remote-id hostname string
abc

3.7 ip dhcp relay information option self-defined


remote-id format

Command: ip dhcp relay information option self-defined remote-id format [ascii |


hex]
Function: Set self-defined format of remote-id for relay option82.
Parameters: None.
Command Mode: Global Mode
Default: ascii.
Usage Guide: self-defined format use ip dhcp relay information option type self-defined
remote-id to create remote-id format.
Example: Set self-defined method of remote-id as hex for relay option82.
Switch(config)# ip dhcp relay information option self-defined remote-id format hex

3.8 ip dhcp relay information option self-defined


subscriber-id

Command: ip dhcp relay information option self-defined subscriber-id {vlan | port |


id (switch-id (mac | hostname)| remote-mac)| string WORD }
no ip dhcp relay information option self-defined subscriber-id
Function: Set creation method for option82, users can define the parameters of circute-id
suboption by themselves.
Parameters: WORD the defined character string of circuit-id by themselves, the
maximum length is 64.
Command Mode: Global Mode
Default: Using standard method.
Usage Guide: After configure this command, if users do not configure circuit-id on
interface, it will create circuit-id suboption for option82 according to self-defined method.

3-4
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

Self-defined format of circuit-id: if self-defined format is ascii, the filled format of vlan such
as “Vlan2”, the format of port such as “Ethernet1/1”, the format of mac and remote-mac
such as “00-02-d1-2e-3a-0d”. If self-defined format is hex, the filled format of vlan
occupies 2 bytes, port occupies 4 bytes, a byte means slot (for chassis switch, it means
slot ID, for box switch, it is 1), a byte means Module (the default is 0), two bytes means
port ID beginning from 1, mac and remote-mac occupy 6 bytes. Each option will be filled
to packets according to the configured order of the commands and divide them with
delimiter (delimiter is ip dhcp relay information option delimiter configuration).
Example: Set self-defined method of circuit-id suboption as port, mac for option82.
Switch(config)# ip dhcp relay information option self-defined subscriber-id port id switch-id
mac

3.9 ip dhcp relay information option self-defined


subscriber-id format

Command: ip dhcp relay information option self-defined subscriber-id format [ascii


| hex]
Function: Set self-defined format of circuit-id for relay option82.
Parameters: None.
Command Mode: Global Mode
Default: ascii.
Usage Guide: self-defined format use ip dhcp relay information option type self-defined
subscriber-id to create circuit-id format.
Example: Set self-defined format of circuit-id as hex for relay option82.
Switch(config)# ip dhcp relay information option self-defined subscriber-id format hex

3.10 ip dhcp relay information option subscriber-id

Command: ip dhcp relay information option subscriber-id {standard | <circuit-id>}


no ip dhcp relay information option subscriber-id
Function: This command is used to set the format of option82 sub-option1(Circuit ID
option) added to the DHCP request messages from interface, standard means the
standard vlan name and physical port name format, like”Vlan2+Ethernet1/12”,<circuit-id>
is the circuit-id contents of option82 specified by users, which is a string no longer than 64
characters. The” no ip dhcp relay information option subscriber-id” command will set
the format of added option82 sub-option1 (Circuit ID option) as standard format.
Parameters: None

3-5
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

Command Mode: Interface configuration mode.


Default Settings: The system uses the standard format to set the circuit-id of option 82 by
default.
User Guide: Because the option 82 information added for the switch should cooperate
with the third party DHCP server, if the standard circuit-id format of the switch cannot
satisfy the server’s request, this method will be provided for users to specify the contents
of circuit-id according to the situation of the server.
Example: Set the sub-option circuit-id of DHCP option82 as foobar.
Switch(config-if-vlan1)#ip dhcp relay information option subscriber-id foobar

3.11 ip dhcp relay information option subscriber-id


format

Command: ip dhcp relay information option subscriber-id format {hex | acsii |


vs-hp}
Function: Set subscriber-id format of Relay Agent option82.
Parameters: hex means that subscriber-id is VLAN and port information with
hexadecimal format, acsii means that subscriber-id is VLAN and port information with
ACSII format. vs-hp means that subscriber-id is compatible with the format of HP
manufacturer.
Command Mode: Global mode
Default: ascii.
User Guide: VLAN and port information with ASCII format, such as “Vlan1+Ethernet1/11”,
VLAN and port information with hexadecimal format defined as below:

Suboption Circuit
Length Length
type ID type

1 8 0 6 VLAN Slot Module Port

1 byte 1 byte 1 byte 1 byte 2 byte 1 byte 1 byte 2 byte

VLAN field fills in VLAN ID. For chassis switch, Slot means slot number, for box switch,
Slot is 1; default Module is 0; Port means port number which begins from 1.
The compatible subscriber-id format with HP manufacturer defined as below:

3-6
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82
Suboption
Length
type

1 2 Port

1 byte 1 byte 2 byte

Port means port number which begins from 1.


Example: Set subscriber-id format of Relay Agent option82 as hexadecimal format.
Switch(config)#ip dhcp relay information option subscriber-id format hex

3.12 ip dhcp relay information policy

Command: ip dhcp relay information policy {drop | keep | replace}


no ip dhcp relay information policy
Function: This command is used to set the retransmitting policy of the system for the
received DHCP request message which contains option82. The drop mode means that if
the message has option82, then the system will drop it without processing; keep mode
means that the system will keep the original option82 segment in the message, and
forward it to the server to process; replace mode means that the system will replace the
option 82 segment in the existing message with its own option 82, and forward the
message to the server to process. The “no ip dhcp relay information policy” will set the
retransmitting policy of the option 82 DCHP message as “replace”.
Parameters: None
Command Mode: Interface configuration mode.
Default Settings: The system uses replace mode to replace the option 82 segment in the
existing message with its own option 82.
User Guide: Since the DHCP client messages might go through several DHCP Relay
Agents when passed to the DHCP server, the latter Relay Agents on the path should set
policies to decide how to process the option82 added by Relay Agents before them. The
selection of option 82 retransmitting policies should take the configuration policy of the
DHCP server into account.
Example: Set the retransmitting policy of DHCP messages option 82 as keep.
Switch(Config-if-Vlan1)# ip dhcp relay information policy keep

3.13 ip dhcp server relay information enable

Command: ip dhcp server relay information enable


no ip dhcp server relay information enable

3-7
Commands for DHCP
Server Configuration Chapter 3 Commands for DHCP Option 82

Function: This command is used to enable the switch DHCP server to identify option82.
The “no ip dhcp server relay information enable” command will make the server ignore the
option 82.
Parameters: None
Command Mode: Global configuration mode
Default Setting: The system disable the option82 identifying function by default.
User Guide: If the users want the switch DHCP server to identify option82 and return
option 82 information in the reply message, this command needs to be set, or, the switch
DHCP server will ignore the option82.
Example: Set the DHCP server to support option82
Switch(Config-if-Vlan1)# ip dhcp server relay information enable

3.14 show ip dhcp relay information option

Command: show ip dhcp relay information option


Function: This command will display the state information of the DHCP option 82 in the
system, including option82 enabling switch, the interface retransmitting policy, the circuit
ID mode and the switch DHCP server option82 enabling switch.
Parameters: None.
Command Mode: Admin and Global Configuration Mode.
User Guide: Use this command to check the state information of Relay Agent option82
during operation.
Example:
Switch#show ip dhcp relay information option
ip dhcp server relay information option(i.e. option 82) is disabled
ip dhcp relay information option(i.e. option 82) is enabled
Vlan2:
ip dhcp relay information policy keep
ip dhcp relay information option subscriber-id standard
Vlan3:
ip dhcp relay information policy replace
ip dhcp relay information option subscriber-id foobar

3-8
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP option 60 and option 43

Chapter 4 Commands for DHCP option


60 and option 43

4.1 option 43 ascii LINE

Command: option 43 ascii LINE


no option 43
Function: Configure option 43 character string with ascii format in ip dhcp pool mode.
The no command deletes the configured option 43.
Parameter: LINE: The configured option 43 character string with ascii format, its length
range between 1 and 255.
Default: No option 43 character string is configured.
Command Mode: ip dhcp pool mode
Usage Guide: None.
Example: Configure option 43 with ascii format to be "AP 1000".
router(config)#ip dhcp pool a
router (dhcp-a-config)#option 43 ascii AP 1000

4.2 option 43 hex WORD

Command: option 43 hex WORD


no option 43
Function: Configure option 43 character string with hex format in ip dhcp pool mode. The
no command deletes the configured option 43.
Parameter: WORD: The configured option 43 character string with hex format, such as
a1241b.
Default: No option 43 is configured.
Command Mode: ip dhcp pool mode
Usage Guide: None.
Example: Configure option 43 with hex format to be "41502031303030".
router(config)#ip dhcp pool a
router (dhcp-a-config)#option 43 hex 41502031303030

4-1
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP option 60 and option 43

4.3 option 43 ip A.B.C.D

Command: option 43 ip A.B.C.D


no option 43
Function: Configure option 43 character string with IP format in ip dhcp pool mode. The
no command deletes the configured option 43.
Parameter: A.B.C.D: The configured option 43 with IP format, such as 192.168.1.1.
Default: No option 43 is configured.
Command Mode: ip dhcp pool mode
Usage Guide: Using this command to configure option 43, such as "192.168.1.1", then
option 43 filled in packets is "C0A80101".
Example: Configure option 43 with IP format to be "192.168.1.1".
router(config)#ip dhcp pool a
router (dhcp-a-config)#option 43 ip 192.168.1.1

4.4 option 60 ascii LINE

Command: option 60 ascii LINE


no option 60
Function: Configure option 60 character string with ascii format in ip dhcp pool mode.
The no command deletes the configured option 60.
Parameter: LINE: The configured option 60 character string with ascii format, its length
range between 1 and 255.
Default: No option 60 character string is configured.
Command Mode: ip dhcp pool mode
Usage Guide: None.
Example: Configure option 60 with ascii format to be "AP 1000".
router(config)#ip dhcp pool a
router (dhcp-a-config)#option 60 ascii AP 1000

4.5 option 60 hex WORD

Command: option 60 hex WORD


no option 60
Function: Configure option 60 character string with hex format in ip dhcp pool mode. The
no command deletes the configured option 60.
Parameter: WORD: The configured option 60 character string with hex format, such as

4-2
Commands for DHCP
Server Configuration Chapter 4 Commands for DHCP option 60 and option 43

a1241b.
Default: No option 60 is configured.
Command Mode: ip dhcp pool mode
Usage Guide: None.
Example: Configure option 60 with hex format to be "41502031303030".
router(config)#ip dhcp pool a
router(dhcp-a-config)#option 60 hex 41502031303030

4.6 option 60 ip A.B.C.D

Command: option 60 ip A.B.C.D


no option 60
Function: Configure option 60 character string with IP format in ip dhcp pool mode. The
no command deletes the configured option 60.
Parameter: A.B.C.D: The configured option 60 with IP format, such as 192.168.1.1.
Default: No option 60 is configured.
Command Mode: ip dhcp pool mode
Usage Guide: Using this command to configure option 60, such as "192.168.1.1", option
60 of packets matched with the configured option 60 is "C0A80101".
Example: Configure option 60 with IP format to be "192.168.1.1".
router(config)#ip dhcp pool a
router (dhcp-a-config)#option 60 ip 192.168.1.1

4-3
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Chapter 5 Commands for DHCPv6


option37, 38

5.1 Commands for DHCPv6 option37, 38

5.1.1 address range

Command: address range <start-ip> <end-ip>


no address range <start-ip> <end-ip>
Function: This command is used to set address range for a DHCPv6 class in DHCPv6
address pool configuration mode, the no command is used to remove the address range.
The prefix/plen form is not supported.
Parameters: start-ip, defines the start address of the address pool
end-ip, defines the end address of the address pool
Default: None.
Command Mode: DHCPv6 address pool class configuration mode
Usage Guide: It is necessary to check the address range assigned to class in order to
make sure that it doesn’t exceed the address range of relevant address pool. A class is
assigned a single address range and the address range assigned to different class in the
same address pool can overlap. If you do not use this command to assign address range
for a DHCPv6 class, then the range for it will be the whole subnet of the address pool by
default.
Example: Associate a DHCPv6 class named CLASS1 to dhcpv6 pool 1 and assign the
address range from 2001:da8:100:1::2 to 2001:da8:100:1::30 for CLASS1.
Switch(Config)#ipv6 dhcp pool 1
Switch(dhcp-1-config)#class CLASS1
Switch(dhcp-1-class-CLASS1-config)#address range 2001:da8:100:1::2
2001:da8:100:1::30

5.1.2 class
Command: class <class-name>
no class <class-name>
Function: This command associates class to address pool in DHCPv6 address pool
configuration mode and enters class configuration mode in address pool. Use the no
command to remove the link.

5-1
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Parameters: class-name, the name of DHCPv6 class.


Default: None.
Command Mode: DHCPv6 address pool configuration mode
Usage Guide: It is recommended to define this class first using global command of IPv6
DHCP class. No class will be created if you input a class name which doesn’t exist.
Example: Associate the DHCPv6 class named CLASS1 to dhcpv6 pool 1.
Switch(Config)#ipv6 dhcp pool 1
Switch(dhcp-1-config)#class CLASS1

5.1.3 ipv6 dhcp class

Command: ipv6 dhcp class <class-name>


no ipv6 dhcp class <class-name>
Function: This command defines a DHCPv6 class and enters DHCPv6 class
configuration mode, the no operation of this command removes this DHCPv6 class.
Parameters: class-name, the name of DHCPv6 class which is a string with a length of
less than 32
Default: None.
Command Mode: Global configuration mode
Usage Guide: Configure a group of option 37 or option 38, or configure option 37 and
option 38 simultaneously in a DHCPv6 class. This command can be used when the server
supports DHCPv6 class only.
Example: Define a DHCPv6 class named CLASS1.
Switch(Config)# ipv6 dhcp class CLASS1

5.1.4 ipv6 dhcp relay remote-id

Command: ipv6 dhcp relay remote-id <remote-id>


no ipv6 dhcp relay remote-id
Function: This command is used to set the form of adding option 37 in received DHCPv6
request packets, of which <remote-id> is the remote-id in user-defined option 37 and it is a
string with a length of less than 128. The no operation of this command restores remote-id
in option 37 to enterprise-number together with vlan MAC address.
Parameters: remote-id, user-defined content of option 37.
Default: Using vlan MAC address as remote-id content by default such as
“00-01-ac-12-23” with ‘-’ hyphen.
Command Mode: Interface configuration mode
Usage Guide: Because the option 37 information added by switch may associate with
third-party DHCPv6 servers, users can specify the remote-id content based on server

5-2
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

condition when default remote-id of the switch cannot satisfy the demand of server. The
enterprise-number together with vlan MAC address is used as the remote-id by default.
Example: Enable abc as the remote-id of DHCPv6 option 37.
Switch(Config-if-vlan1)# ipv6 dhcp relay remote-id abc

5.1.5 ipv6 dhcp relay remote-id option

Command: ipv6 dhcp relay remote-id option


no ipv6 dhcp relay remote-id option
Function: This command enables switch relay to support the option 37, the no form of
this command disables it.
Parameters: None.
Default: Disable the relay option 37.
Command Mode: Global configuration mode
Usage Guide: Only after this command is configured, DHCPv6 relay agent can add
option 37 in DHCPv6 request packets before sending it to server or next relay agent.
Make sure that DHCPv6 service has been enabled before execute this command.
Example: Enable the switch relay to support option 37.
Switch(Config)#service dhcpv6
Switch(Config)#ipv6 dhcp relay remote-id option

5.1.6 ipv6 dhcp relay subscriber-id

Command: ipv6 dhcp relay subscriber-id <subscriber-id>


no ipv6 dhcp relay subscriber-id
Function: This command is used to set the form of adding option 38 in received DHCPv6
request packets, of which <subscriber-id> is the subscriber-id in user-defined option 38
and it is a string with a length of less than 128. The no operation of this command restores
subscriber-id in option 38 to vlan name together with port name such as
"Vlan2+Ethernet1/2".
Parameters: subscriber-id, user-defined content of option 38
Default: Set subscriber-id in option 38 to vlan name together with port name.
Command Mode: Interface configuration mode
Usage Guide: Because the option 38 information added by switch may associate with
third-party DHCPv6 servers, users can specify the subscriber-id content based on server
condition when standard subscriber-id of the switch cannot satisfy the demand of server.
The vlan name together with physical port name is used as the subscriber-id in option 38
by default.
Example: Enable abc as the subscriber-id of DHCPv6 option 38.

5-3
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Switch(Config-if-vlan1)# ipv6 dhcp relay subscriber-id abc

5.1.7 ipv6 dhcp relay subscriber-id option

Command: ipv6 dhcp relay subscriber-id option


no ipv6 dhcp relay subscriber-id option
Function: This command enables switch relay to support the option 38, the no form of
this command disables it.
Parameters: None.
Default: Disable the relay option 38.
Command Mode: Global configuration mode
Usage Guide: Only after this command is configured, DHCPv6 relay agent can add
option 38 in DHCPv6 request packets before sending it to server or next relay agent.
Make sure that DHCPv6 service has been enabled before execute this command. The
option 38 of switch relay is disabled by default.
Example: Enable the switch relay to support option 38.
Switch(Config)#service dhcpv6
Switch(Config)#ipv6 dhcp relay subscriber-id option

5.1.8 ipv6 dhcp relay subscriber-id select delimiter

Command: ipv6 dhcp relay subscriber-id select (sp | sv | pv | spv) delimiter WORD
(delimiter WORD |)
no ipv6 dhcp relay subscriber-id select delimiter
Function: Configures user configuration options to generate subscriber-id. The no form of
this command restores to its original default configuration, i.e. vlan name together with
port name.
Parameters: (sp | sv | pv | spv): a selection in combinations of slot, port and vlan, among
which sp represents slot and port, sv represents slot and vlan, pv represents port and
vlan, and spv represents slot, port and vlan.
WORD: the delimiter between slot, port and vlan which ranges among
(#|.|,|;|:|/|space). Note that there're two delimiter WORDs here, of which the former is the
delimiter between slot and port and the latter is the one between port and vlan.
Default: Null.
Command Mode: Global configuration mode
Usage Guide: The command has no effect on ports with self-defined subscriber-id. If user
redefines the subscriber-id of the port after using the command, the user-defined one
prevails. This configuration is null by default.
Example:

5-4
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Switch(config)# ipv6 dhcp relay subscriber-id select sp delimiter #

5.1.9 ipv6 dhcp server remote-id option

Command: ipv6 dhcp server remote-id option


no ipv6 dhcp server remote-id option
Function: This command enables DHCPv6 server to support the identification of option
37, the no form of this command disables it.
Parameters: None.
Default: Do not support option 37.
Command Mode: Global configuration mode
Usage Guide: Configure this command if option 37 options is expected to be identified
and processed by DHCPv6 server, otherwise they will be ignored. Option 37 is not
supported by default.
Example: Enable the DHCPv6 server to support option 37.
Switch(Config)# ipv6 dhcp server remote-id option

5.1.10 ipv6 dhcp server select relay-forw

Command: ipv6 dhcp server select relay-forw


no ipv6 dhcp server select relay-forw
Function: This command enables the DHCPv6 server to support selections when
multiple option 37 or option 38 options exist and the option 37 and option 38 of relay-forw
in the innermost layer are selected. The no operation of it restores the default
configuration, i.e. selecting option 37 and option 38 of the original packets.
Parameters: None.
Default: Selecting option 37 and option 38 of the original packets.
Command Mode: Interface configuration mode
Usage Guide: Make sure that the server has been enabled to support option 37 and
option 38 before use this command. The system selects option 37 and option 38 of the
original packets by default.
Example: Configure that the vlan1 interface of DHCPv6 server selects option 37 and
option 38 of relay-forw in the innermost layer.
Switch(Config-if-vlan1)# ipv6 dhcp server select relay-forw

5.1.11 ipv6 dhcp server subscriber-id option

Command: ipv6 dhcp server subscriber-id option


no ipv6 dhcp server subscriber-id option
Function: This command enables DHCPv6 server to support the identification of option

5-5
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

38, the no operation of this command disables it.


Parameters: None.
Default: Do not support option 38.
Command Mode: Global configuration mode
Usage Guide: Configure this command if option 38 is expected to be identified and
processed by DHCPv6 server, otherwise they will be ignored. option 38 is not supported
by default.
Example: Enable DHCPv6 server to support option 38.
Switch(Config)# ipv6 dhcp server subscriber-id option

5.1.12 ipv6 dhcp snooping remote-id

Command: ipv6 dhcp snooping remote-id <remote-id>


no ipv6 dhcp snooping remote-id
Function: This command is used to set the form of adding option 37 in received DHCPv6
request packets, of which <remote-id> is the content of remote-id in user-defined option
37 and it is a string with a length of less than 128. The no form of this command restores
remote-id in option 37 to enterprise-number together with vlan MAC address.
Parameters: remote-id, user-defined content of option 37.
Default: Using vlan MAC address as remote-id content by default such as
“00-01-ac-12-23” with ‘-’ hyphen.
Command Mode: Port mode
Usage Guide: Because option 37 information added by switch may associate with
third-party DHCPv6 servers, users can specify remote-id content based on server
condition when standard remote-id of the switch cannot satisfy the demand of server. The
enterprise-number together with vlan MAC address is used as the remote-id by default.
Example: Enable abc as remote-id of DHCPv6 option 37.
Switch(Config-if-Ethernet1/1)# ipv6 dhcp snooping remote-id abc

5.1.13 ipv6 dhcp snooping remote-id option

Command: ipv6 dhcp snooping remote-id option


no ipv6 dhcp snooping remote-id option
Function: This command enables DHCPv6 SNOOPING to support option 37, the no form
of this command disables it.
Parameters: None.
Default: Disable.
Command Mode: Global configuration mode
Usage Guide: Only after this command is configured, DHCPv6 SNOOPING can add

5-6
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

option 37 in DHCPv6 packets before sending it to server or relay agent. Make sure that
DHCPv6 SNOOPING has been enabled before execute this command. The system
disables option 37 of DHCPv6 SNOOPING by default.
Example: Enable option 37 in DHCPv6 SNOOPING.
Switch(Config)#ipv6 dhcp snooping enable
Switch(Config)#ipv6 dhcp snooping remote-id option

5.1.14 ipv6 dhcp snooping remote-id policy

Command: ipv6 dhcp snooping remote-id policy {drop | keep | replace}


no ipv6 dhcp snooping remote-id policy
Function: This command is used to configure the reforward policy of the system when
receiving DHCPv6 packets with option 37, among which the drop mode means that the
system simply discards it with option 37, keep mode means that the system keeps option
37 unchanged and forwards the packets to the server and replace mode means that the
system replaces option 37 of current packets with its own before forwarding it to the server.
The no operation of this command sets reforward policy of DHCPv6 packets with option
37 as replace.
Parameters: None.
Default: Using replace mode to replace option 37 of current packets with system’s own.
Command Mode: Global configuration mode
Usage Guide: Since DHCPv6 client packets may already include option 37 information,
corresponding processing policy of DHCPv6 SNOOPING is required to develop. If the
forwarding policy is set as replace, option 37 has to be enabled in advance. Use replace
mode to replace option 37 of current packets with system’s own by default.
Example: Configure the reforward policy of DHCPv6 packets with option 37 as keep for
DHCPv6 SNOOPING.
Switch(Config)# ipv6 dhcp snooping remote-id policy keep

5.1.15 ipv6 dhcp snooping subscriber-id

Command: ipv6 dhcp snooping subscriber-id <subscriber-id>


no ipv6 dhcp snooping subscriber-id
Function: This command is used to set the form of adding option 38 in received DHCPv6
request packets, of which <subscriber-id> is the content of subscriber-id in user-defined
option 38 and it is a string with a length of less than 128. The no operation of this
command restores subscriber-id in option 38 to vlan name together with port name such
as "Vlan2+Ethernet1/2".
Parameters: subscriber-id, user-defined content of option 38

5-7
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Default: Set subscriber-id in option 38 to vlan name together with port name.
Command Mode: Port mode
Usage Guide: Because option 38 information added by switch may associate with
third-party DHCPv6 servers, users can specify subscriber-id content based on server
condition when standard subscriber-id of the switch cannot satisfy the demand of server.
The vlan name together with physical port name is used as subscriber-id in option 38 by
default.
Example: Enable abc as subscriber-id of DHCPv6 option 38.
Switch(Config-if-Ethernet1/1)#ipv6 dhcp snooping subscriber-id abc

5.1.16 ipv6 dhcp snooping subscriber-id option

Command: ipv6 dhcp snooping subscriber-id option


no ipv6 dhcp snooping subscriber-id option
Function: This command enables DHCPv6 SNOOPING to support option 38, the no form
of this command disables it.
Parameters: None.
Default: Disable option 38 of DHCPv6 SNOOPING.
Command Mode: Global configuration mode
Usage Guide: Only after this command is configured, DHCPv6 SNOOPING can add
option 38 in DHCPv6 packets before sending it to server or relay agent. Make sure that
DHCPv6 SNOOPING has been enabled before executing this command. The system
disables option 38 of DHCPv6 SNOOPING by default.
Example: Enable option 38 in DHCPv6 SNOOPING.
Switch(Config)#ipv6 dhcp snooping enable
Switch(Config)#ipv6 dhcp snooping subscriber-id option

5.1.17 ipv6 dhcp snooping subscriber-id policy

Command: ipv6 dhcp snooping subscriber-id policy {drop | keep | replace}


no ipv6 dhcp snooping subscriber-id policy
Function: This command is used to set the reforward policy of the system when receiving
DHCPv6 packets with option 38, among which the drop mode means that the system
simply discards it with option 38, keep mode means that the system keeps option 38
unchanged and forwards the packets to the server and replace mode means that the
system replaces option 38 of current packets with its own before forwarding it to the server.
The no operation of this command sets the reforward policy of DHCPv6 packets with
option 38 as replace.
Parameters: None.

5-8
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Default: Using replace mode to replace option 38 of current packets with system’s own.
Command Mode: Global configuration mode
Usage Guide: Since DHCPv6 client packets may already include option 38 information,
corresponding processing policy of DHCPv6 SNOOPING is requested to develop. If the
reforward policy is set as replace, option 38 has to be enabled in advance. The system
disables option 38 of DHCPv6 SNOOPING by default.
Example: Set the reforward policy of DHCPv6 packets with option 38 as keep for
DHCPv6 SNOOPING.
Switch(Config)# ipv6 dhcp snooping subscriber-id policy keep

5.1.18 ipv6 dhcp snooping subscriber-id select


delimiter

Command: ipv6 dhcp snooping subscriber-id select (sp | sv | pv | spv) delimiter


WORD (delimiter WORD | )
no ipv6 dhcp snooping subscriber-id select delimiter
Function: Configure user configuration options to generate subscriber-id. The no form of
this command restores to its original default configuration, i.e. vlan name together with
port name.
Parameters: (sp | sv | pv | spv), a selection from combinations of slot, port and vlan,
among which sp represents slot and port, sv represents slot and vlan, pv represents port
and vlan, and spv represents slot, port and vlan.
WORD, the delimiter between slot, port and vlan which ranges among
(#|.|,|;|:|/|space). Note that there're two delimiter WORDs here, of which the former is the
delimiter between slot and port while the latter is that between port and vlan.
Default: Null.
Command Mode: Global configuration mode
Usage Guide: This command has no effect on ports with self-defined subscriber-id. If a
user redefines subscriber-id of the port after configuring the command, the user-defined
one prevails. This configuration is null by default.
Example:
Swithc(config)# ipv6 dhcp snooping subscriber-id select sv delimiter #

5.1.19 ipv6 dhcp use class

Command: ipv6 dhcp use class


no ipv6 dhcp use class
Function: This command enables DHCPv6 server to support DHCPv6 class during

5-9
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

address assignment, the no operation of this command disables it without removing the
relative DHCPv6 class information that has been configured.
Parameters: None.
Default: DHCPv6 server supports DHCPv6 class during address assignment.
Command Mode: Global configuration mode
Usage Guide: By default, DHCPv6 servers support DHCPv6 class during address
assignment and the no form of this command doesn’t remove DHCPv6 class information
that has been configured. Make sure that DHCPv6 service has been enabled before using
this command. DHCPv6 server supports DHCPv6 class during address assignment by
default.
Example: Configure DHCPv6 server to support DHCPv6 class during address
assignment.
Switch(Config)# ipv6 dhcp use class

5.1.20 remote-id subscriber-id

Command: {remote-id [*] <remote-id> [*] | subscriber-id [*] <subscriber-id> [*]}


no {remote-id [*] <remote-id> [*] | subscriber-id [*] < subscriber-id> [*]}
Function: This command configures option 37 and option 38 that match the class in IPv6
DHCP class configuration mode.
Parameters: <remote-id>, a string with a length ranging from 1 to 128 bytes is used to
match remote-id in option 37.
<subscriber-id>, a string with a length ranging from 1 to 128 bytes is used to
match subscriber-id in option 38.
[*], match zero or more characters.
Default: None.
Command Mode: IPv6 DHCP Class configuration mode
Usage Guide: This command configures a mode which matches with the already-defined
DHCPv6 class, and a DHCPv6 class may configure multiple commands. If this command
is ignored and no mode configured in IPv6 DHCP Class mode, any remote-id or
subscriber-id is considered to match with the DHCPv6 class, however, remote-id or
subscriber-id must exist in DHCPv6 packet.
Example: Configure some remote-id or subscriber-id belonging to DHCPv6 class named
CLASS1.
Switch(Config)# ipv6 dhcp class CLASS1
Switch(Dhcpv6-class)#remote-id abc* subscriber-id bcd*
Switch(Dhcpv6-class)#remote-id edf*
Switch(Dhcpv6-class)#subscriber *mmn

5-10
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

5.2 Commands for Monitoring and Debugging

5.2.1 debug ipv6 dhcp detail

Command: debug ipv6 dhcp detail


Function: Display the debug about detailed content of various packets sent and received
by DHCPv6. If packets with option 37 and option 38, they will also be displayed. This
command is applied in the server side as well as the relay side.
Parameters: None.
Command Mode: Admin mode
Usage Guide: Enable/disable the display of detailed debug about packets sent and
received by DHCPv6.
Example:
Switch# debug ipv6 dhcp detail
%Jan 01 01:38:45 2006 DHCPv6 DETAILS: contents of SOLICIT packet
%Jan 01 01:38:45 2006 transaction-ID: 0x00b2d47c
%Jan 01 01:38:45 2006 elapsed time option(8), option-len 2
%Jan 01 01:38:45 2006 elapsed time: 0
%Jan 01 01:38:45 2006 client ID option(1), option-len 14
%Jan 01 01:38:45 2006 DUID: 00:01:00:01:0f:55:82:4f:00:19:e0:3f:d1:83
%Jan 01 01:38:45 2006 identity association option(3), option-len 12
%Jan 01 01:38:45 2006 IANA: 0x0e001d92, T1 0, T2 0
%Jan 01 01:38:45 2006 vendor class option(16), option-len 14
%Jan 01 01:38:45 2006 enterprise number : 311
%Jan 01 01:38:45 2006 option request option(6), option-len 6
%Jan 01 01:38:45 2006 requested-option: domain search list
%Jan 01 01:38:45 2006 requested-option: DNS server list
%Jan 01 01:38:45 2006 requested-option: vendor specific info
%Jan 01 01:38:45 2006 remote-id option(37), option-len 14
%Jan 01 01:38:45 2006 remote-id : 0x0a0b0c
%Jan 01 01:38:45 2006 subscriber-id option(38), option-len 16
%Jan 01 01:38:45 2006 subscriber-id : 0x0a0b0c0d

5.2.2 debug ipv6 dhcp relay packet

Command: debug ip dhcp relay packet


Function: Display the information of relay packet processing.
Parameters: None.

5-11
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

Command Mode: Admin mode


Usage Guide: This command is used to display the process of relay packet processed by
relay agent together with the action information of option 37 and option 38.
Example:
Switch# debug ip dhcpv6 relay packet
%May 19 16:45:34 2010 DHCPv6 RELAY PACKET: received msg0 from
<fe80::211:22ff:fe33:4455> on <Vlan8>
%May 19 16:45:34 2010 DHCPv6 RELAY PACKET: add subscriber-id option
“Vlan8+Ethernet1/12”

5.2.3 debug ipv6 dhcp snooping packet

Command: debug ipv6 dhcp snooping packet


Function: Debug the packets of DHCPv6 SNOOPING. Corresponding information will
also be displayed when adding or deleting option 37 and option 38.
Parameters: None.
Command Mode: Admin mode
Usage Guide: Enable/disable the information of DHCPv6 packets processed by DHCPv6
Snooping, including the type of received packet, source MAC and destination MAC, client
DUID, i.e. the client identification, IA address, preferred lifetime, valid lifetime, and packet
discard and so on.
Example:
switch#debug ipv6 dhcp snooping packet
dhcpv6 snooping packet debug is on
switch#%Jan 05 00:26:40 2006 DHCP6SNP EVENT: Parse packet SOLICIT from
fe80::200:ff:fe00:1
src MAC 00-00-00-00-00-01 interface Ethernet1/23 vlan 24
%Jan 05 00:26:40 2006 DHCP6SNP PACKET: Receive DHCPv6 packet SOLICIT from
fe80::200:ff:fe00:1
src MAC 00-00-00-00-00-01, dst MAC 33-33-00-01-00-02,
interface Ethernet1/23 vlan 24,
transaction-ID 6137412, smac host flag 0, dmac host flag 0
%Jan 05 00:26:40 2006 DHCP6SNP PACKET: Forward packet SOLICIT (protocol 0x37)
%Jan 05 00:26:40 2006 DHCP6SNP PACKET: to vlan 24 except port Ethernet1/23
(designPort flag 0)
%Jan 05 00:26:40 2006 DHCP6SNP PACKET: and return packet to network stack
switch#

5-12
Commands for DHCP
Server Configuration Chapter 5 Commands of DHCPv6 option37, 38

5.2.4 show ipv6 dhcp relay option


Command: show ipv6 dhcp relay option
Function: Display the configuration of system relay agent, including the enable switch for
option 37 and option 38.
Parameters: None.
Command Mode: Admin mode
Usage Guide: Use this command to check relay agents’ configuration status for option 37
and option 38.
Example:
Switch#show ipv6 dhcp relay option
remote-id option enable
subscriber-id option enable
Interface Vlan 1: remote-id option configure “abc”

5.2.5 show ipv6 dhcp snooping option

Command: show ipv6 dhcp snooping option


Function: Display the configuration information of system snooping, including the enable
switch for option 37 and option 38.
Parameters: None.
Command Mode: Admin mode
Usage Guide: Use this command to check snooping configuration status for option 37
and option 38.
Example:
Switch#show ipv6 dhcp snooping option
remote-id option enable
subscriber-id option enable
The slot port vlan select option is : port and vlan
The delimiter is : #

5-13
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Chapter 6 Commands for DHCP


Snooping

6.1 debug ip dhcp snooping binding

Command: debug ip dhcp snooping binding


no debug ip dhcp snooping binding
Function: This command is use to enable the DHCP SNOOPING debug switch to debug
the state of binding data of DHCP SNOOPING.
Command Mode: Admin mode
Usage Guide: This command is mainly used to debug the state of DHCP SNOOPING
task when it adds ARP list entries, dot1x users and trusted user list entries according to
binding data.

6.2 debug ip dhcp snooping event

Command: debug ip dhcp snooping event


no debug ip dhcp snooping event
Function: This command is use to enable the DHCP SNOOPING debug switch to debug
the state of DHCP SNOOPING task.
Command Mode: Admin mode.
Usage Guide: This command is mainly used to debug the state of DHCP SNOOPING
task and available of outputting the state of checking binding data and executing port
action and so on.

6.3 debug ip dhcp snooping packet

Command: debug ip dhcp snooping packet


no debug ip dhcp snooping packet
Function: This command is used to enable the DHCP SNOOPING debug switch to
debug the message-processing procedure of DHCP SNOOPING.
Command Mode: Admin Mode.
Usage Guide: The debug information that the DHCP SNOOPING is processing
messages, including every step in the message-processing procedure: adding alarm
information, adding binding information, transmitting DHCP messages, adding/peeling

6-1
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

option 82 and etc.

6.4 debug ip dhcp snooping packet interface

Command: debug ip dhcp snooping packet interface {[ethernet] <InterfaceName>}


no debug ip dhcp snooping packet {[ethernet] <InterfaceName>}
Function: This command is used to enable the DHCP SNOOPING debug switch to
debug the information that DHCP SNOOPING is receiving a packet.
Parameters: <InterfaceName>: Interface name.
Command Mode: Admin Mode.
Usage Guide: The information that DHCP Snooping is receiving messages from a
specific port.

6.5 debug ip dhcp snooping update

Command: debug ip dhcp snooping update


no debug ip dhcp snooping update
Function: This command is use to enable the DHCP snooping debug switch to debug the
communication information between DHCP snooping and helper server.
Command Mode: Admin Mode.
Usage Guide: Debug the information of communication messages received and sent by
DHCP snooping and helper server.

6.6 enable trustview key

Command: enable trustview key {0 | 7} <password>


no enable trustview key
Function: To configure DES encrypted key for private packets, this command is also the
switch for the private packets encrypt and hash function enabled or not.
Parameter: <password> is character string length less than 16, which use as encrypted
key. 0 for un-encrypted text for the password, while 7 for encrypted.
Command Mode: Global Mode.
Default: Disabled.
Usage Guide: The switch communicates with the TrustView management system
through private protocols. By default these packets are not encrypted. In order to prevent
spoofing, it can be configured to encrypt these packets. And at the same time, the same
password should be configured on TrustView server.

6-2
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Example: Enable encrypt or hash function of private message.


Switch(config)# enable trustview key 0 switch

6.7 ip dhcp snooping

Command: ip dhcp snooping enable


no ip dhcp snooping enable
Function: Enable the DHCP Snooping function.
Parameters: None.
Command Mode: Globe mode.
Default Settings: DHCP Snooping is disabled by default.
Usage Guide: When this function is enabled, it will monitor all the DHCP Server packets
of non-trusted ports.
Example: Enable the DHCP Snooping function.
switch(config)#ip dhcp snooping enable

6.8 ip dhcp snooping action

Command: ip dhcp snooping action {shutdown | blackhole} [recovery <second>]


no ip dhcp snooping action
Function: Set or delete the automatic defense action of a port.
Parameters:
shutdown: When the port detects a fake DHCP Server, it will be shutdown.
blackhole: When the port detects a fake DHCP Server, the vid and source
MAC of the fake packet will be used to block the traffic from this MAC.
recovery: Users can set to recover after the automatic defense action being
executed.(no shut ports or delete correponding blackhole).
second: Users can set how long after the execution of defense action to
recover. The unit is second, and valid range is 10-3600.
Command Mode: Port mode
Default Settings: No default defense action.
Usage Guide: Only when DHCP Snooping is globally enabled, can this command be set.
Trusted port will not detect fake DHCP Server, so, will never trigger the corresponding
defense action. When a port turns into a trusted port from a non-trusted port, the original
defense action of the port will be automatically deleted.
Example: Set the DHCP Snooping defense action of port ethernet1/1 as setting blackhole,

6-3
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

and the recovery time is 30 seconds.


switch(config)#interface ethernet 1/1
switch(Config-Ethernet1/1)#ip dhcp snooping action blackhole recovery 30

6.9 ip dhcp snooping action MaxNum

Command: ip dhcp snooping action {<maxNum>|default}


Function: Set the number of defense action that can be simultaneously took effect.
Parameters: <maxNum>: the number of defense action on each port, the range of which
is 1-200, and the value of which is 10 by default.
default: recover to the default value.
Command Mode: Globe mode
Default Settings: The default value is 10.
Usage Guide: Set the max number of defense actions to avoid the resource exhaustion
of the switch caused by attacks. If the number of alarm information is larger than the set
value, then the earliest defense action will be recovered forcibly in order to send new
defense actions.
Example: Set the number of port defense actions as 100.
switch(config)#ip dhcp snooping action 100

6.10 ip dhcp snooping binding

Command: ip dhcp snooping binding enable


no ip dhcp snooping binding enable
Function: Enable the DHCP Snooping binding funciton
Parameters: None.
Command Mode: Globe mode
Default Settings: DHCP Snooping binding is disabled by default.
Usage Guide: When the function is enabled, it will record the binding information
allocated by DHCP Server of all trusted ports. Only after the DHCP SNOOPING function
is enabled, the binding function can be enabled.
Example: Enable the DHCP Snooping binding funciton.
switch(config)#ip dhcp snooping binding enable
Relative Command: ip dhcp snooping enable

6-4
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

6.11 ip dhcp snooping binding arp

This command is not supported by the switch.

6.12 ip dhcp snooping binding dot1x

Command: ip dhcp snooping binding dot1x


no ip dhcp snooping binding dot1x
Function: Enable the DHCP Snooping binding DOT1X funciton.
Parameters: None
Command Mode: Port mode
Default Settings: By default, the binding DOT1X funciton is disabled on all ports.
Usage Guide: When this function is enabled, DHCP SNOOPING will notify the DOT1X
module about the captured bindng information as a DOT1X controlled user. This
command is mutually exclusive to”ip dhcp snooping binding user-contro“command.
Only after the DHCP SNOOPING binding function is enabled, the binding dot1x
function can be set.
Example: Enable the binding DOT1X funciton on port ethernet1/1.
switch(config)#interface ethernet 1/1
switch(Config-Ethernet 1/1)# ip dhcp snooping binding dot1x
Relative Command: ip dhcp snooping binding enable
ip dhcp snooping binding user-control

6.13 ip dhcp snooping binding user

Command: ip dhcp snooping binding user <mac> address <ipaddress> interface


[Ethernet] <ifname>
no ip dhcp snooping binding user <mac> interface [Ethernet] <ifname>
Function: Configure the information of static binding users.
Parameters:
<mac>: The MAC address of the static binding user, whic is the only index of the binding
user.
<ipaddress>: The IP address of the static binding user.
<ifname>: The access interface of static binding user.
Command Mode: Globe mode
Default Settings: DHCP Snooping has no static binding list entry by default.

6-5
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Usage Guide: The static binding users is deal in the same way as the dynamic binding
users captured by DHCP SNOOPING; the follwoing actions are all allowed: notifying
DOT1X to be a controlled user of DOT1X, adding a trusted user list entry directly, adding
a bingding ARP list entry. The static binding uses will never be aged, and have a priority
higher than dynamic binding users. Only after the DHCP SNOOPING binding function is
enabled, the static binding users can be enabled.
Example: Configure static binding users.
switch(config)#ip dhcp snooping binding user 00-03-0f-12-34-56 address 192.168.1.16
interface Ethernet 1/16
Relative Command: ip dhcp snooping binding enable

6.14 ip dhcp snooping binding user-control

Command: ip dhcp snooping binding user-control


no ip dhcp snooping binding user-control
Function: Enable the binding user funtion.
Parameters: None.
Command Mode: Port Mode.
Default Settings: By default, the binding user funciton is disabled on all ports.
Usage Guide: When this function is enabled, DHCP SNOOPING will treat the captured
binding information as trusted users allowed to access all resources. This command is
mutually exclusive to “ip dhcp snooping binding dot1x“ command.
Only after DHCP SNOOPING binding function is enabled, the binding user function
can be set. This command is not limited by “ip dhcp snooping“ based on VLAN, but it is
only limited by the global “ip dhcp snooping enable“ command.
Example: Enable the binding USER funciton on port ethernet1/1.
switch(config)#interface ethernet 1/1
switch(Config-Ethernet 1/1)# ip dhcp snooping binding user-control
Relative Command: ip dhcp snooping binding enable
ip dhcp snooping binding dot1x

6.15 ip dhcp snooping binding user-control max-user

Command: ip dhcp snooping binding user-control max-user <number>


no ip dhcp snooping binding user-control max-user

6-6
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Function: Set the max number of users allowed to access the port when enabling DHCP
Snooping binding user funciton; the no operation of this command will restore default
value.
Parameters: <number> the max number of users allowed to access the port, from 0 to
1024.
Command Mode: Port Configuration Mode.
Default Settings: The max number of users allowed by each port to access is 1024.
Usage Guide: This command defines the max number of trust users distributed according
to binding information, with ip dhcp snooping binding user-contrl enabled on the port.
By default, the number is 1024. Considering the limited hardware resources of the switch,
the actual number of trust users distributed depends on the resource amount. If a bigger
max number of users is set using this command, DHCP Snooping will distribute the
binding informaiton of untrust users to hardware to be trust users as long as there is
enough available resources. Otherwise, DHCP Snooping will change the distributed
binging informaiton accordint to the new smaller max user number. When the number of
distributed bingding informaiton entries reaches the max limit, no new DHCP will be able
to become trust user or to access other network resouces via the switch.
Examples: Enable DHCP Snooping binding user funtion on Port ethernet1/1, setting the
max number of user allowed to access by Port Ethernet1/1 as 5.
Switch(Config-If-Ethernet1/1)# ip dhcp snooping binding user-control max-user 5
Related Command: ip dhcp snooping binding user-control

6.16 ip dhcp snooping information enable

Command: ip dhcp snooping information enable


no ip dhcp snooping information enable
Function: This command will enable option 82 function of DHCP Snooping on the switch,
the no operation of this command will disable that function.
Parameters: None.
Default Settings: Option 82 function is disabled in DHCP Snooping by default.
Command Mode: Global Configuration Mode.
Usage Guide: Only by implementing this command, can DHCP Snooping add standard
option 82 to DHCP request messages and forward the message. The format of option1 in
option 82 (Circuit ID option) is standard vlan name plus physical port name, like
vlan1+ethernet1/12. That of option2 in option 82 (remote ID option) is CPU MAC of the
switch, like 00030f023301. If a DHCP request message with option 82 options is received,
DHCP Snooping will replace those options in the message with its own. If a DHCP reply
message with option 82 options is received, DHCP Snooping will dump those options in

6-7
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

the message and forward it.


Examples: Enable option 82 function of DHCP Snooping on the switch.
Switch(config)#ip dhcp snooping enable
Switch(config)# ip dhcp snooping binding enable
Switch(config)# ip dhcp snooping information enable

6.17 ip dhcp snooping information option


allow-untrusted (replace|)

Command:ip dhcp snooping information option allow-untrusted (replace|)


no ip dhcp snooping information option allow-untrusted (replace|)
Function: This command is used to set that allow untrusted ports of DHCP snooping to
receive DHCP packets with option82 option. When the "replace" is setting, the potion82
option is allowed to replace. When disabling this command, all untrusted ports will drop
DHCP packets with option82 option.
Parameter: None.
Command Mode: Global Mode
Default: Drop DHCP packets with option82 option received by untrusted ports.
Usage Guide: Usually the switch with DHCP snooping function connects the terminal
user directly, so close allow-untrusted by default to avoid option82 option added by user
privately. Please set uplink port as trust port when enabling the uplink of DHCP snooping
function.
Example: Enable the function that receives DHCP packets with option82.
Switch(config)#ip dhcp snooping information option allow-untrusted

6.18 ip dhcp snooping information option delimiter

Command: ip dhcp snooping information option delimiter [colon | dot | slash |


space]
no ip dhcp snooping information option delimiter
Function: Set the delimiter of each parameter for suboption of option82 in global mode,
no command restores the delimiter as slash.
Parameters: None.
Default Settings: slash (“/”).
Command Mode: Global mode
Usage Guide: Divide parameters with the configured delimiters after users have defined
them which are used to create suboption (remote-id, circuit-id) of option82 in global mode.

6-8
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Example: Set the parameter delimiters as dot (“.”) for suboption of option82.
Switch(config)# ip dhcp snooping information option delimiter dot

6.19 ip dhcp snooping information option remote-id

Command: ip dhcp snooping information option remote-id {standard | <remote-id>}


no ip dhcp snooping information option remote-id
Function: Set the suboption2 (remote ID option) content of option 82 added by DHCP
request packets (they are received by the port). The no command sets the additive
suboption2 (remote ID option) format of option 82 as standard.
Parameters: standard means the default VLAN MAC format. <remote-id> means the
remote-id content of option 82 specified by users, its length can not exceed 64 characters.
Command Mode: Global Mode
Default: Use standard format to set remote-id.
Usage Guide: The additive option 82 needs to associate with third-party DHCP server, it
is used to specify the remote-id content by users when the standard remote-id format can
not satisfy server’s request.
Example: Set the suboption remote-id of DHCP option82 as street-1-1.
Switch(config)#ip dhcp snooping information option remote-id street-1-1

6.20 ip dhcp snooping information option self-defined


remote-id

Command: ip dhcp snooping information option self-defined remote-id {hostname |


mac | string WORD}
no ip dhcp snooping information option self-defined remote-id
Function: Set creation method for option82, users can define the parameters of remote-id
suboption by themselves.
Parameters: WORD the defined character string of remote-id by themselves, the
maximum length is 64.
Command Mode: Global Mode
Default: Using standard method.
Usage Guide: After configure this command, if users do not configure ip dhcp snooping
information option remote-id globally, it will create remote-id suboption for option82
according to self-defined method. For mac, use the format such as 00-02-d1-2e-3a-0d if it
is filled to packets with ascii format, but hex format occpies 6 bytes. Each option will be
filled to packets according to the configured order of the commands and divide them with

6-9
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

delimiter (delimiter is ip dhcp snooping information option delimiter configuration).


Example: Set self-defined method and character string of remote-id suboption are mac
and abc respectively for option82.
Switch(config)# ip dhcp snooping information option self-defined remote-id mac string abc

6.21 ip dhcp snooping information option self-defined


remote-id format

Command: ip dhcp snooping information option self-defined remote-id format


[ascii | hex]
Function: Set self-defined format of remote-id for snooping option82.
Parameters: None.
Command Mode: Global Mode
Default: ascii.
Usage Guide: self-defined format use ip dhcp snooping information option type
self-defined remote-id to create remote-id format.
Example: Set self-defined format of remote-id as hex for snooping option82.
Switch(config)# ip dhcp snooping information option self-defined remote-id format hex

6.22 ip dhcp snooping information option self-defined


subscriber-id

Command: ip dhcp snooping information option self-defined subscriber-id {vlan |


port | id (switch-id (mac | hostname)| remote-mac) | string WORD}
no ip dhcp snooping information option type self-defined subscriber-id
Function: Set creation method for option82, users can define the parameters of circute-id
suboption by themselves.
Parameters: WORD the defined character string of circuit-id by themselves, the
maximum length is 64.
Command Mode: Global Mode
Default: Using standard method.
Usage Guide: After configure this command, if users do not configure circuit-id on port, it
will create circuit-id suboption for option82 according to self-defined method. Self-defined
format of circuit-id: if self-defined subscriber-id format is ascii, the filled format of vlan such
as “Vlan2”, the format of port such as “Ethernet1/1”, the format of mac and remote-mac
such as “00-02-d1-2e-3a-0d”. If self-defined format is hex, the filled format of vlan

6-10
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

occupies 2 bytes, port occupies 4 bytes, a byte means slot (for chassis switch, it means
slot ID, for box switch, it is 1), a byte means Module (the default is 0), two bytes means
port ID beginning from 1, mac and remote-mac occupy 6 bytes. Each option will be filled
to packets according to the configured order of the commands and divide them with
delimiter (delimiter is ip dhcp snooping information option delimiter configuration).
Example: Set self-defined method of circuit-id suboption as vlan, port, mac and
remote-mac for option82.
Switch(config)#ip dhcp snooping information option self-defined subscriber-id vlan port id
remote-mac

6.23 ip dhcp snooping information option self-defined


subscriber-id format

Command: ip dhcp snooping information option self-defined subscriber-id format


[ascii | hex]
Function: Set self-defined format of circuit-id for snooping option82.
Parameters: None.
Command Mode: Global Mode
Default: ascii.
Usage Guide: self-defined format uses ip dhcp snooping information option type
self-defined subscriber-id to create circuit-id format.
Example: Set self-defined format of circuit-id as hex for snooping option82.
Switch(config)#ip dhcp snooping information option self-defined subscriber-id format hex

6.24 ip dhcp snooping information option


subscriber-id

Command: ip dhcp snooping information option subscriber-id {standard |


<circuit-id>}
no ip dhcp snooping information option subscriber-id
Function: Set the suboption1 (circuit ID option) content of option 82 added by DHCP
request packets (they are received by the port). The no command sets the additive
suboption1 (circuit ID option) format of option 82 as standard.
Parameters: standard means the standard format of VLAN name and physical port name,
such as Vlan2+Ethernet1/12. <circuit-id> means the circuit-id content of option 82
specified by users, its length can not exceed 64 characters.

6-11
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Command Mode: Port Mode


Default: Use standard format to set circuit-id.
Usage Guide: The additive option 82 needs to associate with third-party DHCP server, it
is used to specify the circuit-id content by user when the standard circuit-id format can not
satisfy server’s request.
Example: Set the suboption circuit-id of DHCP option82 as P2.
Switch(config)#ip dhcp snooping information option subscriber-id P2

6.25 ip dhcp snooping information option


subscriber-id format

Command: ip dhcp snooping information option subscriber-id format {hex | acsii |


vs-hp}
Function: This command is used to set subscriber-id format of DHCP snooping
option82.
Parameters: hex means that subscriber-id is VLAN and port information with
hexadecimal format, acsii means that subscriber-id is VLAN and port information with
ACSII format. vs-hp means that subscriber-id is compatible with the format of HP
manufacturer.
Command Mode: Global mode
Default: ascii.
User Guide: VLAN and port information with ASCII format, such as Vlan1+Ethernet1/11,
VLAN and port information with hexadecimal format defined as below:

Suboption Circuit
Length Length
type ID type

1 8 0 6 VLAN Slot Module Port

1 byte 1 byte 1 byte 1 byte 2 byte 1 byte 1 byte 2 byte

VLAN field fill in VLAN ID. For chassis switch, Slot means slot number, for box switch, Slot
is 1; default Module is 0; Port means port number which begins from 1.
The compatible subscriber-id format with HP manufacturer defined as below:
Suboption
Length
type

1 2 Port

1 byte 1 byte 2 byte

6-12
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Port means port number which begins from 1.


Example: Set subscriber-id format of DHCP snooping option82 as hexadecimal format.
Switch(config)#ip dhcp snooping information option subscriber-id format hex

6.26 ip dhcp snooping limit-rate

Command: ip dhcp snooping limit-rate <pps>


no ip dhcp snooping limit-rate
Function: Set the DHCP message rate limit
Parameters: <pps>: The number of DHCP messages transmitted in every minute,
ranging from 0 to 100. Its default value is 100. 0 means that no DHCP message will be
transmitted.
Command Mode: Globe mode
Default Settings: The default value is 100.
Usage Guide: After enabling DHCP snooping, the switch will monitor all the DHCP
messages and implement software transmission. The software performance of the switch
is relative to the type of the switch, its current load and so on.
Example: Set the message transmission rate as 50pps.
switch(config)#ip dhcp snooping limit-rate 50

6.27 ip dhcp snooping trust

Command: ip dhcp snooping trust


no ip dhcp snooping trust
Function: Set or delete the DHCP Snooping trust attributes of a port.
Parameters: None
Command Mode: Port mode
Default Settings: By default, all ports are non-trusted ports
Usage Guide: Only when DHCP Snooping is globally enabled, can this command be set.
When a port turns into a trusted port from a non-trusted port, the original defense action of
the port will be automatically deleted; all the security history records will be cleared
(except the information in system log).
Example: Set port ethernet1/1 as a DHCP Snooping trusted port
switch(config)#interface ethernet 1/1
switch(Config- Ethernet 1/1)#ip dhcp snooping trust

6-13
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

6.28 ip user helper-address

Command: ip user helper-address <svr_addr> [port <udp_port>] source <src_addr>


[secondary]
no ip user helper-address [secondary]
Function: Set the address and port of HELPER SERVER.
Parameters:
<svr_addr>: The IP address of HELPER SERVER IP in dotted-decimal notation.
udp_port: The UDP port of HELPER SERVER, the range of which is1-65535,
and its default value is 9119.
src_addr: The local management IP address of the switch, in dotted-decimal
notation.
sencondary: Whether it is a secondary SERVER address.
Command Mode: Global mode
Default Settings: There is no HELPER SERVER address by default.
Usage Guide: DHCP SNOOPING will send the monitored binding information to HELPER
SERVER to save it. If the switch starts abnormally, it can recover the binding data from
HELPER SERVER. The HELPER SERVER function usually is integrated into DCBI
packet. The DHCP SNOOPING and HELPER SERVER use the UDP protocol to
communicate, and guarantee the arrival of retransmitted data. HELPER SERVER
configuration can also be used to sent DOT1X user data from the server, the detail of
usage is described in the chapter of dot1x configuration.
Two HELPER SERVER addresses are allowed, DHCP SNOOPING will try to connect to
PRIMARY SERVER in the first place. Only when the PRIMARY SERVER is unreachable,
will the switch c HELPER SERVER connects to SECONDARY SERVER.
Please pay attention: source address is the effective management IP address of the
switch, if the management IP address of the switch changes, this configuration should be
updated in time.
Example: Set the local management IP address as 100.1.1.1, primary HELPER SERVER
address as 100.1.1.100 and the port as default value.
switch(config)#interface vlan 1
switch(Config- If-Vlan1)#ip address 100.1.1.1 255.255.255.0
switch(Config-if-Vlan1)exit
switch(config)#ip user helper-address 100.1.1.100 source 100.1.1.1

6-14
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

6.29 ip user private packet version two

Command: ip user private packet version two


no ip user private packet version two
Function: The switch choose private packet version two to communicate with trustview.
Parameter: None.
Command Mode: Global Mode.
Default: The switch choose private packet version one to communicate with DCBI.
Usage Guide: If the DCBI access control system is applied, the switch should be
configured to use private protocol of version one to communicate with the DCBI server.
However, if TrustView is applied, version two should be applied.
Example: To configure the switch choose private packet version two to communicate with
inter security management background system.
switch(config)#ip user private packet version two

6.30 show ip dhcp snooping

Command: show ip dhcp snooping [interface [ethernet] <interfaceName>]


Function: Display the current cofiguration information of dhcp snooping or display the
records of defense actions of a specific port.
Parameters: <interfaceName>: The name of the specific port.
Command Mode: Admin and Global Configuration Mode.
Default Settings: None.
Usage Guide: If there is no specific port, then display the current cofiguration information
of dhcp snooping, otherwise, display the records of defense actions of the specific port.
Example:
switch#show ip dhcp snooping
DHCP Snooping is enabled

DHCP Snooping binding arp: disabled


DHCP Snooping maxnum of action info:10
DHCP Snooping limit rate: 100(pps), switch ID: 0003.0F12.3456
DHCP Snooping droped packets: 0, discarded packets: 0
DHCP Snooping alarm count: 0, binding count: 0,
expired binding: 0, request binding: 0

interface trust action recovery alarm num bind num

6-15
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

--------------- --------- --------- ---------- --------- ----------


Ethernet1/1 trust none 0second 0 0
Ethernet1/2 untrust none 0second 0 0
Ethernet1/3 untrust none 0second 0 0
Ethernet1/4 untrust none 0second 0 1
Ethernet1/5 untrust none 0second 2 0
Ethernet1/6 untrust none 0second 0 0
Ethernet1/7 untrust none 0second 0 0
Ethernet1/8 untrust none 0second 0 1
Ethernet1/9 untrust none 0second 0 0
Ethernet1/10 untrust none 0second 0 0
Ethernet1/11 untrust none 0second 0 0
Ethernet1/12 untrust none 0second 0 0
Ethernet1/13 untrust none 0second 0 0
Ethernet1/14 untrust none 0second 0 0
Ethernet1/15 untrust none 0second 0 0
Ethernet1/16 untrust none 0second 0 0
Ethernet1/17 untrust none 0second 0 0
Ethernet1/18 untrust none 0second 0 0
Ethernet1/19 untrust none 0second 0 0
Ethernet1/20 untrust none 0second 0 0
Ethernet1/21 untrust none 0second 0 0
Ethernet1/22 untrust none 0second 0 0
Ethernet1/23 untrust none 0second 0 0
Ethernet1/24 untrust none 0second 0 0

Displayed Information Explanation


DHCP Snooping is enable Whether the DHCP Snooping is globally enabled
or disabled.
DHCP Snooping binding arp Whether the ARP binding function is enabled.
DHCP Snooping maxnum of action The number limitation of port defense actions
info
DHCP Snooping limit rate The rate limitation of receiving packets
switch ID The switch ID is used to identify the switch,
usually using the CPU MAC address.
DHCP Snooping droped packets The number of dropped messages when the
received DHCP messages exceeds the rate limit.
discarded packets The number of discarded packets caused by the

6-16
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

communication failure within the system. If the


CPU of the switch is too busy to schedule the
DHCP SNOOPING task and thus can not handle
the received DHCP messages, such situation
might happen.
DHCP Snooping alarm count: The number of alarm information.
binding count The number of binding information.
expired binding The number of binding information which is
already expired but has not been deleted. The
reason why the expired information is not deleted
immediately might be that the switch needs to
notify the helper server about the information, but
the helper server has not acknowledged it.
request binding The number of REQUEST information

interface The name of port


trust The truest attributes of the port
action The automatic defense action of the port
recovery The automatic recovery time of the port
alarm num The number of history records of the port
automatic defense actions
bind num The number of port-relative binding information.

switch#show ip dhcp snooping int Ethernet1/1


interface Ethernet1/1 user config:
trust attribute: untrust
action: none
binding dot1x: disabled
binding user: disabled
recovery interval:0(s)
Alarm info: 0

Binding info: 0

Expired Binding: 0

Request Binding: 0

6-17
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Displayed Information Explanation


interface The name of port
trust attribute The truest attributes of the port
action The automatic defense action of the
port
recovery interval The automatic recovery time of the port
maxnum of alarm info The max number of automatic defense
actions that can be recorded by the port
binding dot1x Whether the binding dot1x function is
enabled on the port
binding user Whether the binding user function is
enabled on the port.
Alarm info The number of alarm information.
Binding info The number of binding information.
Expired Binding The expired binding information
Request Binding REQUEST information

6.31 show ip dhcp snooping binding all

Command: show ip dhcp snooping binding all


Function: Display the current global binding information of DHCP snooping.
Parameters: None.
Command Mode: Admin and Global Configuration Mode.
Default Settings: None.
Usage Guide: This command can check the global binding information of DHCP
snooping, each table entry includes the corresponding MAC address, IP address, port
name, VLAN ID and the flag of the binding state. Besides, DHCP Snooping must be
enabled globally, this command can be configured.
Example:
switch#show ip dhcp snooping binding all
ip dhcp snooping static binding count:1169, dynamic binding count:0

MAC IP address Interface Vlan ID Flag


--------------------------------------------------------------------------
00-00-00-00-11-11 192.168.40.1 Ethernet1/1 1 S
00-00-00-00-00-10 192.168.40.10 Ethernet1/2 1 D
00-00-00-00-00-11 192.168.40.11 Ethernet1/4 1 D

6-18
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

00-00-00-00-00-12 192.168.40.12 Ethernet1/4 1 D


00-00-00-00-00-13 192.168.40.13 Ethernet1/4 1 SU
00-00-00-00-00-14 192.168.40.14 Ethernet1/4 1 SU
00-00-00-00-00-15 192.168.40.15 Ethernet1/5 1 SL
00-00-00-00-00-16 192.168.40.16 Ethernet1/5 1 SL
--------------------------------------------------------------------------
The flag explanation of the binding state:
S The static binding is configured by shell command
D The dynamic binding type
U The binding is uploaded to the server
R The static binding is configured by the server
O DHCP response with the option82
L The hardware drive is announced by the binding
X Announcing dot1x module is successful
E Announcing dot1x module is failing

6.32 show trustview status

Command: show trustview status


Function: To show all kinds of private packets state information, which sending or
receiving from TrustView (inter security management background system).
Parameter: None.
Command Mode: Admin and Global Configuration Mode.
Default: None.
Usage Guide: This command can be used for debugging the communication messages
between the switch and the TrustView server, messages such as protocol version
notification, encryption negotiation, free resource and web URL redirection, and the
number of forced log-off messages, as well as the number of forced accounting update
messages, can be displayed.
Example:
Switch#show trustview status
Primary TrustView Server 200.101.0.9:9119
TrustView version2 message inform successed
TrustView inform free resource successed
TrustView inform web redirect address successed
TrustView inform user binding data successed
TrustView version2 message encrypt/digest enabled
Key: 08:02:33:34:35:36:37:38

6-19
Commands for DHCP
Server Configuration Chapter 6 Commands for DHCP Snooping

Rcvd 106 encrypted messages, in which MD5-error 0 messages, DES-error 0 messages


Sent 106 encrypted messages
Free resource is 200.101.0.9/255.255.255.255
Web redirect address for unauthencated users is <http://200.101.0.9:8080>
Rcvd 0 force log-off packets
Rcvd 19 force accounting update packets
Using version two private packet

6-20
Commands for DHCP Chapter 7 Commands for DHCP
Server Configuration Snooping option 82

Chapter 7 Commands for DHCP


Snooping option 82

7.1 ip dhcp snooping information enable

Command: ip dhcp snooping information enable


no ip dhcp snooping information enable
Function: This command will enable option 82 function of DHCP Snooping on the switch,
the no operation of this command will disable that function.
Parameters: None.
Default Settings: Option 82 function is disabled in DHCP Snooping by default.
Command Mode: Global Configuration Mode.
Usage Guide: Only by implementing this command, can DHCP Snooping add standard
option 82 to DHCP request messages and forward the message. The format of option1 in
option 82 (Circuit ID option) is standard vlan name plus physical port name, like
“vlan1+ethernet1/12”. That of option2 in option 82 (remote ID option) is CPU MAC of the
switch, like “00030f023301”. If a DHCP request message with option 82 options is
received, DHCP Snooping will replace those options in the message with its own. If a
DHCP reply message with option 82 options is received, DHCP Snooping will dump those
options in the message and forward it.
Examples: Enable option 82 function of DHCP Snooping on the switch.
Switch(config)#ip dhcp snooping enable
Switch(config)#ip dhcp snooping binding enable
Switch(config)#ip dhcp snooping information enable

7-1

You might also like