- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-DHCP Commands | 178.82 KB |
Table of Contents
Chapter 1 DHCP Server Configuration Commands
1.1 DHCP Server Configuration Commands
1.1.5 dhcp select server global-pool
1.1.7 dhcp server forbidden-ip
1.1.9 dhcp server ping packets
1.1.10 dhcp server ping timeout
1.1.11 dhcp server relay information enable
1.1.12 display dhcp server conflict
1.1.13 display dhcp server expired
1.1.14 display dhcp server forbidden-ip
1.1.15 display dhcp server free-ip
1.1.16 display dhcp server ip-in-use
1.1.17 display dhcp server statistics
1.1.18 display dhcp server tree
1.1.27 reset dhcp server conflict
1.1.28 reset dhcp server ip-in-use
1.1.29 reset dhcp server statistics
1.1.30 static-bind client-identifier
1.1.32 static-bind mac-address
1.1.33 tftp-server domain-name
Chapter 2 DHCP Relay Agent Configuration Commands
2.1 DHCP Relay Agent Configuration Commands
2.1.2 dhcp relay address-check
2.1.3 dhcp relay information enable
2.1.4 dhcp relay information format
2.1.5 dhcp relay information strategy
2.1.7 dhcp relay security static
2.1.8 dhcp relay security tracker
2.1.9 dhcp relay server-detect
2.1.10 dhcp relay server-group
2.1.11 dhcp relay server-select
2.1.14 display dhcp relay security
2.1.15 display dhcp relay security statistics
2.1.16 display dhcp relay security tracker
2.1.17 display dhcp relay server-group
2.1.18 display dhcp relay statistics
2.1.19 reset dhcp relay statistics
Chapter 1 DHCP Server Configuration Commands
1.1 DHCP Server Configuration Commands
1.1.1 bims-server
Syntax
bims-server ip ip-address [ port port-number ] sharekey key
undo bims-server
View
DHCP address pool view
Default Level
2: System level
Parameters
ip ip-address: Specifies an IP address for the BIMS server.
port port-number: Specifies a port number for the BIMS server.
sharekey key: Specifies a shared key for the BIMS server, which is a string of 1 to 16 characters.
Description
Use the bims-server command to specify the IP address, port number, and shared key of the BIMS server in the DHCP address pool for the client.
Use the undo bims-server command to remove BIMS server information assigned from the DHCP address pool to the DHCP client.
By default, no BIMS server information is specified.
If you execute the bims-server command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool.
Examples
# Specify the IP address 1.1.1.1, port number 80, shared key aabbcc of the BIMS server in DHCP address pool 0 for the client.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] bims-server ip 1.1.1.1 port 80 sharekey aabbcc
1.1.2 bootfile-name
Syntax
bootfile-name bootfile-name
undo bootfile-name
View
DHCP address pool view
Default Level
2: System level
Parameters
bootfile-name: Boot file name, a string of 1 to 63 characters.
Description
Use the bootfile-name command to specify a bootfile name in the DHCP address pool for the client.
Use the undo bootfile-name command to remove the specified bootfile name assigned from the DHCP address pool to the DHCP client.
By default, no bootfile name is specified.
If you execute the bootfile-name command repeatedly, the latest configuration will overwrite the previous one.
Examples
# Specify the bootfile name aaa in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] bootfile-name aaa
1.1.3 debugging dhcp server
Syntax
debugging dhcp server { all | error | event | packet }
undo debugging dhcp server { all | error | event | packet }
View
User view
Default Level
1: Monitor level
Parameters
all: Enables/disables all the debugging on the DHCP server.
error: Enables/disables error debugging on the DHCP server. Errors include those occurring when the DHCP server processes DHCP packets or allocates addresses.
event: Enables/disables event debugging on the DHCP server. Events include address allocation and ping detection timeout.
packet: Enables/disables DHCP packet debugging. Packets include the packets that the DHCP server has received and sent, and the ping packets sent for the purpose of detection and the received response packets.
Description
Use the debugging dhcp server command to enable debugging on the DHCP server.
Use the undo debugging dhcp server command to disable debugging on the DHCP server.
By default, debugging is disabled on the DHCP server.
Table 1-1 Description on fields of the debugging dhcp server packet command
Field |
Description |
Rx/Tx |
Receive or transmit |
Interface InterfaceName |
Receiving interface |
Message type: MessageType |
Content of the first byte of the DHCP message. That is, the operation type of a DHCP message, namely request or reply. |
Hardware Type: HardwareType |
Hardware type of the DHCP client |
Hardware Address Length: HardwareAddressLength |
Length of the DHCP client’s hardware address |
Hops: Hops |
Number of relay agents a DHCP message passed |
Transaction ID: TransactionID |
A random number, uniquely identifying an address allocation requested by the DHCP client |
Seconds: Seconds |
Number of seconds that has elapsed since the DHCP client began address acquisition |
Broadcast Flag: BroadcastFlag |
DHCP broadcast flag l 1: Broadcast l 0: Unicast. |
Client IP Address: ClientIPAddress |
IP address of the DHCP client |
Your IP Address: YourIPAddress |
IP address that the DHCP server assigns to the client |
Server IP Address: ServerIPAddress |
IP address of the DHCP server |
Gateway IP Address: GatewayIPAddress |
IP address of the DHCP relay agent |
Client Hardware Address: ClientHardwareAddress |
Hardware address of the DHCP client |
Server Host Name: ServerHostName |
Host name of the DHCP server. |
Boot File Name: BootFileName |
Boot file name of the DHCP server |
DHCP message type: DHCPmessagetype |
DHCP message type, including l DHCP Discover l DHCP Offer l DHCP Request l DHCP Decline l DHCP ACK l DHCP NAK l DHCP Release l DHCP Inform |
Table 1-2 Description on fields of the debugging dhcp server event command
Field |
Description |
DHCPServer: |
Identifies DHCP server event |
operation |
DHCP server operation |
Examples
# Enable all the DHCP server debugging.
<Sysname> debugging dhcp server all
<Sysname> terminal debugging
// All the DHCP server debugging is enabled.
<Sysname>
*Mar 31 09:34:15:636 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
Checking for expired lease
// The DHCP server periodically checks whether there is any expired lease.
*Mar 31 09:34:15:745 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Receive DHCPDISCOVER from 0015-E942-3C84 through 100.100.100.1
*Mar 31 09:34:15:915 2007 Sysname DHCPS/7/DHCPS_DEBUG_PACKET:
Rx, interface Vlan-interface3000
Message type: request
Hardware Type: 1, Hardware Address Length: 6
Hops: 1, Transaction ID: 2450676937
Seconds: 0, Broadcast Flag: 0
Client IP Address: 0.0.0.0 Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0 Gateway IP Address: 100.100.100.1
Client Hardware Address: 0015-e942-3c84
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Discover
// The DHCP server receives a DHCP-DISCOVER message.
*Mar 31 09:34:16:665 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Find the lease successfully.
*Mar 31 09:34:16:785 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Delete the lease because the lease IP is used by server.
*Mar 31 09:34:16:945 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Adding the IP used by server to conflicted list.
*Mar 31 09:34:17:225 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Assign Free Lease from global pool.
*Mar 31 09:34:17:355 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Sending ICMP ECHO to target IP: 100.100.0.4
// The DHCP server assigns a temporary lease with the IP address 100.100.0.4 from the global address pool to the client. Before assigning, the DHCP server checks whether the IP address is currently in use by sending ICMP messages.
*Mar 31 09:34:17:495 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: ICMP Timeout!
*Mar 31 09:34:17:615 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: ICMP detecting finished. The target IP can be used for dhcp allocati
on.
// This IP address is assignable.
*Mar 31 09:34:17:795 2007 Sysname DHCPS/7/DHCPS_DEBUG_PACKET:
Tx, interface Vlan-interface3000
Message type: reply
Hardware Type: 1, Hardware Address Length: 6
Hops: 0, Transaction ID: 2450676937
Seconds: 0, Broadcast Flag: 0
Client IP Address: 0.0.0.0 Your IP Address: 100.100.0.4
Server IP Address: 0.0.0.0 Gateway IP Address: 100.100.100.1
Client Hardware Address: 0015-e942-3c84
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Offer
// The DHCP server sends a DHCP-OFFER message and assigns the IP address 100.100.0.4 to the DHCP client.
*Mar 31 09:34:30:135 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DhcpServer: Send DHCPOFFER to 0015-E942-3C84 Offer IP=> 100.100.0.4 through 100.100.100.1
*Mar 31 09:34:30:325 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Receive DHCPREQUEST from 0015-E942-3C84 through 100.100.100.1
*Mar 31 09:34:30:495 2007 Sysname DHCPS/7/DHCPS_DEBUG_PACKET:
Rx, interface Vlan-interface3000
Message type: request
Hardware Type: 1, Hardware Address Length: 6
Hops: 1, Transaction ID: 2450676937
Seconds: 3328, Broadcast Flag: 0
Client IP Address: 0.0.0.0 Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0 Gateway IP Address: 100.100.100.1
Client Hardware Address: 0015-e942-3c84
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Request
// The DHCP server receives a DHCP-REQUEST message.
*Mar 31 09:34:31:245 2007 Sysname DHCPS/7/DHCPS_DEBUG_COMMON:
DHCPServer: Acknowledge the DHCPREQUEST message!
*Mar 31 09:34:31:375 2007 Sysname DHCPS/7/DHCPS_DEBUG_PACKET:
Tx, interface Vlan-interface3000
Message type: reply
Hardware Type: 1, Hardware Address Length: 6
Hops: 0, Transaction ID: 2450676937
Seconds: 0, Broadcast Flag: 0
Client IP Address: 0.0.0.0 Your IP Address: 100.100.0.4
Server IP Address: 0.0.0.0 Gateway IP Address: 100.100.100.1
Client Hardware Address: 0015-e942-3c84
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Ack
// The DHCP server sends a DHCP-ACK message.
1.1.4 dhcp enable
Syntax
dhcp enable
undo dhcp enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the dhcp enable command to enable DHCP.
Use the undo dhcp enable command to disable DHCP.
By default, DHCP is disabled.
& Note:
You need to enable DHCP before performing DHCP server and relay agent configurations.
Examples
# Enable DHCP.
<Sysname> system-view
[Sysname] dhcp enable
1.1.5 dhcp select server global-pool
Syntax
dhcp select server global-pool [ subaddress ]
undo dhcp select server global-pool subaddress
View
VLAN interface view
Default Level
2: System level
Parameters
subaddress: Supports subaddress allocation. That is, the DHCP server and clients are on the same network segment, and the server allocates IP addresses from the address pool containing the network segment of the first subaddress if several subaddresses exist.
Description
Use the dhcp select server global-pool command to enable specified interface(s) to operate in DHCP server mode. After the interface receives a DHCP request, the DHCP server will allocate an IP address from the address pool.
Use the undo dhcp select server global-pool subaddress command to cancel the support for subaddress allocation.
By default, the DHCP server is enabled on an interface.
Examples
# Enable the DHCP server on VLAN interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp select server global-pool
1.1.6 dhcp server detect
Syntax
dhcp server detect
undo dhcp server detect
View
System view
Default Level
2: System level
Parameters
None
Description
Use the dhcp server detect command to enable unauthorized DHCP server detection.
Use the undo dhcp server detect command to disable the function.
By default, the function is disabled.
Examples
# Enable unauthorized DHCP server detection.
<Sysname> system-view
[Sysname] dhcp server detect
1.1.7 dhcp server forbidden-ip
Syntax
dhcp server forbidden-ip low-ip-address [ high-ip-address ]
undo dhcp server forbidden-ip low-ip-address [ high-ip-address ]
View
System view
Default Level
2: System level
Parameters
low-ip-address: Start IP address of the IP address range to be excluded from dynamic allocation.
high-ip-address: End IP address of the IP address range to be excluded from dynamic allocation. The end IP address must have a higher sequence than the start one.
Description
Use the dhcp server forbidden-ip command to exclude IP addresses from dynamic allocation.
Use the undo dhcp server forbidden-ip command to remove the configuration.
By default, all IP addresses in DHCP address pools are assignable except IP addresses of the DHCP server interfaces.
When you use the undo dhcp server forbidden-ip command to remove the configuration to exclude an IP address from dynamic assignment, the specified address/address range must be consistent with the one specified by the dhcp server forbidden-ip command. If you have configured to exclude an address range from dynamic assignment, you need to specify an address range in the undo dhcp server forbidden-ip command instead of specifying one IP address.
Related commands: dhcp server ip-pool and network.
Examples
# Exclude the IP address range 10.110.1.1 to 10.110.1.63 from dynamic allocation.
<Sysname> system-view
[Sysname] dhcp server forbidden-ip 10.110.1.1 10.110.1.63
1.1.8 dhcp server ip-pool
Syntax
dhcp server ip-pool pool-name
undo dhcp server ip-pool pool-name
View
System view
Default Level
2: System level
Parameters
pool-name: Global address pool name, which is a unique pool identifier, a string of 1 to 35 characters.
Description
Use the dhcp server ip-pool command to create a DHCP address pool and enter its view. If the pool was created, you will directly enter its view.
Use the undo dhcp server ip-pool command to remove specified DHCP address pool.
By default, no DHCP address pool is created.
Related commands: dhcp enable.
Examples
# Create the DHCP address pool identified by 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
1.1.9 dhcp server ping packets
Syntax
dhcp server ping packets number
undo dhcp server ping packets
View
System view
Default Level
2: System level
Parameters
number: Number of ping packets, in the range 0 to 10. 0 means no ping operation.
Description
Use the dhcp server ping packets command to specify the maximum number of ping packets on the DHCP server.
Use the undo dhcp server ping packets command to restore the default.
The number defaults to 1.
Examples
# Specify the maximum number of ping packets as 1.
<Sysname> system-view
[Sysname] dhcp server ping packets 10
1.1.10 dhcp server ping timeout
Syntax
dhcp server ping timeout milliseconds
undo dhcp server ping timeout
View
System view
Default Level
2: System level
Parameters
milliseconds: Response timeout value for ping packets in milliseconds. 0 means no ping operation.
Description
Use the dhcp server ping timeout command to configure response timeout time of the ping packet on the DHCP server.
Use the undo dhcp server ping timeout command to restore the default.
The time defaults to 500.
Examples
# Specify the response timeout time as 1000ms.
<Sysname> system-view
[Sysname] dhcp server ping timeout 1000
1.1.11 dhcp server relay information enable
Syntax
dhcp server relay information enable
undo dhcp server relay information enable
View
System view.
Default Level
2: System level
Parameters
None
Description
Use the dhcp server relay information enable command to enable the DHCP server to handle Option 82.
Use the undo dhcp server relay information enable command to configure the DHCP server to ignore Option 82.
By default, the DHCP server handles Option 82.
Examples
# Configure the DHCP server to ignore Option 82.
<Sysname> system-view
[Sysname] undo dhcp server relay information enable
1.1.12 display dhcp server conflict
Syntax
display dhcp server conflict { all | ip ip-address }
View
Any view
Default Level
1: Monitor level
Parameters
all: Displays information about all IP address conflicts.
ip ip-address: Displays conflict information for the IP address.
Description
Use the display dhcp server conflict command to display information about IP address conflicts.
Related commands: reset dhcp server conflict.
Examples
# Display information about all IP address conflicts.
<Sysname> display dhcp server conflict all
Address Discover Time
10.110.1.2 Jan 11 2003 11:57:07
Table 1-3 Description on fields of the display dhcp server conflict command
Field |
Description |
Address |
Conflicted IP address |
Discover Time |
Time when the conflict was discovered |
1.1.13 display dhcp server expired
Syntax
display dhcp server expired { ip ip-address | pool [ pool-name ] | all }
View
Any view
Default Level
1: Monitor level
Parameters
ip ip-address: Displays the lease expiration information of a specified IP address.
pool [ pool-name ]: Displays the lease expiration information of a specified address pool. pool-name is a string of 1 to 35 characters. If no pool name is specified, the lease expiration information of all address pools is displayed.
all: Displays the lease expiration information of all DHCP address pools.
Description
Use the display dhcp server expired command to display the lease expiration information of specified DHCP address pool(s) or an IP address.
DHCP will assign these expired IP addresses to DHCP clients after all addresses have been assigned.
Examples
# Display information about lease expirations in all DHCP address pools.
<Sysname> display dhcp server expired all
Global pool:
IP address Client-identifier/ Lease expiration Type
Hardware address
1.1.1.4 0001-0001-0003 Feb 21 2006 18:07:26 PM Release
1.1.1.5 0001-0001-0004 Feb 21 2006 18:07:26 PM Release
--- total 2 entry ---
Table 1-4 Description on fields of the display dhcp server expired command
Field |
Description |
Global pool |
Information about lease expiration of a DHCP global address pool |
IP address |
Expired IP addresses |
Client-identifier/Hardware address |
IDs or MACs of clients whose IP addresses were expired |
Lease expiration |
The lease expiration time |
Type |
Types of lease expirations. Currently, this field is set to Release. |
1.1.14 display dhcp server forbidden-ip
Syntax
display dhcp server forbidden-ip
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp server forbidden-ip command to display IP addresses excluded from dynamic allocation in DHCP address pool.
Examples
# Display IP addresses excluded from dynamic allocation in the DHCP address pool.
<Sysname> display dhcp server forbidden-ip
IP Range from 1.1.1.1 to 1.1.1.1
IP Range from 2.2.2.2 to 2.2.2.5
1.1.15 display dhcp server free-ip
Syntax
display dhcp server free-ip
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp server free-ip command to display information about IP addresses that have never been assigned.
Examples
# Display information about assignable IP addresses.
<Sysname> display dhcp server free-ip
IP Range from 10.0.0.0 to 10.0.0.255
1.1.16 display dhcp server ip-in-use
Syntax
display dhcp server ip-in-use { ip ip-address | pool [ pool-name ] | all }
View
Any view
Default Level
1: Monitor level
Parameters
ip ip-address: Displays the binding information of a specified IP address.
pool [ pool-name ]: Displays the binding information of a specified address pool. pool-name is a string of 1 to 35 characters. If no pool name is specified, the binding information of all address pools is displayed.
all: Displays the binding information of all DHCP address pools.
Description
Use the display dhcp server ip-in-use command to display the binding information of DHCP address pool(s) or an IP address.
Related commands: reset dhcp server ip-in-use.
Examples
# Display the binding information of all DHCP address pools.
<Sysname> display dhcp server ip-in-use all
Global pool:
IP address Client-identifier/ Lease expiration Type
Hardware address
10.1.1.1 0016-EC41-4D4C NOT Used Manual
--- total 1 entry ---
Table 1-5 Description on fields of the display dhcp server ip-in-use command
Field |
Description |
Global pool |
Binding information of a DHCP global address pool |
IP address |
Bound IP address |
Client-identifier/Hardware address |
Client’s ID or MAC of the binding |
Lease expiration |
Lease expiration time |
Type |
Binding types, including Manual, Auto:OFFERED and Auto:COMMITTED. l Manual: Static binding l Auto:OFFERED: The binding sent in the DHCP-OFFER message from the server to the client. l Auto:COMMITTED: The binding sent in the DHCP-ACK message from the server to the client. |
1.1.17 display dhcp server statistics
Syntax
display dhcp server statistics
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp server statistics command to display the statistics of the DHCP server.
Related commands: reset dhcp server statistics.
Examples
# Display the statistics on the DHCP server.
<Sysname> display dhcp server statistics
Global Pool:
Pool Number: 1
Binding:
Auto: 1
Manual: 0
Expire: 0
BOOTP Request: 10
DHCPDISCOVER: 5
DHCPREQUEST: 3
DHCPDECLINE: 0
DHCPRELEASE: 2
DHCPINFORM: 0
BOOTPREQUEST: 0
BOOTP Reply: 6
DHCPOFFER: 3
DHCPACK: 3
DHCPNAK: 0
BOOTPREPLY: 0
Bad Messages: 0
Table 1-6 Description on fields of the display dhcp server statistics command
Field |
Description |
Global Pool |
Statistics of a DHCP global address pool |
Pool Number |
The number of address pools |
Auto |
The number of dynamic bindings |
Manual |
The number of static bindings |
Expire |
The number of expired bindings |
BOOTP Request DHCPDISCOVER DHCPREQUEST DHCPDECLINE DHCPRELEASE DHCPINFORM BOOTPREQUEST |
The number of DHCP requests sent from DHCP clients to the DHCP server. |
BOOTP Reply DHCPOFFER DHCPACK DHCPNAK Bad Messages BOOTPREPLY |
The number of DHCP replies sent from the DHCP server to DHCP clients. |
Bad Messages |
The number of erroneous messages |
1.1.18 display dhcp server tree
Syntax
display dhcp server tree { pool [ pool-name ] | all }
View
Any view
Default Level
1: Monitor level
Parameters
pool [ pool-name ]: Displays the tree organization information of a specified address pool. pool-name is a string of 1 to 35 characters. If no pool name is specified, the tree organization information of all address pools will be displayed.
all: Displays the tree organization information of all DHCP address pools.
Description
Use the display dhcp server tree command to display the tree organization information of DHCP address pool(s).
Examples
# Display the tree organization information of all DHCP address pools.
<Sysname> display dhcp server tree all
Global pool:
Pool name: 0
network 20.1.1.0 mask 255.255.255.0
Sibling node:1
option 2 ip-address 1.1.1.1
expired 1 0 0
Pool name: 1
static-bind ip-address 10.10.1.2 mask 255.0.0.0
static-bind mac-address 00e0-00fc-0001
PrevSibling node:0
expired unlimited
Table 1-7 Description on fields of the display dhcp server tree command
Field |
Description |
Global pool |
Information of a global address pool |
Pool name |
Address pool name |
network |
Network segment for address allocation |
static-bind ip-address 10.10.1.2 mask 255.0.0.0 static-bind mac-address 00e0-00fc-0001 |
The IP address and MAC address of the static binding |
Sibling node |
Sub-node of the current node. The node in the output may be one of the following types: l Child node: The child node (subnet segment) address pool of the current node l Parent node: The parent node (nature network segment) address pool of the current node l Sibling node: The latter sibling node of the current node (another subnet of the same nature network). The earlier the sibling node is configured, the higher selection priority the sibling node has. l PrevSibling node: The previous sibling node of the current node |
option |
Self-defined DHCP options |
expired |
Lease duration: day, hour, minute or unlimited |
gateway-list |
Gateway assigned to the DHCP client |
dns-list |
DNS server assigned to the DHCP client |
domain-name |
Domain name specified for the DHCP client |
nbns-list |
WINS server assigned to the DHCP client |
netbios-type |
NetBIOS node type assigned to the DHCP client |
tftp-server domain-name |
TFTP server name assigned to the DHCP client |
tftp-server ip-address |
TFTP server IP address assigned to the DHCP client |
1.1.19 dns-list
Syntax
dns-list ip-address&<1-8>
undo dns-list { ip-address | all }
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address&<1-8>: DNS server IP address. &<1-8> means you can specify up to eight DNS server addresses separated by spaces.
all: Specifies all DNS server addresses to remove.
Description
Use the dns-list command to specify DNS server addresses in a DHCP global address pool.
Use the undo dns-list command to remove DNS server addresses from a DHCP global address pool.
By default, no DNS server address is specified.
If you repeatedly use the dns-list command, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool.
Examples
# Specify the DNS server address 10.1.1.254 for the DHCP client in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] dns-list 10.1.1.254
1.1.20 domain-name
Syntax
domain-name domain-name
undo domain-name
View
DHCP address pool view
Default Level
2: System level
Parameters
domain-name: DHCP client domain name to be specified in a DHCP global address pool, a string of 1 to 50 characters.
Description
Use the domain-name command to specify the DHCP client domain name in a DHCP global address pool.
Use the undo domain-name command to remove the domain name assigned from a DHCP global address pool to the DHCP client.
No domain name is specified by default.
Related commands: dhcp server ip-pool.
Examples
# Specify the client domain name as mydomain.com in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] domain-name mydomain.com
1.1.21 expired
Syntax
expired { day day [ hour hour [ minute minute ] ] | unlimited }
undo expired
View
DHCP address pool view
Default Level
2: System level
Parameters
day day: Specifies the number of days, in the range of 0 to 365.
hour hour: Specified the number of hours, in the range of 0 to 23.
minute minute: Specifies the number of minutes, in the range of 0 to 59.
unlimited: Specifies the infinite duration, which is actually 136 years.
Description
Use the expired command to specify the lease duration in a DHCP global address pool.
Use the undo expired command to restore the default lease duration in a DHCP global address pool.
The lease duration defaults to one day.
Note that if the lease duration you specified is beyond the year 2106, the system regards the lease as expired.
Related commands: dhcp server ip-pool.
Examples
# Specify the lease duration as one day, two hours and three minutes in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] expired day 1 hour 2 minute 3
1.1.22 gateway-list
Syntax
gateway-list ip-address&<1-8>
undo gateway-list { ip-address | all }
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address&<1-8>: Gateway IP address. &<1-8> means you can specify up to eight gateway addresses separated by spaces.
all: Specifies all gateway IP addresses to be removed.
Description
Use the gateway-list command to specify gateway address(es) in a DHCP global address pool.
Use the undo gateway-list command to remove gateway address(es) specified for the DHCP client from a DHCP global address pool.
By default, no gateway address is specified.
If you use the gateway-list command repeatedly, the latest configuration will overwrite the previous one.
Examples
# Specify the gateway address 10.110.1.99 in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] gateway-list 10.110.1.99
1.1.23 nbns-list
Syntax
nbns-list ip-address&<1-8>
undo nbns-list { ip-address | all }
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address&<1-8>: WINS server IP address. &<1-8> means you can specify up to eight WINS server addresses separated by spaces.
all: Specifies all WINS server addresses to be removed.
Description
Use the nbns-list command to specify WINS server address(es) in a DHCP global address pool.
Use the undo nbns-list command to remove WINS server address(es) assigned from a DHCP global address pool to the DHCP client.
By default, no WINS server address is specified.
If you use the nbns-list command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool and netbios-type.
Examples
# Specify WINS server address 10.12.1.99 in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] nbns-list 10.12.1.99
1.1.24 netbios-type
Syntax
netbios-type { b-node | h-node | m-node | p-node }
undo netbios-type
View
DHCP address pool view
Default Level
2: System level
Parameters
b-node: Broadcast node. A b-node client sends the destination name in a broadcast message. The destination returns the name-to-IP mapping to the client after receiving the message.
p-node: Peer-to-peer node. A p-node client sends the destination name in a unicast message to the WINS server, and the WINS server returns the mapping to the client.
m-node: Mixed node, a combination of a b-node first and p-node second. An m-node client broadcasts the destination name, if there is no response, and then unicasts the destination name to the WINS server to get the mapping.
h-node: Hybrid node, a combination of a p-node first and b-node second. An h-node is a p-node with the peer-to-peer communication mechanism. An h-node client unicasts the destination name to the WINS server, if there is no response, and then broadcasts it to get the mapping from the destination.
Description
Use the netbios-type command to specify the client NetBIOS node type in a DHCP global address pool.
Use the undo netbios-type command to remove the client NetBIOS node type assigned from a DHCP global address pool to the DHCP client.
By default, no NetBIOS node type is specified.
Related commands: dhcp server ip-pool and nbns-list.
Examples
# Specify the NetBIOS node type as b-node in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] netbios-type b-node
1.1.25 network
Syntax
network ip-address [ mask-length | mask mask ]
undo network
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address: IP address range for dynamic allocation. If no mask length and mask is specified, the natural mask will be used.
mask-length: Mask length.
mask mask: Specifies the IP address network mask, in dotted decimal format.
Description
Use the network command to specify the IP address range for dynamic allocation in a DHCP global address pool.
Use the undo network command to remove the specified address range.
No IP address range is specified by default.
Note that you can specify only one network segment for each DHCP global address pool. If you use the network command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool and dhcp server forbidden-ip.
Examples
# Specify 192.168.8.0/24 as the address range for dynamic allocation in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] network 192.168.8.0 mask 255.255.255.0
1.1.26 option
Syntax
option code { ascii ascii-string | hex hex-string&<1-16> | ip-address ip-address&<1-8> }
undo option code
View
DHCP address pool view
Default Level
2: System level
Parameters
code: Self-defined option number.
ascii ascii-string: Specifies an ASCII string with 1 to 63 characters.
hex hex-string&<1-16>: Specifies hex digit strings. &<1-16> indicates you can specify up to 16 hex digit strings, separated by spaces. Each string contains 2, 4, 6 or 8 hex digits. The device currently supports total 128 hex digits, not including spaces.
ip-address ip-address&<1-8>: Specifies IP addresses. &<1-8> indicates you can specify up to eight IP addresses, separated by spaces.
Description
Use the option command to configure a self-defined DHCP option in a DHCP global address pool.
Use the undo option command to remove a self-defined DHCP option from a DHCP global address pool.
The option command is not configured by default.
If you use the option command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool.
Examples
# Configure the hex digits 0x11 and 0x22 for the self-defined DHCP option 100 in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] option 100 hex 11 22
1.1.27 reset dhcp server conflict
Syntax
reset dhcp server conflict { all | ip ip-address }
View
User view
Default Level
2: System level
Parameters
ip ip-address: Clears the conflict statistics of a specified IP address.
all: Clears the statistics of all IP addresses that conflict.
Description
Use the reset dhcp server conflict command to clear statistics of IP address conflict(s).
Related commands: display dhcp server conflict.
Examples
# Clears the statistics of all IP address conflicts.
<Sysname> reset dhcp server conflict all
1.1.28 reset dhcp server ip-in-use
Syntax
reset dhcp server ip-in-use { ip ip-address | pool [ pool-name ] | all }
View
User view
Default Level
2: System level
Parameters
all: Clears the IP address dynamic binding information of all DHCP address pools.
ip ip-address: Clears the dynamic binding information of a specified IP address.
pool [ pool-name ]: Clears the dynamic binding information of a specified address pool. pool-name is a string of 1 to 35 characters. If no pool name is specified, the dynamic binding information of all address pools is cleared.
Description
Use the reset dhcp server ip-in-use command to clear dynamic IP address binding information.
Related commands: display dhcp server ip-in-use
Examples
# Clear the binding information of IP address 10.110.1.1.
<Sysname> reset dhcp server ip-in-use ip 10.110.1.1
1.1.29 reset dhcp server statistics
Syntax
reset dhcp server statistics
View
User view
Default Level
2: System level
Parameters
None
Description
Use the reset dhcp server statistics command to clear the statistics of the DHCP server.
Related commands: display dhcp server statistics.
Examples
# Clear the statistics of the DHCP server.
<Sysname> reset dhcp server statistics
1.1.30 static-bind client-identifier
Syntax
static-bind client-identifier client-identifier
undo static-bind client-identifier
View
DHCP address pool view
Default Level
2: System level
Parameters
client-identifier: The client ID of a static binding, a string with 4 to 160 characters in the format H-H-H…, each H indicates 4 hex digits except the last H indicates 2 or 4 hex digits. For example, aabb-cccc-dd is a valid ID, while aabb-c-dddd and aabb-cc-dddd are both invalid.
Description
Use the static-bind client-identifier command to specify the client ID of a static binding in a DHCP address pool.
Use the undo static-bind client-identifier command to remove the client ID of a static binding from a DHCP address pool.
By default, no client ID is specified.
Note that:
l Use the static-bind client-identifier command together with the static-bind ip-address command to accomplish a static binding configuration.
l If you use the static-bind client-identifier or static-bind mac-address command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool, static-bind ip-address, and static-bind mac-address.
Examples
# Bind the client ID aaaa-bbbb to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0
[Sysname-dhcp-pool-0] static-bind client-identifier aaaa-bbbb
1.1.31 static-bind ip-address
Syntax
static-bind ip-address ip-address [ mask-length | mask mask ]
undo static-bind ip-address
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address: IP address of a static binding, if no mask and mask length is specified, the natural mask is used.
mask-length: Mask length of the IP address, that is, the number of ones in the mask.
mask mask: Specifies the IP address mask, in dotted decimal format.
Description
Use the static-bind ip-address command to specify an IP address in a DHCP address pool for a static binding.
Use the undo static-bind ip-address command to remove the statically bound IP address.
By default, no IP address is statically bound in a DHCP address pool.
Note that:
l Use the static-bind ip-address command together with the static-bind mac-address or static-bind client-identifier command to accomplish a static binding configuration.
l If the statically bound address is an interface address of the DHCP server, the static binding does not take effect.
l If you use the static-bind ip-address command repeatedly, the latest configuration will overwrite the previous one.
Related commands: dhcp server ip-pool, static-bind client-identifier and static-bind mac-address.
Examples
# Bind the client MAC address 0000-e03f-0305 to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0
[Sysname-dhcp-pool-0] static-bind mac-address 0000-e03f-0305
1.1.32 static-bind mac-address
Syntax
static-bind mac-address mac-address
undo static-bind mac-address
View
DHCP address pool view
Default Level
2: System level
Parameters
mac-address: The MAC address of a static binding, in the format H-H-H.
Description
Use the static-bind mac-address command to statically bind a MAC address to an IP address in a DHCP address pool.
Use the undo static-bind mac-address command to remove the statically bound MAC address..
By default, no MAC address is statically bound.
Note that:
l Use the static-bind mac-address command together with the static-bind ip-address command to complete a static binding configuration.
l If you use the static-bind mac-address or static-bind client-identifier command repeatedly, the latest configuration will overwrite the previous one.
Relate command: dhcp server ip-pool, static-bind client-identifier and static-bind ip-address.
Examples
# Bind the client MAC address 0000-e03f-0305 to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0
[Sysname-dhcp-pool-0] static-bind mac-address 0000-e03f-0305
1.1.33 tftp-server domain-name
Syntax
tftp-server domain-name domain-name
undo tftp-server domain-name
View
DHCP address pool view
Default Level
2: System level
Parameters
domain-name: TFTP server name, a string of 1 to 63 characters.
Description
Use the tftp-server domain-name command to specify a TFTP server name in a DHCP global address pool.
Use the undo tftp-server domain-name command to remove the TFTP server name from a DHCP global address pool.
By default, no TFTP server name is specified.
Using the tftp-server domain-name command repeatedly will overwrite the previous configuration.
Examples
# Specify the TFTP server name as aaa in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] tftp-server domain-name aaa
1.1.34 tftp-server ip-address
Syntax
tftp-server ip-address ip-address
undo tftp-server ip-address
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address: TFTP server IP address.
Description
Use the tftp-server ip-address command to specify the TFTP server IP address in a DHCP global address pool.
Use the undo tftp-server ip-address command to remove the TFTP server IP address from a DHCP global address pool.
By default, no TFTP server address is specified.
Using the tftp-server ip-address command repeatedly will overwrite the previous configuration.
Examples
# Specify the TFTP server address 10.1.1.1 in DHCP global address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] tftp-server ip-address 10.1.1.1
Chapter 2 DHCP Relay Agent Configuration Commands
2.1 DHCP Relay Agent Configuration Commands
2.1.1 debugging dhcp relay
Syntax
debugging dhcp relay { all | error | event | packet [ client mac mac-address ] }
undo debugging dhcp relay { all | error | event | packet [ client mac mac-address ] }
View
User view
Default Level
1: Monitor level
Parameters
all: Enables/disables all debugging options on the DHCP relay agent.
error: Enables/disables error debugging on the DHCP relay agent.
event: Enables/disables event debugging on the DHCP relay agent.
packet: Enables/disables packet debugging on the DHCP relay agent.
client mac mac-address: Enables/disables packet debugging on a DHCP client. The mac-address argument specifies the MAC address of a DHCP client, in the format of H-H-H.
Description
Use the debugging dhcp relay command to enable debugging on the DHCP relay agent.
Use the undo debugging dhcp server command to disable debugging on the DHCP relay agent.
Examples
# Enable packet debugging on the DHCP relay agent.
<Sysname> debugging dhcp relay packet
<Sysname> terminal debugging
<Sysname>
*Mar 31 09:38:36:225 2007 Sysname DHCPR/7/DHCPR_DEBUG_EVENT:
Begin to deal with DHCP Discover packet.
*Mar 31 09:38:36:345 2007 Sysname DHCPR/7/DHCPR_DEBUG_PKTRXTX:
Rx, DHCP request packet, interface Vlan-interface2
*Mar 31 09:38:36:485 2007 Sysname DHCPR/7/DHCPR_DEBUG_PACKET:
From client to server(Server-group 0):
Message type: request
Hardware Type: 1, Hardware Address Length: 6
Hops: 1, Transaction ID: 4281385283
Seconds: 0, Broadcast Flag: 1
Client IP Address: 0.0.0.0 Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0 Gateway IP Address: 22.0.0.1
Client Hardware Address: 00e0-fc14-1601
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Discover
*Mar 31 09:38:37:695 2007 Sysname DHCPR/7/DHCPR_DEBUG_RELAYPKT:
Pkt Sent: send request interface Vlan-interface22, dest IP: 11.0.0.1,
CHardAddr: 00e0.fc14.1601, server-group: 0
// The DHCP relay agent receives a DHCP-DISCOVER message from the DHCP client, and then forwards the message to the DHCP server at 11.0.0.1 in DHCP server group 0.
*Mar 31 09:38:37:925 2007 Sysname DHCPR/7/DHCPR_DEBUG_EVENT:
Begin to deal with DHCP Offer packet.
*Mar 31 09:38:38:45 2007 Sysname DHCPR/7/DHCPR_DEBUG_PKTRXTX:
Rx, DHCP reply packet, interface Vlan-interface22
*Mar 31 09:38:38:185 2007 Sysname DHCPR/7/DHCPR_DEBUG_PACKET:
From server to client(Server-group 0):
Message type: reply
Hardware Type: 1, Hardware Address Length: 6
Hops: 0, Transaction ID: 2294688324
Seconds: 0, Broadcast Flag: 1
Client IP Address: 0.0.0.0 Your IP Address: 22.0.0.2
Server IP Address: 0.0.0.0 Gateway IP Address: 22.0.0.1
Client Hardware Address: 00e0-fc14-1601
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Offer
*Mar 31 09:38:38:956 2007 Sysname DHCPR/7/DHCPR_DEBUG_RELAYPKT:
Pkt Sent: send reply interface Vlan-interface22, dest IP: 255.255.255.255,
CHardAddr: 00e0.fc14.1601, server-group: 0
// The DHCP relay agent receives a DHCP-OFFER message from the DHCP server, and then broadcasts the message.
*Mar 31 09:38:39:185 2007 Sysname DHCPR/7/DHCPR_DEBUG_EVENT:
Begin to deal with DHCP Request packet.
*Mar 31 09:38:39:305 2007 Sysname DHCPR/7/DHCPR_DEBUG_PKTRXTX:
Rx, DHCP request packet, interface Vlan-interface22
*Mar 31 09:38:39:445 2007 Sysname DHCPR/7/DHCPR_DEBUG_PACKET:
From client to server(Server-group 0):
Message type: request
Hardware Type: 1, Hardware Address Length: 6
Hops: 1, Transaction ID: 2294688324
Seconds: 0, Broadcast Flag: 1
Client IP Address: 0.0.0.0 Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0 Gateway IP Address: 22.0.0.1
Client Hardware Address: 00e0-fc14-1601
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Request
*Mar 31 09:38:40:655 2007 Sysname DHCPR/7/DHCPR_DEBUG_RELAYPKT:
Pkt Sent: send request interface Vlan-interface22, dest IP: 11.0.0.1,
CHardAddr: 00e0.fc14.1601, server-group: 0
// The DHCP relay agent receives a DHCP-REQUEST message from the DHCP client, and then forwards the message to the DHCP server at 11.0.0.1.
*Mar 31 09:38:40:885 2007 Sysname DHCPR/7/DHCPR_DEBUG_EVENT:
Begin to deal with DHCP Ack packet.
*Mar 31 09:38:41:05 2007 Sysname DHCPR/7/DHCPR_DEBUG_PKTRXTX:
Rx, DHCP reply packet, interface Vlan-interface22
*Mar 31 09:38:41:155 2007 Sysname DHCPR/7/DHCPR_DEBUG_PACKET:
From server to client(Server-group 0):
Message type: reply
Hardware Type: 1, Hardware Address Length: 6
Hops: 0, Transaction ID: 2294688324
Seconds: 0, Broadcast Flag: 1
Client IP Address: 0.0.0.0 Your IP Address: 22.0.0.2
Server IP Address: 0.0.0.0 Gateway IP Address: 22.0.0.1
Client Hardware Address: 00e0-fc14-1601
Server Host Name: Not Configured, Boot File Name: Not Configured
DHCP message type: DHCP Ack
*Mar 31 09:38:41:905 2007 Sysname DHCPR/7/DHCPR_DEBUG_RELAYPKT:
Pkt Sent: send reply interface Vlan-interface22, dest IP: 255.255.255.255,
CHardAddr: 00e0.fc14.1601, server-group: 0
// The DHCP relay agent receives a DHCP-ACK response from the DHCP server, and then broadcasts the message.
Table 2-1 Description on fields of the debugging dhcp relay packet command
Field |
Description |
From client to server(Server-group 0) |
Information that the DHCP client sends to the DHCP server (in DHCP server group 0). |
Message type |
Content of the first byte of the DHCP message. That is, the operation type of a DHCP message, namely request or reply. |
Hardware Type |
Hardware address type of the DHCP client, where 1 indicates Ethernet type. |
Hardware Address Length |
Length of the DHCP client’s hardware address |
Hops |
Number of hops a DHCP message traveled |
Transaction ID |
A random number uniquely identifying an address allocation request by a DHCP client |
Seconds |
Number of seconds that has elapsed since the DHCP message is sent. It is filled by the DHCP client. |
Broadcast Flag |
Broadcast flag l 1: Broadcast l 0: Unicast |
Client IP Address |
IP address of the DHCP client |
Your IP Address |
IP address that the DHCP server assigns to the client |
Server IP Address |
IP address of the DHCP server |
Gateway IP Address |
IP address of the DHCP relay agent |
Client Hardware Address |
MAC address of the DHCP client |
Server Host Name |
Host name of the DHCP server. |
Boot File Name |
Boot file name |
DHCP message type |
DHCP message type, including l DHCP Discover l DHCP Offer l DHCP Request l DHCP Decline l DHCP ACK l DHCP NAK l DHCP Release l DHCP Inform |
2.1.2 dhcp relay address-check
Syntax
dhcp relay address-check { enable | disable }
View
VLAN interface view
Default Level
2: System level
Parameters
enable: Enables IP address match checking on the relay agent.
disable: Disables IP address match checking on the relay agent.
Description
Use the dhcp relay address-check command to configure IP address match checking on the relay agent.
By default, the function is disabled.
Note that the dhcp relay address-check enable command only checks IP and MAC addresses of clients.
Examples
# Enable IP address match checking on the DHCP relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay address-check enable
2.1.3 dhcp relay information enable
Syntax
dhcp relay information enable
undo dhcp relay information enable
View
VLAN interface view
Default Level
2: System level
Parameters
None
Description
Use the dhcp relay information enable command to enable the relay agent to support Option 82.
Use the undo dhcp relay information enable command to disable Option 82 support.
By default, Option 82 support is disabled on DHCP relay agent.
Examples
# Enable Option 82 support on the relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
2.1.4 dhcp relay information format
Syntax
dhcp relay information format { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }
undo dhcp relay information format [ verbose node-identifier ]
View
VLAN interface view
Default Level
2: System level
Parameters
normal: Specifies the normal padding format.
verbose: Specifies the verbose padding format.
node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier.
l mac: Specifies the MAC address as the node identifier.
l sysname: Specifies the device name as the node identifier.
l user-defined node-identifier: Specifies a character string as the node identifier. The node-identifier is a string of 1 to 50 characters.
By default, the node MAC address is used as the node identifier.
Description
Use the dhcp relay information format command to specify a padding format for Option 82.
Use the undo dhcp relay information format command to restore the default padding format.
The Option 82 padding format defaults to normal.
& Note:
l Using the undo dhcp relay information format command without the keyword verbose node-identifier restores the default normal padding format, or with the keyword verbose node-identifier restores the mac mode of the verbose padding format.
l If configuring the handling strategy of the DHCP relay agent as replace, you need to configure a padding format of Option 82. If the handling strategy is keep or drop, you need not configure any padding format.
l If sub-option 1 (node identifier) of Option 82 is padded with the device name (sysname) of a node, the device name must contain no spaces. Otherwise, the DHCP relay agent will drop the message.
Examples
# Specify the verbose padding format for Option 82.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
[Sysname-Vlan-interface1] dhcp relay information format verbose
2.1.5 dhcp relay information strategy
Syntax
dhcp relay information strategy { drop | keep | replace }
undo dhcp relay information strategy
View
VLAN interface view
Default Level
2: System level
Parameters
drop: Specifies to drop messages containing Option 82.
keep: Specifies to forward messages containing Option 82 without any change.
replace: Specifies to forward messages containing Option 82 after replacing the original Option 82 with the Option 82 padded in the specified padding format.
Description
Use the dhcp relay information strategy command to configure DHCP relay agent handling strategy for messages containing Option 82.
Use the undo dhcp relay information strategy command to restore the default handling strategy.
The handling strategy for messages containing Option 82 defaults to replace.
Examples
# Configure the DHCP relay agent handling strategy for messages containing Option 82 as keep.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
[Sysname-Vlan-interface1] dhcp relay information strategy keep
2.1.6 dhcp relay release ip
dhcp relay release ip client-ip
View
System view
Default Level
2: System level
Parameters
client-ip: DHCP client IP address.
Description
Use the dhcp relay release ip command to send a release request to a specified DHCP server or server groups for releasing a specified client IP address.
In system view, the relay agent will send a release request to the DHCP server corresponding to the interfaces working in DHCP relay agent mode.
Examples
# Send a release request to the DHCP server for releasing the IP address 1.1.1.1 that was obtained by the client.
<Sysname> system-view
[Sysname] dhcp relay release ip 1.1.1.1
2.1.7 dhcp relay security static
Syntax
dhcp relay security static ip-address mac-address
undo dhcp relay security { ip-address | all | dynamic | static }
View
System view
Default Level
2: System level
Parameters
ip-address: Client IP address for creating a static binding.
mac-address: Client MAC address for creating a static binding, in the format H-H-H.
all: Specifies all entries of client IP-to-MAC bindings to be removed.
dynamic: Specifies entries of dynamic client IP-to-MAC bindings to be removed.
static: Specifies entries of manual client IP-to-MAC bindings to be removed.
Description
Use the dhcp relay security static command to configure a manual IP-to-MAC binding on the relay agent.
Use the undo dhcp relay security command to remove specified entries of client IP-to-MAC bindings from the relay agent.
No manual IP-to-MAC binding is configured on the DHCP relay agent by default.
Related commands: display dhcp relay security.
Examples
# Configure a static binding between IP address 1.1.1.1 to MAC address 0005-5d02-f2b3.
<Sysname> system-view
[Sysname] dhcp relay security static 1.1.1.1 0005-5d02-f2b3
2.1.8 dhcp relay security tracker
Syntax
dhcp relay security tracker { interval | auto }
undo dhcp relay security tracker [ interval ]
View
System view
Default Level
2: System level
Parameters
auto: Specifies the auto refreshing interval, which is the value of 60 seconds divided by the number of binding entries. Thus, the more entries, the shorter interval, but the shortest interval is no less than 500 ms.
interval: Refreshing interval in seconds, in the range of 1 to 120.
Description
Use the dhcp relay security tracker command to set a refreshing interval at which the relay agent contacts the DHCP server for refreshing dynamic bindings.
Use the undo dhcp relay security tracker command to restore the default interval.
The default handshake interval is auto, the value of 60 seconds divided by the number of binding entries.
& Note:
A large number of binding entries may result in a slow refreshing speed, so you are recommended to use the default refreshing interval.
Examples
# Set the handshake interval as 100 seconds.
<Sysname> system-view
[Sysname] dhcp relay security tracker 100
2.1.9 dhcp relay server-detect
Syntax
dhcp relay server-detect
undo dhcp relay server-detect
View
System view
Default Level
2: System level
Parameters
None
Description
Use the dhcp relay server-detect command to enable unauthorized DHCP server detection.
Use the undo dhcp relay server-detect command to disable unauthorized DHCP server detection.
By default, unauthorized DHCP server detection is disabled.
Examples
# Enable unauthorized DHCP server detection.
<Sysname> system-view
[Sysname] dhcp relay server-detect
2.1.10 dhcp relay server-group
Syntax
dhcp relay server-group group- ip ip-address
undo dhcp relay server-group group-id [ ip ip-address ]
View
System view
Default Level
2: System level
Parameters
group-id: DHCP server group number.
ip ip-address: DHCP server IP address.
Description
Use the dhcp relay server-group command to specify a DHCP server for a DHCP server group.
Use the undo dhcp relay server-group command to remove a DHCP server from a DHCP server group, if no ip ip-address is specified, all servers in the DHCP server group and the server group itself will be removed.
By default, no DHCP server is specified for a DHCP server group.
Note that:
l If a server group has been correlated to multiple interfaces, you need to cancel these correlations before deleting the server group.
l The IP address of any DHCP server and any interface’s IP address of the DHCP relay agent cannot be in the same network segment. Otherwise, the client may fail to obtain an IP address.
Related commands: display dhcp relay server-group.
Examples
# Specify DHCP server 1.1.1.1 for DHCP server group 1 on the relay agent.
<Sysname> system-view
[Sysname] dhcp relay server-group 1 ip 1.1.1.1
2.1.11 dhcp relay server-select
Syntax
dhcp relay server-select group-id
undo dhcp relay server-select
View
VLAN interface view
Default Level
2: System level
Parameters
group-id: DHCP server group number to be correlated. The specified server group must be an existing group containing at least a DHCP server.
Description
Use the dhcp relay server-select command to correlate specified interface(s) to a specified DHCP server group.
Use the undo dhcp relay server-select command to remove a configured correlation.
By default, no DHCP server group is correlated with an interface on the relay agent.
Note that an interface on the relay agent can only be correlated to one DHCP server group, and a newly configured correlation overwrites the previous one. If the server group in the new correlation does not exist, the new configuration will not work. The interface still maintains the previous correlation.
Examples
# Correlate VLAN interface 1 to DHCP server group 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay server-select 1
2.1.12 dhcp select relay
Syntax
dhcp select relay
undo dhcp select relay
View
VLAN interface view
Default Level
2: System level
Parameters
None
Description
Use the dhcp select relay command to enable the relay agent on the current interface, specified or all interfaces. Upon receiving requests from an enabled interface, the relay agent will forward these requests to outside DHCP servers for IP address allocation.
Use the undo dhcp select relay command to restore the default on interface(s).
After DHCP is enabled, the DHCP server is enabled on an interface by default. That is, upon receiving a client’s request from the interface, the DHCP server allocates an IP address from the DHCP address pool to the client.
Examples
# Enable the DHCP relay agent on the interface VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp select relay
2.1.13 display dhcp relay
Syntax
display dhcp relay { interface interface-type interface-number | all }
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays information of the DHCP server group that a specified interface corresponds to.
all: Displays information of DHCP server groups that all interfaces correspond to.
Description
Use the display dhcp relay command to display information about DHCP server groups correlated to an interface or all interfaces.
Examples
# Display information about DHCP server groups correlated to all interfaces.
[Sysname] display dhcp relay all
Interface name Server-group
Vlan-interface22 2
Table 2-2 Description on fields of the display dhcp relay all command
Field |
Description |
Interface name |
Interface name |
Server-group |
DHCP server group number correlated to the interface. |
2.1.14 display dhcp relay security
display dhcp relay security [ dynamic | static | ip-address ]
View
Any view
Default Level
1: Monitor level
Parameters
dynamic: Displays information about dynamic bindings.
static: Displays information about static bindings.
ip-address: Displays the binding information of an IP address.
Description
Use the display dhcp relay security command to display information about bindings of DHCP relay agents. If no parameter is specified, information about all bindings will be displayed.
Examples
# Display information about all bindings.
[Sysname] display dhcp relay security
IP Address MAC Address Type
10.1.1.1 00e0-0000-0001 Static
10.1.1.5 00e0-0000-0002 Static
--- 2 dhcp-security item(s) found ---
Table 2-3 Description on fields of the display dhcp relay security command
Field |
Description |
IP Address |
Client IP address |
MAC Address |
Client MAC address |
Type |
Type of binding, including dynamic and static |
2.1.15 display dhcp relay security statistics
Syntax
display dhcp relay security statistics
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp relay security statistics command to display statistics information about bindings of DHCP relay agents.
Examples
# Display statistics about client address binding entries.
<Sysname> display dhcp relay security statistics
Static Items :2
Dynamic Items :2
Temporary Items :2
All Items :6
Table 2-4 Description on fields of the display dhcp relay security statistics command
Field |
Description |
Static Items |
Static client address binding items |
Dynamic Items |
Dynamic client address binding items |
Temporary Items |
Temporary client address binding items |
All Items |
All client address binding items |
2.1.16 display dhcp relay security tracker
Syntax
display dhcp relay security tracker
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp relay security tracker command to display the interval for refreshing dynamic bindings on the relay agent.
Examples
# Display the interval for refreshing dynamic bindings on the relay agent.
[Sysname] display dhcp relay security tracker
Current tracker interval: 10s
The interval is 10 seconds.
2.1.17 display dhcp relay server-group
Syntax
display dhcp relay server-group { group-id | all }
View
Any view
Default Level
1: Monitor level
Parameters
group-id: Displays the information of the specified DHCP server group.
all: Displays the information of all DHCP server groups.
Description
Use the display dhcp relay server-group command to display the configuration information of a specified or all DHCP server groups.
Examples
# Display IP addresses of DHCP servers in DHCP server group 1.
<Sysname> display dhcp relay server-group 1
No. Group IP
1 10.1.1.1
2 10.1.1.2
Table 2-5 Description on fields of the display dhcp relay server-group command
Field |
Description |
Server-group |
DHCP server group number |
Group IP |
IP address in the server group |
2.1.18 display dhcp relay statistics
Syntax
display dhcp relay statistics [ server-group { group-id | all } ]
View
Any view
Default Level
1: Monitor level
Parameters
group-id: Number of a server group about which to display DHCP packet statistics.
all: Specifies all server groups about which to display DHCP packet statistics. Information for each group will be displayed.
Description
Use the display dhcp relay statistics command to display DHCP packet statistics related to a specified or all DHCP server groups, which includes number of error packets, number of DHCP packets received from the client, number of DHCP packets received from the server, number of DHCP packets sent to the server, and number of DHCP packets sent to the client (including unicast packets and broadcast packets).
Note that if no parameter (server-group and all) is specified, all DHCP packet statistics on the relay agent will be displayed.
Examples
# Display all DHCP packet statistics on the relay agent.
<Sysname> display dhcp relay statistics
Bad packets received: 0
DHCP packets received from clients: 20
DHCPDISCOVER packets received: 10
DHCPREQUEST packets received: 10
DHCPINFORM packets received: 0
DHCPRELEASE packets received: 0
DHCPDECLINE packets received: 0
BOOTPREQUEST packets received: 0
DHCP packets received from servers: 20
DHCPOFFER packets received: 10
DHCPACK packets received: 10
DHCPNAK packets received: 0
BOOTPREPLY packets received: 0
DHCP packets relayed to servers: 0
DHCPDISCOVER packets relayed: 0
DHCPREQUEST packets relayed: 0
DHCPINFORM packets relayed: 0
DHCPRELEASE packets relayed: 0
DHCPDECLINE packets relayed: 0
BOOTPREQUEST packets relayed: 0
DHCP packets relayed to clients: 0
DHCPOFFER packets relayed: 0
DHCPACK packets relayed: 0
DHCPNAK packets relayed: 0
BOOTPREPLY packets relayed: 0
DHCP packets sent to servers: 0
DHCPDISCOVER packets sent: 0
DHCPREQUEST packets sent: 0
DHCPINFORM packets sent: 0
DHCPRELEASE packets sent: 0
DHCPDECLINE packets sent: 0
BOOTPREQUEST packets sent: 0
DHCP packets sent to clients: 0
DHCPOFFER packets sent: 0
DHCPACK packets sent: 0
DHCPNAK packets sent: 0
BOOTPREPLY packets sent: 0
Table 2-6 Description on the fields of the display dhcp relay statistics command
Field |
Description |
Bad packets received |
Number of error packets received by the DHCP relay agent |
DHCP packets received from clients |
Number of DHCP packets that the DHCP relay agent receives from the client |
DHCP packets received from servers |
Number of DHCP packets that the DHCP relay agent receives from the server |
DHCP packets relayed to servers |
Number of packets that the DHCP relay agent sent to the server |
DHCP packets relayed to clients |
Number of packets that the DHCP relay agent sent to the client |
DHCP packets sent to servers |
Number of DHCP packets that the DHCP relay agent sent to the server. The packets include those that the DHCP relay agent forwarded to server and those that the DHCP relay agent sent to the server. |
DHCP packets sent to clients |
Number of DHCP packets that the DHCP relay agent sent to the client. The packets include those that the DHCP relay agent forwarded to client and those that the DHCP relay agent sent to the client. (Currently, the switch operating as DHCP relay agent will not send DHCP packets to clients.) |
# Display DHCP packet statistics related to every server group on the relay agent.
<Sysname> display dhcp relay statistics server-group all
DHCP relay server-group #2
Packet type Packet number
Client -> Server:
DHCPDISCOVER 5
DHCPREQUEST 5
DHCPINFORM 0
DHCPRELEASE 0
DHCPDECLINE 0
BOOTPREQUEST 0
Server -> Client:
DHCPOFFER 5
DHCPACK 5
DHCPNAK 0
BOOTPREPLY 0
DHCP relay server-group #3
Packet type Packet number
Client -> Server:
DHCPDISCOVER 5
DHCPREQUEST 5
DHCPINFORM 0
DHCPRELEASE 0
DHCPDECLINE 0
BOOTPREQUEST 0
Server -> Client:
DHCPOFFER 5
DHCPACK 5
DHCPNAK 0
BOOTPREPLY 0
Table 2-7 Description on fields of the display dhcp relay statistics server-group command
Field |
Description |
DHCP relay server-group |
DHCP server group |
Packet type |
DHCP packet type |
Packet number |
Number of packets received by the DHCP relay agent |
Client -> Server |
DHCP packets that the DHCP relay agent received from the client |
Server -> Client |
DHCP packets that the DHCP relay agent received from the server |
2.1.19 reset dhcp relay statistics
Syntax
reset dhcp relay statistics [ server-group group-id ]
View
User view
Default Level
2: System level
Parameters
server-group group-id: Removes the statistics of a server group from the relay agent. The group ID is in the range 0 to 19.
Description
Use the reset dhcp relay statistics command to remove statistics from the relay agent.
If no server-group is specified, all statistics will be removed from the relay agent.
Related commands: display dhcp relay statistics.
Examples
# Remove all the DHCP relay agent statistics.
<Sysname> reset dhcp relay statistics