H3C S3600 Command Manual-Release 1602(V1.02)

HomeSupportSwitchesH3C S3600 Switch SeriesReference GuidesCommand ReferencesH3C S3600 Command Manual-Release 1602(V1.02)
24-DHCP Command
Title Size Download
24-DHCP Command 291.54 KB

Table of Contents

1 DHCP Server Configuration Commands· 1-1

DHCP Server Configuration Commands· 1-1

accounting domain· 1-1

bims-server 1-2

bootfile-name· 1-3

dhcp enable· 1-3

dhcp select global 1-4

dhcp select interface· 1-5

dhcp server bims-server 1-7

dhcp server bootfile-name· 1-7

dhcp server detect 1-8

dhcp server dns-list 1-9

dhcp server domain-name· 1-10

dhcp server expired· 1-11

dhcp server forbidden-ip· 1-12

dhcp server ip-pool 1-13

dhcp server nbns-list 1-14

dhcp server netbios-type· 1-16

dhcp server option· 1-17

dhcp server ping· 1-18

dhcp server relay information enable· 1-19

dhcp server static-bind· 1-19

dhcp server tftp-server domain-name· 1-20

dhcp server tftp-server ip-address· 1-21

dhcp server voice-config· 1-22

display dhcp server conflict 1-23

display dhcp server expired· 1-24

display dhcp server free-ip· 1-25

display dhcp server ip-in-use· 1-26

display dhcp server statistics· 1-27

display dhcp server tree· 1-28

dns-list 1-30

domain-name· 1-30

expired· 1-31

gateway-list 1-32

nbns-list 1-33

netbios-type· 1-33

network· 1-34

option· 1-35

reset dhcp server conflict 1-36

reset dhcp server ip-in-use· 1-36

reset dhcp server statistics· 1-37

static-bind client-identifier 1-37

static-bind ip-address· 1-38

static-bind mac-address· 1-39

tftp-server domain-name· 1-40

tftp-server ip-address· 1-40

voice-config· 1-41

2 DHCP Relay Agent Configuration Commands· 2-1

DHCP Relay Agent Configuration Commands· 2-1

address-check· 2-1

dhcp-relay hand· 2-1

dhcp relay information enable· 2-2

dhcp relay information strategy· 2-3

dhcp-security static· 2-4

dhcp-security tracker 2-4

dhcp-server 2-5

dhcp-server detect 2-6

dhcp-server ip· 2-7

display dhcp-security· 2-7

display dhcp-server 2-8

display dhcp-server interface· 2-10

reset dhcp-server 2-10

3 DHCP Snooping Configuration Commands· 3-1

DHCP Snooping Configuration Commands· 3-1

dhcp-snooping· 3-1

dhcp-snooping information enable· 3-1

dhcp-snooping information format 3-2

dhcp-snooping information packet-format 3-3

dhcp-snooping information remote-id· 3-3

dhcp-snooping information strategy· 3-4

dhcp-snooping information vlan circuit-id· 3-5

dhcp-snooping information vlan remote-id· 3-6

dhcp-snooping trust 3-7

display dhcp-snooping· 3-7

display dhcp-snooping trust 3-8

display ip source static binding· 3-9

ip check source ip-address· 3-9

ip source static binding· 3-10

4 Rate Limit Configuration Commands· 4-1

Rate Limit Configuration Commands· 4-1

dhcp protective-down recover enable· 4-1

dhcp protective-down recover interval 4-1

dhcp rate-limit 4-2

dhcp rate-limit enable· 4-3

5 DHCP/BOOTP Client Configuration· 5-1

DHCP Client Configuration Commands· 5-1

display dhcp client 5-1

ip address dhcp-alloc· 5-2

BOOTP Client Configuration Commands· 5-3

display bootp client 5-3

ip address bootp-alloc· 5-4

 


 

l          Support for assigning a TFTP server address and bootfile name from the DHCP server to the client with auto-configuration function is a new feature in this manual. For specific commands, see bootfile-name, dhcp server bootfile-name, dhcp server tftp-server domain-name, dhcp server tftp-server ip-address, tftp-server domain-name, and tftp-server ip-address.

l          DHCP-snooping option 82 is a new feature in this manual. For specific commands, see dhcp-snooping information enable to dhcp-snooping information vlan remote-id.

l          IP filtering is a new feature in this manual. For specific commands, see display ip source static binding, ip check source ip-address, and ip source static binding.

l          DHCP packet rate limit is a new feature in this manual. For specific commands, see Rate Limit Configuration Commands.

 

The contents of this chapter are only applicable to the S3600-EI series among S3600 Series Ethernet Switches.

 

DHCP Server Configuration Commands

accounting domain

Syntax

accounting domain domain-name

undo accounting domain

View

DHCP address pool view

Parameters

domain-name: Name of a domain, a string of 1 to 24 characters. (You can use the domain command to create a domain.)

Description

Use the accounting domain command to enable the DHCP accounting function.

Use the undo accounting domain command to disable the DHCP accounting function.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter DHCP address pool view.

[Sysname] dhcp server ip-pool test

# Enable the DHCP accounting function (assuming that domain 123 already exists).

[Sysname-dhcp-pool-test] accounting domain 123

bims-server

Syntax

bims-server ip ip-address [ port port-number ] sharekey key

undo bims-server

View

DHCP address pool view

Parameters

ip ip-address: Specifies the IP address of the remote BIMS server.

port port-number: Specifies the port number of the remote BIMS. The port-number argument ranges from 1 to 65534.

sharekey key: Specifies the shared key of the remote BIMS server. The key argument is a string containing 1 to 16 characters. It cannot be null.

Description

Use the bims-server command to specify the IP address, port number, and shared key of a BIMS server in the DHCP global address pool for the client.

Use the undo bims-server command to remove specified BIMS server information from the DHCP global address pool.

By default, the related information of the BIMS server is not specified.

If you execute the bims-server command repeatedly, the latest configuration will overwrite the previous one.

Related commands: dhcp server bims-server.

Examples

# Specify the IP address 192.168.0.1, port number 651, shared key aaa of the BIMS server in the DHCP global address pool for the client.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp server ip-pool test

[Sysname-dhcp-pool-test] bims-server ip 192.168.0.1 port 651 sharekey aaa

bootfile-name

Syntax

bootfile-name bootfile-name

undo bootfile-name

View

DHCP address pool view

Parameters

bootfile-name: Boot file name (with the extension name .cfg), a string of 1 to 63 characters.

Description

Use the bootfile-name command to specify a bootfile name in the DHCP global address pool for the client.

Use the undo bootfile-name command to remove the specified bootfile name from the DHCP global address pool.

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.cfg in DHCP global address pool 0 for the client..

<Sysname> system-view

Enter system view, return to user view with Ctrl+Z.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-ip-pool-0] bootfile-name aaa.cfg

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.

Note that:

l          Among S3600 series switches, only S3600-EI switches support this command. DHCP is always enabled on S3600-SI series switches.

l          You need to enable DHCP before performing other DHCP-related configurations.

 

To improve security and avoid malicious attacks to the unused sockets, S3600 Ethernet switches provide the following functions:

UDP ports 67 and 68 used by DHCP are enabled/disabled only when DHCP is enabled/disabled.

The implementation is as follows:

l          After DHCP is enabled by executing the dhcp enable command, if the DHCP server and DHCP relay functions are not configured, UDP port 67 and UDP port 68 ports is kept disabled; if the DHCP server and DHCP relay functions are configured, UDP 67 and UDP 68 ports are enabled.

l          After DHCP is disabled by executing the undo dhcp enable command, even if the DHCP server and DHCP relay functions are configured, UDP port 67 and UDP port 68 ports is disabled.

 

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable DHCP.

[Sysname] dhcp enable

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 argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

all: Specifies all interfaces 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 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 DHCP server global address pool mode.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure VLAN-interface 1 through VLAN-interface 3 to operate in global DHCP address pool mode, so that when a DHCP packet is received from a DHCP client on one of these interfaces, the DHCP server assigns an IP address from a global DHCP address pool to the DHCP client.

[Sysname] dhcp select global interface vlan-interface 1 to vlan-interface 3

# 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 global DHCP address pools to the DHCP client.

[Sysname] dhcp select global all

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. The argument interface-type indicates interface type, interface-number indicates interface number. interface-type interface-number [ to interface-type interface-number ] specifies an interface range.

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 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 DHCP server global address pool mode.

Before configuring an interface to operate in DHCP interface address pool mode, you need to configure an IP address for the interface.

 

To improve security and avoid malicious attack to the unused SOCKETs, S3600 Ethernet switches provide the following functions:

l          UDP 67 and UDP 68 ports used by DHCP are enabled only when DHCP is enabled.

