H3C S5500-EI Series Switches Command Manual-Release 2102(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-EI Series Switches Command Manual-Release 2102(V1.01)
19-DHCP Commands
Title Size Download
19-DHCP Commands 199 KB

Table of Contents

Chapter 1 DHCP Server Configuration Commands. 1-1

1.1 DHCP Server Configuration Commands. 1-1

1.1.1 bims-server 1-1

1.1.2 bootfile-name. 1-2

1.1.3 dhcp enable. 1-2

1.1.4 dhcp select server global-pool 1-3

1.1.5 dhcp server detect 1-4

1.1.6 dhcp server forbidden-ip. 1-4

1.1.7 dhcp server ip-pool 1-5

1.1.8 dhcp server ping packets. 1-6

1.1.9 dhcp server ping timeout 1-7

1.1.10 dhcp server relay information enable. 1-7

1.1.11 display dhcp server conflict 1-8

1.1.12 display dhcp server expired. 1-9

1.1.13 display dhcp server free-ip. 1-10

1.1.14 display dhcp server forbidden-ip. 1-10

1.1.15 display dhcp server ip-in-use. 1-11

1.1.16 display dhcp server statistics. 1-12

1.1.17 display dhcp server tree. 1-14

1.1.18 dns-list 1-15

1.1.19 domain-name. 1-16

1.1.20 expired. 1-17

1.1.21 gateway-list 1-17

1.1.22 nbns-list 1-18

1.1.23 netbios-type. 1-19

1.1.24 network. 1-20

1.1.25 option. 1-21

1.1.26 reset dhcp server conflict 1-21

1.1.27 reset dhcp server ip-in-use. 1-22

1.1.28 reset dhcp server statistics. 1-23

1.1.29 static-bind client-identifier 1-23

1.1.30 static-bind ip-address. 1-24

1.1.31 static-bind mac-address. 1-25

1.1.32 tftp-server domain-name. 1-26

1.1.33 tftp-server ip-address. 1-27

1.1.34 voice-config. 1-27

Chapter 2 DHCP Relay Agent Configuration Commands. 2-1

2.1 DHCP Relay Agent Configuration Commands. 2-1

2.1.1 dhcp enable. 2-1

2.1.2 dhcp relay address-check. 2-2

2.1.3 dhcp relay information enable. 2-2

2.1.4 dhcp relay information format 2-3

2.1.5 dhcp relay information strategy. 2-4

2.1.6 dhcp relay release. 2-5

2.1.7 dhcp relay security static. 2-5

2.1.8 dhcp relay security tracker 2-6

2.1.9 dhcp relay server-detect 2-7

2.1.10 dhcp relay server-group. 2-8

2.1.11 dhcp relay server-select 2-9

2.1.12 dhcp select relay. 2-9

2.1.13 display dhcp relay. 2-10

2.1.14 display dhcp relay security. 2-11

2.1.15 display dhcp relay security statistics. 2-12

2.1.16 display dhcp relay security tracker 2-12

2.1.17 display dhcp relay server-group. 2-13

2.1.18 display dhcp relay statistics. 2-14

2.1.19 reset dhcp relay statistics. 2-15

Chapter 3 DHCP Client Configuration Commands. 3-1

3.1 DHCP Client Configuration Commands. 3-1

3.1.1 display dhcp client 3-1

3.1.2 ip address dhcp-alloc. 3-3

Chapter 4 DHCP Snooping Configuration Commands. 4-1

4.1 DHCP Snooping Configuration Commands. 4-1

4.1.1 dhcp-snooping. 4-1

4.1.2 dhcp-snooping information enable. 4-2

4.1.3 dhcp-snooping information format 4-2

4.1.4 dhcp-snooping information strategy. 4-3

4.1.5 dhcp-snooping trust 4-4

4.1.6 display dhcp-snooping. 4-5

4.1.7 display dhcp-snooping trust 4-6

4.1.8 reset dhcp-snooping. 4-7

Chapter 5 BOOTP Client Configuration Commands. 5-1

5.1 BOOTP Client Configuration Commands. 5-1

5.1.1 display bootp client 5-1

5.1.2 ip address bootp-alloc. 5-2

 


Chapter 1  DHCP Server Configuration Commands

 

l      The DHCP server configuration is supported only on VLAN interfaces and loopback interfaces. The subaddress pool configuration is not supported on loopback interfaces.

l      DHCP Snooping must be disabled on the DHCP server.

 

1.1  DHCP Server Configuration Commands

1.1.1  bims-server

Syntax

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

undo bims-server

View

DHCP address pool view

Parameters

ip ip-address: Specifies an IP address for the BIMS server.

port port-number: Specifies a port number for the BIMS server in the range 1 to 65534.

sharekey key: Specifies a shared key for the BIMS server, which is a string of 1 to 16 characters.

Description

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

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

By default, no BIMS server information is specified.

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

Related commands: dhcp server ip-pool.

Examples

# Specify the IP address 1.1.1.1, port number 80, shared key aabbcc of the BIMS server in DHCP address pool 0 for the client.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] bims-server ip 1.1.1.1 port 80 sharekey aabbcc

1.1.2  bootfile-name

Syntax

bootfile-name bootfile-name

undo bootfile-name

View

DHCP address pool view

Parameters

bootfile-name: Boot file name, a string of 1 to 63 characters.

Description

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

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

By default, no bootfile name is specified.

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

Examples

# Specify the bootfile name aaa in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] bootfile-name aaa

1.1.3  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 disabled.

 

&  Note:

You need to enable DHCP before performing DHCP server and relay agent configurations.

 

Examples

# Enable DHCP.

<Sysname> system-view

[Sysname] dhcp enable

1.1.4  dhcp select server global-pool

Syntax

dhcp select server global-pool [ subaddress ]

undo dhcp select server global-pool subaddress

View

Interface view

Parameters

subaddress: Supports subaddress allocation. That is, the DHCP server and clients are on the same network segment, and the server allocates IP addresses from the address pool containing the network segment of the first subaddress if several subaddresses exist.

Description

Use the dhcp select server global-pool command to enable the DHCP server on specified interface(s). After the interface receives a DHCP request, the DHCP server will allocate an IP address from the address pool.

Use the undo dhcp select server global-pool subaddress command to cancel the support for subaddress allocation.

By default, the DHCP server is enabled on an interface.

Examples

# Enable the DHCP server on VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp select server global-pool

1.1.5  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 unauthorized DHCP server detection.

Use the undo dhcp server detect command to disable the function.

By default, the function is disabled.

Examples

# Enable unauthorized DHCP server detection.

<Sysname> system-view

[Sysname] dhcp server detect

1.1.6  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: Start IP address of the IP address range to be excluded from dynamic allocation.

high-ip-address: End IP address of the IP address range to be excluded from dynamic allocation. The end IP address must have a higher sequence than the start one.

Description

Use the dhcp server forbidden-ip command to exclude IP addresses from dynamic allocation.

Use the undo dhcp server forbidden-ip command to remove the configuration.

By default, all IP addresses in a DHCP address pool are assignable except IP addresses of the DHCP server interfaces.

Note that:

l           When you use the dhcp server forbidden-ip command to exclude an IP address that is bound to a user from dynamic assignment, the address can be still assigned to the user.

l           When you use the undo dhcp server forbidden-ip command to remove the configuration, the specified address/address range must be consistent with the one specified with the dhcp server forbidden-ip command. If you have configured to exclude an address range from dynamic assignment, you need to specify an address range in the undo dhcp server forbidden-ip command instead of specifying one IP address.

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

Examples

# Exclude the IP address range 10.110.1.1 to 10.110.1.63 from dynamic allocation.

<Sysname> system-view

[Sysname] dhcp server forbidden-ip 10.110.1.1 10.110.1.63

1.1.7  dhcp server ip-pool

Syntax

dhcp server ip-pool pool-name

undo dhcp server ip-pool pool-name

View

System view

Parameters

pool-name: Global address pool name, which is a unique pool identifier, a string of 1 to 35 characters.

Description

Use the dhcp server ip-pool command to create a DHCP address pool and enter its view. If the pool was created, you will directly enter its view.

Use the undo dhcp server ip-pool command to remove specified DHCP address pool.

By default, no DHCP address pool is created.

Related commands: dhcp enable.

Examples

# Create the DHCP address pool identified by 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0]

1.1.8  dhcp server ping packets

Syntax

dhcp server ping packets number

undo dhcp server ping packets

View

System view

Parameters

number: Number of ping packets, in the range of 0 to 10. 0 means no ping operation.

Description

Use the dhcp server ping packets command to specify the maximum number of ping packets on the DHCP server.

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

The number defaults to 1.

Examples

# Specify the maximum number of ping packets as 1.

<Sysname> system-view

[Sysname] dhcp server ping packets 10

1.1.9  dhcp server ping timeout

Syntax

dhcp server ping timeout milliseconds

undo dhcp server ping timeout

View

System view

Parameters

milliseconds: Response timeout value for ping packets in milliseconds, in the range of 0 to 10,000. 0 means no ping operation.

Description

Use the dhcp server ping timeout command to configure response timeout time of the ping packet on the DHCP server.

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

The time defaults to 500.

Examples

# Specify the response timeout time as 1000ms.

<Sysname> system-view

[Sysname] dhcp server ping timeout 1000

1.1.10  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

[Sysname] undo dhcp server relay information enable

1.1.11  display dhcp server conflict

Syntax

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

View

Any view

Parameters

all: Displays information about all IP address conflicts.

ip-address: Displays conflict information for the IP address.

Description

Use the display dhcp server conflict command to display information about IP address conflicts.

Related commands: reset dhcp server conflict.

Examples

# Display information about all IP address conflicts.

<Sysname> display dhcp server conflict all

    Address             Discover time

    4.4.4.1             Apr 25 2007 16:57:20

 --- total 1 entry ---

Table 1-1 Description on fields of the display dhcp server conflict command

Field

Description

Address

Conflicted IP address

Discover Time

Time when the conflict was discovered

 

1.1.12  display dhcp server expired

Syntax

display dhcp server expired { all | ip ip-address | pool [ pool-name ] }

View

Any view

Parameters

all: Displays the lease expiration information of all DHCP address pools.

ip ip-address: Displays the lease expiration information of a specified IP address.

pool [ pool-name ]: Displays the lease expiration information of a specified address pool. The pool name is a string of 1 to 35 characters. If the pool name is not specified, the lease expiration information of all address pools is displayed.

Description

Use the display dhcp server expired command to display the lease expiration information of specified DHCP address pool(s) or an IP address.

DHCP will assign these expired IP addresses to DHCP clients after all addresses have been assigned.

Examples

# Display information about lease expirations in all DHCP address pools.

<Sysname> display dhcp server expired all

Global pool:

 IP address       Client-identifier/    Lease expiration          Type

                    Hardware address

 4.4.4.6          3030-3066-2e65-3230-  Apr 25 2007 17:10:47     Release

                   302e-3130-3234-2d45-

                   7468-6572-6e65-7430-

                   2f31

 

 --- total 1 entry ---

Table 1-2 Description on fields of the display dhcp server expired command

Field

Description

Global pool

Information about lease expiration of a DHCP address pool

IP address

Expired IP addresses

Client-identifier/Hardware address

IDs or MACs of clients whose IP addresses were expired

Lease expiration

The lease expiration time

Type

Types of lease expirations. Currently, this field is set to Release.

 

1.1.13  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 information about assignable IP addresses, which have never been assigned.

Examples

# Display information about assignable IP addresses.

<Sysname> display dhcp server free-ip

IP Range from 10.0.0.0              to  10.0.0.255

1.1.14  display dhcp server forbidden-ip

Syntax

display dhcp server forbidden-ip

View

Any view

Parameters

None

Description

Use the display dhcp server forbidden-ip command to display IP addresses excluded from dynamic allocation in DHCP address pool.

Examples

# Display IP addresses excluded from dynamic allocation in the DHCP address pool.

<Sysname> display dhcp server forbidden-ip

IP Range from 1.1.1.1              to  1.1.1.1

IP Range from 2.2.2.2              to  2.2.2.5

1.1.15  display dhcp server ip-in-use

Syntax

display dhcp server ip-in-use { all | ip ip-address | pool [ pool-name ] }

View

Any view

Parameters

all: Displays the binding information of all DHCP address pools.

ip ip-address: Displays the binding information of a specified IP address.

pool [ pool-name ]: Displays the binding information of a specified address pool. The pool name is a string of 1 to 35 characters. If no pool name is specified, the binding information of all address pools is displayed.

Description

Use the display dhcp server ip-in-use command to display the binding information of DHCP address pool(s) or an IP address.

Related commands: reset dhcp server ip-in-use.

Examples

# Display the binding information of all DHCP address pools.

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

Global pool:

 IP address    Client-identifier/    Lease expiration        Type

                 Hardware address

 10.1.1.1      4444-4444-4444         NOT Used                  Manual

 

 --- total 1 entry ---

Table 1-3 Description on fields of the display dhcp server ip-in-use command

Field

Description

Global pool

Binding information of a DHCP address pool

IP address

Bound IP address

Client-identifier/Hardware address

Client’s ID or MAC of the binding

Lease expiration

Lease expiration time

Type

Binding types, including Manual, Auto:OFFERED and Auto:COMMITTED.

l      Manual: Static binding

l      Auto:OFFERED: The binding sent in the DHCP-OFFER message from the server to the client.

l      Auto:COMMITTED: The binding sent in the DHCP-ACK message from the server to the client.

 

1.1.16  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 of the DHCP server.

Related commands: reset dhcp server statistics.

Examples

# Display the statistics on the DHCP server.

<Sysname> display dhcp server statistics

    Global Pool:

      Pool Number:                     1

      Binding:

        Auto:                           1

        Manual:                         0

        Expire:                         0

    BOOTP Request:                    13

      DHCPDISCOVER:                    3

      DHCPREQUEST:                     7

      DHCPDECLINE:                     0

      DHCPRELEASE:                     3

      DHCPINFORM:                      0

      BOOTPREQUEST:                    0

    BOOTP Reply:                       9

      DHCPOFFER:                        3

      DHCPACK:                          6

      DHCPNAK:                          0

      BOOTPREPLY:                       0

    Bad Messages:                      0

Table 1-4 Description on fields of the display dhcp server statistics command

Field

Description

Global Pool

Statistics of a DHCP address pool

Pool Number

The number of address pools

Auto

The number of dynamic bindings

Manual

The number of static bindings

Expire

The number of expired bindings

BOOTP Request

The number of DHCP requests sent from DHCP clients to the DHCP server, including:

l      DHCPDISCOVER

l      DHCPREQUEST

l      DHCPDECLINE

l      DHCPRELEASE

l      DHCPINFORM

l      BOOTPREQUEST

BOOTP Reply

The number of DHCP replies sent from the DHCP server to DHCP clients, including:

l      DHCPOFFER

l      DHCPACK

l      DHCPNAK

l      BOOTPREPLY

Bad Messages

 The number of erroneous messages

 

1.1.17  display dhcp server tree

Syntax

display dhcp server tree { all | pool [ pool-name ] }

View

Any view

Parameters

all: Displays the tree organization information of all DHCP address pools.

pool [ pool-name ]: Displays the tree organization information of a specified address pool. The pool name is a string of 1 to 35 characters. If no pool name is specified, the tree organization information of all address pools will be displayed.

Description

Use the display dhcp server tree command to display the tree organization information of DHCP address pool(s).

Examples

# Display the tree organization information of all DHCP address pools.

<Sysname> display dhcp server tree all

Global pool:

 

Pool name: 0

 network 20.1.1.0 mask 255.255.255.0

 Sibling node:1

 option 2 ip-address 1.1.1.1

 expired 1 0 0

 

Pool name: 1

 static-bind ip-address 10.10.1.2 mask 255.0.0.0

 static-bind mac-address 00e0-00fc-0001

 PrevSibling node:0

 expired unlimited

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

Field

Description

Global pool

Information of a address pool

Pool name

Address pool name

network

Network segment for address allocation

static-bind ip-address 10.10.1.2 mask 255.0.0.0

static-bind mac-address 00e0-00fc-0001

The IP address and MAC address of the static binding

Sibling node

The sibling node of the current node, nodes of this kind in the output are:

l      Child node: The child node (subnet segment) address pool of the current node

l      Parent node: The parent node (nature network segment) address pool of the current node

l      Sibling node: The latter sibling node of the current node (another subnet of the same nature network). The earlier the sibling node is configured, the higher selection priority the sibling node has.

l      PrevSibling node: The previous sibling node of the current node

option

Self-defined DHCP options

expired

The lease duration, in the format of day, hour,  and minute

 

1.1.18  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>: DNS server IP address. &<1-8> means you can specify up to eight DNS server addresses separated by spaces.

all: Specifies all DNS server addresses to remove.

Description

Use the dns-list command to specify DNS server addresses in a DHCP address pool.

Use the undo dns-list command to remove DNS server addresses from a DHCP address pool.

By default, no DNS server address is specified.

If you repeatedly use the dns-list command, the latest configuration will overwrite the previous one.

Related commands: dhcp server ip-pool.

Examples

# Specify the DNS server address 10.1.1.254 for the DHCP client in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.19  domain-name

Syntax

domain-name domain-name

undo domain-name

View

DHCP address pool view

Parameters

domain-name: Domain name suffix for DHCP clients, a string of 1 to 50 characters.

Description

Use the domain-name command to specify a domain name suffix for the DHCP clients in the DHCP address pool.

Use the undo domain-name command to remove the domain name suffix assigned from the DHCP address pool to the DHCP client.

No domain name suffix is specified by default.

Related commands: dhcp server ip-pool.

Examples

# Specify a domain name suffix of mydomain.com for the DHCP clients in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.20  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, in the range of 0 to 365.

hour hour: Specified the number of hours, in the range of 0 to 23.

minute minute: Specifies the number of minutes, in the range of 0 to 59.

unlimited: Specifies the infinite duration, which is actually 136 years.

Description

Use the expired command to specify the lease duration in a DHCP address pool.

Use the undo expired command to restore the default lease duration in a DHCP address pool.

The lease duration defaults to one day.

Note that if the lease duration you specified is beyond the year 2106, the system regards the lease as expired.

Related commands: dhcp server ip-pool.

Examples

# Specify the lease duration as one day, two hours and three minutes in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.21  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>: Gateway IP address. &<1-8> means you can specify up to eight gateway addresses separated by spaces.

all: Specifies all gateway IP addresses to be removed.

Description

Use the gateway-list command to specify gateway address(es) in a DHCP address pool.

Use the undo gateway-list command to remove specified gateway address(es) specified for the DHCP client from a DHCP address pool.

By default, no gateway address is specified.

If you use the gateway-list command repeatedly, the latest configuration will overwrite the previous one.

Examples

# Specify the gateway address 10.110.1.99 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.22  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>: WINS server IP address. &<1-8> means you can specify up to eight WINS server addresses separated by spaces.

all: Specifies all WINS server addresses to be removed.

Description

Use the nbns-list command to specify WINS server address(es) in a DHCP address pool.

Use the undo nbns-list command to remove WINS server address(es) assigned from a DHCP address pool to the DHCP client.

By default, no WINS server address is specified.

If you use the nbns-list command repeatedly, the latest configuration will overwrite the previous one.

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

Examples

# Specify WINS server address 10.12.1.99 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.23  netbios-type

Syntax

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

undo netbios-type

View

DHCP address pool view

Parameters

b-node: Broadcast node. A b-node client sends the destination name in a broadcast message. The destination returns the name-to-IP mapping to the client after receiving the message.

p-node: Peer-to-peer node. A p-node client sends the destination name in a unicast message to the WINS server, and the WINS server returns the mapping to the client.

m-node: Mixed node, a combination of a b-node first and p-node second. An m-node client broadcasts the destination name, if there is no response, and then unicasts the destination name to the WINS server to get the mapping.

h-node: Hybrid node, a combination of a p-node first and b-node second. An h-node is a p-node with the peer-to-peer communication mechanism. An h-node client unicasts the destination name to the WINS server, if there is no response, and then broadcasts it to get the mapping from the destination.

Description

Use the netbios-type command to specify the client NetBIOS node type in a DHCP address pool.

Use the undo netbios-type command to remove the client NetBIOS node type assigned from a DHCP address pool to the DHCP client.

By default, no NetBIOS node type is specified.

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

Examples

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

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.24  network

Syntax

network ip-address [ mask-length | mask mask ]

undo network

View

DHCP address pool view

Parameters

ip-address: IP address range for dynamic allocation. If no mask length and mask is specified, the natural mask will be used.

mask-length: Mask length, in the range of 1 to 30.

mask mask: Specifies the IP address network mask, in dotted decimal format.

Description

Use the network command to specify the IP address range for dynamic allocation in a DHCP address pool.

Use the undo network command to remove the specified address range.

No IP address range is specified by default.

Note that you can specify only one network segment for each DHCP global address pool. If you use the network command repeatedly, the latest configuration will overwrite the previous one.

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

Examples

# Specify 192.168.8.0/24 as the address range for dynamic allocation in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.25  option

Syntax

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

undo option code

View

DHCP address pool view

Parameters

code: Self-defined option number, in the range of 2 to 254.

ascii ascii-string: Specifies an ASCII string with 1 to 63 characters.

hex hex-string&<1-16>: Specifies hex digit strings. &<1-16> indicates you can specify up to 16 hex digit strings, separated by spaces. Each string contains 2, 4, 6 or 8 hex digits.

ip-address ip-address&<1-8>: Specifies IP addresses. &<1-8> indicates you can specify up to eight IP addresses, separated by spaces.

Description

Use the option command to configure a self-defined DHCP option in a DHCP address pool.

Use the undo option command to remove a self-defined DHCP option from a DHCP address pool.

The option command is not configured by default.

If you use the option command repeatedly, the latest configuration will overwrite the previous one.

Related commands: dhcp server ip-pool.

Examples

# Configure the hex digits 0x11 and 0x22 for the self-defined DHCP Option 100 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.26  reset dhcp server conflict

Syntax

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

View

User view

Parameters

all: Clears the statistics of all IP address conflicts.

ip ip-address: Clears the conflict statistics of a specified IP address.

Description

Use the reset dhcp server conflict command to clear statistics of IP address conflict(s).

Related commands: display dhcp server conflict.

Examples

# Clears the statistics of all IP address conflicts.

<Sysname> reset dhcp server conflict all

1.1.27  reset dhcp server ip-in-use

Syntax

reset dhcp server ip-in-use { all | ip ip-address | pool [ pool-name ] }

View

User view

Parameters

all: Clears the IP address dynamic binding information of all DHCP address pools.

ip ip-address: Clears the dynamic binding information of a specified IP address.

pool [ pool-name ]: Clears the dynamic binding information of a specified address pool. The pool name is a string of 1 to 35 characters. If no pool name is specified, the dynamic binding information of all address pools is cleared.

Description

Use the reset dhcp server ip-in-use command to clear dynamic IP address binding information.

Related commands: display dhcp server ip-in-use

Examples

# Clear the binding information of IP address 10.110.1.1.

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

1.1.28  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 of the DHCP server.

Related commands: display dhcp server statistics.

Examples

# Clear the statistics of the DHCP server.

<Sysname> reset dhcp server statistics

1.1.29  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 indicates 2 or 4 hex digits. For example, aabb-cccc-dd is a valid ID, while aabb-c-dddd and aabb-cc-dddd are both invalid.

Description

Use the static-bind client-identifier command to specify the client ID of a static binding in a DHCP address pool.

Use the undo static-bind client-identifier command to remove the client ID of a static binding from a DHCP address pool.

By default, no client ID is specified.

Note that:

l           Use the static-bind client-identifier command together with the static-bind ip-address command to accomplish a static binding configuration.

l           The ID of the static binding of a client must be identical to the ID displayed by using the display dhcp client verbose command on the client. Otherwise, the client cannot obtain an IP address.

l           If you use the static-bind client-identifier or static-bind mac-address command repeatedly, the latest configuration will overwrite the previous one.

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

Examples

# Bind the client ID aaaa-bbbb to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0

[Sysname-dhcp-pool-0] static-bind client-identifier aaaa-bbbb

1.1.30  static-bind ip-address

Syntax

static-bind ip-address ip-address [ mask-length | mask mask ]

undo static-bind ip-address

View

DHCP address pool view

Parameters

ip-address: IP address of a static binding, if no mask and mask length is specified, the natural mask is used.

mask-length: Mask length of the IP address, that is, the number of ones in the mask.

mask mask: Specifies the IP address mask, in dotted decimal format.

Description

Use the static-bind ip-address command to specify an IP address in a DHCP address pool for a static binding.

Use the undo static-bind ip-address command to remove the statically bound IP address.

By default, no IP address is statically bound in a DHCP address pool.

Note that:

l           Use the static-bind ip-address command together with the static-bind mac-address or static-bind client-identifier command to accomplish a static binding configuration.

l           If the statically bound IP address is an interface address of the DHCP server, the static binding does not take effect.

l           If you use the static-bind ip-address command repeatedly, the latest configuration will overwrite the previous one.

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

Examples

# Bind the client MAC address 0000-e03f-0305 to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0

[Sysname-dhcp-pool-0] static-bind mac-address 0000-e03f-0305

1.1.31  static-bind mac-address

Syntax

static-bind mac-address mac-address

undo static-bind mac-address

View

DHCP address pool view

Parameters

mac-address: The MAC address of a static binding, in the format H-H-H.

Description

Use the static-bind mac-address command to statically bind a MAC address to an IP address in a DHCP address pool.

Use the undo static-bind mac-address command to remove the statically bound MAC address.

By default, no MAC address is statically bound.

Note that:

l           Use the static-bind mac-address command together with the static-bind ip-address command to complete a static binding configuration.

l           If you use the static-bind mac-address or static-bind client-identifier command repeatedly, the latest configuration will overwrite the previous one.

Relate command: dhcp server ip-pool, static-bind client-identifier and static-bind ip-address.

Examples

# Bind the client MAC address 0000-e03f-0305 to the IP address 10.1.1.1 with the mask 255.255.255.0 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] static-bind ip-address 10.1.1.1 mask 255.255.255.0

[Sysname-dhcp-pool-0] static-bind mac-address 0000-e03f-0305

1.1.32  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 1 to 63 characters.

Description

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

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

By default, no TFTP server name is specified.

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

Examples

# Specify the TFTP server name as aaa in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] tftp-server domain-name aaa

1.1.33  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 DHCP address pool.

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

By default, no TFTP server address is specified.

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

Examples

# Specify the TFTP server address 10.1.1.1 in DHCP address pool 0.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

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

1.1.34  voice-config

Syntax

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

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

View

DHCP address pool view

Parameters

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

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

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

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

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

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

Description

Use the voice-config command to configure specified Option 184 contents in a DHCP address pool.

Use the undo voice-config command to remove specified Option 184 contents from a DHCP address pool.

By default, no Option 184 content is configured.

Note that specifying the IP address of a network calling processor first is necessary to make other configured parameters take effect.

Examples

# Configure Option 184 in DHCP address pool 0: the primary network calling processor 10.1.1.1, backup network calling processor 10.2.2.2, voice VLAN ID 3 that is enabled, the failover IP address 10.3.3.3 and dialer string 99*.

<Sysname> system-view

[Sysname] dhcp server ip-pool 0

[Sysname-dhcp-pool-0] voice-config ncp-ip 10.1.1.1

[Sysname-dhcp-pool-0] voice-config as-ip 10.2.2.2

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

[Sysname-dhcp-pool-0] voice-config fail-over 10.3.3.3 99*

 


Chapter 2  DHCP Relay Agent Configuration Commands

 

l      The DHCP relay agent configuration is supported only on VLAN interfaces.

l      DHCP Snooping cannot be configured on the DHCP relay agent.

 

2.1  DHCP Relay Agent Configuration Commands

2.1.1  dhcp enable

Syntax

dhcp enable

undo dhcp enable

View

System view

Parameters

None

Description

Use the dhcp enable command to enable DHCP.

Use the undo dhcp enable command to disable DHCP.

By default, DHCP is disabled.

 

&  Note:

For both DHCP server and relay agent configuration, enabling DHCP first is necessary to make other configurations take effect.

 

Examples

# Enable DHCP.

<Sysname> system-view

[Sysname] dhcp enable

2.1.2  dhcp relay address-check

Syntax

dhcp relay address-check { disable | enable }

View

Interface view

Parameters

disable: Disables IP address match checking on the relay agent.

enable: Enables IP address match checking on the relay agent.

Description

Use the dhcp relay address-check enable command to enable IP address match check on the relay agent.

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

By default, the function is disabled.

Examples

# Enable IP address match checking on the DHCP relay agent.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay address-check enable

2.1.3  dhcp relay information enable

Syntax

dhcp relay information enable

undo dhcp relay information enable

View

Interface view

Parameters

None

Description

Use the dhcp relay information enable command to enable the relay agent to support Option 82.

Use the undo dhcp relay information enable command to disable Option 82 support.

By default, Option 82 support is disabled on DHCP relay agent.

Examples

# Enable Option 82 support on the relay agent.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

2.1.4  dhcp relay information format

Syntax

dhcp relay information format { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }

undo dhcp relay information format [ verbose node-identifier ]

View

Interface view

Parameters

normal: Specifies the normal padding format.

verbose: Specifies the verbose padding format.

node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier. By default, the node MAC address is used as the node identifier.

l           mac indicates using MAC address as the node identifier.

l           sysname indicates using the device name of a node as the node identifier.

l           user-defined node-identifier indicates using a specified character string as the node identifier, in which node-identifier is a string with 1 to 50 characters.

Description

Use the dhcp relay information format command to specify a padding format for Option 82.

Use the undo dhcp relay information format command to restore the default padding format.

The Option 82 padding format defaults to normal.

 

&  Note:

l      Using the undo dhcp relay information format command without the keyword verbose node-identifier restores the default normal padding format, or with the keyword verbose node-identifier restores the mac mode of the verbose padding format.

l      If configuring the handling strategy of the DHCP relay agent as replace, you need to configure a padding format of Option 82. If the handling strategy is keep or drop, you need not configure any padding format.

l      If sub-option 1 (node identifier) of Option 82 is padded with the device name (sysname) of a node, the device name must contain no spaces. Otherwise, the DHCP relay agent will drop the message.

 

Examples

# Specify the verbose padding format for Option 82.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

[Sysname-Vlan-interface1] dhcp relay information strategy replace

[Sysname-Vlan-interface1] dhcp relay information format verbose

2.1.5  dhcp relay information strategy

Syntax

dhcp relay information strategy { drop | keep | replace }

undo dhcp relay information strategy

View

Interface 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 in the specified padding format.

Description

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

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

The handling strategy for messages containing Option 82 defaults to replace.

Examples

# Configure the DHCP relay agent handling strategy for messages containing Option 82 as keep.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay information enable

[Sysname-Vlan-interface1] dhcp relay information strategy keep

2.1.6  dhcp relay release

Syntax

dhcp relay release ip client-ip

View

System view

Parameters

client-ip: DHCP client IP address.

Description

Use the dhcp relay release ip command to request the DHCP server to release a specified client IP address.

Examples

# Request the DHCP server to release the IP address 1.1.1.1.

<Sysname> system-view

[Sysname] dhcp relay release ip 1.1.1.1

2.1.7  dhcp relay security static

Syntax

dhcp relay security static ip-address mac-address [ interface interface-type interface-number ]

undo dhcp relay security { ip-address | all | dynamic | static }

View

System view

Parameters

ip-address: Client IP address for creating a static binding.

mac-address: Client MAC address for creating a static binding, in the format H-H-H.

interface interface-type interface-number: Specifies an interface connecting to the DHCP client. interface-type interface-number specifies the interface type and interface number.

all: Specifies all client entries to be removed.

dynamic: Specifies dynamic client entries to be removed.

static: Specifies manual client entries to be removed.

Description

Use the dhcp relay security static command to configure a static client entry, that is, the binding between IP address, MAC address, and VLAN interface on the relay agent.

Use the undo dhcp relay security command to remove specified client entries from the relay agent.

No manual client entry is configured on the DHCP relay agent by default.

Note that:

When using the dhcp relay security static command to bind an interface to a static client entry, make sure that the interface is configured as a DHCP relay agent; otherwise, entry conflicts may occur.

Related commands: display dhcp relay security.

Examples

# Bind DHCP relay interface VLAN-interface 2 to IP address 10.10.1.1 and MAC address 0005-5d02-f2b3 of the client.

<Sysname> system-view

[Sysname] dhcp relay security static 10.10.1.1 0005-5d02-f2b3 interface vlan-interface 2

2.1.8  dhcp relay security tracker

Syntax

dhcp relay security tracker { interval | auto }

undo dhcp relay 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 the value of 60 seconds divided by the number of binding entries. Thus, the more entries are, the shorter interval is, but the shortest interval is no less than 500 ms.

Description

Use the dhcp relay security tracker command to set a refreshing interval at which the relay agent contacts the DHCP server for refreshing dynamic bindings.

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

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

Examples

# Set the handshake interval as 100 seconds.

<Sysname> system-view

[Sysname] dhcp relay security tracker 100

2.1.9  dhcp relay server-detect

Syntax

dhcp relay server-detect

undo dhcp relay server-detect

View

System view

Parameters

None

Description

Use the dhcp relay server-detect command to enable unauthorized DHCP server detection.

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

By default, unauthorized DHCP server detection is disabled.

Examples

# Enable unauthorized DHCP server detection.

<Sysname> system-view

[Sysname] dhcp relay server-detect

2.1.10  dhcp relay server-group

Syntax

dhcp relay server-group group- ip ip-address

undo dhcp relay server-group group-id [ ip ip-address ]

View

System view

Parameters

group-id: DHCP server group number, in the range of 0 to 19.

ip ip-address: DHCP server IP address.

Description

Use the dhcp relay server-group command to specify a DHCP server for a DHCP server group.

Use the undo dhcp relay server-group command to remove a DHCP server from a DHCP server group, if no ip ip-address is specified, all servers in the DHCP server group and the server group itself will be removed.

By default, no DHCP server is specified for a DHCP server group.

Note that:

l           The IP address of any DHCP server and any interface’s IP address of the DHCP relay agent cannot be in the same network segment. Otherwise, the client may fail to obtain an IP address.

l           If a server group has been correlated to multiple interfaces, you need to cancel these correlations before removing the server group.

Related commands: display dhcp relay server-group.

Examples

# Specify DHCP server 1.1.1.1 for DHCP server group 1 on the relay agent.

<Sysname> system-view

[Sysname] dhcp relay server-group 1 ip 1.1.1.1

2.1.11  dhcp relay server-select

Syntax

dhcp relay server-select group-id

undo dhcp relay server-select

View

Interface view

Parameters

group-id: DHCP server group number to be correlated, in the range of 0 to 19. The specified server group must be an existing group containing at least a DHCP server.

Description

Use the dhcp relay server-select command to correlate specified interface(s) to a specified DHCP server group.

Use the undo dhcp relay server-select command to remove a configured correlation.

By default, no DHCP server group is correlated with an interface on the relay agent.

Note that an interface on the relay agent can only be correlated to one DHCP server group, and a newly configured correlation overwrites the previous one. If the server group in the new correlation does not exist, the new configuration will not work. The interface still maintains the previous correlation.

Examples

# Correlate VLAN-interface 1 to DHCP server group 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp relay server-select 1

2.1.12  dhcp select relay

Syntax

dhcp select relay

undo dhcp select relay

View

Interface view

Parameters

None

Description

Use the dhcp select relay command to enable the relay agent on the current interface, specified or all interfaces. Upon receiving requests from an enabled interface, the relay agent will forward these requests to outside DHCP servers for IP address allocation.

Use the undo dhcp select relay command to restore the default on interface(s).

After DHCP is enabled, the DHCP server is enabled on an interface by default. That is, upon receiving a client’s request from the interface, the DHCP server allocates an IP address from the DHCP address pool to the client.

Examples

# Enable the DHCP relay agent on VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] dhcp select relay

2.1.13  display dhcp relay

Syntax

display dhcp relay { all | interface interface-type interface-number }

View

Any view

Parameters

all: Displays information of DHCP server groups that all interfaces correspond to.

interface interface-type interface-number: Displays information of the DHCP server group that a specified interface corresponds to.

Description

Use the display dhcp relay command to display information about DHCP server groups correlated to an interface or all interfaces.

Examples

# Display information about DHCP server groups correlated to all interfaces.

<Sysname> display dhcp relay all

    Interface name            Server-group

    Vlan-interface3                   2

Table 2-1 Description on fields of the display dhcp relay all command

Field

Description

Interface name

Interface name

Server-group

DHCP server group number correlated to the interface.

 

2.1.14  display dhcp relay security

Syntax

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

View

Any view

Parameters

ip-address: Displays the binding information of an IP address.

dynamic: Displays information about dynamic bindings.

static: Displays information about static bindings.

Description

Use the display dhcp relay security command to display information about bindings of DHCP relay agents. If no parameter is specified, information about all bindings will be displayed.

Examples

# Display information about all bindings.

<Sysname> display dhcp relay security

 IP Address      MAC Address     Type       Interface

 10.1.1.5        00e0-0000-0000  Static     Vlan2

 10.10.1.2       0002-0002-0002  Static     N/A

---   2 dhcp-security item(s) found   ---

Table 2-2 Description on fields of the display dhcp relay security command

Field

Description

IP Address

Client IP address

MAC Address

Client MAC address

Type

Type of binding, including dynamic and static

Interface

VLAN interface connecting to the DHCP client. If no VLAN interface is recorded in the binding entry, “N/A” is displayed.

 

2.1.15  display dhcp relay security statistics

Syntax

display dhcp relay security statistics

View

Any view

Parameters

None

Description

Use the display dhcp relay security statistics command to display statistics information about bindings of DHCP relay agents.

Examples

# Display statistics about client address binding entries.

<Sysname> display dhcp relay security statistics

Static Items      :1

Dynamic Items     :0

Temporary Items   :0

All Items          :1

Table 2-3 Description on fields of the display dhcp relay security statistics command

Field

Description

Static Items

Static client address binding items

Dynamic Items

Dynamic client address binding items

Temporary Items

Temporary client address binding items

All Items

All client address binding items

 

2.1.16  display dhcp relay security tracker

Syntax

display dhcp relay security tracker

View

Any view

Parameters

None

Description

Use the display dhcp relay security tracker command to display the interval for refreshing dynamic bindings on the relay agent.

Examples

# Display the interval for refreshing dynamic bindings on the relay agent.

<Sysname> display dhcp relay security tracker

 Current tracker interval: 10s (Specified by user)

The interval is 10 seconds.

2.1.17  display dhcp relay server-group

Syntax

display dhcp relay server-group { group-id | all }

View

Any view

Parameters

group-id: Displays the information of the specified DHCP server group numbered from 0 to 19.

all: Displays the information of all DHCP server groups.

Description

Use the display dhcp relay server-group command to display the configuration information of a specified or all DHCP server groups.

Examples

# Display IP addresses of DHCP servers in DHCP server group 1.

<Sysname> display dhcp relay server-group 1

    No.            Group IP

    1              1.1.1.1

    2              1.1.1.2

Table 2-4 Description on fields of the display dhcp relay server-group command

Field

Description

No.

Sequence number

Group IP

IP address in the server group

 

2.1.18  display dhcp relay statistics

Syntax

display dhcp relay statistics [ server-group { group-id | all } ]

View

Any view

Parameters

group-id: Specifies a server group number in the range of 0 to 19 about which to display DHCP packet statistics.

all: Specifies all server groups about which to display DHCP packet statistics. Information for each group will be displayed.

Description

Use the display dhcp relay statistics command to display DHCP packet statistics related to a specified or all DHCP server groups.

Note that if no parameter (server-group and all) is specified, all DHCP packet statistics on the relay agent will be displayed.

Examples

# Display all DHCP packet statistics on the relay agent.

<Sysname> display dhcp relay statistics

     Bad packets received:                   0

     DHCP packets received from clients: 20

         DHCPDISCOVER packets received:      10

         DHCPREQUEST packets received:       10

         DHCPINFORM packets received:        0

         DHCPRELEASE packets received:       0

         DHCPDECLINE packets received:       0

         BOOTPREQUEST packets:               0

     DHCP packets received from servers: 20

         DHCPOFFER packets received:     10

         DHCPACK packets received:           10

         DHCPNAK packets received:           0

         BOOTPREPLY packets:             0

     DHCP packets sent to servers:           20

     DHCP packets sent to clients:           20

# Display DHCP packet statistics related to every server group on the relay agent.

<Sysname> display dhcp relay statistics server-group all

 DHCP relay server-group           #2

     Packet type               Packet number

 Client -> Server:

     DHCPDISCOVER                   5

     DHCPREQUEST                5

     DHCPINFORM                         0

     DHCPRELEASE                    0

     DHCPDECLINE                    0

     BOOTPREQUEST                   0

 Server -> Client:

     DHCPOFFER                      5

     DHCPACK                        5

     DHCPNAK                        0

     BOOTPREPLY                     0

 

 DHCP relay server-group           #3

     Packet type               Packet number

 Client -> Server:

     DHCPDISCOVER                   5

     DHCPREQUEST                5

     DHCPINFORM                         0

     DHCPRELEASE                    0

     DHCPDECLINE                    0

     BOOTPREQUEST                   0

 Server -> Client:

     DHCPOFFER                      5

     DHCPACK                        5

     DHCPNAK                        0

     BOOTPREPLY                     0

2.1.19  reset dhcp relay statistics

Syntax

reset dhcp relay statistics [ server-group group-id ]

View

User view

Parameters

server-group group-id: Specifies a server group ID in the range of 0 to 19 about which to remove statistics from the relay agent.

Description

Use the reset dhcp relay statistics command to remove statistics from the relay agent.

If no server-group is specified, all statistics will be removed from the relay agent.

Related commands: display dhcp relay statistics.

Examples

# Remove all statistics from the DHCP relay agent.

<Sysname> reset dhcp relay statistics

 


Chapter 3  DHCP Client Configuration Commands

 

l      The DHCP client configuration is supported only on VLAN interfaces.

l      When multiple VLAN interfaces having the same MAC address use DHCP for IP address acquisition via a relay agent, the DHCP server cannot be the Windows 2000 Server or Windows 2003 Server.

l      You are not recommended to enable both the DHCP client and the DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the DHCP client may fail to obtain an IP address.

 

3.1  DHCP Client Configuration Commands

3.1.1  display dhcp client

Syntax

display dhcp client [ verbose ] [ interface interface-type interface-number ]

View

Any view

Parameters

verbose: Specifies verbose DHCP client information to be displayed.

interface interface-type interface-number: Specifies an interface of which to display DHCP client information.

Description

Use the display dhcp client command to display DHCP client information. If no interface interface-type interface-number is specified, DHCP client information of all interfaces will be displayed.

Examples

# Display DHCP client information of all interfaces.

<Sysname> display dhcp client

Vlan-interface1 DHCP client information:

 Current machine state: BOUND

 Allocated IP: 40.1.1.20 255.255.255.0

 Allocated lease: 259200 seconds, T1: 129600 seconds, T2: 226800 seconds

 DHCP server: 40.1.1.2

# Display verbose DHCP client information.

<Sysname> display dhcp client verbose

Vlan-interface1 DHCP client information:

 Current machine state: BOUND

 Allocated IP: 40.1.1.20 255.255.255.0

 Allocated lease: 259200 seconds, T1: 129600 seconds, T2: 226800 seconds

 Lease from 2005.08.13 15:37:59   to   2005.08.16 15:37:59

 DHCP server: 40.1.1.2

 Transaction ID: 0x1c09322d

 Default router: 40.1.1.2

 DNS server: 44.1.1.11

 DNS server: 44.1.1.12

 Domain name: ddd.com

 Boot server: 200.200.200.200  1.1.1.1

Client ID: 3030-3066-2e65-3234-

392e-3830-3438-2d56-

6c61-6e2d-696e-7465-

7266-6163-6531

T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.

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

Field

Description

Vlan-interface1 DHCP client information

Information of the interface acting as the DHCP client

Current machine state

DHCP client current machine state

Allocated IP

The IP address allocated by the DHCP server

Allocated lease

The allocated lease time

T1

The 1/2 lease time (in seconds) of the DHCP client IP address

T2

The 7/8 lease time (in seconds) of the DHCP client IP address

Lease from….to….

The start and end time of the lease.

DHCP Server

DHCP server IP address that assigned the IP address

Transaction ID

Transaction ID, a random number chosen by the client to identify an IP address allocation.

Default router

The gateway address assigned to the client

DNS server

The DNS server address assigned to the client

Domain name

The domain name suffix assigned to the client

Boot server

PXE server addresses (up to 16 addresses) specified for the DHCP client, which are obtained through Option 43.

Client ID

Client ID

T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.

How long the T1 (1/2 lease time) timer will timeout.

 

3.1.2  ip address dhcp-alloc

Syntax

ip address dhcp-alloc [ client-identifier mac interface-type interface-number ]

undo ip address dhcp-alloc

View

Interface view

Parameters

client-identifier mac interface-type interface-number: Specifies the MAC address of an interface using which as the client ID to obtain an IP address.

Description

Use the ip address dhcp-alloc command to configure an interface to use DHCP for IP address acquisition.

Use the undo ip address dhcp-alloc command to cancel an interface from using DHCP.

By default, an interface does not use DHCP for IP address acquisition.

Note that:

l           If no parameter is specified, the client uses a character string comprised of the current interface name and MAC address as its ID for address acquisition.

l           The DHCP client sends a DHCP-RELEASE message for releasing the IP address obtained via DHCP, if the interface of the client is down, the message cannot be sent.

Examples

# Configure VLAN-interface 1 to use DHCP for IP address acquisition.

<Sysname> system-view

[Sysname] interface vlan-interface 1

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

 


Chapter 4  DHCP Snooping Configuration Commands

 

&  Note:

l      DHCP Snooping supports no link aggregation. If an Ethernet port is added into an aggregation group, DHCP Snooping configuration on it will not take effect. When the port is removed from the group, DHCP Snooping can take effect.

l      The DHCP snooping enabled device does not work if it is between the DHCP relay agent and DHCP server, and it can work when it is between the DHCP client and relay agent or between the DHCP client and server.

l      The DHCP Snooping enabled device cannot be a DHCP server or DHCP relay agent.

l      You are not recommended to enable the DHCP client, BOOTP client, and DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the BOOTP client/DHCP client may fail to obtain an IP address.

 

4.1  DHCP Snooping Configuration Commands

4.1.1  dhcp-snooping

Syntax

dhcp-snooping

undo dhcp-snooping

View

System view

Parameters

None

Description

Use the dhcp-snooping command to enable DHCP snooping.

Use the undo dhcp-snooping command to disable DHCP snooping.

With DHCP snooping disabled, all ports can forward responses from any DHCP servers and does not record binding information about MAC addresses of DHCP clients and the obtained IP addresses.

By default, DHCP snooping is disabled.

Related commands: display dhcp-snooping.

Examples

# Enable DHCP snooping.

[Sysname] dhcp-snooping

4.1.2  dhcp-snooping information enable

Syntax

dhcp-snooping information enable

undo dhcp-snooping information enable

View

Ethernet port view

Parameters

None

Description

Use the dhcp-snooping information enable command to configure DHCP Snooping to support Option 82.

Use the undo dhcp-snooping information enable command to disable this function.

By default, DHCP Snooping does not support Option 82.

Examples

# Configure DHCP Snooping to support Option 82.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

4.1.3  dhcp-snooping information format

Syntax

dhcp-snooping information format { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }

undo dhcp-snooping information format [ verbose node-identifier ]

View

Ethernet port view

Parameters

normal: Specifies the normal padding format.

verbose: Specifies the verbose padding format.

node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier. By default, the node MAC address is used as the node identifier.

l           mac indicates using MAC address as the node identifier.

l           sysname indicates using the device name of a node as the node identifier.

l           user-defined node-identifier indicates using a specified character string as the node identifier, in which node-identifier is a string with 1 to 50 characters.

Description

Use the dhcp-snooping information format command to specify the padding format for Option 82.

Use the undo dhcp-snooping information format command to restore the default padding format.

By default, the padding format for Option 82 is normal.

Note that when you use the undo dhcp-snooping information format command, if the verbose node-identifier argument is not specified, the padding format will be restored to normal; if the verbose node-identifier argument is specified, the padding format will be restored to verbose with MAC address as the node identifier.

Examples

# Specify the padding format as verbose for Option 82.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information strategy replace

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information format verbose

4.1.4  dhcp-snooping information strategy

Syntax

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

undo dhcp-snooping information strategy

View

Ethernet port view

Parameters

drop: Drops the requesting message containing Option 82.

keep: Forwards the requesting message containing Option 82 without changing Option 82.

replace: Forwards the requesting message containing Option 82 after replacing the original Option 82 with the one padded in specified format.

Description

Use the dhcp-snooping information strategy command to configure the handling strategy for Option 82 in requesting messages.

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

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

Examples

# Configure the handling strategy for Option 82 in requesting messages as keep.

<Sysname> system-view

[Sysname] interface gigabitethernet1/0/1

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable

[Sysname-GigabitEthernet1/0/1] dhcp-snooping information strategy keep

4.1.5  dhcp-snooping trust

Syntax

dhcp-snooping trust [ no-user-binding ]

undo dhcp-snooping trust

View

Ethernet port view

Parameters

no-user-binding: Specifies the port not to record the clients’ IP-to-MAC bindings in DHCP requests it receives. The command without this keyword allows the port to record the IP-to-MAC bindings of clients.

Description

Use the dhcp-snooping trust command to set a port as trusted.

Use the undo dhcp-snooping trust command to restore the default state of a port.

All ports are untrusted by default.

Related commands: display dhcp-snooping trust.

Examples

# Specify GigabitEthernet 1/0/1 as a trusted port and allow it to record the IP-to-MAC bindings of clients.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

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

4.1.6  display dhcp-snooping

Syntax

display dhcp-snooping

View

Any view

Parameters

None

Description

Use the display dhcp-snooping command to display the binding information recorded through DHCP snooping.

Related commands: dhcp-snooping.

 

&  Note:

Using the display dhcp-snooping command displays IP-to-MAC bindings that are present both in the DHCP-ACK and DHCP-REQUEST messages.

 

Examples

# Display DHCP snooping address binding information.

<Sysname> display dhcp-snooping

 DHCP Snooping is enabled.

 The client binding table for all untrusted ports.

 Type : D--Dynamic ,  S—-Static

 Type    IP Address  MAC Address        Lease       VLAN    Interface

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

 D     10.1.1.1      00e0-fc00-0006  286          1     GigabitEthernet1/0/1

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

Table 4-1 Description on fields of the display dhcp snooping command

Field

Description

Type

Binding type

IP Address

IP address assigned to the DHCP client

MAC Address

MAC address of the DHCP client

Lease

Lease period of the IP address in seconds

VLAN

VLAN where the port connecting the DHCP client resides

Interface

Port to which the DHCP client is connected

 

4.1.7  display dhcp-snooping trust

Syntax

display dhcp-snooping trust

View

Any view

Parameters

None

Description

Use the display dhcp-snooping trust command to display information about trusted ports.

Related commands: dhcp-snooping trust.

Examples

# Display information about trusted ports.

<Sysname> display dhcp-snooping trust

 DHCP Snooping is enabled.

 DHCP Snooping trust becomes active.

 Interface                                       Trusted

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

 GigabitEthernet1/0/1                          Trusted

The above output shows that DHCP snooping is enabled, DHCP snooping trust is active, and port GigabitEthernet 1/0/1 is trusted

4.1.8  reset dhcp-snooping

Syntax

reset dhcp-snooping { all | ip ip-address }

View

User view

Parameters

all: Clears all DHCP snooping binding information.

ip ip-address: Clears the DHCP snooping binding information of the specified IP address.

Description

Use the reset dhcp-snooping command clear DHCP snooping binding information.

Examples

# Clear all DHCP binding information.

<Sysname> reset dhcp-snooping all

 


Chapter 5  BOOTP Client Configuration Commands

 

&  Note:

l      BOOTP client configuration can only be used on VLAN interfaces.

l      If several VLAN interfaces sharing the same MAC address obtain IP addresses through a BOOTP relay agent, the BOOTP server cannot be a Windows 2000 Server or Windows 2003 Server.

l      You are not recommended to enable both the DHCP client and the DHCP Snooping on the same device. Otherwise, DHCP Snooping entries may fail to be generated, or the BOOTP client may fail to obtain an IP address.

 

5.1  BOOTP Client Configuration Commands

5.1.1  display bootp client

Syntax

display bootp client [ interface interface-type interface-number ]

View

Any view

Parameters

interface interface-type interface-number: Displays the BOOTP client information of the interface.

Description

Use the display bootp client command to display related information about a BOOTP client.

Note:

l           If interface interface-type interface-number is not specified, the command will display information about BOOTP clients on all interfaces.

l           If interface interface-type interface-number is specified, the command will display information about the BOOTP client on the specified interface.

Examples

# Display related information of the BOOTP client on VLAN-interface 1.

<Sysname> display bootp client interface vlan-interface 1

Vlan-interface1 BOOTP client information:

Allocated IP: 169.254.0.2 255.255.0.0

Transaction ID = 0x3d8a7431

Mac Address  00e0-fc0a-c3ef

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

Field

Description

Vlan-interface1 BOOTP client information

Information of the interface serving as a BOOTP client

Allocated IP

BOOTP client’s IP address allocated by the BOOTP server

Transaction ID

Value of the XID field in a BOOTP message, namely, a random number used to match a response message from the BOOTP server while the BOOTP client sends a BOOTP request to the BOOTP server. If the values of the XID field are different in the BOOTP response and request, the BOOTP client will drop the BOOTP response.

Mac Address

MAC address of a BOOTP client

 

5.1.2  ip address bootp-alloc

Syntax

ip address bootp-alloc

undo ip address bootp-alloc

View

Interface view

Parameters

None

Description

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

Use the undo ip address bootp-alloc command to disable the interface from obtaining an IP address through BOOTP.

By default, an interface does not obtain an IP address through BOOTP.

Related commands: display bootp client.

Examples

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

<Sysname> system-view

[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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网