- Table of Contents
-
- H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
- 00-1Cover
- 01-CLI Commands
- 02-Login Commands
- 03-Configuration File Management Commands
- 04-VLAN Commands
- 05-Extended VLAN Application Commands
- 06-IP Address-IP Performance-IPX Commands
- 07-GVRP Commands
- 08-QinQ Commands
- 09-Port Basic Configuration Commands
- 10-Link Aggregation Commands
- 11-Port Isolation Commands
- 12-Port Binding Commands
- 13-DLDP Commands
- 14-MAC Address Table Commands
- 15-MSTP Commands
- 16-Routing Protocol Commands
- 17-Multicast Commands
- 18-802.1x Commands
- 19-AAA-RADIUS-HWTACACS-EAD Commands
- 20-Traffic Accounting Commands
- 21-VRRP-HA Commands
- 22-ARP Commands
- 23-DHCP Commands
- 24-ACL Commands
- 25-QoS Commands
- 26-Mirroring Commands
- 27-Cluster Commands
- 28-PoE Commands
- 29-UDP-Helper Commands
- 30-SNMP-RMON Commands
- 31-NTP Commands
- 32-SSH Terminal Service Commands
- 33-File System Management Commands
- 34-FTP and TFTP Commands
- 35-Information Center Commands
- 36-DNS Commands
- 37-System Maintenance and Debugging Commands
- 38-HWPing Commands
- 39-RRPP Commands
- 40-NAT-Netstream-Policy Routing Commands
- 41-Telnet Protection Commands
- 42-Hardware-Dependent Software Configuration Commands
- 43-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
23-DHCP Commands | 244 KB |
Table of Contents
Chapter 1 DHCP Server Configuration Commands
1.1 DHCP Server Configuration Commands
1.1.8 dhcp server forbidden-ip
1.1.11 dhcp server netbios-type
1.1.14 dhcp server static-bind
1.1.15 display dhcp server conflict
1.1.16 display dhcp server expired
1.1.17 display dhcp server free-ip
1.1.18 display dhcp server ip-in-use
1.1.19 display dhcp server statistics
1.1.20 display dhcp server tree
1.1.29 reset dhcp server conflict
1.1.30 reset dhcp server ip-in-use
1.1.31 reset dhcp server statistics
1.1.33 static-bind mac-address
Chapter 2 DHCP Relay Agent Configuration Commands
2.1 DHCP Relay Agent Configuration Commands
2.1.2 address-check dhcp-relay
2.1.3 address-check no-matched
2.1.4 dhcp relay information enable
2.1.5 dhcp relay information strategy
2.1.11 display dhcp-server interface
Chapter 3 DHCP Snooping Configuration Commands
3.1 DHCP Snooping Configuration Commands
3.1.3 dhcp-snooping information enable
3.1.5 display dhcp-snooping count
3.1.6 display dhcp-snooping trust
3.1.7 display dhcp-snooping vlan
Chapter 1 DHCP Server Configuration Commands
1.1 DHCP Server Configuration Commands
1.1.1 dhcp enable
Syntax
dhcp enable
undo dhcp enable
View
System view
Parameters
None
Description
Use the dhcp enable command to enable DHCP.
Use the undo dhcp enable command to disable DHCP.
By default, DHCP is enabled.
You must first enable DHCP before performing other DHCP-related configurations. This configuration is necessary for both DHCP servers and DHCP relay agents.
Examples
# Enable DHCP.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp enable
1.1.2 dhcp select global
Syntax
VLAN interface view:
dhcp select global
undo dhcp select
System view:
dhcp select global { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp select { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s) to operate in global address pool mode. The interface-type and interface-number arguments are the type and number of an interface. The to keyword separates the start and the end of an interface range.
all: Specifies all ports to operate in global address pool mode.
Description
Use the dhcp select global command to configure the specified interface(s) or all interfaces to operate in global DHCP address pool mode. Upon receiving a DHCP packet from a DHCP client through an interface operating in global DHCP address pool mode, the DHCP server chooses an IP address from a global DHCP address pool of the local DHCP server and assigns the address to the DHCP client.
Use the undo dhcp select command to restore the default DHCP packet processing mode.
By default, an interface operates in local DHCP server global address pool mode.
Examples
# Configure all interfaces to operate in global DHCP address pool mode, so that when a DHCP packet is received from a DHCP client through any interface, the DHCP server assigns an IP address in local global DHCP address pools to the DHCP client.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp select global all
1.1.3 dhcp select interface
Syntax
VLAN interface view:
dhcp select interface
undo dhcp select
System view:
dhcp select interface { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp select { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s) to operate in interface address pool mode.
all: Specifies all interfaces to operate in interface address pool mode.
Description
Use the dhcp select interface command to configure the specified interface(s) to operate in DHCP interface address pool mode. Upon receiving a DHCP packet from a DHCP client through an interface operating in interface address pool mode, the DHCP server chooses an IP address from the interface address pool of the local DHCP server and assigns the address to the DHCP client.
Use the undo dhcp select command to restore the default DHCP packet processing mode.
By default, an interface operates in local DHCP server global address pool mode.
Examples
# Configure all interfaces to operate in interface address pool mode, so that when a DHCP packet is received from a DHCP client through any interface, the DHCP server assigns an IP address in the local interface address pool to the DHCP client.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp select interface all
1.1.4 dhcp server detect
Syntax
dhcp server detect
undo dhcp server detect
View
System view
Parameters
None
Description
Use the dhcp server detect command to enable the unauthorized DHCP server detecting function.
Use the undo dhcp server detect command to disable the unauthorized DHCP server detecting function.
By default, the unauthorized DHCP server detecting function is disabled.
With the unauthorized DHCP server detecting function enabled, a DHCP server tracks the information (such as the IP addresses and interfaces) of DHCP servers to enable the administrator to detect unauthorized DHCP servers in time and take proper measures.
Examples
# Enable the unauthorized DHCP server detecting function.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server detect
1.1.5 dhcp server dns-list
Syntax
VLAN interface view:
dhcp server dns-list ip-address&<1-8>
undo dhcp server dns-list { ip-address | all }
System view:
dhcp server dns-list ip-address&<1-8> { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server dns-list { ip-address | all } { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
ip-address&<1-8>: IP address of a DNS server. &<1-8> means you can provide up to eight DNS server IP addresses. When inputting more than one DNS server IP address, separate two neighboring IP addresses with a space.
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pools.
all: (In comparison with the ip-address argument) Specifies all DNS server IP addresses.
all: (In comparison with the interface keyword) Specifies all interface address pools.
Description
Use the dhcp server dns-list command to configure DNS server IP address(es) for the DHCP address pool(s) of specified interface(s).
Use the undo dhcp server dns-list command to remove the DNS server IP address(es) configured for the DHCP address pool(s) of the specified interface(s).
By default, no DNS server IP address is configured for a DHCP interface address pool.
If you execute the dhcp server dns-list command repeatedly, the new configuration overwrites the previous one.
Related commands: dns-list.
Examples
# Configure the DNS server IP address 1.1.1.254 for the DHCP address pool of the VLAN-interface 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1] dhcp server dns-list 1.1.1.254
1.1.6 dhcp server domain-name
Syntax
VLAN interface view:
dhcp server domain-name domain-name
undo dhcp server domain-name
System view:
dhcp server domain-name domain-name { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server domain-name { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
domain-name: Domain name of the DHCP clients whose IP addresses are from the specified interface address pool(s). This argument is a string of 3 to 50 characters.
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pool(s).
all: Specifies all interface address pools.
Description
Use the dhcp server domain-name command to configure a domain name for the DHCP clients whose IP addresses are from the specified interface address pool(s).
Use the undo dhcp server domain-name command to remove the configured domain name.
By default, no domain name is configured for the DHCP clients.
Related commands: domain-name.
Examples
# Set aabbcc.com as the domain name of the DHCP client whose IP address is obtained from the DHCP address pool of the current VLAN-interface 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1] dhcp server domain-name aabbcc.com
1.1.7 dhcp server expired
Syntax
VLAN interface view:
dhcp server expired { day day [ hour hour [ minute minute ] ] | unlimited }
undo dhcp server expired
System view:
dhcp server expired { day day [ hour hour [ minute minute ] ] | unlimited } { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server expired { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
day day: Specifies the number of days. The day argument ranges from 0 to 365.
hour hour: Specifies the number of hours. The hour argument ranges from 0 to 23.
minute minute: Specifies the number of minutes. The minute argument ranges from 0 to 59.
unlimited: Specifies that the lease time is unlimited. (But actually, the system limits the maximum lease time to about 25 years.)
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pool(s).
all: Specifies all interface address pools.
Description
Use the dhcp server expired command to configure the lease time of the IP addresses in the specified interface address pool(s).
Use the undo dhcp server expired command to restore the default lease time.
The default lease time is one day.
Related commands: expired.
Examples
# Set the lease time of the IP addresses in all interface address pools to be 1 day, 2 hours and 3 minutes.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server expired day 1 hour 2 minute 3 all
1.1.8 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
Parameters
low-ip-address: IP address that is not available for being assigned to DHCP clients automatically (An IP address of this kind is known as a forbidden IP address). This argument also marks the lower end of the range of the forbidden IP addresses.
high-ip-address: IP address that is not available for being assigned to DHCP clients. This argument also marks the higher end of the range of the forbidden IP addresses. Note that this argument cannot be less than the low-ip-address argument. If you do not provide this argument, only the IP address specified by the low-ip-address argument is forbidden.
Description
Use the dhcp server forbidden-ip command to forbid the specified IP addresses in a DHCP address pool to be automatically assigned.
Use the undo dhcp server forbidden-ip command to cancel this configuration.
By default, all IP addresses in an address pool are allowed to be automatically assigned.
Note that the specified address range cannot contain statically-bound addresses when you use the undo dhcp server forbidden-ip command.
Related commands: dhcp server ip-pool, network, static-bind ip-address, dhcp server static-bind.
Examples
# Forbid the IP addresses in the range 10.110.1.1 to 10.110.1.63 to be automatically assigned.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server forbidden-ip 10.110.1.1 10.110.1.63
1.1.9 dhcp server ip-pool
Syntax
dhcp server ip-pool pool-name
undo dhcp server ip-pool pool-name
View
System view
Parameters
pool-name: Name of a DHCP address pool, which uniquely identifies the address pool. This argument is a string of 1 to 35 characters.
Description
Use the dhcp server ip-pool command to create a global DHCP address pool and enter DHCP address pool view. If the address pool identified by the pool-name argument already exists, this command leads you to DHCP address pool view.
Use the undo dhcp server ip-pool command to remove a specified DHCP address pool.
By default, no global DHCP address pool is created.
Related commands: dhcp enable.
Examples
# Create DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0]
1.1.10 dhcp server nbns-list
Syntax
VLAN interface view:
dhcp server nbns-list ip-address&<1-8>
undo dhcp server nbns-list { ip-address | all }
System view:
dhcp server nbns-list ip-address&<1-8> { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server nbns-list { ip-address | all } { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
ip-address&<1-8>: IP address of a WINS server. &<1-8> means you can provide up to eight WINS server IP addresses. When inputting more than one WINS server IP address, separate two neighboring IP addresses with a space.
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pool(s).
all: (In comparison with the ip-address argument) Specifies all WINS server IP addresses.
all: (In comparison with the interface keyword) Specifies all interface address pools.
Description
Use the dhcp server nbns-list command to configure WINS server IP address(es) for the specified DHCP interface address pool(s).
Use the undo dhcp server nbns-list command to remove the WINS server IP address(es) configured for the specified DHCP interface address pool(s).
By default, no WINS server IP address is configured for a DHCP interface address pool.
If you execute the dhcp server nbns-list command repeatedly, the new configuration overwrites the previous one.
Related commands: nbns-list, dhcp server netbios-type.
Examples
# Configure the WINS server IP address 10.12.1.99 for all the DHCP interface address pools.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server nbns-list 10.12.1.99 all
1.1.11 dhcp server netbios-type
Syntax
VLAN interface view:
dhcp server netbios-type { b-node | h-node | m-node | p-node }
undo dhcp server netbios-type
System view:
dhcp server netbios-type { b-node | h-node | m-node | p-node } { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server netbios-type { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
b-node: Specifies the broadcast type. Nodes of this type acquire host name-to-IP address mapping by broadcasting.
p-node: Specifies the peer-to-peer type. Nodes of this type acquire host name-to-IP address mapping by communicating with the WINS server.
m-node: Specifies the m-typed mixed type. Nodes of this type are p-nodes with some broadcasting features. (The character m here stands for mixed.)
h-node: Specifies the hybrid type. Nodes of this type are b-nodes with peer-to-peer communicating features.
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pools.
all: Specifies all interface address pools.
Description
Use the dhcp server netbios-type command to configure the NetBIOS node type of the DHCP clients whose IP addresses are from the specified interface address pool(s).
Use the undo dhcp server netbios-type command to restore the default NetBIOS node type.
By default, no NetBIOS node type is specified and the default NetBIOS node type is h-node.
Related commands: netbios-type, dhcp server nbns-list.
Examples
# Specify p-node as the NetBIOS node type of the DHCP clients whose IP addresses are from the DHCP address pool of VLAN-interface 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] dhcp server netbios-type p-node
1.1.12 dhcp server option
Syntax
VLAN interface view:
dhcp server option code { ascii ascii-string | hex hex-string&<1-10> | ip-address ip-address&<1-8> }
undo dhcp server option code
System view:
dhcp server option code { ascii ascii-string | hex hex-string&<1-10> | ip-address ip-address&<1-8> } { interface interface-type interface-number [ to interface-type interface-number ] | all }
undo dhcp server option code { interface interface-type interface-number [ to interface-type interface-number ] | all }
View
System view, VLAN interface view
Parameters
code: Customized option number, ranging from 2 to 254. Note that this argument cannot be 3, 6, 15, 44, 46, 50 through 55, 57 through 59.
ascii ascii-string: Specifies a string that is of 1 to 63 characters. Note that each character of the string must be an ASCII character.
hex hex-string&<1-10>: Specifies strings, a hexadecimal number of 1 to 8 digits. &<1-10> means you can provide up to 10 such strings. When inputting more than one string, separate two neighboring strings with a space.
ip-address ip-address&<1-8>: Specifies IP addresses. &<1-8> means you can provide up to eight IP addresses. When inputting more than one IP address, separate two neighboring IP addresses with a space.
interface interface-type interface-number [ to interface-type interface-number ]: Specifies the interface(s), through which you can specify the corresponding interface address pools.
all: Specifies all interface address pools.
Description
Use the dhcp server option command to customize DHCP options for the specified DHCP interface address pool(s).
Use the undo dhcp server option command to remove the customized DHCP options.
If you execute the dhcp server option command repeatedly, the new configuration overwrites the previous one.
Related commands: option.
Examples
# Configure option 100 to be 0x11 and 0x22 for all DHCP interface address pools.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server option 100 hex 11 22 all
1.1.13 dhcp server ping
Syntax
dhcp server ping { packets number | timeout milliseconds }
undo dhcp server ping { packets | timeout }
View
System view
Parameters
packets number: Specifies the number of the packets to be sent in a ping test. The number argument ranges from 0 to 10 and defaults to 2. Value 0 means no packet will be sent.
timeout milliseconds: Specifies the timeout time (in milliseconds) of each packet. The milliseconds argument ranges from 0 to 10,000 and defaults to 500.
Description
Use the dhcp server ping command to set the maximum number of the ICMP packets a DHCP server sends in a ping test and the maximum response timeout time of each ICMP packet.
Use the undo dhcp server ping command to restore the default settings.
Examples
# Set the maximum number of the packets the DHCP server sends in a ping test to 10, and the timeout time of each packet to 300 milliseconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ping packets 10
[H3C] dhcp server ping timeout 300
1.1.14 dhcp server static-bind
Syntax
dhcp server static-bind ip-address ip-address mac-address mac-address
undo dhcp server static-bind { ip-address ip-address | mac-address mac-address }
View
VLAN interface view
Parameters
ip-address: IP address to be statically bound. Note that the specified IP address must belong to the same network segment as that of the VLAN interface.
mac-address: MAC address to which the IP address is statically bound.
Description
Use the dhcp server static-bind command to statically bind an IP address of the current address pool to a MAC address.
Use the undo dhcp server static-bind command to cancel an IP-MAC address binding.
By default, no IP address in an address pool is statically bound.
It should be noted that:
l An IP address can be statically bound to only one MAC address. A MAC address can be bound with only one IP address statically.
l The IP address to be statically bound cannot be an interface IP address of the device; otherwise the static binding does not take effect. The device of the bound MAC address can also obtain another IP address.
Examples
# Statically bind the IP address 10.1.1.1 to the MAC address 0000-e03f-0305. (Assume that the interface address pool of VLAN-interface 1 already exists and the IP address belongs to the address pool.)
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] dhcp server static-bind ip-address 10.1.1.1 mac-address 0000-e03f-0305
1.1.15 display dhcp server conflict
Syntax
display dhcp server conflict { all | ip ip-address }
View
Any view
Parameters
all: Specifies all IP addresses.
ip-address: Specifies an IP address.
Description
Use the display dhcp server conflict command to display the statistics of IP address conflicts on the DHCP server.
Related commands: reset dhcp server conflict.
Examples
# Display the statistics of IP address conflicts.
<H3C> display dhcp server conflict all
Address Discover Time
10.110.1.2 Jan 11 2003 11:57:07 PM
Table 1-1 Description on the fields of the display dhcp server conflict command
Field |
Description |
Address |
Conflicting IP address |
Discover Time |
Time when the conflict is detected |
1.1.16 display dhcp server expired
Syntax
display dhcp server expired { ip ip-address | pool [ pool-name ] | interface [ interface-type interface-number ] | all }
View
Any view
Parameters
ip ip-address: Specifies an IP address.
pool [ pool-name ]: Specifies a global address pool. The pool-name argument, a string of 1 to 35 characters, is the name of an address pool. If you do not provide this argument, this command applies to all global address pools.
interface [ interface-type interface-number ]: Specifies a VLAN interface. If you do not specify a VLAN interface, this command applies to all VLAN interfaces.
all: Specifies all DHCP address pools.
Description
Use the display dhcp server expired command to display the lease expiration information about an IP address, or the lease expiration information about all IP addresses in one or all DHCP address pools. When all the IP addresses in an address pool are assigned, the DHCP server assigns the IP addresses that are expired to DHCP clients.
Examples
# Display the lease expiration information about the IP addresses in all DHCP address pools.
<H3C> display dhcp server expired all
Global pool:
IP address Hardware address Lease expiration Type
Interface pool:
IP address Hardware address Lease expiration Type
--- total 0 entry ---
Table 1-2 Description on the fields of the display dhcp server expired command
Field |
Description |
Global pool |
The information about the expired IP addresses of global address pools |
Interface pool |
The information about the expired IP addresses of interface address pools |
IP address |
Bound IP addresses |
Hardware address |
MAC addresses to which IP addresses are bound |
Lease expiration |
The time when a lease time expires |
Type |
Address binding type |
1.1.17 display dhcp server free-ip
Syntax
display dhcp server free-ip
View
Any view
Parameters
None
Description
Use the display dhcp server free-ip command to display the free (that is, unassigned) IP addresses.
Examples
# Display the free IP addresses.
<H3C> display dhcp server free-ip
IP Range from 1.0.0.0 to 2.2.2.1
IP Range from 2.2.2.3 to 2.255.255.255
IP Range from 4.0.0.0 to 4.255.255.255
IP Range from 5.5.5.0 to 5.5.5.0
IP Range from 5.5.5.2 to 5.5.5.255
1.1.18 display dhcp server ip-in-use
Syntax
display dhcp server ip-in-use { ip ip-address | pool [ pool-name ] | interface [ interface-type interface-number ] | all }
View
Any view
Parameters
ip ip-address: Specifies an IP address.
pool [ pool-name ]: Specifies a global address pool. The pool-name argument, a string of 1 to 35 characters, is the name of an address pool. If you do not provide this argument, this command applies to all global address pools.
interface [ interface-type interface-number ]: Specifies a VLAN interface. If you do not specify a VLAN interface, this command applies to all VLAN interfaces.
all: Specifies all address pools.
Description
Use the display dhcp server ip-in-use command to display the address binding information of an IP address, the specified DHCP address pool(s) or all DHCP address pools.
Related commands: reset dhcp server ip-in-use.
Examples
# Display the address binding information of all DHCP address pools.
<H3C> display dhcp server ip-in-use all
Global pool:
IP address Hardware address Lease expiration Type
2.2.2.2 4444-4444-4444 NOT Used Manual
Interface pool:
IP address Hardware address Lease expiration Type
5.5.5.1 0050-ba28-930a NOT Used Manual
--- total 2 entry ---
Table 1-3 Description on the fields of the display dhcp server ip-in-use command
Field |
Description |
Global pool |
Address binding information of global DHCP address pools |
Interface pool |
Address binding information of interface DHCP address pools |
IP address |
Bound IP address |
Hardware address |
MAC address to which the IP address is bound |
Lease expiration |
Time when the lease expires |
Type |
Address binding type |
1.1.19 display dhcp server statistics
Syntax
display dhcp server statistics
View
Any view
Parameters
None
Description
Use the display dhcp server statistics command to display the statistics on a DHCP server.
Related commands: reset dhcp server statistics.
Examples
# Display the statistics on a DHCP server.
<H3C> display dhcp server statistics
Global Pool:
Pool Number: 5
Binding
Auto: 0
Manual: 1
Expire: 0
Interface Pool:
Pool Number: 1
Binding
Auto: 1
Manual: 0
Expire: 0
Boot Request: 6
Dhcp Discover: 1
Dhcp Request: 4
Dhcp Decline: 0
Dhcp Release: 1
Dhcp Inform: 0
Boot Reply: 4
Dhcp Offer: 1
Dhcp Ack: 3
Dhcp Nak: 0
Bad Messages: 0
Table 1-4 Description on the fields of the display dhcp server statistics command
Field |
Description |
Global Pool |
Statistics about global address pools |
Interface Pool |
Statistics about interface address pools |
Pool Number |
Number of address pools |
Auto |
Number of the automatically bound IP addresses |
Manual |
Number of the manually bound IP addresses |
Expire |
Number of the expired IP addresses |
Boot Request: 6 Dhcp Discover: 1 Dhcp Request: 4 Dhcp Decline: 0 Dhcp Release: 1 Dhcp Inform: 0 |
Statistics about the DHCP packets received from DHCP clients |
Boot Reply: 4 Dhcp Offer: 1 Dhcp Ack: 3 Dhcp Nak: 0 |
Statistics about the DHCP packets sent to DHCP clients |
Bad Messages |
Number of the error DHCP packets |
1.1.20 display dhcp server tree
Syntax
display dhcp server tree { pool [ pool-name ] | interface [ interface-type interface-number ] | all }
View
Any view
Parameters
pool [ pool-name ]: Specifies a global address pool. The pool-name argument, a string of 1 to 35 characters, is the name of an address pool. If you do not provide this argument, this command applies to all global address pools.
interface [ interface-type interface-number ]: Specifies a VLAN interface. If you do not specify a VLAN interface, this command applies to all VLAN interfaces.
all: Specifies all address pools.
Description
Use the display dhcp server tree command to display information about address pool tree.
Examples
# Display the information about address pool tree.
<H3C> display dhcp server tree all
Global pool:
Pool name: 5
network 10.10.1.0 mask 255.255.255.0
Child node:6
Sibling node:7
option 10 ip-address 255.0.0.0
expired 1 0 0
Pool name: 6
static-bind ip-address 10.10.1.2 mask 255.0.0.0
static-bind mac-address 000f-e2fc-0001
Parent node:5
option 10 ip-address 255.255.0.0
expired 1 0 0
Pool name: 7
network 10.10.1.64 mask 255.255.255.192
PrevSibling node:5
option 10 ip-address 255.0.0.0
gateway-list 2.2.2.2
dns-list 1.1.1.1
domain-name 444444
nbns-list 3.3.3.3
expired 1 0 0
Table 1-5 Description on the fields of the display dhcp server tree command
Field |
Description |
Global pool |
Information about global address pools |
Interface pool |
Information about interface address pools |
Pool name |
Address pool name |
network |
Assignable IP address range |
static-bind ip-address 10.10.1.2 mask 255.0.0.0 static-bind mac-address 000f-e2fc-0001 |
Statically bound IP and MAC addresses |
Child node:6 |
The address pool 6 is the child node of this node. This field can display the information about the following types of node: Child node: Displays the information about an address pool that is a child of the current address pool. Parent node: Displays the information about the address pool that is the parent of the current address pool. Sibling node: Displays the information about the next sibling address pool of the current address pool. (The order of sibling address pools are determined by the time when they are configured.) PrevSibling node: Displays the information about the previous sibling address pool of the current address pool. |
option |
Customized DHCP options |
expired |
The address lease time (in terms of number of days, hours, and minutes) |
gateway-list |
List of the gateways configured for the DHCP clients |
dns-list |
List of the DNS servers configured for the DHCP clients |
domain-name |
The domain name configured for the DHCP clients |
nbns-list |
List of the WINS servers configured for the DHCP clients |
1.1.21 dns-list
Syntax
dns-list ip-address&<1-8>
undo dns-list { ip-address | all }
View
DHCP address pool view
Parameters
ip-address&<1-8>: IP address of a DNS server. &<1-8> string means you can provide up to eight DNS server IP addresses. When inputting more than one IP address, separate two neighboring IP addresses with a space.
all: Specifies all configured DNS server IP addresses.
Description
Use the dns-list command to configure one or multiple DNS server IP addresses for a global DHCP address pool.
Use the undo dns-list command to remove one or all DNS server IP addresses configured for the DHCP address pool.
By default, no DNS server IP address is configured.
If you execute the dns-list command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server dns-list, dhcp server ip-pool.
Examples
# Configure the DNS server IP address 1.1.1.254 for global DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] dns-list 1.1.1.254
1.1.22 domain-name
Syntax
domain-name domain-name
undo domain-name
View
DHCP address pool view
Parameters
domain-name: Domain name for the DHCP clients of a global DHCP address pool, a string of 3 to 50 characters.
Description
Use the domain-name command to configure a domain name for the DHCP clients of a global DHCP address pool.
Use the undo domain-name command to remove the domain name.
By default, no domain name is configured for the DHCP clients of a global DHCP address pool.
Related commands: dhcp server ip-pool, dhcp server domain-name.
Examples
# Configure the domain name “mydomain.com” for the DHCP clients of the global DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] domain-name mydomain.com
1.1.23 expired
Syntax
expired { day day [ hour hour [ minute minute ] ] | unlimited }
undo expired
View
DHCP address pool view
Parameters
day day: Specifies the number of days. The day argument ranges from 0 to 365.
hour hour: Specifies the number of hours. The hour argument ranges from 0 to 23.
minute minute: Specifies the number of minutes. The minute argument ranges from 0 to 59.
unlimited: Specifies that the lease time is unlimited. (But actually, the system limits the maximum lease time to about 25 years.)
Description
Use the expired command to configure the lease time of the IP addresses in a global DHCP address pool.
Use the undo expired command to restore the default lease time.
The default lease time is one day.
Related commands: dhcp server ip-pool, dhcp server expired.
Examples
# Set the lease time of the IP addresses in the global DHCP address pool 0 to 1 day, 2 hours and 3 minutes.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] expired day 1 hour 2 minute 3
1.1.24 gateway-list
Syntax
gateway-list ip-address&<1-8>
undo gateway-list { ip-address | all }
View
DHCP address pool view
Parameters
ip-address&<1-8>: IP address of a gateway. &<1-8> means you can provide up to eight gateway IP addresses. When inputting more than one IP address, separate two neighboring IP addresses with a space.
all: Specifies all configured gateway IP addresses.
Description
Use the gateway-list command to configure one or multiple gateway IP addresses for the DHCP clients of a DHCP address pool.
Use the undo gateway-list command to remove one or all the configured gateway IP addresses configured for the DHCP address pool.
By default, no gateway IP address is configured.
If you execute the gateway-list command repeatedly, the new configuration overwrites the previous one.
Examples
# Configure the gateway IP address 10.110.1.99 for the global DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] gateway-list 10.110.1.99
1.1.25 nbns-list
Syntax
nbns-list ip-address&<1-8>
undo nbns-list { ip-address | all }
View
DHCP address pool view
Parameters
ip-address&<1-8>: IP address of a WINS server. &<1-8> means you can provide up to eight WINS server IP addresses. When inputting more than one IP address, separate two neighboring IP addresses with a space.
all: Specifies all configured WINS server IP addresses.
Description
Use the nbns-list command to configure one or multiple WINS server IP addresses for the DHCP clients of a global DHCP address pool.
Use the undo nbns-list command to remove one or all WINS server IP addresses configured for the DHCP clients.
By default, no WINS server IP address is configured.
If you execute the nbns-list command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool, dhcp server nbns-list, netbios-type.
Examples
# Configure the WINS server IP address 10.12.1.99 for the global DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] nbns-list 10.12.1.99
1.1.26 netbios-type
Syntax
netbios-type { b-node | h-node | m-node | p-node }
undo netbios-type
View
DHCP address pool view
Parameters
b-node: Specifies the broadcast type. Nodes of this type acquire host name-to-IP address mapping by broadcasting.
p-node: Specifies the peer-to-peer type. Nodes of this type acquire host name-to-IP address mapping by communicating with the WINS server.
m-node: Specifies the mixed type. Nodes of this type are p-nodes with some broadcasting features.
h-node: Specifies the hybrid type. Nodes of this type are b-nodes with peer-to-peer communicating features.
Description
Use the netbios-type command to configure the DHCP clients of a global address pool to be of specified NetBIOS node type.
Use the undo netbios-type command to restore the default NetBIOS node type.
By default, no NetBIOS node type is specified. In this case, the client uses h-node.
Related commands: dhcp server ip-pool, dhcp server netbios-type, nbns-list.
Examples
# Configure the DHCP clients of the global DHCP address pool 0 to be of b-node type.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] netbios-type b-node
1.1.27 network
Syntax
network ip-address [ mask mask ]
undo network
View
DHCP address pool view
Parameters
ip-address: IP address of a network segment, used to specify an IP address range.
mask mask: Specifies a subnet mask in dotted decimal notation. If you do not specify the mask argument, the default subnet mask is used.
Description
Use the network command to configure a dynamically assigned IP address range (where IP addresses will be dynamically assigned to DHCP clients).
Use the undo network command to remove a dynamically assigned IP address range.
By default, no such IP address range is configured for a DHCP address pool.
Note that you can configure only one such IP address range for a DHCP address pool. If you execute the network command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool, dhcp server forbidden-ip.
Examples
# Configure the dynamically assigned IP address range 192.168.8.0/24 for the global DHCP address pool 0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] network 192.168.8.0 mask 255.255.255.0
1.1.28 option
Syntax
option code { ascii ascii-string | hex hex-string&<1-10> | ip-address ip-address&<1-8> }
undo option code
View
DHCP address pool view
Parameters
code: Customized option number ranging from 2 to 254. Note that this argument cannot be 3, 6, 15, 44, 46, 50 through 55, 57 through 59.
ascii ascii-string: Specifies a string that is of 1 to 63 ASCII characters.
hex hex-string&<1-10>: Specifies strings, a hexadecimal number of 1 to 8 digits. &<1-10> means that you can provide up to 10 such strings. When entering more than one strings, separate two neighboring strings with a space.
ip-address ip-address&<1-8>: Specifies IP addresses. &<1-8> means that you can provide up to eight IP addresses. When entering more than one IP address, separate two neighboring IP addresses with a space.
Description
Use the option command to customize DHCP options for a global DHCP address pool.
Use the undo option command to remove the customized DHCP options.
If you execute the option command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool, dhcp server option.
Examples
# Configure option 100 to be 0x11 and 0x22 for the global DHCP address pools.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] option 100 hex 11 22
1.1.29 reset dhcp server conflict
Syntax
reset dhcp server conflict { all | ip ip-address }
View
User view
Parameters
ip ip-address: Specifies an IP address, whose conflict statistics will be cleared.
all: Clears all address conflict statistics.
Description
Use the reset dhcp server conflict command to clear address conflict statistics.
Related commands: display dhcp server conflict.
Examples
# Clear all address conflict statistics.
<H3C> reset dhcp server conflict all
1.1.30 reset dhcp server ip-in-use
Syntax
reset dhcp server ip-in-use { all | interface [ interface-type interface-number ] | ip ip-address | pool [ pool-name ] }
View
User view
Parameters
all: Clears the dynamic address binding information about all IP addresses.
interface [ interface-type interface-number ]: Clears the dynamic address binding information about a specified interface address pool. If you do not specify the interface-number argument, this command clears the dynamic address binding information about all interface address pools.
ip ip-address: Clears the dynamic address binding information about a specified IP address.
pool [ pool-name ]: Clears the dynamic address binding information about a specified address pool. The pool-name argument, a string of 1 to 35 characters, is the name of an address pool. If you do not provide this argument, this command clears the dynamic address binding information about all global address pools.
Description
Use the reset dhcp server ip-in-use command to clear the specified or all dynamic address binding information.
Related commands: display dhcp server ip-in-use.
Examples
# Clear the dynamic address binding information about the IP address 10.110.1.1.
<H3C> reset dhcp server ip-in-use ip 10.110.1.1
1.1.31 reset dhcp server statistics
Syntax
reset dhcp server statistics
View
User view
Parameters
None
Description
Use the reset dhcp server statistics command to clear the statistics on a DHCP server, such as the number of DHCP unrecognized packets/request packets/response packets.
Related commands: display dhcp server statistics.
Examples
# Clear the statistics on a DHCP server.
<H3C> reset dhcp server statistics
1.1.32 static-bind ip-address
Syntax
static-bind ip-address ip-address [ mask mask ]
undo static-bind ip-address
View
DHCP address pool view
Parameters
ip-address: IP address to be bound.
mask mask: Subnet mask of the specified IP address. If you do not specify the mask argument, the default subnet mask is used.
Description
Use the static-bind ip-address command to specify an IP address to be statically bound to a MAC address.
Use the undo static-bind ip-address command to remove a statically bound IP address.
By default, no IP address is statically bound.
Note that:
l The static-bind ip-address command must be used together with the static-bind mac-address command, to specify a statically bound IP address or MAC address.
l If you execute the static-bind ip-address command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool, static-bind mac-address.
Examples
# Bind the IP address 10.1.1.1 (with the subnet mask 255.255.255.0) to the MAC address 0000-e03f-0305.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0
[H3C-dhcp-pool-0] static-bind mac-address 0000-e03f-0305
1.1.33 static-bind mac-address
Syntax
static-bind mac-address mac-address
undo static-bind mac-address
View
DHCP address pool view
Parameters
mac-address: MAC address of the host to which the IP address is to be bound. You need to provide this argument in the form of H-H-H.
Description
Use the static-bind mac-address command to specify a MAC address to which an IP address will be bound statically.
Use the undo static-bind mac-address command to remove such a MAC address.
By default, no such MAC address is specified.
Note that:
l The static-bind ip-address command must be used together with the static-bind mac-address command, to respectively specify a statically bound IP address and MAC address.
l If you execute the static-bind mac-address command repeatedly, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool, static-bind ip-address.
Examples
# Bind the IP address 10.1.1.1 (with the subnet mask 255.255.255.0) to the MAC address 0000-e03f-0305.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp server ip-pool 0
[H3C-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0
[H3C-dhcp-pool-0] static-bind mac-address 0000-e03f-0305
Chapter 2 DHCP Relay Agent Configuration Commands
2.1 DHCP Relay Agent Configuration Commands
2.1.1 address-check
Syntax
address-check enable
address-check disable
View
VLAN interface view
Parameters
None
Description
Use the address-check enable command to enable the address checking function of the DHCP relay agent.
Use the address-check disable command to disable the address checking function of the DHCP relay agent.
By default, the address checking function of the DHCP relay agent is disabled on a VLAN interface.
Examples
# Enable the address checking function of the DHCP relay agent on VLAN-interface 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] address-check enable
2.1.2 address-check dhcp-relay
Syntax
address-check dhcp-relay enable
address-check dhcp-relay disable
View
VLAN interface view
Parameters
None
Description
Use the address-check dhcp-relay enable command to validate the dynamic entries generated by the DHCP relay agent.
Use the address-check dhcp-relay disable command to invalidate the dynamic entries generated by the DHCP relay agent.
By default, the dynamic entries generated by the DHCP relay agent are valid.
This configuration will take effect only after the address checking function of the DHCP relay agent on the VLAN interface is enabled.
Examples
# Invalidate the dynamic entries generated by the DHCP relay agent.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1] address-check enable
[H3C-Vlan-interface1] address-check dhcp-relay disable
2.1.3 address-check no-matched
Syntax
address-check no-matched enable
address-check no-matched disable
View
VLAN interface view
Parameters
None
Description
Use the address-check no-matched enable command to forbid freely-connected clients to pass DHCP security check.
Use the address-check no-matched disable command to allow freely-connected clients to pass DHCP security check.
By default, freely-connected clients are not allowed to pass DHCP security check.
Freely-connected clients refer to the clients whose IP addresses and MAC addresses are not in the DHCP security table.
This configuration will take effect only after the address checking function of the DHCP relay agent on the VLAN interface is enabled.
Examples
# Configure to not allow freely-connected clients to pass DHCP security check on VLAN-interface 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1] address-check enable
[H3C-Vlan-interface1] address-check no-matched enable
2.1.4 dhcp relay information enable
Syntax
dhcp relay information enable
undo dhcp relay information enable
View
System view
Parameters
None
Description
Use the dhcp relay information enable command to enable option 82 supporting on a DHCP relay agent, through which you can enable the DHCP relay agent to insert option 82 into DHCP request packets sent to a DHCP server.
Use the undo dhcp relay information enable command to disable option 82 supporting on a DHCP relay agent, through which you can disable the DHCP relay agent from inserting option 82 into DHCP request packets sent to a DHCP server.
By default, this function is disabled.
Related commands: dhcp relay information strategy.
Examples
# Enable option 82 supporting on a DHCP relay agent.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp relay information enable
2.1.5 dhcp relay information strategy
Syntax
dhcp relay information strategy { drop | keep | replace }
undo dhcp relay information strategy
View
System view
Parameters
drop: Specifies to discard the DHCP request packets that carry option 82.
keep: Specifies to remain the DHCP request packets that carry option 82 unchanged.
replace: Specifies to replace option 82 carried by a DHCP request packet with that of the DHCP relay agent.
Description
Use the dhcp relay information strategy command to instruct a DHCP relay agent to perform specified operations to DHCP request packets that carry option 82.
Use the undo dhcp relay information strategy command to instruct a DHCP relay agent to perform the default operations to DHCP request packets that carry option 82.
By default, the DHCP relay agent replaces the option 82 carried by a DHCP request packet with its own option 82.
Related commands: dhcp relay information enable
Examples
# Instruct the DHCP relay agent to drop the DHCP request packets that carry option 82.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp relay information strategy drop
2.1.6 dhcp-security static
Syntax
dhcp-security static ip-address mac-address
undo dhcp-security { ip-address | all | dynamic | static }
View
System view
Parameters
ip-address: User IP address.
mac-address: User MAC address.
all: Removes all user address entries.
dynamic: Removes dynamic user address entries.
static: Removes static user address entries.
Description
Use the dhcp-security static command to configure a static user address entry.
Use the undo dhcp-security command to remove one or all user address entries, or all user address entries of a specified type.
Related commands: display dhcp-security.
Examples
# Configure a user address entry for the DHCP server group, with the user IP address being 1.1.1.1 and the user MAC address being 0005-5D02-F2B3.
<H3C> system-view
System View: return to User View with Ctrl+Z
[H3C] dhcp-security static 1.1.1.1 0005-5D02-F2B3
2.1.7 dhcp-server
Syntax
dhcp-server groupNo
undo dhcp-server
View
VLAN interface view
Parameters
groupNo: DHCP server group number. This argument ranges from 0 to 19.
Description
Use the dhcp-server command to map the current VLAN interface to a DHCP server group.
Use the undo dhcp-server command to cancel the mapping.
Related commands: dhcp-server ip, display dhcp-server, display dhcp-server interface vlan-interface.
Examples
# Specify that VLAN-interface 1 corresponds to DHCP server group 1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] dhcp-server 1
2.1.8 dhcp-server ip
Syntax
dhcp-server groupNo ip ip-address&<1-8>
undo dhcp-server groupNo
View
System view
Parameters
groupNo: DHCP server group number, ranging from 0 to 19.
ip-address&<1-8>: IP address of the DNS server. &<1-8> indicates that up to eight IP addresses can be input, with any two IP addresses separated by a space.
Description
Use the dhcp-server ip command to configure the DHCP server IP address(es) in a specified DHCP server group.
Use the undo dhcp-server command to remove all DHCP server IP addresses in a DHCP server group.
Related commands: dhcp-server, display dhcp-server.
Examples
# Configure three DHCP server IP addresses 1.1.1.1, 2.2.2.2, and 3.3.3.3 for DHCP server group 1, so that this group contains three DHCP servers (server 1, server 2 and server 3).
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp-server 1 ip 1.1.1.1 2.2.2.2 3.3.3.3
2.1.9 display dhcp-security
Syntax
display dhcp-security [ ip-address | dynamic | static ]
View
Any view
Parameters
ip-address: IP address. This argument is used to display the user address entry with the specified IP address.
dynamic: Displays the dynamic user address entries.
static: Displays the static user address entries.
Description
Use the display dhcp-security command to display one or all user address entries, or a specified type of user address entries in the valid user address table of a DHCP server group.
Examples
# Display all user address entries contained in the valid user address table of the DHCP server group.
<H3C> display dhcp-security
IP Address MAC Address IP Address Type
2.2.2.3 0005-5d02-f2b2 Static
3.3.3.3 0005-5d02-f2b3 Dynamic
--- 2 dhcp-security item(s) found ---
Table 2-1 Description on the fields of the display dhcp-security command
Field |
Description |
IP Address |
IP address of a user of the DHCP server group |
MAC Address |
MAC address of the user of the DHCP server group |
IP Address Type |
Type of the user address entry (static/dynamic) |
2.1.10 display dhcp-server
Syntax
display dhcp-server groupNo
View
Any view
Parameters
groupNo: DHCP server group number, ranging from 0 to 19.
Description
Use the display dhcp-server command to display information about a specified DHCP server group.
Related commands: dhcp-server ip, dhcp-server, display dhcp-server interface vlan-interface.
Examples
# Display information about DHCP server group 0.
<H3C> display dhcp-server 0
IP address of DHCP server group 0: 1.1.1.1
IP address of DHCP server group 0: 2.2.2.2
IP address of DHCP server group 0: 3.3.3.3
IP address of DHCP server group 0: 4.4.4.4
IP address of DHCP server group 0: 5.5.5.5
IP address of DHCP server group 0: 6.6.6.6
IP address of DHCP server group 0: 7.7.7.7
IP address of DHCP server group 0: 8.8.8.8
Messages from this server group: 0
Messages to this server group: 0
Messages from clients to this server group: 0
Messages from this server group to clients: 0
DHCP_OFFER messages: 0
DHCP_ACK messages: 0
DHCP_NAK messages: 0
DHCP_DECLINE messages: 0
DHCP_DISCOVER messages: 0
DHCP_REQUEST messages: 0
DHCP_INFORM messages: 0
DHCP_RELEASE messages: 0
BOOTP_REQUEST messages: 0
BOOTP_REPLY messages: 0
Table 2-2 Description on the fields of the display dhcp-server command
Field |
Description |
IP address of DHCP server group 0: |
DHCP server IP addresses of DHCP server group 0 |
Messages from this server group |
Number of packets received from the DHCP server group |
Messages to this server group |
Number of packets sent to the DHCP server group |
Messages from clients to this server group |
Number of packets received from the DHCP clients |
Messages from this server group to clients |
Number of packets sent to the DHCP clients |
DHCP_OFFER messages |
Number of received DHCP-OFFER packets |
DHCP_ACK messages |
Number of received DHCP-ACK packets |
DHCP_NAK messages |
Number of received DHCP-NAK packets |
DHCP_DECLINE messages |
Number of received DHCP-DECLINE packets |
DHCP_DISCOVER messages |
Number of received DHCP-DISCOVER packets |
DHCP_REQUEST messages |
Number of received DHCP-REQUEST packets |
DHCP_INFORM messages |
Number of received DHCP-INFORM packets |
DHCP_RELEASE messages |
Number of received DHCP-RELEASE packets |
BOOTP_REQUEST messages |
Number of BOOTP request packets |
BOOTP_REPLY messages |
Number of BOOTP response packets |
2.1.11 display dhcp-server interface
Syntax
display dhcp-server interface Vlan-interface vlan-id
View
Any view
Parameters
vlan-id: VLAN ID.
Description
Use the display dhcp-server interface command to display information about the DHCP server group to which a VLAN interface is mapped.
Related commands: dhcp-server, display dhcp-server.
Examples
# Display information about the DHCP server group to which VLAN 2 interface is mapped.
<H3C> display dhcp-server interface vlan-interface 2
The DHCP server group of this interface is 0
The above display information indicates the VLAN 2 interface is mapped to DHCP server group 0.
2.1.12 reset dhcp-server
Syntax
reset dhcp-server groupNo
View
User view
Parameters
groupNo: DHCP server group number, ranging from 0 to 19.
Description
Use the reset dhcp-server command to clear the statistics information of the specified DHCP server group.
Related commands: dhcp server, display dhcp-server.
Examples
# Clear the statistics information of DHCP server group 2.
<H3C> reset dhcp-server 2
Chapter 3 DHCP Snooping Configuration Commands
3.1 DHCP Snooping Configuration Commands
3.1.1 dhcp-snooping
Syntax
dhcp-snooping
undo dhcp-snooping
View
System view
Parameters
None
Description
Use the dhcp-snooping command to enable the DHCP snooping function, so as to allow the switch to listen to the DHCP broadcast packets.
Use the undo dhcp-snooping command to disable the DHCP snooping function.
By default, the DHCP snooping function is disabled.
Related commands: display dhcp-snooping.
Examples
# Enable the DHCP snooping function.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp-snooping
3.1.2 dhcp-snooping trust
Syntax
dhcp-snooping trust
undo dhcp-snooping trust
View
Ethernet port view
Parameters
None
Description
Use the dhcp-snooping trust command to specify an Ethernet port as a trusted port.
Use the undo dhcp-snooping trust command to restore an Ethernet port to an untrusted port.
DHCP snooping security allow you to specify a port as a trusted port or an untrusted port, so that DHCP clients can obtain IP addresses from valid DHCP servers.
l Trusted ports can be used to connect DHCP servers or ports of other switches. Untrusted ports can be used to connect DHCP clients or networks.
l Trusted ports forward any received DHCP packets to ensure that DHCP clients can obtain IP addresses from valid DHCP servers. Untrusted ports discard the DHCP-ACK and DHCP-OFFER responses received from DHCP servers.
By default, all the ports of a switch are untrusted ports.
Related commands: display dhcp-snooping trust.
Examples
# Specify the Ethernet 2/0/1 port as a trusted port.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Ethernet2/0/1
[H3C-Ethernet2/0/1] dhcp-snooping trust
3.1.3 dhcp-snooping information enable
dhcp-snooping information enable
undo dhcp-snooping information enable
View
System view
Parameters
None
Description
Use the dhcp-snooping information enable command to enable DHCP-Snooping option 82.
Use the undo dhcp-snooping information enable command to disable DHCP-Snooping option 82.
DHCP-Snooping option 82 is disabled by default.
Examples
# Enable DHCP-Snooping option 82.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] dhcp-snooping information enable
DHCP snooping option 82 is enabled globally.
3.1.4 display dhcp-snooping
Syntax
display dhcp-snooping
View
Any view
Parameters
None
Description
Use the display dhcp-snooping command to display the IP-MAC mapping relations recorded by the DHCP snooping-enabled switch.
Related commands: dhcp-snooping.
Examples
# Display the IP-MAC mapping relations recorded by the DHCP snooping-enabled switch.
<H3C> display dhcp-snooping
DHCP snooping is enabled globally.
Type : D--Dynamic , S--Static
Type IP Address MAC Address Lease VLAN Interface
==== =============== =============== ========= ==== =================
--- 0 DHCP snooping item(s) found ---
3.1.5 display dhcp-snooping count
Syntax
display dhcp-snooping count
View
Any view
Parameters
None
Description
Use the display dhcp-snooping count command to display the total number of DHCP-Snooping entries.
Examples
# Display the total number of DHCP-Snooping entries.
<H3C> display dhcp-snooping count
1 dhcp-snooping item(s) found
3.1.6 display dhcp-snooping trust
Syntax
display dhcp-snooping trust
View
Any view
Parameters
None
Description
Use the display dhcp-snooping trust command to display the (enabled/disabled) state of the DHCP snooping function and the trusted ports.
Related commands: dhcp-snooping trust.
Examples
# Display the state of the DHCP snooping function and the trusted ports.
<H3C> display dhcp-snooping trust
Interface Trusted
=================================
Ethernet3/0/3 Trusted
The above information indicates that the Ethernet 3/0/3 port is a trusted port.
3.1.7 display dhcp-snooping vlan
Syntax
display dhcp-snooping vlan { vlan-list | all }
View
Any view
Parameters
vlan-list: Displays the VLAN lists in the specified VLAN range, in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>. where, vlan-id is in the range of 1 to 4094, and &<1-10> means that you can specify up to 10 VLANs or VLAN ranges for this argument.
all: Displays all the IP-MAC mapping relations recorded by the DHCP-Snooping-enabled switch.
Description
Use the display dhcp-snooping vlan command to display the IP-MAC mapping relations recorded by the DHCP-Snooping-enabled switch in the specified VLAN.
Examples
# Display the IP-MAC mapping relations recorded by the DHCP-Snooping-enabled switch in VLAN 2.
<H3C> display dhcp-snooping vlan 2
DHCP snooping is enabled globally.
The client binding table for untrusted ports on the VLANs assigned.
Type : D--Dynamic , S--Static
Type IP Address MAC Address Lease VLAN Interface
==== =============== =============== ========= ==== =================
D 3.3.3.2 0012-3f83-6eef 20 2 Ethernet3/0/1
--- 1 dhcp snooping item(s) found ---
3.1.8 reset dhcp-snooping
Syntax
reset dhcp-snooping [ ip-address ]
View
User view
Parameters
ip-address: Clears the IP-MAC mapping relations recorded by the DHCP-Snooping-enabled switch.
Description
Use the reset dhcp-snooping command to clear the specified IP-MAC mapping relation or all the IP-MAC mapping relations recorded by the DHCP-Snooping-enabled switch.
Related commands: dhcp server, display dhcp-server.
Examples
# Clear the 10.1.1.1-MAC mapping relation recorded by the DHCP-Snooping-enabled switch.
<H3C> reset dhcp-snooping 10.1.1.1