l          UDP 67 and UDP 68 ports are disabled when DHCP is disabled.

The corresponding implementation is as follows:

l          After a DHCP interface address pool is created by executing the dhcp select interface command, UDP 67 and UDP 68 ports used by DHCP are enabled.

l          After a DHCP interface address pool is deleted by executing the undo dhcp select interface command and all other DHCP functions are disabled, UDP 67 and UDP 68 ports used by DHCP are disabled accordingly.

 

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure VLAN-interface 1 through VLAN-interface 3 to operate in DHCP interface address pool mode, so that when a DHCP packet is received from a DHCP client on one of these interfaces, the DHCP server assigns an IP address from the corresponding interface DHCP address pool to the DHCP client.

[Sysname] dhcp select interface interface vlan-interface 1 to vlan-interface 3

# Configure all interfaces to operate in DHCP 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 interface DHCP address pool to the DHCP client.

[Sysname] dhcp select interface all

dhcp server bims-server

Syntax

dhcp server bims-server ip ip-address [ port port-number ] sharekey key { interface interface-type interface-number [ to interface-type interface-number ] | all }

undo dhcp server bims-server { interface interface-type interface-number [ to interface-type interface-number ] | all }

View

System view

Parameters

port port-number: Specifies the port number of the remote BIMS server. The port-number argument ranges from 1 to 65534.

sharekey key: Specifies the shared key of the remote BIMS server. The key argument is a string containing 1 to 16 characters. It cannot be null.

interface interface-type interface-number [ to interface-type interface-number ]: Specifies a port operating in the interface address pool mode. The interface-type argument specifies a port type; the interface-number argument specifies a port number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies a port range.

all: Specifies all ports.

Description

Use the dhcp server bims-server command to specify the IP address, port number, and shared key of a BIMS server in the DHCP interface address pool(s) for the client.

Use the undo dhcp server bims-server command to remove specified BIMS server information from the DHCP interface address pool(s).

By default, no IP address, port number, or shared key of a BIMS server is specified in the DHCP interface address pool(s) for the clients.

Related commands: bims-server.

Examples

# Specify the IP address 192.168.0.2, port number 111, shared key aaa of the BIMS server in the DHCP interface address pool of VLAN-interface 2 for the client.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp server bims-server ip 192.168.0.2 port 111 sharekey aaa interface

Vlan-interface 2

dhcp server bootfile-name

Syntax

In VLAN interface view, use the following commands to specify the bootfile name in the current interface address pool for the client:

dhcp server bootfile-name bootfile-name

undo dhcp server bootfile-name

In system view, use the following commands to specify the bootfile name in the specified interface address pool for the client:

dhcp server bootfile-name bootfile-name { all | interface interface-type interface-number }

undo dhcp server bootfile-name { all | interface interface-type interface-number }

View

System view, VLAN interface view

Parameters

bootfile-name: Bootfile name (with the extension name .cfg), in the range 1 to 63 characters.

all: Specifies all interface address pools.

interface interface-type interface-number: Specifies an interface address pool. The interface-type argument specifies an interface type; the interface-number argument specifies an interface number.

Description

Use the dhcp server bootfile-name command to specify the bootfile name in interface address pool for the client.

Use the undo dhcp server bootfile-name command to remove the bootfile name from interface address pool.

No bootfile name is specified in an interface address pool by default.

If you execute the dhcp server bootfile-name command repeatedly, the new configuration will overwrite the previous one.

Related commands: bootfile-name.

Examples

# Specify bootfile name aaa.cfg in the DHCP interface address pool of VLAN-interface 1.

<Sysname> system-view

Enter system view, return to user view with Ctrl+Z.

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] dhcp server bootfile-name aaa.cfg

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 detection function. With this feature enabled, upon receiving a DHCP request, the DHCP server will record the IP addresses of any DHCP servers which ever assigned an IP address to the DHCP client and the receiving interface. The administrator can use this information to check out any unauthorized DHCP servers.

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.

Note that:

With unauthorized DHCP server detection enabled, the device records only one entry for each DHCP server. The administrator needs to find unauthorized DHCP servers from the log information.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable the unauthorized DHCP server detecting function.

[Sysname] dhcp server detect

dhcp server dns-list

Syntax

In VLAN interface view, use the following commands to specify the DNS server IP address in the current DHCP interface address pool for the client.

dhcp server dns-list ip-address&<1-8>

undo dhcp server dns-list { ip-address | all }

In system view, use the following commands to specify the DNS server IP address in multiple DHCP interface address pools for the client.

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. The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

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 specify the DNS server IP address in the DHCP interface address pool for the client.

Use the undo dhcp server dns-list command to remove the DNS server IP address specified in the DHCP interface address pool.

By default, no DNS server IP address is specified for the client.

If you execute the dhcp server dns-list command repeatedly, the new configuration overwrites the previous one.

Related commands: dns-list.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter VLAN-interface 1 view.

[Sysname] interface Vlan-interface 1

# Configure the DNS server IP address 1.1.1.254 for the DHCP address pool of the VLAN-interface 1 for the client.

[Sysname-Vlan-interface1] dhcp server dns-list 1.1.1.254

dhcp server domain-name

Syntax

In VLAN interface view, use the following commands to configure a domain name suffix for the DHCP clients whose IP addresses are from the current DHCP interface address pool.

dhcp server domain-name domain-name

undo dhcp server domain-name

In system view, use the following commands to configure a domain name suffix for the DHCP clients whose IP addresses are from multiple DHCP interface address pools.

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 suffix 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). The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

all: Specifies all interface address pools.

Description

Use the dhcp server domain-name command to configure a domain name suffix for the DHCP clients whose IP addresses are from the specified interface address pool(s). With this suffix configured, the client only needs to input part of a domain name, and the system will add the domain name suffix for name resolution.

Use the undo dhcp server domain-name command to remove the configured domain name suffix.

By default, no domain name suffix is configured for the DHCP client.

Related commands: domain-name.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter VLAN-interface 1 view.

[Sysname] interface Vlan-interface 1

# Configure the domain name suffix aabbcc.com for the DHCP clients whose IP addresses are from the current DHCP interface address pool.

[Sysname-Vlan-interface1] dhcp server domain-name aabbcc.com

# Configure the domain name suffix abcd.com for the DHCP clients whose IP addresses are from the DHCP interface address pools on VLAN-interface 2 through VLAN-interface 5.

[Sysname-Vlan-interface1] quit

[Sysname] dhcp server domain-name abcd.com interface Vlan-interface 2 to Vlan-interface 5

dhcp server expired

Syntax

In VLAN interface view, use the following commands to configure the lease time of the IP addresses in the current DHCP interface address pool.

dhcp server expired { day day [ hour hour [ minute minute ] ] | unlimited }

undo dhcp server expired

In system view, use the following commands to configure the lease time of the IP addresses in multiple DHCP interface address pools.

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). The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

all: Specifies all interface address pools.

Description

Use the dhcp server expired command to configure the lease time of the IP addresses dynamically obtained in the specified DHCP 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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Set the lease time of the IP addresses dynamically obtained in all DHCP interface address pools to be 1 day, 2 hours and 3 minutes.

[Sysname] dhcp server expired day 1 hour 2 minute 3 all

# Set the lease time of the IP addresses dynamically obtained from DHCP interface address pools on VLAN-interface 2 through VLAN-interface 5 to be 2 days.

[Sysname-Vlan-interface1] quit

[Sysname] dhcp server expired day 2 interface Vlan-interface 2 to Vlan-interface 5

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 the forbiddance.

By default, all IP addresses in an address pool are allowed to be automatically assigned.

Related commands: dhcp server ip-pool, network, static-bind ip-address, dhcp server static-bind.

 

l          When you execute the undo dhcp server forbidden-ip command, make sure that the specified address range does not contain any statically-bound IP address.

l          You can configure multiple IP address segments that are not to be automatically configured by executing the dhcp server forbidden-ip command several times.

l          If an IP address that is not to be automatically assigned has been configured as a statically-bound IP address, the DHCP server still assigns this IP address to the client whose MAC address or ID has been bound.

 

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Forbid the IP addresses in the range 10.110.1.1 to 10.110.1.63 to be automatically assigned.

[Sysname] dhcp server forbidden-ip 10.110.1.1 10.110.1.63

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.

 

To improve security and avoid malicious attack to the unused SOCKETs, S3600 Ethernet switches provide the following functions:

l          UDP 67 and UDP 68 ports used by DHCP are enabled only when DHCP is enabled.

l          UDP 67 and UDP 68 ports are disabled when DHCP is disabled.

The corresponding implementation is as follows:

l          After a DHCP address pool is created by executing the dhcp server ip-pool command, the UDP 67 and UDP 68 ports used by DHCP are enabled.

l          After a DHCP address pool is deleted by executing the undo dhcp server ip-pool command and all other DHCP functions are disabled, UDP 67 and UDP 68 ports used by DHCP are disabled.

 

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Create DHCP address pool 0.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0]

dhcp server nbns-list

Syntax

In VLAN interface view, use the following commands to configure WINS server IP address(es) in the current DHCP interface address pool for the client.

dhcp server nbns-list ip-address&<1-8>

undo dhcp server nbns-list { ip-address | all }

In system view, use the following commands to configure WINS server IP addresses in multiple DHCP interface address pools for the client.

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 DHCP interface address pool(s). The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

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) in the specified DHCP interface address pool(s) for the client.

Use the undo dhcp server nbns-list command to remove the WINS server IP address(es) configured in the specified DHCP interface address pool(s) for the clients.

By default, no WINS server IP address is configured for the client.

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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the WINS server IP address 10.12.1.99 in all the DHCP interface address pools for the DHCP client.

[Sysname] dhcp server nbns-list 10.12.1.99 all

dhcp server netbios-type

Syntax

In VLAN interface view, use the following commands to configure the NetBIOS node type of the DHCP clients whose IP addresses are from the current DHCP interface address pool.

dhcp server netbios-type { b-node | h-node | m-node | p-node }

undo dhcp server netbios-type

In system view, use the following commands to configure the NetBIOS node type of the DHCP clients whose IP addresses are from multiple DHCP interface address pools.

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 b-typed node. Nodes of this type acquire host name-to-IP address mapping by broadcasting.

p-node: Specifies the p-typed node. Nodes of this type acquire host name-to-IP address mapping by communicating with the WINS server.

m-node: Specifies the m-typed node. Nodes of this type are p-nodes with some broadcasting features.

h-node: Specifies the h-typed node. 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 DHCP interface address pool. The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

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 DHCP 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. After the WINS server IP address is configured for the client in the DHCP interface address pool, the client uses the hybrid node (h-node).

Related commands: netbios-type, dhcp server nbns-list.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Specify p-node as the NetBIOS node type of the DHCP clients whose IP addresses are from the DHCP interface address pool of VLAN-interface 1.

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp server netbios-type p-node

dhcp server option

Syntax

In VLAN interface view, use the following commands to customize DHCP options for the current DHCP interface address pool.

dhcp server option code { ascii ascii-string | hex hex-string&<1-10> | ip-address ip-address&<1-8> }

undo dhcp server option code

In system view, use the following commands to customize DHCP options for multiple DHCP interface address pools.

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 61, 66, 67, 82, 150, 184, or 217.

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, each of which comprises 1 to 8 hexadecimal 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. The device currently supports total 64 hex digits, not including spaces.

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 DHCP interface address pools. The interface-type argument specifies an interface type; the interface-number argument specifies an interface number; the interface interface-type interface-number [ to interface-type interface-number ] keyword and argument combination specifies an interface range.

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.

For commands related to Option 184, refer to dhcp server voice-config.

Related commands: option.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure option 100 to be 0x11 and 0x22 for all DHCP interface address pools.

[Sysname] dhcp server option 100 hex 11 22 all

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 maximum number of the echo request packets. The number argument ranges from 0 to 10 and defaults to 2. Value 0 means no ping operation will be performed.

timeout milliseconds: Specifies the timeout time (in milliseconds) the device waits for an echo response. 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 echo request packets and the maximum timeout time the device waits for an echo response packet.

Use the undo dhcp server ping command to restore the default settings.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Set the maximum number of the echo request packets to 10, and the response timeout time to 300 milliseconds.

[Sysname] dhcp server ping packets 10

[Sysname] dhcp server ping timeout 300

dhcp server relay information enable

Syntax

dhcp server relay information enable

undo dhcp server relay information enable

View

System view

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

System View: return to User View with Ctrl+Z.

[Sysname] undo dhcp server relay information enable

dhcp server static-bind

Syntax

dhcp server static-bind ip-address ip-address { client-identifier client-identifier | mac-address mac-address }

undo dhcp server static-bind { client-identifier client-identifier | 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 current VLAN interface.

client-identifier: Client ID of a static binding, a string of 4 to 160 characters in the format H-H-H…, each H indicates 4 hex digits except the last H that 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.

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 DHCP interface address pool to a MAC address. When the client with the MAC address or ID requests an IP address, the DHCP server will find the IP address from the binding in the interface address pool for the client.

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 or one client ID. A MAC address or client ID 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 bound MAC address can still obtain another IP address.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Statically bind the client ID aaaa-bbbb to the IP address 10.1.1.1 (Assume that the DHCP interface address pool of VLAN-interface 1 already exists and the IP address belongs to the address pool).

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp server static-bind ip-address 10.1.1.1 client-identifier aaaa-bbbb

# Statically bind the IP address 10.1.1.2 to the MAC address 0000-e03f-0305. (Assume that the DHCP interface address pool of VLAN-interface 1 already exists and the IP address belongs to the address pool.)

[Sysname-Vlan-interface1] dhcp server static-bind ip-address 10.1.1.2 mac-address 0000-e03f-0305

dhcp server tftp-server domain-name

Syntax

In VLAN interface view, use the following commands to specify the TFTP server name in the current DHCP interface address pool for the client:

dhcp server tftp-server domain-name domain-name

undo dhcp server tftp-server domain-name

In system view, use the following commands to specify the TFTP server name in the specified DHCP interface address pool for the client:

dhcp server tftp-server domain-name domain-name { all | interface interface-type interface-number }

undo dhcp server tftp-server domain-name { all | interface interface-type interface-number }

View

System view, VLAN interface view

Parameters

domain-name: TFTP server name, a string in the range 3 to 50 characters.

all: Specifies all interface address pools.

interface interface-type interface-number: Specifies an interface address pool.

Description

Use the dhcp server tftp-server domain-name command to specify the TFTP server name in DHCP interface address pool for the client. When the client’s request contains Option 66 (TFTP server name), the DHCP server will return an IP address together with the name of the specified TFTP server from the interface address pool to the client.

Use the undo dhcp server tftp-server domain-name command to remove the TFTP server name from DHCP interface address pool for the client.

No TFTP server name is specified in a DHCP interface address pool by default.

If you use the dhcp server tftp-server domain-name command repeatedly, the new configuration overwrites the previous one.

Related commands: tftp-server domain-name.

Examples

# Specify the TFTP server name as domain1 in the DHCP interface address pool of VLAN-interface 1 for the client.

<Sysname> system-view

Enter system view, return to user view with Ctrl+Z.

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] dhcp server tftp-server domain-name domain1

dhcp server tftp-server ip-address

Syntax

In VLAN interface view, use the following commands to specify the TFTP server IP address in the current DHCP interface address pool for the client:

dhcp server tftp-server ip-address ip-address

undo dhcp server tftp-server ip-address

In system view, use the following commands to specify the TFTP server IP address in the specified DHCP interface address pool for the client:

dhcp server tftp-server ip-address ip-address { all | interface interface-type interface-number }

undo dhcp server tftp-server ip-address ip-address { all | interface interface-type interface-number }

View

System view, VLAN interface view

Parameters

ip-address: TFTP server IP address.

all: Specifies all interface address pools.

interface interface-type interface-number: Specifies an interface address pool.

Description

Use the dhcp server tftp-server ip-address command to specify the TFTP server address in DHCP interface address pool for the client. When the client’s request contains Option 150 (TFTP server IP address), the DHCP server will return an IP address together with the IP address of the specified TFTP server from the interface address pool to the client.

Use the undo dhcp server tftp-server ip-address command to remove the TFTP server address from DHCP interface address pool for the client.

No TFTP server address is specified in a DHCP interface address pool by default.

Using the dhcp server tftp-server ip-address command repeatedly will overwrite the previous configuration.

Related commands: tftp-server ip-address.

Examples

# Specify the TFTP server IP address 10.1.1.1 in the DHCP interface address pool of VLAN-interface 1 for the client.

<Sysname> system

Enter system view, return to user view with Ctrl+Z.

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] dhcp server tftp-server ip-address 10.1.1.1

dhcp server voice-config

Syntax

In VLAN interface view, use the following commands to configure specified Option 184 and its sub-options in the current DHCP interface address pool for the client:

dhcp server voice-config { ncp-ip ip-address | as-ip ip-address | voice-vlan vlan-id { enable | disable } | fail-over ip-address dialer-string }

undo dhcp server voice-config [ ncp-ip | as-ip | voice-vlan | fail-over ]

In system view, use the following commands to configure specified Option 184 and its sub-options in multiple DHCP interface address pools for the client:

dhcp server voice-config { ncp-ip ip-address | as-ip ip-address | voice-vlan vlan-id { enable | disable } | fail-over ip-address dialer-string } { interface interface-type interface-number [ to interface-type interface-number ] | all }

undo dhcp server voice-config [ ncp-ip | as-ip | voice-vlan | fail-over ] { interface interface-type interface-number [ to interface-type interface-number ] | all }

View

VLAN interface view

Parameters

ncp-ip ip-address: Specifies the IP address of the primary network calling processor.

as-ip ip-address: Specifies the IP address of the backup network calling processor.

voice-vlan vlan-id: Specifies the voice VLAN ID, in the range of 2 to 4094.

l          disable: Disables the specified VLAN, meaning DHCP clients will not take this VLAN as their voice VLAN.

l          enable: Enables the specified VLAN, meaning DHCP clients will take this VLAN as their voice VLAN.

fail-over ip-address dialer-string: Specifies the failover IP address and dialer string. The dialer-string is a string of 0 to 39 characters, which can be 0 to 9, and “*”.

interface interface-type interface-number [ to interface-type interface-number ]: Specifies the DHCP interface address pool (s).

all: Specifies all interface address pools.

Description

Use the dhcp server voice-config command to enable the DHCP server to assign IP addresses with Option 184 and its sub-options from the specified interface address pool.

Use the undo dhcp server voice-config command to disable the DHCP server from assigning IP addresses with Option 184 and its sub-options from the specified interface address pool.

The DHCP server answers Option 184 and the corresponding sub-options only after the DHCP client requests for Option 184.

Before configuring other sub-options, you must configure the sub-option ncp-ip; otherwise other sub-options do not take effect.

By default, a DHCP server interface address pool does not assign Option 184 and the corresponding sub-options to the client.

Related commands: voice-config.

Examples

# Enter system view

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter VLAN-interface 1 view.

[Sysname] interface Vlan-interface 1

# Enable the DHCP server to support all the sub-options of Option 184 in VLAN-interface 1. The NCP IP address is 1.1.1.1 and the IP address of the alternate server is 2.2.2.2. The voice VLAN is enabled, with the ID being 3. The fail-over IP address is 3.3.3.3 and the dial number string is 99*.

[Sysname-Vlan-interface1] dhcp select interface

[Sysname-Vlan-interface1] dhcp server voice-config ncp-ip 1.1.1.1

[Sysname-Vlan-interface1] dhcp server voice-config as-ip 2.2.2.2

[Sysname-Vlan-interface1] dhcp server voice-config voice-vlan 3 enable

[Sysname-Vlan-interface1] dhcp server voice-config fail-over 3.3.3.3 99*

display dhcp server conflict

Syntax

display dhcp server conflict { all | ip ip-address }

View

Any view

Parameters

all: Specifies all IP addresses.

ip ip-address: Specifies one 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.

<Sysname> display dhcp server conflict all

Address             Discover time

192.168.0.1         Apr  2 2000 00:25:46 AM

 --- total 1 entry ---

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

 

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 one 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 expired IP addresses to DHCP clients.

Examples

# Display the lease expiration information about the IP addresses in all DHCP address pools.

<Sysname> display dhcp server expired all

Global pool:

 IP address    Client-identifier/    Lease expiration          Type

                 Hardware address

 

Interface pool:

 IP address    Client-identifier/    Lease expiration          Type

                 Hardware address

 --- 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

Client-identifier/Hardware address

User ID or MAC addresses to which IP addresses are bound

Lease expiration

The time when a lease time expires

Type

Address binding type

 

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.

<Sysname> display dhcp server free-ip

IP Range from 192.168.3.3          to  192.168.3.255

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 one 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.

<Sysname> display dhcp server ip-in-use all

Global pool:

 IP address     Client-identifier/    Lease expiration          Type

                  Hardware address

 

Interface pool:

 IP address      Client-identifier/   Lease expiration      Type

                   Hardware address

 192.168.3.2     3030-6530-2d66-6331-   Apr  6 2000 00:52:06 AM Auto:COMMITTED

                   342d-3030-3062-566c-

                   616e-2d69-6e74-6572-

                   6661-6365-3130-30

 

 --- total 1 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

Client-identifier/Hardware address

User ID or MAC address to which the IP address is bound

Lease expiration

Time when the lease expires

Type

Address binding type

 

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.

<Sysname> 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

 

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.

<Sysname> display dhcp server tree all

Global pool:

 

Pool name: test123

 network 10.0.0.0 mask 255.0.0.0

Child node:test1234

  option 30 hex AA BB

  expired 1 0 0

 

Pool name: test1234

 network 10.1.1.0 mask 255.255.255.0

Parent node:test123

  option 30 hex AA BB

  expired 1 0 0

Interface pool:

 

Pool name: Vlan-interface2

 network 192.168.2.0 mask 255.255.255.0

  gateway-list 192.168.2.1

  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

Child node

The child node address pool 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 client

 

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 in a DHCP global address pool for the DHCP client.

Use the undo dns-list command to remove one or all DNS server IP addresses configured for the DHCP client.

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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the DNS server IP address 1.1.1.254 in DHCP global address pool 0 for the DHCP client.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] dns-list 1.1.1.254

domain-name

Syntax

domain-name domain-name

undo domain-name

View

DHCP address pool view

Parameters

domain-name: Domain name suffix for the DHCP client of a DHCP global address pool, a string of 3 to 50 characters.

Description

Use the domain-name command to configure a domain name suffix in a DHCP global address pool for the DHCP client.

Use the undo domain-name command to remove the domain name suffix.

By default, no domain name suffix is configured in a DHCP global address pool for the DHCP client.

Related commands: dhcp server ip-pool, dhcp server domain-name.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the domain name suffix mydomain.com in the DHCP global address pool 0 for the DHCP client.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] domain-name mydomain.com

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 to be assigned dynamically in the DHCP global 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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Set the lease time of the IP addresses to be dynamically assigned in the DHCP global address pool 0 to 1 day, 2 hours and 3 minutes.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] expired day 1 hour 2 minute 3

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 in the DHCP global address pool for the DHCP client.

Use the undo gateway-list command to remove one or all the configured gateway IP addresses configured for the DHCP client.

By default, no gateway IP address is configured.

If you execute the gateway-list command repeatedly, the new configuration overwrites the previous one.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the gateway IP address 10.110.1.99 in the DHCP global address pool 0 for the client.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] gateway-list 10.110.1.99

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 in the DHCP global address pool for the DHCP client.

Use the undo nbns-list command to remove one or all WINS server IP addresses configured for the DHCP client.

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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the WINS server IP address 10.12.1.99 in the global DHCP address pool 0 for the DHCP client.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] nbns-list 10.12.1.99

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 b-typed node. Nodes of this type acquire host name-to-IP address mapping by broadcasting.

p-node: Specifies the p-typed node. Nodes of this type acquire host name-to-IP address mapping by communicating with the WINS server.

m-node: Specifies the m-typed node. Nodes of this type are p-nodes with some broadcasting features.

h-node: Specifies the h-typed node. Nodes of this type are b-nodes with peer-to-peer communicating features.

Description

Use the netbios-type command to configure the NetBIOS node type in the DHCP global address pool for the DHCP client.

Use the undo netbios-type command to remove the configured NetBIOS node type.

By default, no NetBIOS node type is specified in a DHCP global address pool for the DHCP client. After the WINS server IP address is configured for the client in the DHCP global address pool, the client uses the hybrid node (h-node).

Related commands: dhcp server ip-pool, dhcp server netbios-type, nbns-list.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Specify b-node as the NetBIOS node type in the DHCP global address pool 0 for the clients.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] netbios-type b-node

network

Syntax

network network-address [ mask mask ]

undo network

View

DHCP address pool view

Parameters

network-address: IP address of a network segment, used to specify an IP address range.

mask mask: Specifies a subnet mask in dotted decimal notation, in the form of x.x.x.x. When no mask is provided, the default natural mask is used.

Description

Use the network command to configure a dynamically assigned IP address range in the DHCP global address pool.

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 global address pool.

Note that you can configure only one such IP address range for a DHCP global 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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the dynamically assigned IP address range 192.168.8.0/24 for the DHCP global address pool 0.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] network 192.168.8.0 mask 255.255.255.0

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 61, 66, 67, 82, 150, 184, or 217.

ascii ascii-string: Specifies a string that is of 1 to 63 characters. Note that each character of the string needs to be an ASCII character.

hex hex-string&<1-10>: Specifies strings, each of which comprises of 1 to 8 hexadecimal digits. The &<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. The device currently supports total 64 hex digits, not including spaces.

ip-address ip-address&<1-8>: Specifies IP addresses. The &<1-8> string means that you can provide up to eight IP addresses. When entering more than one IP addresses, separate two neighboring IP addresses with a space.

Description

Use the option command to customize DHCP options for a DHCP global 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.

For commands related to Option 184, refer to voice-config.

Related commands: dhcp server ip-pool, dhcp server option.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure option 100 to be 0x11 and 0x22 for the DHCP global address pools.

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] option 100 hex 11 22

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.

<Sysname> reset dhcp server conflict all

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.

<Sysname> reset dhcp server ip-in-use ip 10.110.1.1

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.

<Sysname> reset dhcp server statistics

static-bind client-identifier

Syntax

static-bind client-identifier client-identifier

undo static-bind client-identifier

View

DHCP address pool view

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 that 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 configure a client ID to be statically bound in a DHCP global address pool.

Use the undo static-bind client-identifier command to delete a client ID that is statically bound in a DHCP global address pool.

By default, no client ID is statically bound.

Note that:

l          The static-bind client-identifier command must be used together with the static-bind ip-address command, to respectively specify a statically bound client ID and an IP address in a DHCP global address pool.

l          If you execute this command or the static-bind mac-address command repeatedly, the new configuration overwrites the previous one.

Related commands: dhcp server ip-pool, static-bind ip-address, static-bind mac-address.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Bind the host aaaa-bbbb with the IP address 10.1.1.1. The mask is 255.255.255.0.

[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

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 no mask is provided, the default natural mask is used.

Description

Use the static-bind ip-address command to specify an IP address which will be bound statically to a MAC address in a DHCP global address pool.

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 or the static-bind client-identifier command, to respectively specify a statically bound IP address, MAC address, or client ID in a DHCP global address pool.

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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Bind the IP address 10.1.1.1 (with the subnet mask 255.255.255.0) to the MAC address 0000-e03f-0305.

[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

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 in a DHCP global address pool.

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 in a DHCP global address pool.

l          If you execute the static-bind mac-address command or the static-bind client-identifier command repeatedly, the new configuration overwrites the previous one.

Related commands: dhcp server ip-pool, static-bind ip-address.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Bind the IP address 10.1.1.1 (with the subnet mask 255.255.255.0) to the MAC address 0000-e03f-0305.

[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

tftp-server domain-name

Syntax

tftp-server domain-name domain-name

undo tftp-server domain-name

View

DHCP address pool view

Parameters

domain-name: TFTP server name, a string of 3 to 50 characters.

Description

Use the tftp-server domain-name command to specify a TFTP server name in a global address pool for the DHCP client.

Use the undo tftp-server domain-name command to remove the TFTP server name from a global address pool.

By default, no TFTP server name is specified.

Using the tftp-server domain-name command repeatedly will overwrite the previous configuration.

Related commands: dhcp server tftp-server domain-name.

Examples

# Specify the TFTP server name as aaa in the global address pool 1.

<Sysname> system-view

Enter system view, return to user view with Ctrl+Z.

[Sysname] dhcp server ip-pool 1

[Sysname-dhcp-pool-1] tftp-server domain-name domain1

tftp-server ip-address

Syntax

tftp-server ip-address ip-address

undo tftp-server ip-address

View

DHCP address pool view

Parameters

ip-address: TFTP server IP address

Description

Use the tftp-server ip-address command to specify the TFTP server IP address in a global address pool.

Use the undo tftp-server ip-address command to remove the TFTP server IP address from a global address pool.

By default, no TFTP server address is specified.

Using the tftp-server ip-address command repeatedly will overwrite the previous configuration.

Related commands: dhcp server tftp-server ip-address.

Examples

# Specify the TFTP server address 10.1.1.1 in the global address pool 1.

<Sysname> system-view

Enter system view, return to user view with Ctrl+Z.

[Sysname] dhcp server ip-pool 1

[Sysname-dhcp-pool-1] tftp-server tftp-server ip-address 10.1.1.1

voice-config

Syntax

voice-config { ncp-ip ip-address | as-ip ip-address | voice-vlan vlan-id { disable | enable } | fail-over ip-address dialer-string }

undo voice-config [ ncp-ip | as-ip | voice-vlan | fail-over ]

View

DHCP address pool view

Parameters

ncp-ip ip-address: Specifies the IP address of the primary network calling processor.

as-ip ip-address: Specifies the IP address of the backup network calling processor.

voice-vlan vlan-id: Specifies the voice VLAN ID, in the range of 2 to 4094.

l          disable: Disables the specified VLAN, meaning DHCP clients will not take this VLAN as their voice VLAN.

l          enable: Enables the specified VLAN, meaning DHCP clients will take this VLAN as their voice VLAN.

fail-over ip-address dialer-string: Specifies the failover IP address and dialer string. The dialer-string is a string of 0 to 39 characters, which can be 0 to 9, and “*”.

Description

Use the voice-config command to configure Option 184 and its sub-options in the global address pool.

Use the undo voice-config command to remove Option 184 and its sub-options from the global address pool.

The DHCP server answers Option 184 and the corresponding sub-options only after the DHCP client requests Option 184.

By default, a DHCP server global address pool does not assign Option 184 and the corresponding sub-options to the client.

Related commands: dhcp server voice-config.

Examples

# Enter system view

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable the DHCP server to support Option 184 in global address pool 123. The NCP IP address is 1.1.1.1 and the IP address of the alternate server is 2.2.2.2. The voice VLAN is enabled, with the ID being 3. The fail-over IP address is 3.3.3.3 and the dialer string is 99*.

[Sysname] dhcp select global all

[Sysname] dhcp server ip-pool 123

[Sysname-dhcp-pool-123] voice-config ncp-ip 1.1.1.1

[Sysname-dhcp-pool-123] voice-config as-ip 2.2.2.2

[Sysname-dhcp-pool-123] voice-config voice-vlan 3 enable

[Sysname-dhcp-pool-123] voice-config fail-over 3.3.3.3 99*

 


DHCP Relay Agent Configuration Commands

address-check

Syntax

address-check enable

address-check disable

View

VLAN interface view

Parameters

None

Description

Use the address-check enable command to enable IP address match checking on the DHCP relay agent. After this feature is enabled, the DHCP relay agent can cooperate with the ARP module to check whether a requesting client’s IP and MAC addresses match a binding on the DHCP relay agent; if not, the client cannot access outside networks via the DHCP relay agent.

Use the address-check disable command to disable IP address match checking on the DHCP relay agent.

By default, IP address match checking on the DHCP relay agent is disabled.

Note that among S3600 series switches, only S3600-EI series switches support the two commands.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter VLAN-interface 1 view.

[Sysname] interface vlan-interface 1

# Enable IP address match checking on VLAN-interface 1 of the DHCP relay agent.

[Sysname-Vlan-interface1] address-check enable

dhcp-relay hand

Syntax

dhcp relay hand enable

dhcp relay hand disable

View

System view

Parameters

None

Description

Use the dhcp relay hand enable command to enable the DHCP relay handshake function. With this feature enabled, the DHCP relay agent uses the IP address of a client and the MAC address of the DHCP relay interface to periodically send a handshake message to the DHCP server to determine whether or not to update the clent’s binding entry.

Use the dhcp relay hand disable command to disable the DHCP relay handshake function.

By default, the DHCP relay handshake function is enabled.

Note that:

l          Among S3600 series switches, only S3600-EI series switches support the two commands.

l          Currently, the DHCP relay agent handshake function on a S3600-EI series switch can only interoperate with a Windows 2000 DHCP server.

Examples

# Disable the DHCP relay handshake function.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp relay hand disable

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 support on a DHCP relay agent.

Use the undo dhcp relay information enable command to disable Option 82 support on a DHCP relay agent.

By default, this function is disabled.

 

By default, with the Option 82 support function enabled on the DHCP relay agent, the DHCP relay agent will adopt the replace strategy to process the request packets containing Option 82. However, if other strategies are configured before, then enabling the 82 supporting on the DHCP relay will not change the configured strategies.

 

Related commands: dhcp relay information strategy.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable Option 82 support on a DHCP relay agent.

[Sysname] dhcp relay information enable

dhcp relay information strategy

Syntax

dhcp relay information strategy { drop | keep | replace }

undo dhcp relay information strategy

View

System view

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 with the specified content.

Description

Use the dhcp relay information strategy command to configure the DHCP relay agent handling strategy for messages containing Option 82 sent by the DHCP client.

Use the undo dhcp relay information strategy command to restore the default handling strategy.

By default, the handling strategy for messages containing Option 82 is replace.

Related commands: dhcp relay information enable.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Configure the DHCP relay agent handling strategy for messages containing Option 82 sent by the DHCP client as drop.

[Sysname] dhcp relay information strategy drop

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 DHCP address binding entry.

Use the undo dhcp-security command to remove one or all address binding entries, or all address binding entries of a specified type.

Note that among S3600 series switches, only S3600-EI series switches support the two commands.

Related commands: display dhcp-security.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z

# Configure a static address binding entry, with the IP address being 1.1.1.1 and the MAC address being 0005-5D02-F2B3.

[Sysname] dhcp-security static 1.1.1.1 0005-5D02-F2B3

dhcp-security tracker

Syntax

dhcp-security tracker { interval | auto }

undo dhcp-security tracker [ interval ]

View

System view

Parameters

interval: Refreshing interval in seconds, in the range of 1 to 120.

auto: Specifies the auto refreshing interval, which is automatically calculated according to the number of binding entries.

Description

The default handshake interval is auto, the value of 60 seconds divided by the number of binding entries.

Use the dhcp-security tracker command to set the interval at which the DHCP relay agent refreshes dynamic binding entries.

Use the undo dhcp-security tracker command to restore the default interval.

By default, the refreshing interval is automatically calculated according to the number of binding entries.

Note that among S3600 series switches, only S3600-EI series switches support these two commands.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Set the interval to refresh dynamic binding entries to 60 seconds.

[Sysname] dhcp-security tracker 60

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.

Note that:

l          A DHCP server group can correspond to multiple interfaces, while an interface can only be correlated with one DHCP server group.

l          If you execute the dhcp-server command repeatedly, the latest configuration will overwrite the previous one.

l          Before referencing a DHCP server group, you need to use the dhcp-server groupNo ip ip-address&<1-8> command to configure the DHCP server group.

Related commands: dhcp-server ip, display dhcp-server, display dhcp-server interface vlan-interface.

 

To improve security and avoid malicious attack to the unused SOCKETs, S3600 Ethernet switches provide the following functions:

l          UDP 67 and UDP 68 ports used by DHCP are enabled only when DHCP is enabled.

l          UDP 67 and UDP 68 ports are disabled when DHCP is disabled.

The corresponding implementation is as follows.

l          When a VLAN interface is mapped to a DHCP server group with the dhcp-server command, the DHCP relay agent is enabled. At the same time, UDP 67 and UDP 68 ports used by DHCP are enabled.

l          When the mapping between a VLAN interface and a DHCP server group is removed with the undo dhcp-server command, DHCP services are disabled. At the same time, UDP 67 and UDP 68 ports used by DHCP are disabled.

 

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enter VLAN-interface 1 view.

[Sysname] interface vlan-interface 1

# Specify that VLAN-interface 1 corresponds to DHCP server group 1.

[Sysname-Vlan-interface1] dhcp-server 1

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 switch serving as a DHCP relay agent to detect unauthorized DHCP servers.

Use the undo dhcp-server detect command to disable the unauthorized DHCP server detection function.

By default, the unauthorized DHCP server detection function is disabled

Related commands: dhcp server, display dhcp-server.

Examples

# Enter system view

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable the unauthorized-DHCP server detection function on the DHCP relay agent.

[Sysname] dhcp-server detect

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 DHCP 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

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# 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).

[Sysname] dhcp-server 1 ip 1.1.1.1 2.2.2.2 3.3.3.3

display dhcp-security

Syntax

display dhcp-security [ ip-address | dynamic | static | tracker ]

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.

tracker: Displays the interval to update the user address entries.

Description

Use the display dhcp-security command to display information about address binding entries on the DHCP relay agent.

Note that among S3600 series switches, only S3600-EI series switches support this command.

Examples

# Display information about all address binding entries.

<Sysname> display dhcp-security

 IP Address      MAC Address     IP Address Type

 10.1.1.1        0001-0001-0001  Static

 192.168.10.2   000d-88f7-b090  Dynamic_ack

---   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 the DHCP client

MAC Address

MAC address of the DHCP client

IP Address Type

Type of the user address entry (static/dynamic)

 

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.

<Sysname> 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 the packets the DHCP relay receives from the DHCP server group

Messages to this server group

Number of the packets the DHCP relay sends to the DHCP server group

Messages from clients to this server group

Number of the packets the DHCP relay receives from the DHCP clients

Messages from this server group to clients

Number of the packets the DHCP relay sends to the DHCP clients

DHCP_OFFER messages

Number of the DHCP-OFFER packets received by the DHCP relay

DHCP_ACK messages

Number of the DHCP-ACK packets received by the DHCP relay

DHCP_NAK messages

Number of the DHCP-NAK packets received by the DHCP relay

DHCP_DECLINE messages

Number of the DHCP-DECLINE packets received by the DHCP relay

DHCP_DISCOVER messages

Number of the DHCP-DISCOVER packets received by the DHCP relay

DHCP_REQUEST messages

Number of the DHCP-REQUEST packets received by the DHCP relay

DHCP_INFORM messages

Number of the DHCP-INFORM packets received by the DHCP relay

DHCP_RELEASE messages

Number of the DHCP-RELEASE packets received by the DHCP relay

BOOTP_REQUEST messages

Number of the BOOTP request packets

BOOTP_REPLY messages

Number of the BOOTP response packets

 

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-interface 2 is mapped.

<Sysname> display dhcp-server interface vlan-interface 2

 Dhcp-group 0 is configured on this interface

The above information indicates the VLAN-interface 2 is mapped to DHCP server group 0.

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.

<Sysname> reset dhcp-server 2

 


DHCP Snooping Configuration Commands

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.

Use the undo dhcp-snooping command to disable the DHCP snooping function. After DHCP snooping is disabled, all the ports can forward DHCP replies from the DHCP server without recording the IP-to-MAC bindings of the DHCP clients.

By default, the DHCP snooping function is disabled.

Note that:

l          You need to disable DHCP relay agent before enabling DHCP snooping on the switch.

l          The clients connected to a DHCP snooping device cannot obtain an IP address through BOOTP.

Related commands: dhcp-server, display dhcp-snooping.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Enable the DHCP snooping function.

[Sysname] dhcp-snooping

dhcp-snooping information enable

Syntax

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.

Enable DHCP snooping before performing this configuration.

Examples

# Enable DHCP snooping Option 82.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp-snooping information enable

dhcp-snooping information format

Syntax

dhcp-snooping information format { hex | ascii }

View

System view

Parameters

hex: Specifies the storage format of Option 82 as HEX (namely, hexadecimal string).

ascii: Specifies the storage format of Option 82 as ASCII.

Description

Use the dhcp-snooping information format command to configure the storage format of non-user-defined Option 82 as HEX or ASCII.

By default, the Option 82 is in HEX format.

 

The dhcp-snooping information format command applies only to the default content of the Option 82 field. If you have configured the circuit ID or remote ID sub-option, the storage format of the sub-option is ASCII, instead of the one specified with the dhcp-snooping information format command.

 

Examples

# Configure the storage format of Option 82 as ASCII.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp-snooping information format ascii

dhcp-snooping information packet-format

Syntax

dhcp-snooping information packet-format { extended | standard }

View

System view

Parameters

extended: Specifies the padding format for Option 82 as the extended format.

standard: Specifies the padding format for Option 82 as the standard format.

Description

Use the dhcp-snooping information packet-format command to configure the padding format for Option 82 as the extended or standard one.

By default, the padding format for Option 82 is the extended one.

Examples

# Configure the padding format for Option 82 as the standard one.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp-snooping information packet-format standard

dhcp-snooping information remote-id

Syntax

dhcp-snooping information remote-id { sysname | string string }

undo dhcp-snooping information remote-id

View

System view

Parameters

sysname: Uses the system name (sysname) of the DHCP snooping device to pad the remote ID sub-option in Option 82.

string: Customized content of the remote ID sub-option, a string of 1 to 63 ASCII characters.

Description

Use the dhcp-snooping information remote-id command to configure the remote ID sub-option in Option 82.

Use the undo dhcp-snooping information remote-id command to restore the default value of the remote ID sub-option in Option 82.

By default, the remote ID sub-option in Option 82 is the MAC address of the DHCP Snooping device that received the DHCP client’s request.

Examples

# Configure the remote ID sub-option of Option 82 as the system name (sysname) of the DHCP snooping device.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp-snooping information remote-id sysname

dhcp-snooping information strategy

Syntax

dhcp-snooping information strategy { drop | keep | replace }

undo dhcp-snooping information strategy

View

System view, Ethernet port view

Parameters

drop: If a packet contains Option 82, DHCP snooping drops this packet.

keep: If a packet contains Option 82, DHCP snooping keeps and forwards this packet.

replace: If a packet contains Option 82, DHCP snooping replaces the original Option 82 field with the Option 82 field having the specified padding content and forwards the packet.

Description

Use the dhcp-snooping information strategy command in system view to configure a handling policy for DHCP requests that contain Option 82 sent by the DHCP client.

Use the undo dhcp-snooping information strategy command to restore the default handling policy.

Use the dhcp-snooping information strategy command in Ethernet port view to configure a handling policy for requests that contain Option 82 received on the current port.

Use the undo dhcp-snooping information strategy command to restore the default handling policy.

By default, after DHCP-snooping Option 82 support is enabled, DHCP snooping replaces the Option 82 field in the requests sent by the DHCP clients.

 

l          Enable DHCP-snooping and DHCP-snooping Option 82 before performing this configuration.

l          If a handling policy is configured on a port, this configuration overrides the globally configured handling policy for requests received on this port, while the globally configured handling policy applies on those ports where a handling policy is not natively configured.

 

Examples

# Configure the keep handling policy for DHCP requests that contain Option 82 on the DHCP snooping device.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp-snooping information strategy keep

dhcp-snooping information vlan circuit-id

Syntax

dhcp-snooping information [ vlan vlan-id ] circuit-id string string

undo dhcp-snooping information { [ vlan vlan-id ] circuit-id | circuit-id all }

View

Ethernet port view

Parameters

vlan vlan-id: Specifies a VLAN. DHCP packets from the VLAN are padded with the circuit ID sub-option.

string: Content of the circuit ID sub-option, a string of 3 to 63 ASCII characters.

Description

Use the dhcp-snooping information vlan circuit-id command to configure the content of the circuit ID field in Option 82.

Use the undo dhcp-snooping information circuit-id command to restore the default.

With vlan vlan-id specified, the customized circuit ID sub-option applies only to the DHCP packets from the specified VLAN. With no vlan vlan-id specified, the customized circuit ID sub-option applies to all DHCP packets that pass through the current port.

Use the undo dhcp-snooping information vlan vlan-id circuit-id command to restore the default circuit ID in DHCP packets from the specified VLAN.

Use the undo dhcp-snooping information circuit-id command to restore the default circuit ID for all DHCP packets except those from the specified VLAN.

Use the undo dhcp-snooping information circuit-id all command to restore the default circuit ID for all DHCP packets.

By default, the circuit ID field in Option 82 contains the VLAN ID and index of the port that received the client’s request.

If you have configured a circuit ID with the vlan vlan-id argument specified, and the other one without the argument in Ethernet port view, the former circuit ID applies to the DHCP messages from the specified VLAN, while the latter one applies to DHCP messages from other VLANs.

Examples

# Set the circuit ID field in Option 82 of the DHCP messages sent through Ethernet 1/0/1 to abc.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] dhcp-snooping information circuit-id string abc

dhcp-snooping information vlan remote-id

Syntax

dhcp-snooping information [ vlan vlan-id ] remote-id string string

undo dhcp-snooping information { [ vlan vlan-id ] remote-id | remote-id all }

View

Ethernet port view

Parameters

vlan vlan-id: Specifies the VLAN ID of the remote ID to be customized.

string: Customized content of the remote ID sub-option, a string of 3 to 63 ASCII characters.

Description

Use the dhcp-snooping information vlan remote-id command to configure the content of the remote ID in Option 82

Use the undo dhcp-snooping information remote-id command to restore the default remote ID in Option 82.

With vlan vlan-id specified, the customized remote ID sub-option applies only to the DHCP packets from the specified VLAN. Without vlan vlan-id specified, the customized remote ID sub-option applies to all DHCP packets that pass through the current port.

Use the undo dhcp-snooping information vlan vlan-id remote-id command to restore the default remote ID in DHCP packets from the specified VLAN.

Use the undo dhcp-snooping information remote-id command to restore the default remote ID in all DHCP packets except those from the specified VLAN.

Use the undo dhcp-snooping information remote-id all command to restore the default remote ID in all DHCP packets.

By default, the remote ID sub-option in Option 82 is the MAC address of the DHCP Snooping device that received the DHCP client’s request.

If you have configured a remote ID with the vlan vlan-id argument specified, and the other one without the argument in Ethernet port view, the former remote ID applies to the DHCP messages from the specified VLAN, while the latter one applies to DHCP messages from other VLANs.

Examples

# Configure the remote ID of Option 82 in DHCP packets to abc on the port Ethernet 1/0/1.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] dhcp-snooping information remote-id string abc

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 set an Ethernet port to a DHCP-snooping trusted port.

Use the undo dhcp-snooping trust command to restore an Ethernet port to a DHCP-snooping untrusted port.

By default, with the DHCP snooping enabled, all the ports of a switch are untrusted ports.

Note that:

After DHCP snooping is enabled, you need to specify the port connected to a valid DHCP server as trusted to ensure that DHCP clients can obtain valid IP addresses. The trusted port and the ports connected to DHCP clients must be in the same VLAN.

Related commands: display dhcp-snooping trust.

Examples

# Enter system view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

# Set the Ethernet 1/0/1 port to a trusted port.

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] dhcp-snooping trust

display dhcp-snooping

Syntax

display dhcp-snooping [ unit unit-id ]

View

Any view

Parameters

unit unit-id: Displays the DHCP-snooping information on the specified device in the fabric. unit-id indicates the number of the device whose DHCP-snooping information needs to be viewed. If unit unit-id is not specified, DHCP snooping information of all units in the fabric is displayed.

Description

Use the display dhcp-snooping command to display the user IP-MAC address mapping entries recorded by the DHCP snooping function.

Related commands: dhcp-snooping.

Examples

# Display the user IP-MAC address mapping entries recorded by the DHCP snooping function.

<Sysname> display dhcp-snooping

 DHCP-Snooping is enabled.

 The client binding table for all untrusted ports.     

 Type : D--Dynamic , S--Static

 Unit ID : 1

 Type IP Address       MAC Address      Lease       VLAN Interface

 ==== ============= ============== ========= ==== ================

 D    10.1.1.1        000f-e200-0006   200      1    Ethernet1/0/1

---   1 dhcp-snooping item(s) of unit 1 found   ---

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.

<Sysname> display dhcp-snooping trust

 DHCP-Snooping is enabled.

 DHCP-Snooping trust become effective.

 Interface                 Trusted

 ===================== =================

 Ethernet1/0/10          Trusted 

The above display information indicates that the DHCP snooping function is enabled, and the Ethernet 1/0/10 port is a trusted port.

display ip source static binding

Syntax

display ip source static binding [ vlan vlan-id | interface interface-type interface-number ]

View

Any view

Parameters

vlan-id: ID of the VLAN whose IP static binding entries are to be displayed.

interface-type interface-number: Type and number of the port whose IP static binding entries are to be displayed.

Description

Use the display ip source static binding command to display the IP static binding entries configured. If you specify a VLAN, all the IP static binding entries for the specified VLAN will be displayed. If you specify a port, all the IP static binding entries for the specified port will be displayed.

Examples

# Display all IP static binding entries configured.

<Sysname> display ip source static binding

 Type IP Address      MAC Address     Remaining  VLAN Interface

                                      lease

 ==== =============== =============== =========  ==== =================

 S    192.168.0.25    0015-e20f-0101  infinite     1    Ethernet1/0/2

 S    192.168.0.58    0001-e201-4f01  infinite     1    Ethernet1/0/3

 S    192.168.0.101   000f-0101-0204  infinite     1    Ethernet1/0/2

 S    192.168.0.122   000f-e20f-21a3  infinite     1    Ethernet1/0/3

 S    192.168.0.144   0015-e943-712f  infinite     1    Ethernet1/0/2

---   5 static binding item(s) found   ---

ip check source ip-address

Syntax

ip check source ip-address [ mac-address ]

undo ip check source ip-address [ mac-address ]

View

Ethernet port view

Parameters

mac-address: Enables IP filtering based on the source MAC address of the packets.

Description

Use the ip check source ip-address command to enable the filtering of the IP packets received through the current port based on the source IP address of the packets.

Use the undo ip check source ip-address command to disable the filtering of the IP packets received through the current port based on the source IP address of the packets.

Use the ip check source ip-address mac-address command to enable the filtering of the IP packets received through the current port based on the source IP address and source MAC address of the packets.

Use the undo ip check source ip-address mac-address command to disable the filtering of the IP packets received through the current port based on the source IP address and source MAC address of the packets.

By default, the filtering of the IP packets received through a port based on the source IP address or source MAC address of the packets is disabled.

Examples

# Enable the filtering of the IP packets received through port Ethernet 1/0/11 based on the source IP address of the packets.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/11

[Sysname-Ethernet1/0/11] ip check source ip-address

ip source static binding

Syntax

ip source static binding ip-address ip-address [ mac-address mac-address ]

undo ip source static binding ip-address ip-address

View

Ethernet port view

Parameters

ip-address ip-address: Specifies the IP address to be statically bound.

mac-address mac-address: Specifies the MAC address to be statically bound.

Description

Use the ip source static binding ip-address command to configure the static binding among source IP address, source MAC address, and the port number so as to generate static binding entries.

Use the undo ip source static binding ip-address command to remove the static binding among source IP address, source MAC address, and the port.

By default, no binding among source IP address, source MAC address, and the port number is configured.

To create a static binding after IP filtering is enabled with the mac-address keyword included on a port, the mac-address argument must be specified; otherwise, the packets sent from this IP address cannot pass the IP filtering.

Related commands: ip check source ip-address.

Examples

# Configure static binding among source IP address 1.1.1.1, source MAC address 0015-e20f-0101, and Ethernet 1/0/3.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/3

[Sysname-Ethernet1/0/3] ip source static binding ip-address 1.1.1.1 mac-address 0015-e20f-0101

 


Rate Limit Configuration Commands

dhcp protective-down recover enable

Syntax

dhcp protective-down recover enable

undo dhcp protective-down recover enable

View

System view

Parameters

None

Description

Use the dhcp protective-down recover enable command to enable port state auto-recovery on the switch.

Use the undo dhcp protective-down recover enable command to disable port state auto-recovery.

With the port state auto-recovery function, a port that is shut down because the DHCP traffic rate limit configured on it is exceeded can automatically be brought up after a specified interval.

By default, the port state auto-recovery function on the switch is disabled.

Examples

# Enable port state auto-recovery on the switch.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp protective-down recover enable

dhcp protective-down recover interval

Syntax

dhcp protective-down recover interval interval

undo dhcp protective-down recover interval

View

System view

Parameters

interval: Interval (in seconds) for a port disabled due to the DHCP traffic exceeding the set threshold to be brought up again. This argument ranges from 10 to 86,400.

Description

Use the dhcp protective-down recover interval command to set an auto recovery interval.

Use the undo dhcp protective-down recover interval command to restore the default interval.

With the port state auto-recovery function enabled on a switch, the auto recovery interval defaults to 300 seconds.

Note that:

l          Before configuring the port state auto-recovery interval, you must enable port state auto-recovery on the switch first.

l          The new port state auto-recovery interval only applies to the ports that are shut down after the dhcp protective-down recover interval command is last executed.

Examples

# Set the port state auto-recovery interval to 30 seconds.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] dhcp protective-down recover enable

[Sysname] dhcp protective-down recover interval 30

dhcp rate-limit

Syntax

dhcp rate-limit rate

undo dhcp rate-limit

View

Ethernet port view

Parameters

rate: Maximum rate of DHCP traffic in pps. This argument ranges from 10 to 150.

Description

Use the dhcp rate-limit command to configure the maximum rate of DHCP traffic for the port. When the number of DHCP packets received on the port per second exceeds the specified threshold, the switch will discard the exceeding DHCP packets.

Use the undo dhcp rate-limit command to restore the default.

By default, after the DHCP traffic limit is enabled, the maximum rate of DHCP traffic is 15 pps.

Note that:

You need to enable the function to limit DHCP traffic (refer to the dhcp rate-limit enable command) for a port before executing either of these two commands for the port.

Examples

# Configure the DHCP traffic threshold to 100 pps for port Ethernet 1/0/11.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface ethernet 1/0/11

[Sysname-Ethernet1/0/11] dhcp rate-limit enable

[Sysname-Ethernet1/0/11] dhcp rate-limit 100

dhcp rate-limit enable

Syntax

dhcp rate-limit enable

undo dhcp rate-limit enable

View

Ethernet port view

Parameters

None

Description

Use the dhcp rate-limit enable command to enable the function to limit DHCP traffic for an Ethernet port. You can use this command to limit the DHCP traffic passing through an Ethernet port. When the number of DHCP packets received on the port per second exceeds the specified threshold (the default value is 15 pps), the switch will discard the exceeding DHCP packets.

Use the undo dhcp rate-limit enable command to disable the function. You can use this command to relieve the DHCP traffic limit configured on an Ethernet port.

By default, the function to limit DHCP traffic is disabled on an Ethernet port. That is, DHCP traffic passing through an Ethernet port is not limited.

Examples

# Enable the function to limit DHCP traffic for Ethernet 1/0/11 port.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface ethernet 1/0/11

[Sysname-Ethernet1/0/11] dhcp rate-limit enable

 


DHCP/BOOTP Client Configuration

DHCP Client Configuration Commands

display dhcp client

Syntax

display dhcp client [ verbose ]

View

Any view

Parameters

verbose: Displays the detailed address allocation information.

Description

Use the display dhcp client command to display the information about the address allocation of DHCP clients.

Note that S3600 series Ethernet switches that operate as DHCP clients support a maximum lease duration of 24 days currently.

Examples

# Display the information about the address allocation of DHCP clients.

<Sysname> display dhcp client verbose

DHCP client statistic information:

Vlan-interface1:

Current machine state: BOUND

Allocated IP: 192.168.0.2 255.255.255.0

Allocated lease: 86400 seconds, T1: 43200 seconds, T2: 75600 seconds

Lease from 2002.09.20 01:05:03   to   2002.09.21 01:05:03

Server IP: 192.168.0.1

Transaction ID = 0x3d8a7431

Default router: 192.168.0.1

Next timeout will happen after 0 days 11 hours 56 minutes 1 seconds.

Table 5-1 Description on the fields of the display dhcp client command

Field

Description

Vlan-interface1

VLAN interface operating as a DHCP client to obtain an IP address dynamically

Current machine state

The state of the client state machine

Allocated IP

IP address allocated to the DHCP client

lease

Lease period

T1

Renewal timer setting

T2

Rebinding timer setting

Lease from….to….

The starting and end time of the lease period

Server IP

IP address of the DHCP server selected

Transaction ID

Transaction ID

Default router

Gateway address

Next timeout will happen after 0 days 11 hours 56 minutes 1 seconds.

The timer expires in 11 hours, 56 minutes, and 1 second.

 

ip address dhcp-alloc

Syntax

ip address dhcp-alloc

undo ip address dhcp-alloc

View

VLAN interface view

Parameters

None

Description

Use the ip address dhcp-alloc command to configure a VLAN interface to obtain an IP address through DHCP.

Use the undo ip address dhcp-alloc command to cancel the configuration.

By default, a VLAN interface does not use DHCP to obtain an IP address.

 

To improve security and avoid malicious attacks to the unused sockets, S3600 Ethernet switches provide the following functions:

l          UDP ports 67 and 68 used by DHCP are enabled/disabled only when DHCP is enabled/disabled.

The implementation is as follows:

l          After the DHCP client is enabled by executing the ip address dhcp-alloc command, UDP port 68 is enabled.

l          After the DHCP client is disabled by executing the undo ip address dhcp-alloc command, UDP port 68 is disabled.

 

Examples

# Configure VLAN-interface 1 to obtain an IP address through DHCP.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address dhcp-alloc

BOOTP Client Configuration Commands

display bootp client

Syntax

display bootp client [ interface Vlan-interface vlan-id ]

View

Any view

Parameters

vlan-id: ID of the VLAN interface.

Description

Use the display bootp client command to display BOOTP client-related information, including the MAC address of the BOOTP client and the IP address obtained.

Examples

# Display the BOOTP client-related information.

<Sysname> display bootp client interface Vlan-interface 1

Vlan-interface1:

Allocated IP: 192.168.0.2 255.255.255.0

Transaction ID = 0x3d8a7431

Mac Address  000f-e20a-c3ef

Default router: 192.168.0.1

Table 5-2 Description on the fields of the display bootp client command

Field

Description

Vlan-interface1

VLAN-interface 1 is configured to obtain an IP address through BOOTP.

Allocated IP

IP address allocated to the VLAN interface

Transaction ID

Value of the XID field in BOOTP packets

Mac Address

MAC address of the BOOTP client

Default router

Default router

 

ip address bootp-alloc

Syntax

ip address bootp-alloc

undo ip address bootp-alloc

View

VLAN interface view

Parameters

None

Description

Use the ip address bootp-alloc command to configure a VLAN interface to obtain an IP address through BOOTP.

Use the undo ip address bootp-alloc command to cancel the configuration.

By default, a VLAN interface does not use BOOTP to obtain an IP address.

Related commands: display bootp client.

Examples

# Configure VLAN-interface 1 to obtain an IP address through BOOTP.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address bootp-alloc

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网