display dhcp-snooping

HP A7500 Switch Series
Layer 3 - IP Services
Command Reference
Part number: 5998-1880
Software version: Release 6626 and later
Document version: 6W101-20111130
Legal and notice information
© Copyright 2011 Hewlett-Packard Development Company, L.P.
No part of this documentation may be reproduced or transmitted in any form or by any means without
prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance, or
use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or omissions contained
herein.
Contents
ARP configuration commands ····································································································································· 1
arp check enable······················································································································································1
arp max-learning-num ··············································································································································1
arp static····································································································································································2
arp timer aging·························································································································································3
display arp ································································································································································4
display arp ip-address ·············································································································································5
display arp timer aging ···········································································································································6
display arp vpn-instance··········································································································································7
mac-address station-move········································································································································7
naturemask-arp enable ············································································································································8
reset arp ····································································································································································8
Gratuitous ARP configuration commands·················································································································10
arp send-gratuitous-arp ········································································································································· 10
gratuitous-arp-sending enable······························································································································ 11
gratuitous-arp-learning enable ····························································································································· 11
Proxy ARP configuration commands·························································································································13
display local-proxy-arp ········································································································································· 13
display proxy-arp ·················································································································································· 13
local-proxy-arp enable ·········································································································································· 14
proxy-arp enable ··················································································································································· 15
IP addressing configuration commands····················································································································16
display ip interface················································································································································ 16
display ip interface brief······································································································································· 18
ip address ······························································································································································ 20
DHCP server configuration commands·····················································································································22
bims-server ····························································································································································· 22
bootfile-name ························································································································································· 22
dhcp enable ··························································································································································· 23
dhcp server apply ip-pool····································································································································· 24
dhcp select server global-pool ····························································································································· 24
dhcp server client-detect enable ·························································································································· 25
dhcp server detect ················································································································································· 26
dhcp server forbidden-ip ······································································································································ 26
dhcp server ip-pool ··············································································································································· 27
dhcp server ping packets ····································································································································· 28
dhcp server ping timeout ······································································································································ 29
dhcp server relay information enable ················································································································· 29
dhcp server threshold············································································································································ 30
display dhcp server conflict·································································································································· 31
display dhcp server expired································································································································· 32
display dhcp server free-ip ··································································································································· 33
display dhcp server forbidden-ip ························································································································· 33
display dhcp server ip-in-use ································································································································ 34
display dhcp server statistics································································································································ 36
display dhcp server tree ······································································································································· 37
dns-list ····································································································································································· 39
i
domain-name ························································································································································· 40
expired ··································································································································································· 40
forbidden-ip···························································································································································· 41
gateway-list ···························································································································································· 42
nbns-list ··································································································································································· 42
netbios-type ···························································································································································· 43
network··································································································································································· 44
network ip range ··················································································································································· 45
network mask ························································································································································· 45
next-server ······························································································································································ 46
option······································································································································································ 47
reset dhcp server conflict ······································································································································ 48
reset dhcp server ip-in-use ···································································································································· 48
reset dhcp server statistics ···································································································································· 49
static-bind client-identifier ····································································································································· 49
static-bind ip-address ············································································································································ 50
static-bind mac-address········································································································································· 51
tftp-server domain-name········································································································································ 51
tftp-server ip-address ············································································································································· 52
vendor-class-identifier············································································································································ 53
voice-config ···························································································································································· 54
DHCP relay agent configuration commands············································································································55
dhcp relay address-check enable ························································································································ 55
dhcp relay check mac-address ···························································································································· 56
dhcp relay client-detect enable ···························································································································· 56
dhcp relay information circuit-id format-type······································································································ 57
dhcp relay information circuit-id string················································································································ 58
dhcp relay information enable····························································································································· 58
dhcp relay information format ····························································································································· 59
dhcp relay information remote-id format-type ···································································································· 60
dhcp relay information remote-id string ·············································································································· 60
dhcp relay information strategy··························································································································· 61
dhcp relay release ip ············································································································································ 62
dhcp relay security static ······································································································································ 62
dhcp relay security refresh enable ······················································································································ 63
dhcp relay security tracker ··································································································································· 64
dhcp relay server-detect········································································································································ 65
dhcp relay server-group········································································································································ 65
dhcp relay server-select ········································································································································ 66
dhcp select relay ··················································································································································· 67
display dhcp relay················································································································································· 67
display dhcp relay information ···························································································································· 68
display dhcp relay security··································································································································· 70
display dhcp relay security statistics ··················································································································· 71
display dhcp relay security tracker······················································································································ 71
display dhcp relay server-group ·························································································································· 72
display dhcp relay statistics·································································································································· 73
reset dhcp relay statistics ······································································································································ 75
DHCP client configuration commands ······················································································································76
display dhcp client ················································································································································ 76
ip address dhcp-alloc············································································································································ 78
DHCP snooping configuration commands ···············································································································80
dhcp-snooping ······················································································································································· 80
ii
dhcp-snooping binding database filename ········································································································ 80
dhcp-snooping binding database update interval ····························································································· 81
dhcp-snooping binding database update now ·································································································· 82
dhcp-snooping check mac-address······················································································································ 82
dhcp-snooping check request-message ··············································································································· 83
dhcp-snooping information circuit-id format-type······························································································· 84
dhcp-snooping information circuit-id string········································································································· 84
dhcp-snooping information enable······················································································································ 85
dhcp-snooping information format ······················································································································ 86
dhcp-snooping information remote-id format-type ····························································································· 87
dhcp-snooping information remote-id string ······································································································· 87
dhcp-snooping information strategy ···················································································································· 88
dhcp-snooping rate-limit········································································································································ 89
dhcp-snooping trust ··············································································································································· 90
display dhcp-snooping·········································································································································· 91
display dhcp-snooping binding database ·········································································································· 92
display dhcp-snooping information ····················································································································· 93
display dhcp-snooping packet statistics ·············································································································· 94
display dhcp-snooping trust·································································································································· 95
reset dhcp-snooping ·············································································································································· 96
reset dhcp-snooping packet statistics ·················································································································· 96
IPv4 DNS configuration commands··························································································································98
display dns domain··············································································································································· 98
display dns host····················································································································································· 99
display dns server················································································································································100
display ip host ·····················································································································································101
dns domain ··························································································································································102
dns resolve ···························································································································································103
dns server ·····························································································································································103
ip host ···································································································································································104
reset dns host ·······················································································································································105
IP performance optimization configuration commands························································································ 106
display fib ····························································································································································106
display fib ip-address··········································································································································108
display icmp statistics··········································································································································109
display ip socket··················································································································································111
display ip statistics ··············································································································································114
display tcp statistics·············································································································································116
display udp statistics ···········································································································································118
ip forward-broadcast (interface view) ···············································································································119
ip forward-broadcast (system view)···················································································································120
ip icmp-extensions ···············································································································································120
ip redirects enable ··············································································································································121
ip ttl-expires enable ·············································································································································121
ip unreachables enable ······································································································································122
reset ip statistics···················································································································································122
reset tcp statistics ·················································································································································123
reset udp statistics················································································································································123
tcp path-mtu-discovery·········································································································································124
tcp timer fin-timeout ·············································································································································124
tcp timer syn-timeout············································································································································125
tcp window ··························································································································································126
iii
UDP Helper configuration commands ··················································································································· 127
display udp-helper server ···································································································································127
reset udp-helper packet·······································································································································127
udp-helper enable ···············································································································································128
udp-helper port ····················································································································································128
udp-helper server ·················································································································································129
IPv6 basics configuration commands ···················································································································· 131
display ipv6 fib····················································································································································131
display ipv6 fib ipv6-address·····························································································································132
display ipv6 interface ·········································································································································134
display ipv6 neighbors ·······································································································································138
display ipv6 neighbors count·····························································································································140
display ipv6 neighbors vpn-instance·················································································································141
display ipv6 pathmtu ··········································································································································142
display ipv6 socket ·············································································································································143
display ipv6 statistics ··········································································································································145
display tcp ipv6 statistics ····································································································································149
display tcp ipv6 status ········································································································································152
display udp ipv6 statistics ··································································································································153
ipv6·······································································································································································154
ipv6 address ························································································································································155
ipv6 address anycast ··········································································································································155
ipv6 address auto················································································································································156
ipv6 address auto link-local ·······························································································································157
ipv6 address eui-64 ············································································································································157
ipv6 address link-local ········································································································································158
ipv6 hoplimit-expires enable ······························································································································159
ipv6 icmp-error ····················································································································································159
ipv6 icmpv6 multicast-echo-reply enable ··········································································································160
ipv6 nd autoconfig managed-address-flag·······································································································161
ipv6 nd autoconfig other-flag·····························································································································161
ipv6 nd dad attempts··········································································································································162
ipv6 nd hop-limit··················································································································································162
ipv6 nd ns retrans-timer ······································································································································163
ipv6 nd nud reachable-time ·······························································································································164
ipv6 nd ra halt ·····················································································································································164
ipv6 nd ra interval···············································································································································165
ipv6 nd ra no-advlinkmtu····································································································································166
ipv6 nd ra prefix ·················································································································································166
ipv6 nd ra router-lifetime ····································································································································167
ipv6 neighbor ······················································································································································168
ipv6 neighbor stale-aging ··································································································································169
ipv6 neighbors max-learning-num ·····················································································································169
ipv6 pathmtu ························································································································································170
ipv6 pathmtu age ················································································································································170
ipv6 prefer temporary-address···························································································································171
ipv6 unreachables enable··································································································································172
reset ipv6 neighbors ···········································································································································172
reset ipv6 pathmtu···············································································································································173
reset ipv6 statistics···············································································································································174
reset tcp ipv6 statistics ········································································································································174
reset udp ipv6 statistics·······································································································································175
tcp ipv6 timer fin-timeout ····································································································································175
tcp ipv6 timer syn-timeout ···································································································································176
iv
tcp ipv6 window··················································································································································176
DHCPv6 configuration commands························································································································· 177
DHCPv6 common configuration commands ·············································································································177
display ipv6 dhcp duid·······································································································································177
DHCPv6 relay agent configuration commands ········································································································177
display ipv6 dhcp relay server-address ············································································································177
display ipv6 dhcp relay statistics·······················································································································178
ipv6 dhcp relay server-address··························································································································180
reset ipv6 dhcp relay statistics ···························································································································181
DHCPv6 client configuration commands ···················································································································182
display ipv6 dhcp client ·····································································································································182
display ipv6 dhcp client statistics ······················································································································183
reset ipv6 dhcp client statistics···························································································································184
IPv6 DNS configuration commands······················································································································· 186
display dns ipv6 server·······································································································································186
display ipv6 host ·················································································································································187
dns server ipv6 ····················································································································································188
ipv6 host·······························································································································································188
Tunneling configuration commands ······················································································································· 189
default···································································································································································189
description····························································································································································190
destination····························································································································································190
display interface tunnel·······································································································································191
display ipv6 interface tunnel ······························································································································194
encapsulation-limit ···············································································································································198
interface tunnel ····················································································································································198
mtu ········································································································································································199
reset counters interface ·······································································································································200
service-loopback-group ·······································································································································200
shutdown ······························································································································································201
source ···································································································································································202
tunnel bandwidth·················································································································································203
tunnel discard ipv4-compatible-packet··············································································································203
tunnel-protocol ·····················································································································································204
Index ········································································································································································ 206
v
ARP configuration commands
arp check enable
Syntax
arp check enable
undo arp check enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the arp check enable command to enable dynamic ARP entry check.
Use the undo arp check enable command to disable dynamic ARP entry check.
By default, dynamic ARP entry check is enabled.
Examples
# Enable dynamic ARP entry check.
<Sysname> system-view
[Sysname] arp check enable
arp max-learning-num
Syntax
arp max-learning-num number
undo arp max-learning-num
View
Layer 2 Ethernet port view, Layer 3 Ethernet port view, Layer 3 Ethernet subinterface view, VLAN interface
view, Layer 2 aggregate interface view, Layer 3 aggregate interface view, Layer 3 aggregate
subinterface view
Default level
2: System level
Parameters
number: Specifies the maximum number of dynamic ARP entries that an interface can learn, in the range
of 0 to 8192.
1
Description
Use the arp max-learning-num command to configure the maximum number of dynamic ARP entries that
an interface can learn.
Use the undo arp max-learning-num command to restore the default.
By default, a Layer 2 interface does not limit the number of dynamic ARP entries. The maximum number
of dynamic ARP entries that a Layer 3 interface can learn is 8192.
When the number argument is set to 0, the interface is disabled from learning dynamic ARP entries.
Examples
# Specify VLAN-interface 40 to learn up to 500 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface vlan-interface 40
[Sysname-Vlan-interface40] arp max-learning-num 500
# Specify GigabitEthernet 1/0/1 to learn up to 1000 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] arp max-learning-num 1000
# Specify Layer 2 aggregate interface bridge-aggregation 1 to learn up to 1000 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] arp max-learning-num 1000
# Specify Layer 3 aggregate interface route-aggregation 1 to learn up to 1000 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface route-aggregation 1
[Sysname-Route-Aggregation1] arp max-learning-num 1000
arp static
Syntax
arp static ip-address mac-address [ vlan-id interface-type interface-number ] [ vpn-instance
vpn-instance-name ]
undo arp ip-address [ vpn-instance-name ]
View
System view
Default level
2: System level
Parameters
ip-address: Specifies the IP address in an ARP entry.
mac-address: Specifies the MAC address in an ARP entry, in the format H-H-H.
vlan-id: Specifies the ID of a VLAN to which a static ARP entry belongs, in the range of 1 to 4094.
interface-type interface-number: Specifies the interface type and interface number.
2
vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN for a static ARP entry. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. Without this option, the static
ARP entry belongs to the public network.
Description
Use the arp static command to configure a static ARP entry in the ARP mapping table.
Use the undo arp command to remove an ARP entry.
A static ARP entry is effective when the device works normally. However, when the VLAN or VLAN
interface to which an ARP entry corresponds is deleted, the entry, if long, will be deleted, and if short and
resolved, will become unresolved.
The vlan-id argument specifies the VLAN corresponding to an ARP entry and must be the ID of an existing
VLAN. In addition, the Ethernet interface following the argument must belong to that VLAN. The VLAN
interface of the VLAN must have been created.
If both the vlan-id and ip-address arguments are specified, the IP address of the VLAN interface
corresponding to the vlan-id argument must be in the same network segment as the IP address specified
by the ip-address argument.
Related commands: reset arp and display arp.
Examples
# Configure a static ARP entry, with IP address 202.38.10.2, MAC address 00e0-fc01-0000, and
outbound interface GigabitEthernet 1/0/1 of VLAN 10.
<Sysname> system-view
[Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 GigabitEthernet 1/0/1
arp timer aging
Syntax
arp timer aging aging-time
undo arp timer aging
View
System view
Default level
2: System level
Parameters
aging-time: Specifies the age timer for dynamic ARP entries in minutes, ranging from 1 to 1440.
Description
Use the arp timer aging command to set the age timer for dynamic ARP entries.
Use the undo arp timer aging command to restore the default.
By default, the age timer for dynamic ARP entries is 20 minutes.
Related commands: display arp timer aging.
Examples
# Set the age timer for dynamic ARP entries to 10 minutes.
<Sysname> system-view
3
[Sysname] arp timer aging 10
display arp
Syntax
In standalone mode:
display arp [ [ all | dynamic | static ] [ slot slot-number ] | vlan vlan-id | interface interface-type
interface-number ] [ count | verbose ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display arp [ [ all | dynamic | static ] [ chassis chassis-number slot slot-number ] | vlan vlan-id |
interface interface-type interface-number ] [ count | verbose ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays all ARP entries.
dynamic: Displays dynamic ARP entries.
static: Displays static ARP entries.
slot slot-number: Displays the ARP entries for the interface card specified by the slot number. (In
standalone mode)
chassis chassis-number slot slot-number: Displays the ARP entries of a card on an IRF member switch. The
chassis-number argument specifies the ID of the IRF member switch. The slot-number argument refers to
the number of the slot where the card resides. (In IRF mode)
vlan vlan-id: Displays the ARP entries of the specified VLAN. The VLAN ID ranges from 1 to 4094.
interface interface-type interface-number: Displays the ARP entries of the interface specified by the
argument interface-type interface-number.
count: Displays the number of ARP entries.
verbose: Displays detailed information about ARP entries.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression..
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display arp command to display ARP entries in the ARP mapping table.
If no parameter is specified, all ARP entries are displayed.
4
Related commands: arp static and reset arp.
Examples
# Display the information of all ARP entries.
<Sysname> display arp all
Type: S-Static
D-Dynamic
IP Address
MAC Address
VLAN ID
Interface
192.168.0.235
00e0-fc02-2181
N/A
GE1/0/1
20
Aging Type
D
192.168.0.74
0023-895f-9550
N/A
GE1/0/1
5
D
192.168.0.2
000d-88f7-b090
N/A
GE1/0/1
17
D
192.168.0.5
00e0-4c3d-35d7
N/A
GE1/0/1
15
D
Table 1 Output description
Field
Description
IP Address
IP address in an ARP entry
MAC Address
MAC address in an ARP entry
VLAN ID
ID of the VLAN that the ARP entry belongs to
Interface
Outbound interface in an ARP entry
Aging
Aging time for a dynamic ARP entry in minutes ("DIS" or “N/A” means unknown
aging time or no aging time)
ARP entry type:
• D for dynamic
• S for static
Type
# Display the number of all ARP entries.
<Sysname> display arp all count
Total Entry(ies):
4
display arp ip-address
Syntax
In standalone mode:
display arp ip-address [ slot slot-number ] [ verbose ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display arp ip-address [ chassis chassis-number slot slot-number ] [ verbose ] [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ip-address: Displays the ARP entry for the specified IP address.
5
slot slot-number: Displays the ARP entries for the interface card specified by the slot number. (In
standalone mode)
chassis chassis-number slot slot-number: Displays the ARP entries of a card on an IRF member switch. The
chassis-number argument refers to the ID of the IRF member switch. The slot-number argument refers to the
number of the slot where the card resides. (In IRF mode)
verbose: Displays the detailed information about ARP entries.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display arp ip-address command to display the ARP entry for a specified IP address.
Related commands: arp static and reset arp.
Examples
# Display the corresponding ARP entry for the IP address 20.1.1.1.
<Sysname> display arp 20.1.1.1
Type: S-Static
D-Dynamic
IP Address
MAC Address
VLAN ID
Interface
Aging Type
20.1.1.1
00e0-fc00-0001
N/A
N/A
N/A
S
display arp timer aging
Syntax
display arp timer aging [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display arp timer aging command to display the age timer for dynamic ARP entries.
Related commands: arp timer aging.
6
Examples
# Display the age timer for dynamic ARP entries.
<Sysname> display arp timer aging
Current ARP aging time is 10 minute(s)
display arp vpn-instance
Syntax
display arp vpn-instance vpn-instance-name [ count ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance-name: Specifies the name of a MPLS L3 VPN, a case-sensitive string of 1 to 31 characters.
count: Displays the number of ARP entries.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display arp vpn-instance command to display the ARP entries for a specified VPN.
Related commands: arp static and reset arp.
Examples
# Display ARP entries for the VPN instance named test.
<Sysname> display arp vpn-instance test
Type: S-Static
D-Dynamic
IP Address
MAC Address
VLAN ID
Interface
Aging Type
20.1.1.1
00e0-fc00-0001
N/A
N/A
N/A
mac-address station-move
Syntax
mac-address station-move quick-notify enable
undo mac-address station-move quick-notify enable
View
System view
7
S
Default level
2: System level
Parameters
None
Description
Use the mac-address station-move quick-notify enable command to enable ARP quick update.
Use the undo mac-address station-move quick-notify enable command to restore the default.
By default, ARP quick update is disabled.
Example
# Enable ARP quick update.
<Sysname> system-view
[Sysname] mac-address station-move quick-notify enable
naturemask-arp enable
Syntax
naturemask-arp enable
undo naturemask-arp enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the naturemask-arp enable command to enable natural mask support for ARP requests.
Use the undo naturemask-arp enable command to restore the default.
By default, natural mask support for ARP requests is disabled.
Examples
# Enable natural mask support for ARP requests.
<Sysname> system-view
[Sysname] naturemask-arp enable
reset arp
Syntax
In standalone mode:
reset arp { all | dynamic | static | slot slot-number | interface interface-type interface-number }
In IRF mode:
8
reset arp { all | dynamic | static | chassis chassis-number slot slot-number | interface interface-type
interface-number }
View
User view
Default level
2: System level
Parameters
all: Clears all ARP entries.
dynamic: Clears all dynamic ARP entries.
static: Clears all static ARP entries.
slot slot-number: Clears the ARP entries for the interface card specified by the slot number. (In standalone
mode)
chassis chassis-number slot slot-number: Clears the ARP entries of a card on an IRF member switch. The
chassis-number argument refers to the ID of the IRF member switch. The slot-number argument specifies
the number of the slot where the card resides. (In IRF mode)
interface interface-type interface-number: Clears the ARP entries for the interface specified by the
argument interface-type interface-number.
Description
Use the reset arp command to clear ARP entries from the ARP mapping table.
With interface interface-type interface-number or slot slot-number specified, the command clears only
dynamic ARP entries of the interface or the interface card.
Related commands: arp static and display arp.
Examples
# Clear all static ARP entries.
<Sysname> reset arp static
9
Gratuitous ARP configuration commands
arp send-gratuitous-arp
Syntax
arp send-gratuitous-arp [ interval milliseconds ]
undo arp send-gratuitous-arp
View
Layer 3 Ethernet port view, Layer 3 Ethernet subinterface view, Layer 3 aggregate interface view, Layer
3 aggregate subinterface view, VLAN interface view
Default level
2: System level
Parameters
interval milliseconds: Sets the interval at which gratuitous ARP packets are sent, in the range of 200 to
200,000 milliseconds. The default value is 2000.
Description
Use the arp send-gratuitous-arp command to enable periodic sending of gratuitous ARP packets and set
the sending interval for the interface.
Use the undo arp send-gratuitous-arp command to disable the interface from periodically sending
gratuitous ARP packets.
By default, an interface is disabled from sending gratuitous ARP packets periodically.
This function takes effect only when the link of the enabled interface goes up and an IP address has been
assigned to the interface.
The IP address contained in a gratuitous ARP request can be the VRRP virtual IP address, the primary IP
address or a manually configured secondary IP address of the sending interface only. The primary IP
address can be configured manually or automatically, whereas the secondary IP address must be
configured manually.
If you change the interval for sending gratuitous ARP packets, the configuration is effective at the next
sending interval.
The frequency of sending gratuitous ARP packets may be much lower than is expected if this function is
enabled on multiple interfaces, or each interface is configured with multiple secondary IP addresses, or
a small sending interval is configured in the preceding cases.
Examples
# Enable VLAN-interface 2 to send gratuitous ARP packets every 300 milliseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] arp send-gratuitous-arp interval 300
10
gratuitous-arp-sending enable
Syntax
gratuitous-arp-sending enable
undo gratuitous-arp-sending enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the gratuitous-arp-sending enable command to enable a device to send gratuitous ARP packets
when receiving ARP requests from another network segment.
Use the undo gratuitous-arp-sending enable command to restore the default.
By default, a device cannot send gratuitous ARP packets when receiving ARP requests from another
network segment.
Examples
# Disable a device from sending gratuitous ARP packets.
<Sysname> system-view
[Sysname] undo gratuitous-arp-sending enable
gratuitous-arp-learning enable
Syntax
gratuitous-arp-learning enable
undo gratuitous-arp-learning enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the gratuitous-arp-learning enable command to enable the gratuitous ARP packet learning function.
Use the undo gratuitous-arp-learning enable command to disable the function.
By default, the function is enabled.
With this function enabled, a device receiving a gratuitous ARP packet can add the source IP and MAC
addresses to its own dynamic ARP table if it finds that no ARP entry exists in the cache corresponding to
11
the source IP address of the ARP packet. If a matching ARP entry is found in the cache, the device updates
the ARP entry regardless of whether this function is enabled.
Examples
# Enable the gratuitous ARP packet learning function.
<Sysname> system-view
[Sysname] gratuitous-arp-learning enable
12
Proxy ARP configuration commands
display local-proxy-arp
Syntax
display local-proxy-arp [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
2: System level
Parameters
interface interface-type interface-number: Displays the local proxy ARP status of the interface specified
by the argument interface-type interface-number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display local-proxy-arp command to display the status of the local proxy ARP.
If no interface is specified, the local proxy ARP status of all interfaces is displayed.
Related commands: local-proxy-arp enable.
Examples
# Display the status of the local proxy ARP on VLAN-interface 2.
<Sysname> display local-proxy-arp interface vlan-interface 2
Interface Vlan-interface2
Local Proxy ARP status: enabled
display proxy-arp
Syntax
display proxy-arp [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
13
Default level
2: System level
Parameters
interface interface-type interface-number: Displays the proxy ARP status of the interface specified by the
argument interface-type interface-number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display proxy-arp command to display the proxy ARP status.
If an interface is specified, the proxy ARP status of the specified interface is displayed; if no interface is
specified, the proxy ARP status of all interfaces is displayed.
Related commands: proxy-arp enable.
Examples
# Display the proxy ARP status on VLAN-interface 1.
<Sysname> display proxy-arp interface Vlan-interface 1
Interface Vlan-interface 1
Proxy ARP status: disabled
local-proxy-arp enable
Syntax
local-proxy-arp enable [ ip-range startIP to endIP ]
undo local-proxy-arp enable
View
VLAN interface view, Layer 3 Ethernet port view, Layer 3 Ethernet subinterface view, Layer 3 aggregate
interface view, Layer 3 aggregate subinterface view
Default level
2: System level
Parameters
ip-range startIP to endIP: Specifies the IP address range for which local proxy ARP is enabled. The start
IP address must be lower than or equal to the end IP address.
Description
Use the local-proxy-arp enable command to enable local proxy ARP.
Use the undo local-proxy-arp enable command to disable local proxy ARP.
By default, local proxy ARP is disabled.
Only one IP address range can be specified by using the ip-range keyword on an interface.
14
Related commands: display local-proxy-arp.
Examples
# Enable local proxy ARP on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] local-proxy-arp enable
# Enable local proxy ARP on VLAN-interface 2 for a specific IP address range.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] local-proxy-arp enable ip-range 1.1.1.1 to 1.1.1.20
proxy-arp enable
Syntax
proxy-arp enable
undo proxy-arp enable
View
VLAN interface view, Layer 3 Ethernet port view, Layer 3 Ethernet subinterface view, Layer 3 aggregate
interface view, Layer 3 aggregate subinterface view
Default level
2: System level
Parameters
None
Description
Use the proxy-arp enable command to enable proxy ARP.
Use the undo proxy-arp enable command to disable proxy ARP.
By default, proxy ARP is disabled.
Related commands: display proxy-arp.
Examples
# Enable proxy ARP on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] proxy-arp enable
15
IP addressing configuration commands
display ip interface
Syntax
display ip interface [ interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ip interface command to display IP configuration information for a specified Layer 3
interface or all Layer 3 interfaces.
Examples
# Display IP configuration information for interface VLAN-interface 1.
<Sysname> display ip interface vlan-interface 1
Vlan-interface1 current state :DOWN
Line protocol current state :DOWN
Internet Address is 1.1.1.1/8 Primary
Broadcast address : 1.255.255.255
The Maximum Transmit Unit : 1500 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
ARP packet input number:
0
Request packet:
0
Reply packet:
0
Unknown packet:
0
TTL invalid packet number:
0
ICMP packet input number:
0
Echo reply:
0
Unreachable:
0
16
Source quench:
0
Routing redirect:
0
Echo request:
0
Router advert:
0
Router solicit:
0
Time exceed:
0
IP header bad:
0
Timestamp request:
0
Timestamp reply:
0
Information request:
0
Information reply:
0
Netmask request:
0
Netmask reply:
0
Unknown type:
0
Table 2 Output description
Field
Description
Current physical state of the interface:
• Administrative DOWN—The interface is shut down with the
shutdown command.
current state
• DOWN—Indicates that the interface is administratively up but its
physical state is down, which may be caused by a connection or
link failure.
• UP—Indicates that both the administrative and physical states of the
interface are up.
Current state of the link layer protocol, which can be
Line protocol current state
• DOWN—Indicates that the protocol state of the interface is down.
• UP—Indicates that the protocol state of the interface is up.
• UP (spoofing)—Indicates that the protocol state of the interface
pretends to be up; however, no corresponding link is present, or the
corresponding link is not present permanently but is established as
needed.
IP address of an interface:
Internet Address
• Primary—Identifies a primary IP address.
• Sub—Identifies a secondary IP address.
• acquired via DHCP—Identifies an IP address obtained through
DHCP.
• Mad—Identifies a MAD IP address.
Broadcast address
Broadcast address of the subnet attached to an interface
The Maximum Transmit Unit
Maximum transmission units on the interface, in bytes
input packets, bytes, multicasts
Unicast packets, bytes, and multicast packets received on an interface
(the statistics start at the device startup)
output packets, bytes, multicasts
ARP packet input number:
Request packet:
Reply packet:
Unknown packet:
Total number of ARP packets received on the interface (the statistics
start at the device startup), including
• ARP request packets
• ARP reply packets
• Unknown packets
17
Field
Description
TTL invalid packet number
Number of TTL-invalid packets received on the interface (the statistics
start at the device startup)
ICMP packet input number:
Echo reply:
Unreachable:
Source quench:
Routing redirect:
Echo request:
Router advert:
Router solicit:
Time exceed:
IP header bad:
Timestamp request:
Timestamp reply:
Information request:
Information reply:
Netmask request:
Netmask reply:
Unknown type:
Total number of ICMP packets received on the interface (the statistics
start at the device startup), including:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Echo reply packets
Unreachable packets
Source quench packets
Routing redirect packets
Echo request packets
Router advertisement packets
Router solicitation packets
Time exceeded packets
IP header bad packets
Timestamp request packets
Timestamp reply packets
Information request packets
Information reply packets
Netmask request packets
Netmask reply packets
Unknown type packets
display ip interface brief
Syntax
display ip interface [ interface-type [ interface-number ] ] brief [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type: Specifies an interface by its type.
interface-number: Specifies an interface by its number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
18
Description
Use the display ip interface brief command to display brief IP configuration information for a specified
Layer 3 interface or all Layer 3 interfaces.
•
Without the interface type and interface number specified, the brief IP configuration information for
all Layer 3 interfaces is displayed.
•
With only the interface type specified, the brief IP configuration information for all Layer 3
interfaces of the specified type is displayed.
•
With both the interface type and interface number specified, only the brief IP configuration
information for the specified interface is displayed.
Related commands: display ip interface.
Examples
# Display brief IP configuration information for VLAN interfaces.
<Sysname> display ip interface vlan-interface brief
*down: administratively down
(s): spoofing
Interface
Physical Protocol IP Address
Description
Vlan1
up
up
6.6.6.6
Vlan-inte...
Vlan2
up
up
7.7.7.7
Vlan-inte...
Table 3 Output description
Field
Description
*down: administratively
down
The interface is administratively shut down with the shutdown command.
(s) : spoofing
Spoofing attribute of the interface. It indicates that an interface may have no link
present even when its link layer protocol is displayed up or the link is set up only
on demand.
Interface
Interface name
Physical state of the interface:
• *down—Indicates that the interface is administratively down; that is, the
interface is shut down with the shutdown command.
Physical
• down—Indicates that the interface is administratively up but its physical state
is down.
• up—Indicates that both the administrative and physical states of the interface
are up.
Link layer protocol state of the interface, which can be
Protocol
• down—Indicates that the protocol state of the interface is down.
• up—Indicates that the protocol state of the interface is up.
• up(s)—Indicates that the protocol state of the interface is up (spoofing).
IP Address
IP address of the interface (If no IP address is configured, “unassigned” is
displayed.)
Description
Interface description information, for which up to 12 characters can be
displayed. If there are more than 12 characters, only the first nine characters
are displayed.
19
ip address
Syntax
ip address ip-address { mask-length | mask } [ sub ]
undo ip address [ ip-address { mask-length | mask } [ sub ] ]
View
Interface view
Default level
2: System level
Parameters
ip-address: Specifies the IP address of an interface, in dotted decimal notation.
mask-length: Specifies the subnet mask length, the number of consecutive ones in the mask.
mask: Specifies the subnet mask in dotted decimal notation.
sub: Specifies the secondary IP address for the interface.
Description
Use the ip address command to assign an IP address and mask to the interface.
Use the undo ip address command to remove all IP addresses from the interface.
Use the undo ip address ip-address { mask | mask-length } command to remove the primary IP address.
Use the undo ip address ip-address { mask | mask-length } sub command to remove a secondary IP
address.
By default, no IP address is assigned to any interface.
When assigning IP addresses to an interface, consider the following:
•
You can assign only one primary IP address to an interface.
•
The primary and secondary IP addresses can be located in the same network segment.
•
Before removing the primary IP address, remove all secondary IP addresses.
•
You cannot assign a secondary IP address to the interface that is configured to obtain one through
DHCP.
Related commands: display ip interface.
Examples
# Assign VLAN-interface 1 a primary IP address 129.12.0.1 and a secondary IP address 202.38.160.1,
with subnet masks being 255.255.255.0.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 129.12.0.1 255.255.255.0
[Sysname-Vlan-interface1] ip address 202.38.160.1 255.255.255.0 sub
# Assign Layer 3 Ethernet port GigabitEthernet 2/0/5 a primary IP address 129.12.0.1 and a secondary
IP address 202.38.160.1, with subnet masks being 255.255.255.0.
<Sysname> system-view
[Sysname]interface GigabitEthernet 2/0/5
[Sysname–GigabitEthernet2/0/5]port link-mode route
20
[Sysname–GigabitEthernet2/0/5]ip address 129.12.0.1 255.255.255.0
[Sysname–GigabitEthernet2/0/5]ip address 202.38.160.1 255.255.255.0 sub
21
DHCP server configuration commands
bims-server
Syntax
bims-server ip ip-address [ port port-number ] sharekey key
undo bims-server
View
DHCP address pool view
Default level
2: System level
Parameters
ip ip-address: Specifies an IP address for the BIMS server.
port port-number: Specifies a port number for the BIMS server, in the range of 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 the specified BIMS server information.
By default, no BIMS server information is specified.
If you execute the bims-server command repeatedly, the latest configuration overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
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
bootfile-name
Syntax
bootfile-name bootfile-name
undo bootfile-name
View
DHCP address pool view
22
Default level
2: System level
Parameters
bootfile-name: Specifies the 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.
By default, no bootfile name is specified.
If you execute the bootfile-name command repeatedly, the latest configuration overwrites the previous
one.
Related commands: dhcp server ip-pool and display dhcp server tree.
Examples
# Specify the bootfile name aaa.cfg in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] bootfile-name aaa.cfg
dhcp enable
Syntax
dhcp enable
undo dhcp enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the dhcp enable command to enable DHCP.
Use the undo dhcp enable command to disable DHCP.
By default, DHCP is disabled.
NOTE:
You need to enable DHCP before performing DHCP server and relay agent configurations.
Examples
# Enable DHCP.
<Sysname> system-view
[Sysname] dhcp enable
23
dhcp server apply ip-pool
Syntax
dhcp server apply ip-pool pool-name
undo dhcp server apply ip-pool [ pool-name ]
View
Interface view
Default level
2: System level
Parameters
pool-name: DHCP address pool name, a case-insensitive string in the range of 1 to 35 characters.
Description
Use the dhcp server apply ip-pool command to apply an extended address pool on an interface.
Use the undo dhcp server apply ip-pool command to remove the configuration.
By default, no extended address pool is applied on an interface, and the server assigns an IP address
from a common address pool to a client when the client's request arrives at the interface.
•
If you execute the dhcp server apply ip-pool command on an interface, when a client's request
arrives at the interface, the server attempts to assign the client the statically bound IP address first
and then an IP address from this extended address pool.
•
Only an extended address pool can be applied on an interface. The address pool to be referenced
must already exist.
Related commands: dhcp server ip-pool.
Examples
# Apply extended DHCP address pool 0 on VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp server apply ip-pool 0
dhcp select server global-pool
Syntax
dhcp select server global-pool [ subaddress ]
undo dhcp select server global-pool [ subaddress ]
View
Interface view
Default level
2: System level
Parameters
subaddress: Supports secondary address allocation. When the DHCP server and client are on the same
network segment, the server preferably assigns an IP address from an address pool that resides on the
same subnet as the primary IP address of the server interface (connecting to the client). If the address
24
pool contains no assignable IP address, the server assigns an IP address from an address pool that
resides on the same subnet as the secondary IP addresses of the server interface. If the interface has
multiple secondary IP addresses, each address pool is tried in turn for address allocation. Without the
keyword subaddress specified, the DHCP server can only assign an IP address from the address pool that
resides on the same subnet as the primary IP address of the server interface.
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 from a client, the DHCP server will allocate an IP address
from the address pool.
Use the undo dhcp select server global-pool command to remove the configuration. Upon receiving a
DHCP request from a client, the interface will neither assign an IP address to the client, nor serve as a
DHCP relay agent to forward the request.
Use the undo dhcp select server global-pool subaddress command to disable the support for secondary
address allocation.
By default, the DHCP server is enabled on an interface.
Examples
# Enable the DHCP server on VLAN-interface 1 to assign IP addresses from the address pool that resides
on the same subnet as the primary IP address of the server interface (connecting to the client) for the
client.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp select server global-pool
dhcp server client-detect enable
Syntax
dhcp server client-detect enable
undo dhcp server client-detect enable
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp server client-detect enable command to enable client off-line detection on the DHCP server.
Use the undo dhcp server client-detect enable command to disable the function.
By default, the function is disabled.
With this feature enabled, the DHCP server considers a DHCP client goes offline when the ARP entry for
the client ages out. In addition, it removes the client’s IP-to-MAC binding entry.
25
Examples
# Enable client off-line detection on the DHCP server.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp server client-detect enable
dhcp server detect
Syntax
dhcp server detect
undo dhcp server detect
View
System view
Default level
2: System level
Parameters
None
Description
Use the dhcp server detect command to enable unauthorized DHCP server detection.
Use the undo dhcp server detect command to disable the function.
By default, the function is disabled.
With this function enabled, upon receiving a DHCP request, the DHCP server resolves from the request
the IP addresses of DHCP servers which ever offered IP addresses to the DHCP client and the receiving
interface. Each server detected is recorded only once. The administrator can use this information to check
for unauthorized DHCP servers.
Examples
# Enable unauthorized DHCP server detection.
<Sysname> system-view
[Sysname] dhcp server detect
dhcp server forbidden-ip
Syntax
dhcp server forbidden-ip low-ip-address [ high-ip-address ]
undo dhcp server forbidden-ip low-ip-address [ high-ip-address ]
View
System view
Default level
2: System level
26
Parameters
low-ip-address: Specifies the start IP address of the IP address range to be excluded from dynamic
allocation.
high-ip-address: Specifies the 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.
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.
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 the same address range in the undo dhcp server forbidden-ip command instead of specifying
one IP address.
Using the dhcp server forbidden-ip command repeatedly can exclude multiple IP address ranges from
allocation.
Related commands: display dhcp server forbidden-ip, dhcp server ip-pool, network, and 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
dhcp server ip-pool
Syntax
dhcp server ip-pool pool-name [ extended ]
undo dhcp server ip-pool pool-name
View
System view
Default level
2: System level
Parameters
pool-name: Specifies the global address pool name, which is a unique pool identifier, a string of 1 to 35
characters.
extended: Specifies the address pool as an extended address pool. If this keyword is not specified, the
address pool is a common address pool.
27
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 the specified DHCP address pool.
By default, no DHCP address pool is created.
Related commands: dhcp enable and display dhcp server tree.
Examples
# Create the common address pool identified by 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0]
dhcp server ping packets
Syntax
dhcp server ping packets number
undo dhcp server ping packets
View
System view
Default level
2: System level
Parameters
number: Specifies the 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.
To avoid IP address conflicts, the DHCP server checks whether an IP address is in use before assigning
it to a DHCP client.
The DHCP server pings the IP address to be assigned by using ICMP. If the server gets a response within
the specified period, the server selects and pings another IP address. If not, the server pings the IP
address again until the specified number of ping attempts is reached. If still no response is received, the
server assigns the IP address to the requesting client.
Examples
# Specify the maximum number of ping packets as 10.
<Sysname> system-view
[Sysname] dhcp server ping packets 10
28
dhcp server ping timeout
Syntax
dhcp server ping timeout milliseconds
undo dhcp server ping timeout
View
System view
Default level
2: System level
Parameters
milliseconds: Specifies the 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 the ping response timeout time on the DHCP
server.
Use the undo dhcp server ping timeout command to restore the default.
The time defaults to 500 ms.
To avoid IP address conflicts, the DHCP server checks whether an IP address is in use before assigning
it to a DHCP client.
The DHCP server pings the IP address to be assigned by using ICMP. If the server gets a response within
the specified interval, the server selects and pings another IP address. If not, the server pings the IP
address again until the specified number of ping attempts is reached. If still no response is received, the
server assigns the IP address to the requesting client.
Examples
# Specify the response timeout time as 1000 ms.
<Sysname> system-view
[Sysname] dhcp server ping timeout 1000
dhcp server relay information enable
Syntax
dhcp server relay information enable
undo dhcp server relay information enable
View
System view
Default level
2: System level
Parameters
None
29
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
dhcp server threshold
Syntax
dhcp server threshold { allocated-ip threshold-value | average-ip-use threshold-value | max-ip-use
threshold-value }
undo dhcp server threshold { allocated-ip | average-ip-use | max-ip-use }
View
System view
Default level
2: System level
Parameters
allocated-ip threshold-value: Enables the DHCP server to send trap messages to the network
management server when the ratio of successfully allocated IP addresses to received DHCP requests
within five minutes reaches the threshold specified by the threshold-value argument. The threshold is a
percentage value ranging from 1 to 100.
average-ip-use threshold-value: Enables the DHCP server to send trap messages to the network
management server when the average IP address utilization of an address pool within five minutes
reaches the threshold specified by the threshold-value argument. The threshold is a percentage value
ranging from 1 to 100.
max-ip-use threshold-value: Enables the DHCP server to send trap messages to the network management
server when the maximum IP address utilization of an address pool within five minutes reaches the
threshold specified by the threshold-value argument. The threshold is a percentage value ranging from 1
to 100.
Description
Use the dhcp server threshold command to enable the DHCP server to send trap messages to the network
management server when the specified threshold is reached.
Use the undo dhcp server threshold command to restore the default.
By default, the DHCP server does not send trap messages to the network management server.
Examples
# Enable the DHCP server to send trap messages to the network management server when the ratio of
successfully allocated IP addresses to received DHCP requests within five minutes exceeds 50%.
<Sysname> system-view
30
[Sysname] dhcp server threshold allocated-ip 50
# Enable the DHCP server to send trap messages to the network management server when the average
IP address utilization of an address pool within five minutes exceeds 80%.
<Sysname> system-view
[Sysname] dhcp server threshold average-ip-use 80
# Enable the DHCP server to send trap messages to the network management server when the maximum
IP address utilization of an address pool within five minutes exceeds 80%.
<Sysname> system-view
[Sysname] dhcp server threshold max-ip-use 80
display dhcp server conflict
Syntax
display dhcp server conflict { all | ip ip-address } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays information about all IP address conflicts.
ip-address: Displays conflict information for a specified IP address.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
4.4.4.2
Apr 25 2007 17:00:10
--- total 2 entry ---
Table 4 Output description
Field
Description
Address
Conflicted IP address
31
Field
Description
Discover Time
Time when the conflict was discovered
display dhcp server expired
Syntax
display dhcp server expired { all | ip ip-address | pool [ pool-name ] } [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
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.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
IP address
Client-identifier/
Lease expiration
Type
Hardware address
4.4.4.6
3030-3066-2e65-3230302e-3130-3234-2d457468-6572-6e65-74302f31
--- total 1 entry ---
32
Apr 25 2007 17:10:47
Release
Table 5 Output description
Field
Description
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. This field is set to Release.
display dhcp server free-ip
Syntax
display dhcp server free-ip [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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.1
to
10.0.0.254
display dhcp server forbidden-ip
Syntax
display dhcp server forbidden-ip [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
33
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
Global:
IP Range from 1.1.0.2
to
1.1.0.3
IP Range from 1.1.1.2
to
1.1.1.3
Pool name: 2
1.1.1.5
1.1.1.6
Table 6 Output description
Field
Description
Global
Globally excluded IP addresses specified with the dhcp server forbidden-ip
command in system view. No address pool can assign these IP addresses.
Pool name
Excluded IP addresses specified with the forbidden-ip command in DHCP
address pool view. They cannot be assigned from the current extended
address pool only.
display dhcp server ip-in-use
Syntax
display dhcp server ip-in-use { all | ip ip-address | pool [ pool-name ] } [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
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.
34
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
Pool utilization: 0.39%
IP address
Client-identifier/
Lease expiration
Type
Hardware address
10.1.1.1
10.1.1.2
4444-4444-4444
3030-3030-2e30-3030-
NOT Used
Manual
May
Auto:COMMITTED
1 2009 14:02:49
662e-3030-3033-2d457468-6572-6e65-74302f31
--- total 2 entry ---
Table 7 Output description
Field
Description
Utilization rate of IP addresses in a DHCP address pool, which is the
ratio of assigned IP addresses to assignable IP addresses in the
DHCP address pool.
• When the binding information of all DHCP address pools is
Pool utilization
displayed, this field displays the total utilization rate of IP
addresses in all DHCP address pools.
• When the binding information of a specific DHCP address pool
is displayed, this field displays the utilization rate of IP addresses
in the DHCP address pool.
• When the binding information of a specific IP address is
displayed, this field is not displayed.
IP address
Bound IP address
Client-identifier/Hardware address
Client’s ID or MAC of the binding
Lease expiration time:
• Specific time (May 1 2009 14:02:49 in this example)—Time
Lease expiration
when the lease expires
• NOT Used—The IP address of the static binding has not been
assigned to the specific client.
• Unlimited—Infinite lease expiration time
35
Field
Description
Binding types:
• Manual—Static binding
• Auto:OFFERED—The binding sent in the DHCP-OFFER message
Type
from the server to the client.
• Auto:COMMITTED—The binding sent in the DHCP-ACK
message from the server to the client.
display dhcp server statistics
Syntax
display dhcp server statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp server statistics command to display the statistics of the DHCP server.
Related commands: reset dhcp server statistics.
Examples
# Display the statistics on the DHCP server.
<Sysname> display dhcp server statistics
Global Pool:
Pool Number:
1
Binding:
Auto:
1
Manual:
0
Expire:
0
BOOTP Request:
10
DHCPDISCOVER:
5
DHCPREQUEST:
3
DHCPDECLINE:
0
DHCPRELEASE:
2
DHCPINFORM:
0
BOOTPREQUEST:
0
36
BOOTP Reply:
6
DHCPOFFER:
3
DHCPACK:
3
DHCPNAK:
0
BOOTPREPLY:
0
Bad Messages:
0
Table 8 Output description
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
The number of DHCP requests sent from DHCP clients to the DHCP server. The
requests include:
BOOTP Request
•
•
•
•
•
•
DHCPDISCOVER
DHCPREQUEST
DHCPDECLINE
DHCPRELEASE
DHCPINFORM
BOOTPREQUEST
The number of DHCP replies sent from the DHCP server to DHCP clients. The
replies include:
BOOTP Reply
Bad Messages
•
•
•
•
DHCPOFFER
DHCPACK
DHCPNAK
BOOTPREPLY
The number of Erroneous messages
display dhcp server tree
Syntax
display dhcp server tree { all | pool [ pool-name ] } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays information of all DHCP address pools.
pool [ pool-name ]: Displays information of a specified address pool. The pool name argument is a string
of 1 to 35 characters. If no pool name is specified, information of all address pools will be displayed.
37
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp server tree command to display information of DHCP address pool(s).
Examples
# Display 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 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
Extended pool:
Pool name: 2
network ip range 1.1.1.0 1.1.1.255
network mask 255.255.255.0
expired 0 0 2 0
Table 9 Output description
Field
Description
Global pool
Information of a common address pool
Pool name
Address pool name
network
Subnet for address allocation
static-bind ip-address 10.10.1.2 mask
255.0.0.0
The IP address and MAC address of the static binding
static-bind mac-address 00e0-00fc-0001
38
Field
Description
The sibling node of the current node. Nodes of this kind in the
output information can be:
• Child node—The child node (subnet segment) address pool
of the current node
• Parent node—The parent node (nature network segment)
Sibling node
address pool of the current node
• 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 order the sibling node
has.
• 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, minute, and
second
Extended pool
Information of an extended address pool
network ip range
Range of assignable IP addresses in the extended address pool
network mask
Mask of IP addresses assigned from the extended address pool
dns-list
Syntax
dns-list ip-address&<1-8>
undo dns-list { ip-address | all }
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address&<1-8>: Specifies the 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 be removed.
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 perform the dns-list command repeatedly, the latest configuration overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
Examples
# Specify the DNS server address 10.1.1.254 for the DHCP client in DHCP address pool 0.
39
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] dns-list 10.1.1.254
domain-name
Syntax
domain-name domain-name
undo domain-name
View
DHCP address pool view
Default level
2: System level
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 specified domain name suffix.
No domain name suffix is specified by default.
Related commands: dhcp server ip-pool and display dhcp server tree.
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
expired
Syntax
expired { day day [ hour hour [ minute minute [ second second ] ] ] | unlimited }
undo expired
View
DHCP address pool view
Default level
2: System level
Parameters
day day: Specifies the number of days, in the range of 0 to 365.
hour hour: Specifies 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.
40
second second: Specifies the number of seconds, in the range of 0 to 59.
unlimited: Specifies the unlimited lease 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.
By default, the lease duration of a static address pool is unlimited, and the lease duration of a dynamic
address pool is one day.
NOTE:
The lease duration cannot be less than 5 seconds.
Related commands: dhcp server ip-pool and display dhcp server tree.
Examples
# Specify the lease duration as one day, two hours, three minutes, and four seconds 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 second 4
forbidden-ip
Syntax
forbidden-ip ip-address&<1-8>
undo forbidden-ip { ip-address&<1-8> | all }
View
DHCP extended address pool view
Default level
2: System level
Parameters
ip-address&<1-8>: Specifies the IP addresses to be excluded from dynamic allocation. &<1-8> indicates
that you can specify up to eight IP addresses, separated with spaces.
all: Excludes all IP addresses from dynamic allocation.
Description
Use the forbidden-ip command to exclude IP addresses from dynamic allocation in an extended address
pool.
Use the undo forbidden-ip command to cancel specified or all excluded IP addresses.
By default, all IP addresses in an extended address pool are assignable except the IP addresses of the
DHCP server interfaces.
•
Only the extended address pools support this command.
•
IP addresses specified with the forbidden-ip command in DHCP address pool view are excluded
from dynamic address allocation in the current extended address pool only. They are assignable in
other address pools.
41
•
Repeatedly using the forbidden-ip command can exclude multiple IP address ranges from dynamic
allocation.
Related commands: dhcp server ip-pool and display dhcp server forbidden-ip.
Examples
# Exclude IP addresses 192.168.1.3 and 192.168.1.10 from dynamic allocation for extended address pool
0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0 extended
[Sysname-dhcp-pool-0] forbidden-ip 192.168.1.3 192.168.1.10
gateway-list
Syntax
gateway-list ip-address&<1-8>
undo gateway-list { ip-address | all }
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address&<1-8>: Specifies the 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 addresses in a DHCP address pool.
Use the undo gateway-list command to remove specified gateway addresses 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 overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
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
nbns-list
Syntax
nbns-list ip-address&<1-8>
undo nbns-list { ip-address | all }
42
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address&<1-8>: Specifies the 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 addresses in a DHCP address pool.
Use the undo nbns-list command to remove the specified WINS server addresses.
By default, no WINS server address is specified.
If you use the nbns-list command repeatedly, the latest configuration overwrites the previous one.
Related commands: dhcp server ip-pool, netbios-type, and display dhcp server tree.
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
netbios-type
Syntax
netbios-type { b-node | h-node | m-node | p-node }
undo netbios-type
View
DHCP address pool view
Default level
2: System level
Parameters
b-node: Broadcast node. A b-node client sends the destination name in a broadcast message. The
destination returns the name-to-IP mapping to the client after receiving the message.
p-node: Peer-to-peer node. A p-node client sends the destination name in a unicast message to the WINS
server, and the WINS server returns the mapping to the client.
m-node: Mixed node, a combination of a b-node first and p-node second. An m-node client broadcasts
the destination name, if there is no response, and then unicasts the destination name to the WINS server
to get the mapping.
h-node: Hybrid node, a combination of a p-node first and b-node second. An h-node is a b-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.
43
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 specified client NetBIOS node type.
By default, no NetBIOS node type is specified.
Related commands: dhcp server ip-pool, nbns-list, and display dhcp server tree.
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
network
Syntax
network network-address [ mask-length | mask mask ]
undo network
View
DHCP address pool view
Default level
2: System level
Parameters
network-address: Specifies the subnet for dynamic allocation. If no mask length and mask is specified,
the natural mask will be used.
mask-length: Specifies the 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 subnet for dynamic allocation in a DHCP address pool.
Use the undo network command to remove the specified subnet.
No subnet is specified by default.
You can specify only one subnet for each common address pool. If you use the network command
repeatedly, the latest configuration overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
Examples
# Specify 192.168.8.0/24 as the subnet 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
44
network ip range
Syntax
network ip range min-address max-address
undo network ip range
View
DHCP address pool view
Default level
2: System level
Parameters
min-address: Specifies the lowest IP address for dynamic allocation.
max-address: Specifies the highest IP address for dynamic allocation.
Description
Use the network ip range command to specify the IP address range for dynamic allocation in an address
pool.
Use the undo network ip range command to remove the specified address range.
No IP address range is specified by default.
NOTE:
• In a common address pool, you can use the network ip range command to further specify an IP address
range on a subnet for address allocation. The specified IP address range must belong to the subnet;
otherwise the common address pool cannot assign IP addresses.
• You can specify only one IP address range for each address pool. If you use the network ip range
command repeatedly, the latest configuration overwrites the previous one..
Related commands: dhcp server ip-pool, network, and display dhcp server tree.
Examples
# Specify addresses 10.1.1.1 through 10.1.1.150 on subnet 10.1.1.0/24 for dynamic address allocation in
common address pool 1.
<Sysname> system-view
[Sysname] dhcp server ip-pool 1
[Sysname-dhcp-pool-1] network 10.1.1.0 24
[Sysname-dhcp-pool-1] network ip range 10.1.1.1 10.1.1.150
# Specify addresses 192.168.8.1 through 192.168.8.150 for dynamic address allocation in extended
address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0 extended
[Sysname-dhcp-pool-0] network ip range 192.168.8.1 192.168.8.150
network mask
Syntax
network mask mask
45
undo network mask
View
DHCP extended address pool view
Default level
2: System level
Parameters
mask: Specifies a network mask, in dotted decimal notation.
Description
Use the network mask command to specify the IP address mask for dynamic allocation in an extended
address pool.
Use the undo network mask command to remove the specified IP address mask.
No IP address mask is specified by default.
NOTE:
• Only the extended address pools support this command.
• If you specify an IP address range for an extended address pool without an IP address mask, the
extended address pool is not valid, and therefore the system cannot assign IP addresses from the
extended address pool.
Related commands: dhcp server ip-pool, display dhcp server tree, and network ip range.
Examples
# Specify 255.255.255.0 as the IP address mask for dynamic allocation in extended address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0 extended
[Sysname-dhcp-pool-0] network mask 255.255.255.0
next-server
Syntax
next-server ip-address
undo next-server
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address: Specifies the IP address of a server.
Description
Use the next-server command to specify the IP address of a server for DHCP clients.
Use the undo next-server command to remove the server’s IP address from the DHCP address pool.
46
By default, no server’s IP address is specified in the address pool on the DHCP server.
If you repeatedly execute this command, the new configuration overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
Examples
# Specify a server’s IP address 1.1.1.1 in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] next-server 1.1.1.1
option
Syntax
option code { ascii ascii-string | hex hex-string&<1-16> | ip-address ip-address&<1-8> }
undo option code
View
DHCP address pool view
Default level
2: System level
Parameters
code: Self-defined option number, in the range of 2 to 254, excluding 12, 50 to 55, 57 to 61, and 82.
ascii ascii-string: Specifies an ASCII string with 1 to 255 characters.
hex hex-string&<1-16>: Specifies hex digit strings. &<1-16> indicates that 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 that 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 overwrites the previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
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
47
reset dhcp server conflict
Syntax
reset dhcp server conflict { all | ip ip-address }
View
User view
Default level
2: System level
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
reset dhcp server ip-in-use
Syntax
reset dhcp server ip-in-use { all | ip ip-address | pool [ pool-name ] }
View
User view
Default level
2: System level
Parameters
all: Clears the IP address dynamic binding information of all DHCP address pools.
ip ip-address: Clears the dynamic binding information of a specified IP address.
pool [ pool-name ]: Clears the dynamic binding information of a specified address pool. 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
48
reset dhcp server statistics
Syntax
reset dhcp server statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the reset dhcp server statistics command to clear the statistics of the DHCP server.
Related commands: display dhcp server statistics.
Examples
# Clear the statistics of the DHCP server.
<Sysname> reset dhcp server statistics
static-bind client-identifier
Syntax
static-bind client-identifier client-identifier
undo static-bind client-identifier
View
DHCP address pool view
Default level
2: System level
Parameters
client-identifier: Client ID of a static binding, a string with 4 to 160 characters in the format of 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, but 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.
•
Use the static-bind client-identifier command together with the static-bind ip-address command to
accomplish a static binding configuration.
•
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.
49
•
If you use the static-bind client-identifier or static-bind mac-address command repeatedly, the latest
configuration overwrites the previous one.
Related commands: dhcp server ip-pool, static-bind ip-address, static-bind mac-address, display dhcp
server tree, and 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
static-bind ip-address
Syntax
static-bind ip-address ip-address [ mask-length | mask mask ]
undo static-bind ip-address
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address: Specifies the IP address of a static binding. If no mask and mask length is specified, the
natural mask is used.
mask-length: Specifies the mask length of the IP address, which is the number of 1s in the mask, in the
range of 1 to 30.
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.
•
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.
•
The IP address of the static binding cannot be an interface address of the DHCP server. Otherwise,
an IP address conflict may occur, and the bound client cannot obtain an IP address correctly.
•
If you use the static-bind ip-address command repeatedly, the latest configuration overwrites the
previous one.
Related commands: dhcp server ip-pool, static-bind client-identifier, static-bind mac-address, and
display dhcp server tree.
50
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
static-bind mac-address
Syntax
static-bind mac-address mac-address
undo static-bind mac-address
View
DHCP address pool view
Default level
2: System level
Parameters
mac-address: Specifies the MAC address of a static binding, in the format of 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.
Use the static-bind mac-address command together with the static-bind ip-address command to
complete a static binding configuration.
If you use the static-bind mac-address or static-bind client-identifier command repeatedly, the latest
configuration overwrites the previous one.
Relate commands: dhcp server ip-pool, static-bind client-identifier, static-bind ip-address, display dhcp
server tree.
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
tftp-server domain-name
Syntax
tftp-server domain-name domain-name
51
undo tftp-server domain-name
View
DHCP address pool view
Default level
2: System level
Parameters
domain-name: Specifies the 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.
If you perform the tftp-server domain-name command repeatedly, the last configuration overwrites the
previous one.
Related commands: dhcp server ip-pool and display dhcp server tree.
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
tftp-server ip-address
Syntax
tftp-server ip-address ip-address
undo tftp-server ip-address
View
DHCP address pool view
Default level
2: System level
Parameters
ip-address: Specifies the 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.
If you perform the tftp-server ip-address command repeatedly, the last configuration overwrites the
previous one.
52
Related commands: dhcp server ip-pool and display dhcp server tree.
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
vendor-class-identifier
Syntax
vendor-class-identifier hex-string&<1-255> ip range min-address max-address
undo vendor-class-identifier hex-string&<1-255>
View
DHCP extended address pool view
Default level
2: System level
Parameters
hex-string&<1-255>: A character string, which is used to match against Option 60 (vendor class
identifier option). hex-string is a hexadecimal number ranging from 0 to FF. &<1-255> indicates that you
can type up to 255 hexadecimal numbers, which are separated by spaces.
ip range min-address max-address: Specifies the IP address range for dynamic allocation. min-address
is the lowest IP address and max-address is the highest IP address for dynamic allocation.
Description
Use the vendor-class-identifier command to specify an IP address range for the DHCP clients of a
specified vendor.
Use the undo vendor-class-identifier command to restore the default.
By default, no IP address range is specified for the DHCP clients of any vendor.
After this feature is configured in an extended DHCP address pool, the DHCP server, when using the
extended DHCP address pool to assign an IP address to a DHCP client, checks whether Option 60 in the
DHCP request is the same as the character string configured with the vendor-class-identifier command.
If yes, the DHCP server selects an IP address from the address range specified with this command. If not,
the DHCP server selects one from the address range specified with the network ip range command.
NOTE:
• Only extended address pools support this command.
• The IP address range specified with this command must be included in that specified with the network
ip range command.
Related commands: network ip range and network mask.
Examples
# Specify IP address rang 10.1.1.1 to 10.1.1.5 for the DHCP clients of vender a0 b0 0c.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0 extended
53
[Sysname-dhcp-pool-0] vendor-class-identifier a0 b0 0c ip range 10.1.1.1 10.1.1.5
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
Default level
2: System level
Parameters
as-ip ip-address: Specifies the IP address for the backup network calling processor. When the primary
network calling processor is unavailable, the DHCP client uses 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 the IP address for the primary network calling processor.
voice-vlan vlan-id: Specifies the voice VLAN ID, in the range of 2 to 4094.
disable: Disables the specified voice VLAN ID, meaning DHCP clients will not take this ID as their voice
VLAN.
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.
You must specify the IP address of a network calling processor first to make other configured parameters
take effect.
Related commands: dhcp server ip-pool and display dhcp server tree.
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*
54
DHCP relay agent configuration commands
NOTE:
The DHCP relay agent configuration is supported only on Layer 3 Ethernet ports (or subinterfaces), VLAN
interfaces, and Layer 3 aggregate interfaces.
dhcp relay address-check enable
Syntax
dhcp relay address-check enable
undo dhcp relay address-check enable
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp relay address-check enable command to enable address check on the relay agent.
Use the undo dhcp relay address-check enable command to disable address check on the relay agent.
By default, the function is disabled.
With this feature enabled, the DHCP relay agent can dynamically record clients’ IP-to-MAC bindings
after clients get IP addresses through DHCP. It also supports static bindings. You can manually configure
IP-to-MAC bindings on the DHCP relay agent, so that users can access external networks using fixed IP
addresses.
Upon receiving an ARP packet, the DHCP relay agent matches the sender’s IP and MAC addresses in the
packet against the bindings (both dynamic and static). If no match is found, the DHCP relay agent does
not learn the ARP entry. The sending host cannot access external networks via the DHCP relay agent.
This command can be executed only on Layer 3 Ethernet ports (including subinterfaces) and VLAN
interfaces.
The dhcp relay address-check enable command only checks IP and MAC addresses of clients.
Examples
# Enable address check on the DHCP relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay address-check enable
55
dhcp relay check mac-address
Syntax
dhcp relay check mac-address
undo dhcp relay check mac-address
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp relay check mac-address command to enable MAC address check on the DHCP relay
agent.
Use the undo dhcp relay check mac-address command to disable MAC address check on the DHCP
relay agent.
By default, this function is disabled.
With this function enabled, the DHCP relay agent compares the chaddr field of a received DHCP request
with the source MAC address field of the frame. If they are the same, the DHCP relay agent decides this
request as valid and forwards it to the DHCP server; if not, the DHCP request is discarded.
DHCP relay agents change the source MAC addresses when forwarding DHCP packets. Therefore, you
can enable MAC address check only on a DHCP relay agent directly connected to the DHCP clients.
Otherwise, valid DHCP packets may be discarded and clients cannot obtain IP addresses.
Examples
# Enable MAC address check on the DHCP relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay check mac-address
dhcp relay client-detect enable
Syntax
dhcp relay client-detect enable
undo dhcp relay client-detect enable
View
Interface view
Default level
2: System level
Parameters
None
56
Description
Use the dhcp relay client-detect enable command to enable offline detection on the DHCP relay agent.
Use the undo dhcp relay client-detect enable command to disable offline detection on the DHCP relay
agent.
By default, this function is disabled.
With this function enabled on an interface, the DHCP relay agent removes a client’s IP-to-MAC binding
entry when it is aged out, and sends a DHCP-RELEASE request to the DHCP server to release the IP
address of the client.
Examples
# Enable offline detection on the DHCP relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay client-detect enable
dhcp relay information circuit-id format-type
Syntax
dhcp relay information circuit-id format-type { ascii | hex }
undo dhcp relay information circuit-id format-type
View
Interface view
Default level
2: System level
Parameters
ascii: Specifies the code type for the circuit ID sub-option as ascii.
hex: Specifies the code type for the circuit ID sub-option as hex.
Description
Use the dhcp relay information circuit-id format-type command to configure the code type for the
non-user-defined circuit ID sub-option.
Use the undo dhcp relay information circuit-id format-type command to restore the default.
By default, the code type for the circuit ID sub-option depends on the specified padding format of Option
82. Each field has its own code type.
This command applies only to configuring the non-user-defined circuit ID sub-option. After you configure
the padding content for the circuit ID sub-option using the dhcp relay information circuit-id string
command, ASCII is adopted as the code type.
Related commands: display dhcp relay information.
Examples
# Configure the code type for the non-user-defined circuit ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information circuit-id format-type ascii
57
dhcp relay information circuit-id string
Syntax
dhcp relay information circuit-id string circuit-id
undo dhcp relay information circuit-id string
View
Interface view
Default level
2: System level
Parameters
circuit-id: Padding content for the user-defined circuit ID sub-option, a case-sensitive string of 3 to 63
characters.
Description
Use the dhcp relay information circuit-id string command to configure the padding content for the
user-defined circuit ID sub-option.
Use the undo dhcp relay information circuit-id string command to restore the default.
By default, the padding content for the circuit ID sub-option depends on the padding format of Option
82.
After you configure the padding content for the circuit ID sub-option using this command, ASCII is
adopted as the code type.
Related commands: dhcp relay information format and display dhcp relay information.
Examples
# Configure the padding content for the circuit ID sub-option as company001.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information circuit-id string company001
dhcp relay information enable
Syntax
dhcp relay information enable
undo dhcp relay information enable
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp relay information enable command to enable the relay agent to support Option 82.
58
Use the undo dhcp relay information enable command to disable Option 82 support.
By default, Option 82 support is disabled on the DHCP relay agent.
Related commands: display dhcp relay information.
Examples
# Enable Option 82 support on the relay agent.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
dhcp relay information format
Syntax
dhcp relay information format { normal | verbose [ node-identifier { mac | sysname | user-defined
node-identifier } ] }
undo dhcp relay information format
View
Interface view
Default level
2: System level
Parameters
normal: Specifies the normal padding format.
verbose: Specifies the verbose padding format.
node-identifier { mac | sysname | user-defined node-identifier }: Specifies the access node identifier. By
default, the node MAC address is used as the node identifier.
•
mac indicates using the MAC address as the node identifier.
•
sysname indicates using the device name of a node as the node identifier.
•
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:
• 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.
• 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.
Related commands: display dhcp relay information.
59
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
dhcp relay information remote-id format-type
Syntax
dhcp relay information remote-id format-type { ascii | hex }
undo dhcp relay information remote-id format-type
View
Interface view
Default level
2: System view
Parameters
ascii: Specifies the code type for the remote ID sub-option as ascii.
hex: Specifies the code type for the remote ID sub-option as hex.
Description
Use the dhcp relay information remote-id format-type command to configure the code type for the
non-user-defined remote ID sub-option.
Use the undo dhcp relay information remote-id format-type command to restore the default.
By default, the code type for the remote ID sub-option is HEX.
This command applies only to configuring the non-user-defined remote ID sub-option. After you configure
the padding content for the remote ID sub-option using the dhcp relay information remote-id string
command, ASCII is adopted as the code type.
Related commands: display dhcp relay information.
Examples
# Configure the code type for the non-user-defined remote ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information remote-id format-type ascii
dhcp relay information remote-id string
Syntax
dhcp relay information remote-id string { remote-id | sysname }
undo dhcp relay information remote-id string
60
View
Interface view
Default level
2: System level
Parameters
remote-id: Padding content for the user-defined remote ID sub-option, a case-sensitive string of 1 to 63
characters.
sysname: Specifies the device name as the padding content for the remote ID sub-option.
Description
Use the dhcp relay information remote-id string command to configure the padding content for the
user-defined remote ID sub-option.
Use the undo dhcp relay information remote-id string command to restore the default.
By default, the padding content for the remote ID sub-option depends on the padding format of Option
82.
After you configure the padding content for the remote ID sub-option using this command, ASCII is
adopted as the code type.
NOTE:
If you want to specify the character string sysname (a case-insensitive character string) as the padding
content for the remote ID sub-option, you need to use quotation marks to make it take effect. For example,
if you want to specify Sysname as the padding content for the remote ID sub-option, you need to enter the
dhcp relay information remote-id string “Sysname” command.
Related commands: dhcp relay information format and display dhcp relay information.
Examples
# Configure the padding content for the remote ID sub-option as device001.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information remote-id string device001
dhcp relay information strategy
Syntax
dhcp relay information strategy { drop | keep | replace }
undo dhcp relay information strategy
View
Interface view
Default level
2: System level
Parameters
drop: Specifies the dropping of messages containing Option 82.
keep: Specifies the forwarding of messages containing Option 82 without any change.
61
replace: Specifies the forwarding of 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.
Related commands: display dhcp relay information.
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
dhcp relay release ip
Syntax
dhcp relay release ip client-ip
View
System view
Default level
2: System level
Parameters
client-ip: Specifies the 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
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 | interface interface-type interface-number |
static }
View
System view
62
Default level
2: System level
Parameters
ip-address: Specifies the client IP address for creating a static binding.
mac-address: Specifies the client MAC address for creating a static binding, in the format H-H-H.
interface interface-type interface-number: Specifies a Layer 3 interface connecting to the DHCP client.
interface-type interface-number specifies the interface type and interface number.
all: Specifies that all client entries are to be removed.
dynamic: Specifies that dynamic client entries are to be removed.
static: Specifies that manual client entries are to be removed.
Description
Use the dhcp relay security static command to configure a static client entry, which is the binding
between IP address, MAC address, and Layer 3 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.
•
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.
•
The undo dhcp relay security interface command is used to remove all the dynamic client entries
from the interface.
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
dhcp relay security refresh enable
Syntax
dhcp relay security refresh enable
undo dhcp relay security refresh enable
View
System view
Default level
2: System level
Parameters
None
63
Description
Use the dhcp relay security refresh enable command to enable the DHCP relay agent to periodically
refresh dynamic client entries.
Use the undo dhcp relay security refresh enable command to disable periodic refresh of dynamic client
entries.
By default, the DHCP relay agent is enabled to periodically refresh dynamic client entries.
If you disable the DHCP relay agent from periodically refreshing dynamic client entries, such entries do
not age automatically. Therefore, if a client relinquishes its IP address, you need to manually remove the
corresponding dynamic client entry on the DHCP relay agent.
Related commands: dhcp relay security tracker and dhcp relay security static.
Examples
# Disable the DHCP relay agent from periodically refreshing dynamic client entries.
<Sysname> system-view
[Sysname] undo dhcp relay security refresh enable
dhcp relay security tracker
Syntax
dhcp relay security tracker { interval | auto }
undo dhcp relay security tracker [ interval ]
View
System view
Default level
2: System level
Parameters
interval: Specifies the 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. The more entries there are, the shorter the interval. 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 refreshing interval is auto, the value of 60 seconds divided by the number of binding entries.
Related commands: display dhcp relay security tracker.
Examples
# Set the refreshing interval as 100 seconds.
<Sysname> system-view
[Sysname] dhcp relay security tracker 100
64
dhcp relay server-detect
Syntax
dhcp relay server-detect
undo dhcp relay server-detect
View
System view
Default level
2: System level
Parameters
None
Description
Use the dhcp relay server-detect command to enable unauthorized DHCP server detection.
Use the undo dhcp relay server-detect command to disable unauthorized DHCP server detection.
By default, unauthorized DHCP server detection is disabled.
With this function enabled, upon receiving a DHCP request, the DHCP relay agent will record from the
request the IP addresses of all DHCP servers that ever offered IP addresses to the DHCP client and the
receiving interface. Each server detected is recorded only once. The administrator can use this
information from logs to check for unauthorized DHCP servers.
After the information of recorded DHCP servers is cleared, the relay agent will re-record server
information following this mechanism.
Examples
# Enable unauthorized DHCP server detection.
<Sysname> system-view
[Sysname] dhcp relay server-detect
dhcp relay server-group
Syntax
dhcp relay server-group group-id ip ip-address
undo dhcp relay server-group group-id [ ip ip-address ]
View
System view
Default level
2: System level
Parameters
group-id: Specifies a DHCP server group by its number, in the range of 0 to 19.
ip ip-address: Specifies a DHCP server IP address.
Description
Use the dhcp relay server-group command to specify a DHCP server for a DHCP server group.
65
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.
•
The IP address of a DHCP server and the IP address of the DHCP relay agent’s interface that
connects the DHCP client cannot be in the same network segment. Otherwise, the client may fail to
obtain an IP address.
•
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
dhcp relay server-select
Syntax
dhcp relay server-select group-id
undo dhcp relay server-select
View
Interface view
Default level
2: System level
Parameters
group-id: Specifies a DHCP server group by its number to be correlated, in the range of 0 to 19.
Description
Use the dhcp relay server-select command to correlate specified interfaces 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.
•
A DHCP server group can correlate with one or multiple DHCP relay agent interfaces.
•
A relay agent interface can only correlate with 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.
•
The DHCP server group referenced in this command should have been configured by using the
dhcp relay server-group command.
Related commands: dhcp relay server-group and display dhcp relay.
Examples
# Correlate VLAN-interface 1 to DHCP server group 1.
<Sysname> system-view
66
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay server-select 1
dhcp select relay
Syntax
dhcp select relay
undo dhcp select relay
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp select relay command to enable the relay agent on the current interface. 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.
After DHCP is enabled, the DHCP server is enabled on an interface by default. Upon receiving a client’s
request from the interface, the DHCP server allocates an IP address from the DHCP address pool to the
client.
When the working mode of the interface is changed from DHCP server to DHCP relay agent, the IP
address leases will not be deleted. To avoid this, delete the existing IP address leases when changing the
interface working mode to DHCP relay agent.
Examples
# Enable the DHCP relay agent on VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp select relay
display dhcp relay
Syntax
display dhcp relay { all | interface interface-type interface-number } [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays information of DHCP server groups that all interfaces correspond to.
67
interface interface-type interface-number: Displays information of the DHCP server group that a specified
interface corresponds to.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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-interface1
2
Table 10 Output description
Field
Description
Server-group
DHCP server group number correlated to the interface.
display dhcp relay information
Syntax
display dhcp relay information { all | interface interface-type interface-number } [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays the Option 82 configuration information of all interfaces.
interface interface-type interface-number: Displays the Option 82 configuration information of a
specified interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
68
Description
Use the display dhcp relay information command to display Option 82 configuration information on the
DHCP relay agent.
Examples
# Display the Option 82 configuration information of all interfaces.
<Sysname> display dhcp relay information all
Interface: Vlan-interface100
Status: Enable
Strategy: Replace
Format: Verbose
Circuit ID format-type: HEX
Remote ID format-type: ASCII
Node identifier: aabbcc
User defined:
Circuit ID: company001
Interface: Vlan-interface200
Status: Enable
Strategy: Keep
Format: Normal
Circuit ID format-type: HEX
Remote ID format-type: ASCII
User defined:
Remote ID: device001
Table 11 Output description
Field
Description
Interface
Interface name
Status
Option 82 state, which can be Enable or Disable.
Strategy
Handling strategy for requesting messages containing Option 82, which can
be Drop, Keep, or Replace.
Format
Padding format of Option 82, which can be Normal or Verbose.
Circuit ID format-type
Non-user-defined code type of the circuit ID sub-option, which can be ASCII or
HEX.
Remote ID format-type
Non-user-defined code type of the remote ID sub-option, which can be ASCII
or HEX.
Node identifier
Access node identifier
User defined
Content of user-defined sub-options
Circuit ID
User-defined padding content of the circuit ID sub-option
Remote ID
User-defined padding content of the remote ID sub-option
69
display dhcp relay security
Syntax
display dhcp relay security [ ip-address | dynamic | static ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ip-address: Displays the binding information of an IP address.
dynamic: Displays information about dynamic bindings.
static: Displays information about static bindings.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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.
You must enable address check, or IP source guard on the DHCP relay agent before it can generate
dynamic client entries. For more information about IP source guard, see Security Configuration Guide.
Examples
# Display information about all bindings.
<Sysname> display dhcp relay security
IP Address
10.1.1.5
---
MAC Address
Type
Interface
00e0-0000-0000
Static
Vlan2
1 dhcp-security item(s) found
---
Table 12 Output description
Field
Description
IP Address
Client IP address
MAC Address
Client MAC address
Type
Type of binding, including dynamic, static, and temporary
Interface
Layer 3 interface connecting to the DHCP client. If no interface is recorded in the
binding entry, “N/A” is displayed.
70
display dhcp relay security statistics
Syntax
display dhcp relay security statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp relay security statistics command to display statistics information about bindings of
DHCP relay agents.
You must enable address check, or IP source guard on the DHCP relay agent before it can generate
dynamic client entries. For more information about IP source guard, see Security Configuration Guide.
Examples
# Display statistics about bindings of DHCP relay agents.
<Sysname> display dhcp relay security statistics
Static Items
:1
Dynamic Items
:0
Temporary Items
:0
All Items
:1
Table 13 Output description
Field
Description
Static Items
Static binding items
Dynamic Items
Dynamic binding items
Temporary Items
Temporary binding items
All Items
All binding items
display dhcp relay security tracker
Syntax
display dhcp relay security tracker [ | { begin | exclude | include } regular-expression ]
71
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp relay security tracker command to display the interval for refreshing dynamic
bindings on the relay agent.
Examples
# Display the interval for refreshing dynamic bindings on the relay agent.
<Sysname> display dhcp relay security tracker
Current tracker interval : 10s
The interval is 10 seconds.
display dhcp relay server-group
Syntax
display dhcp relay server-group { group-id | all } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
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.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
72
Description
Use the display dhcp relay server-group command to display the configuration information of a
specified DHCP server group 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 14 Output description
Field
Description
No.
Sequence number
Group IP
IP address in the server group
display dhcp relay statistics
Syntax
display dhcp relay statistics [ server-group { group-id | all } ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
group-id: Specifies a server group by its number, in the range of 0 to 19, about display DHCP packet
statistics is to be displayed.
all: Specifies all server groups about which DHCP packet statistics is to be displayed. Information for
each group is displayed independently.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp relay statistics command to display DHCP packet statistics related to a specified
DHCP server group or all DHCP server groups.
If no parameter (server-group and all) is specified, all DHCP packet statistics on the relay agent will be
displayed.
Related commands: reset dhcp relay statistics.
73
Examples
# Display all DHCP packet statistics on the relay agent.
<Sysname> display dhcp relay statistics
Bad packets received:
0
DHCP packets received from clients:
0
DHCPDISCOVER packets received:
0
DHCPREQUEST packets received:
0
DHCPINFORM packets received:
0
DHCPRELEASE packets received:
0
DHCPDECLINE packets received:
0
BOOTPREQUEST packets received:
0
DHCP packets received from servers:
0
DHCPOFFER packets received:
0
DHCPACK packets received:
0
DHCPNAK packets received:
0
BOOTPREPLY packets received:
0
DHCP packets relayed to servers:
0
DHCPDISCOVER packets relayed:
0
DHCPREQUEST packets relayed:
0
DHCPINFORM packets relayed:
0
DHCPRELEASE packets relayed:
0
DHCPDECLINE packets relayed:
0
BOOTPREQUEST packets relayed:
0
DHCP packets relayed to clients:
0
DHCPOFFER packets relayed:
0
DHCPACK packets relayed:
0
DHCPNAK packets relayed:
0
BOOTPREPLY packets relayed:
0
DHCP packets sent to servers:
0
DHCPDISCOVER packets sent:
0
DHCPREQUEST packets sent:
0
DHCPINFORM packets sent:
0
DHCPRELEASE packets sent:
0
DHCPDECLINE packets sent:
0
BOOTPREQUEST packets sent:
0
DHCP packets sent to clients:
0
DHCPOFFER packets sent:
0
DHCPACK packets sent:
0
DHCPNAK packets sent:
0
BOOTPREPLY packets sent:
0
# 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
Packet type
#0
Packet number
Client -> Server:
DHCPDISCOVER
0
DHCPREQUEST
0
DHCPINFORM
0
74
DHCPRELEASE
0
DHCPDECLINE
0
BOOTPREQUEST
0
Server -> Client:
DHCPOFFER
0
DHCPACK
0
DHCPNAK
0
BOOTPREPLY
0
reset dhcp relay statistics
Syntax
reset dhcp relay statistics [ server-group group-id ]
View
User view
Default level
1: Monitor level
Parameters
server-group group-id: Specifies a server group by its number, in the range of 0 to 19, about which
statistics is to be removed 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
75
DHCP client configuration commands
NOTE:
• The DHCP client configuration is supported only on Layer 3 Ethernet ports (or subinterfaces), VLAN
interfaces, and Layer 3 aggregate interfaces.
• 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 Server 2000 or Windows Server 2003.
• You cannot configure an interface of an aggregation group as a DHCP client.
display dhcp client
Syntax
display dhcp client [ verbose ] [ interface interface-type interface-number ] [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
verbose: Specifies verbose DHCP client information to be displayed.
interface interface-type interface-number: Specifies an interface for which to display DHCP client
information.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
76
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
Classless static route:
Destination: 1.1.0.1, Mask: 255.0.0.0, NextHop: 192.168.40.16
Destination: 10.198.122.63, Mask: 255.255.255.255, NextHop: 192.168.40.16
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-3234392e-3830-3438-2d566c61-6e2d-696e-74657266-6163-6531
T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.
Table 15 Output description
Field
Description
Vlan-interface1 DHCP client information
Information of the interface acting as the DHCP client
Current state of the DHCP client:
• HALT—Indicates that the client stops applying for an IP address.
• INIT—Indicates the initialization state.
• SELECTING—Indicates that the client has sent out a
DHCP-DISCOVER message in search of a DHCP server and is
waiting for the response from DHCP servers.
Current machine state
• REQUESTING—Indicates that the client has sent out a
DHCP-REQUEST message requesting for an IP address and is
waiting for the response from DHCP servers.
• BOUND—Indicates that the client has received the DHCP-ACK
message from a DHCP server and obtained an IP address
successfully.
• RENEWING—Indicates that the T1 timer expires.
• REBOUNDING—Indicates that the T2 timer expires.
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
77
Field
Description
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
Classless static route
Classless static routes assigned to the client
Static route
Classful static routes 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 until the T1 (1/2 lease time) timer times out.
ip address dhcp-alloc
Syntax
ip address dhcp-alloc [ client-identifier mac interface-type interface-number ]
undo ip address dhcp-alloc
View
Interface view
Default level
2: System level
Parameters
client-identifier mac interface-type interface-number: Specifies the MAC address of an interface to be
used 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:
• If no parameter is specified, the client uses a character string that comprises the current interface name
and MAC address as its ID for address acquisition.
• 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.
• For a sub interface that obtained an IP address via DHCP, using the shutdown command on its primary
interface does not make the DHCP client send a DHCP-RELEASE message for releasing the sub
interface’s IP address.
78
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
79
DHCP snooping configuration commands
NOTE:
A DHCP snooping enabled device does not work if it is between the DHCP relay agent and DHCP server.
It can work when it is between the DHCP client and relay agent or between the DHCP client and server.
dhcp-snooping
Syntax
dhcp-snooping
undo dhcp-snooping
View
System view
Default level
2: System level
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> system-view
[Sysname] dhcp-snooping
dhcp-snooping binding database filename
Syntax
dhcp-snooping binding database filename filename
undo dhcp-snooping binding database filename
View
System view
80
Default level
2: System level
Parameters
filename: File name. For how to define the file name, see Fundamentals Configuration Guide.
Description
Use the dhcp-snooping binding database filename command to specify the name of the file for storing
DHCP snooping entries.
Use the undo dhcp-snooping binding database filename to restore the default.
By default, no file name is specified.
NOTE:
• If no file with the specified name is found, the device will automatically create the file upon storing a
DHCP snooping binding.
• DHCP snooping entries are stored immediately after this command is used, and then updated at the
interval set by the dhcp-snooping binding database update interval command.
Related commands: dhcp-snooping binding database update interval.
Examples
# Specify the name of the file for storing DHCP snooping entries as database.dhcp.
<Sysname> system-view
[Sysname] dhcp-snooping binding database filename database.dhcp
dhcp-snooping binding database update interval
Syntax
dhcp-snooping binding database update interval minutes
undo dhcp-snooping binding database update interval
View
System view
Default level
2: System level
Parameters
minutes: Specifies the refresh interval in minutes, in the range of 1 to 14400.
Description
Use the dhcp-snooping binding database update interval command to set the interval at which the
DHCP snooping entry file is refreshed.
Use the undo dhcp-snooping binding database update interval command to restore the default.
By default, the DHCP snooping entry file is not refreshed periodically.
81
NOTE:
• With this command configured, DHCP snooping will check bindings periodically. If a binding is added
or removed during an interval, DHCP snooping will add or remove this binding to or from the file at the
end of this interval; if no change occurs within the interval, DHCP snooping will not refresh the file.
• This command takes effect only when the DHCP snooping entry file is specified.
Related commands: dhcp-snooping binding database filename.
Examples
# Configure the DHCP snooping entry file to be refreshed every 10 minutes.
<Sysname> system-view
[Sysname] dhcp-snoooping binding database update interval 10
dhcp-snooping binding database update now
Syntax
dhcp-snooping binding database update now
View
System view
Default level
2: System level
Parameters
None
Description
Use the dhcp-snooping binding database update now command to store DHCP snooping entries to the
file.
NOTE:
• DHCP snooping entries will be stored to the file each time this command is used.
• This command takes effect only when the DHCP snooping entry file is specified.
Related commands: dhcp-snooping binding database filename.
Examples
# Store DHCP snooping entries to the file.
<Sysname> system-view
[Sysname] dhcp-snooping binding database update now
dhcp-snooping check mac-address
Syntax
dhcp-snooping check mac-address
undo dhcp-snooping check mac-address
82
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp-snooping check mac-address command to enable MAC address check on a DHCP
snooping device.
Use the undo dhcp-snooping check mac-address command to disable MAC address check of DHCP
snooping.
By default, this function is disabled.
With this function enabled, the DHCP snooping device compares the chaddr field of a received DHCP
request with the source MAC address field in the frame. If they are the same, the DHCP snooping device
decides this request valid and forwards it to the DHCP server. If not, the DHCP request is discarded.
Examples
# Enable MAC address check of DHCP snooping.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping check mac-address
dhcp-snooping check request-message
Syntax
dhcp-snooping check request-message
undo dhcp-snooping check request-message
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
None
Description
Use the dhcp-snooping check request-message command to enable DHCP-REQUEST message check of
DHCP snooping.
Use the undo dhcp-snooping check request-message command to disable DHCP-REQUEST message
check of the DHCP snooping.
By default, this function is disabled.
With this function enabled, upon receiving a DHCP-REQUEST message, a DHCP snooping device
searches local DHCP snooping entries for the corresponding entry of the message. If an entry is found,
the DHCP snooping device compares the entry with the message information. If they are consistent, the
83
DHCP-REQUEST message is considered as valid lease renewal request and forwarded to the DHCP
server. If they are not consistent, the messages is considered as forged lease renewal request and
discarded. If no corresponding entry is found locally, the message is considered valid and forwarded to
the DHCP server.
Examples
# Enable DHCP-REQUEST message check of DHCP snooping.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping check request-message
dhcp-snooping information circuit-id format-type
Syntax
dhcp-snooping information circuit-id format-type { ascii | hex }
undo dhcp-snooping information circuit-id format-type
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
ascii: Specifies the code type for the circuit ID sub-option as ascii.
hex: Specifies the code type for the circuit ID sub-option as hex.
Description
Use the dhcp-snooping information circuit-id format-type command to configure the code type for the
non-user-defined circuit ID sub-option.
Use the undo dhcp-snooping information circuit-id format-type command to restore the default.
By default, the code type for the circuit ID sub-option depends on the padding format of Option 82. Each
field has its own code type.
This command applies to configuring the non-user-defined circuit ID sub-option only. After you configure
the padding content for the circuit ID sub-option using the dhcp-snooping information circuit-id string
command, ASCII is adopted as the code type.
Related commands: display dhcp-snooping information.
Examples
# Configure the padding format for the non-user-defined circuit ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information circuit-id format-type ascii
dhcp-snooping information circuit-id string
Syntax
dhcp-snooping information [ vlan vlan-id ] circuit-id string circuit-id
84
undo dhcp-snooping information [ vlan vlan-id ] circuit-id string
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
vlan vlan-id: Specifies a VLAN ID, in the range of 1 to 4094.
circuit-id: Padding content for the user-defined circuit ID sub-option, a case-sensitive string of 3 to 63
characters.
Description
Use the dhcp-snooping information circuit-id string command to configure the padding content for the
user-defined circuit ID sub-option.
Use the undo dhcp-snooping information circuit-id string command to restore the default.
By default, the padding content for the circuit ID sub-option depends on the padding format of Option
82.
•
After you configure the padding content for the circuit ID sub-option using this command, ASCII is
adopted as the code type.
•
If a VLAN is specified, the configured circuit ID sub-option only takes effect within the VLAN; if no
VLAN is specified, the configured circuit ID sub-option takes effect in all VLANs. The former case
has a higher priority. The circuit ID sub-option specified for a VLAN will be padded for packets
within the VLAN.
Related commands: dhcp-snooping information format and display dhcp-snooping information.
Examples
# Configure the padding content for the user-defined circuit ID sub-option as company001.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information circuit-id string company001
dhcp-snooping information enable
Syntax
dhcp-snooping information enable
undo dhcp-snooping information enable
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
None
85
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.
Related commands: display dhcp-snooping information.
Examples
# Configure DHCP snooping to support Option 82.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable
dhcp-snooping information format
Syntax
dhcp-snooping information format { normal | verbose [ node-identifier { mac | sysname | user-defined
node-identifier } ] }
undo dhcp-snooping information format
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
normal: Specifies the normal padding format.
verbose: Specifies the verbose padding format.
node-identifier { mac | sysname | user-defined node-identifier }: Specifies access node identifier. By
default, the node MAC address is used as the node identifier.
•
mac indicates using MAC address as the node identifier.
•
sysname indicates using the device name of a node as the node identifier.
•
user-defined node-identifier indicates using a specified character string as the node identifier, in
which node-identifier is a string of 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.
By default, the padding format for Option 82 is normal.
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.
Related commands: display dhcp-snooping information.
86
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
dhcp-snooping information remote-id format-type
Syntax
dhcp-snooping information remote-id format-type { ascii | hex }
undo dhcp-snooping information remote-id format-type
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
ascii: Specifies the code type for the remote ID sub-option as ascii.
hex: Specifies the code type for the remote ID sub-option as hex.
Description
Use the dhcp-snooping information remote-id format-type command to configure the code type for the
non-user-defined remote ID sub-option.
Use the undo dhcp-snooping information remote-id format-type command to restore the default.
By default, the code type for the remote ID sub-option is HEX.
NOTE:
This command applies to configuring a non-user-defined remote ID sub-option only. After you configure
the padding content for the remote ID sub-option using the dhcp-snooping information remote-id string
command, ASCII is adopted as the code type.
Related commands: display dhcp-snooping information.
Examples
# Configure the code type for the non-user-defined remote ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information remote-id format-type ascii
dhcp-snooping information remote-id string
Syntax
dhcp-snooping information [ vlan vlan-id ] remote-id string { remote-id | sysname }
undo dhcp-snooping information [ vlan vlan-id ] remote-id string
87
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
vlan vlan-id: Specifies a VLAN ID, in the range of 1 to 4094.
remote-id: Padding content for the user-defined circuit ID sub-option, a case-sensitive string of 1 to 63
characters.
sysname: Specifies the device name as the padding content for the remote ID sub-option.
Description
Use the dhcp-snooping information remote-id string command to configure the padding content for the
user-defined remote ID sub-option.
Use the undo dhcp-snooping information remote-id string command to restore the default.
By default, the padding content for the remote ID sub-option depends on the padding format of Option
82.
•
After you configure the padding content for the remote ID sub-option using this command, ASCII is
adopted as the code type.
•
If a VLAN is specified, the configured remote ID sub-option only takes effect within the VLAN; if no
VLAN is specified, the configured remote ID sub-option takes effect in all VLANs. The former case
has a higher priority. The remote ID sub-option configured for a VLAN will be padded for the
packets within the VLAN.
NOTE:
If you want to specify the character string sysname (a case-insensitive character string) as the padding
content for the remote ID sub-option, you need to use quotation marks to make it take effect. For example,
if you want to specify Sysname as the padding content for the remote ID sub-option, you need to enter the
dhcp relay information remote-id string “Sysname” command.
Related commands: dhcp-snooping information format and display dhcp-snooping information.
Examples
# Configure the padding content for the remote ID sub-option as device001.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information remote-id string device001
dhcp-snooping information strategy
Syntax
dhcp-snooping information strategy { drop | keep | replace }
undo dhcp-snooping information strategy
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
88
Default level
2: System level
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.
By default, the handling strategy for Option 82 in requesting messages is replace.
Related commands: display dhcp-snooping information.
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
dhcp-snooping rate-limit
Syntax
dhcp-snooping rate-limit rate
undo dhcp-snooping rate-limit
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
rate: Maximum rate of incoming DHCP packets, ranging from 64 to 512 Kbps.
Description
Use the dhcp-snooping rate-limit command to configure the maximum rate of incoming DHCP packets .
Use the undo dhcp-snooping rate-limit command to restore the default.
By default, DHCP packet rate limit is disabled.
89
NOTE:
• This command takes effect only after you enable DHCP snooping.
• An interface configured with DHCP packet rate limit discards incoming DHCP packets exceeding the
specified maximum rate.
• If a Layer 2 Ethernet port belongs to an aggregation group, it uses the DHCP packet maximum rate
configured on the corresponding Layer 2 aggregate interface.
Examples
# Set the maximum rate of incoming DHCP packets on Layer 2 Ethernet port GigabitEthernet 1/0/1 to
64 Kbps.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping rate-limit 64
dhcp-snooping trust
Syntax
dhcp-snooping trust [ no-user-binding ]
undo dhcp-snooping trust
View
Layer 2 Ethernet port view, Layer 2 aggregate interface view
Default level
2: System level
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 records the IP-to-MAC bindings of clients.
Description
Use the dhcp-snooping trust command to configure a port as a trusted port.
Use the undo dhcp-snooping trust command to restore the default state of a port.
All ports are untrusted by default.
After enabling DHCP snooping, you need to specify the ports connected to the valid DHCP servers as
trusted to ensure that DHCP clients can obtain valid IP addresses.
Related commands: display dhcp-snooping trust.
Examples
# Specify GigabitEthernet 1/0/1 as a trusted port and enable 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
90
display dhcp-snooping
Syntax
display dhcp-snooping [ ip ip-address ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ip ip-address: Displays the DHCP snooping entries corresponding to the specified IP address.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp-snooping command to display DHCP snooping entries.
NOTE:
Only the DHCP snooping entries containing IP-to-MAC bindings that are present both in the DHCP-ACK
and DHCP-REQUEST messages are displayed by using the display dhcp-snooping command.
Related commands: dhcp-snooping and reset dhcp-snooping.
Examples
# Display all DHCP snooping entries.
<Sysname> display dhcp-snooping
DHCP Snooping is enabled.
The client binding table for all untrusted ports.
Type : D--Dynamic , S--Static , R--Recovering
Type IP Address
MAC Address
Lease
VLAN SVLAN Interface
==== =============== ============== ============ ==== ===== =================
D
---
10.1.1.1
00e0-fc00-0006 286
1 dhcp-snooping item(s) found
1
2
GigabitEthernet1/0/1
---
Table 16 Output description
Field
Description
Entry type, which can be:
Type
• D: Dynamic
• S: Static. Static DHCP snooping entries are not supported.
• R: Specifies that the DHCP snooping entry is being restored through the
DHCP snooping entry file, and the interface in the entry is invalid.
91
Field
Description
IP Address
IP address assigned to the DHCP client
MAC Address
MAC address of the DHCP client
Lease
Lease period left (in seconds)
VLAN
Outer VLAN tag when DHCP snooping and QinQ are both enabled or the
DHCP snooping device receives a packet with two VLAN tags; or VLAN
where the port connecting the DHCP client resides
SVLAN
Inner VLAN tag when DHCP snooping and QinQ are both enabled or the
DHCP snooping device receives a packet with two VLAN tags; or N/A.
Interface
Port to which the DHCP client is connected
display dhcp-snooping binding database
Syntax
display dhcp-snooping binding database [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp-snooping binding database command to display the DHCP snooping entry file
information.
Examples
# Display the DHCP snooping entry file information.
<Sysname> display dhcp-snooping binding database
File name
Update interval
:
:
Latest read time
:
Latest write time
Status
:
:
flash:/database.dhcp
10 minutes
Jul 15 2008 16:38:22
Jul 15 2008 16:38:24
Last write succeeded.
92
Table 17 Output description
Field
Description
File name
File name
Update interval
Interval at which the DHCP snooping entry file is refreshed
Latest read time
The last time when the file is read
Latest write time
The last time when the file is written
Status
Indicates whether the file was written successfully last time
display dhcp-snooping information
Syntax
display dhcp-snooping information { all | interface interface-type interface-number } [ | { begin |
exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays the Option 82 configuration information of all Layer 2 Ethernet ports.
interface interface-type interface-number: Displays the Option 82 configuration information of a
specified interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dhcp-snooping information command to display Option 82 configuration information
on the DHCP snooping device.
Examples
# Display the Option 82 configuration information of all interfaces.
<Sysname> display dhcp-snooping information all
Interface: GigabitEthernet 1/0/1
Status: Enable
Strategy: Replace
Format: Verbose
Circuit ID format-type: HEX
Remote ID format-type: ASCII
Node identifier: aabbcc
93
User defined:
Circuit ID: company001
Interface: GigabitEthernet 1/0/2
Status: Disable
Strategy: Keep
Format: Normal
Circuit ID format-type: HEX
Remote ID format-type: ASCII
User defined:
Circuit ID: company001
Remote ID: device001
VLAN 10:
Circuit ID: vlan10@company001
VLAN 20:
Remote ID: device001
display dhcp-snooping packet statistics
Syntax
In standalone mode:
display dhcp-snooping packet statistics [ slot slot-number ] [ | { begin | exclude | include }
regular-expression ]
In IRF mode:
display dhcp-snooping packet statistics [ chassis chassis-number slot slot-number ] [ | { begin | exclude
| include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays the DHCP packet statistics of the interface card specified by the slot number. (In
standalone mode)
chassis chassis-number slot slot-number: Displays the DHCP packet statistics of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters
94
Description
Use the display dhcp-snooping packet statistics command to display DHCP packet statistics on the DHCP
snooping device.
•
In standalone mode, executing the display dhcp-snooping packet statistics command without a slot
specified displays DHCP packet statistics on the card where the command is executed.
•
In IRF mode, executing the display dhcp-snooping packet statistics command without chassis
chassis-number slot slot-number specified displays DHCP packet statistics on the card of the
member switch where the command is executed.
Related commands: reset dhcp-snooping packet statistics.
Examples
# Display DHCP packet statistics on the DHCP snooping device.
<Sysname> display dhcp-snooping packet statistics
DHCP packets received
: 100
DHCP packets sent
: 200
Packets dropped due to rate limitation : 20
Dropped invalid packets
: 0
display dhcp-snooping trust
Syntax
display dhcp-snooping trust [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
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
=========================
============
95
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.
reset dhcp-snooping
Syntax
reset dhcp-snooping { all | ip ip-address }
View
User view
Default level
2: System level
Parameters
all: Clears all DHCP snooping entries.
ip ip-address: Clears the DHCP snooping entries of the specified IP address.
Description
Use the reset dhcp-snooping command to clear DHCP snooping entries.
Related commands: display dhcp-snooping.
Examples
# Clear all DHCP snooping entries.
<Sysname> reset dhcp-snooping all
reset dhcp-snooping packet statistics
Syntax
In standalone mode:
reset dhcp-snooping packet statistics [ slot slot-number ]
In IRF mode:
reset dhcp-snooping packet statistics [ chassis chassis-number slot slot-number ]
View
User view
Default level
1: Monitor level
Parameters
slot slot-number: Clears the DHCP packet statistics of the interface card specified by the slot number. (In
standalone mode)
chassis chassis-number slot slot-number: Clears the DHCP packet statistics of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
96
Description
Use the reset dhcp-snooping packet statistics command to clear DHCP packet statistics on the DHCP
snooping device.
Note the following:
•
In standalone mode, executing the reset dhcp-snooping packet statistics command without a slot
specified clears DHCP packet statistics on the card where the command is executed.
•
In IRF mode, executing the reset dhcp-snooping packet statistics command without chassis
chassis-number slot slot-number specified clears DHCP packet statistics on the card of the member
switch where the command is executed.
Related commands: display dhcp-snooping packet statistics.
Examples
# Clear DHCP packet statistics on the DHCP snooping device.
<Sysname> reset dhcp-snooping packet statistics
97
IPv4 DNS configuration commands
NOTE:
The term interface in this document refers to Layer 3 interfaces, including VLAN interfaces and route-mode
(or Layer 3) Ethernet ports. You can set an Ethernet port to operate in route mode by using the port
link-mode route command (see Layer 2—LAN Switching Configuration Guide).
display dns domain
Syntax
display dns domain [ dynamic ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
dynamic: Displays the domain name suffixes dynamically obtained through DHCP or other protocols.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dns domain command to display the domain name suffixes.
Related commands: dns domain.
Examples
# Display domain name suffixes.
<Sysname> display dns domain
Type:
D:Dynamic
S:Static
No.
Type
Domain-name
1
S
com
98
Table 18 Output description
Field
Description
No
Sequence number
Type
Type of domain name suffix: S represents a statically configured domain name suffix,
and D represents a domain name suffix obtained dynamically through DHCP.
Domain-name
Domain name suffix
display dns host
Syntax
display dns host [ ip | ipv6 | naptr | srv ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ip: Displays the dynamic cache information of type A queries. A type A query resolves a domain name
to the mapped IPv4 address.
ipv6: Displays the dynamic cache information of type AAAA queries. A type AAAA query resolves a
domain name to the mapped IPv6 address.
naptr: Displays the dynamic cache information of NAPTR queries. A NAPTR query offers the replacement
rule of a character string to convert the character string to a domain name.
srv: Displays the dynamic cache information of SRV queries. An SRV query offers the domain name of a
certain service site.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dns host command to display the dynamic DNS cache information.
Without any keyword specified, the dynamic DNS cache information of all query types will be displayed.
Related commands: reset dns host.
Examples
# Display the dynamic DNS cache information of all query types.
<Sysname> display dns host
No.
Host
TTL
Type
1
sample.com
3132 IP
99
Reply Data
192.168.10.1
2
sample.net
2925 IPv6
3
sip.sample.com
3122 NAPTR 100 10 u sip+E2U !^.*$!sip:info.se!i
FE80::4904:4448
4
website.tcp.sample.com
3029 SRV
10 10 8080 iis.sample.com
Table 19 Output description
Field
Description
No
Sequence number
Host
Domain name for query
TTL
Time that a mapping can be stored in the cache (in seconds)
Type
Query type, including IP, IPv6, NAPTR, and SRV
Reply data concerning the query type:
Reply Data
• For an IP query, the reply data is an IPv4 address.
• For an IPv6 query, the reply data is an IPv6 address.
• For a NAPTR query, the reply data comprises order, preference, flags,
services, regular expression, and replacement.
• For an SRV query, the reply data comprises the priority, weight, port, and
target domain name.
display dns server
Syntax
display dns server [ dynamic ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
dynamic: Displays the DNS server information dynamically obtained through DHCP or other protocols
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dns server command to display the IPv4 DNS server information.
Related commands: dns server.
Examples
# Display the IPv4 DNS server information.
<Sysname> display dns server
Type:
100
D:Dynamic
DNS Server
1
S:Static
Type
IP Address
S
169.254.65.125
Table 20 Output description
Field
Description
DNS Server
Sequence number of the DNS server, configured automatically by the device,
starting from 1.
Type
Type of domain name server: S represents a statically configured DNS server, and
D represents a DNS server obtained dynamically through DHCP.
IP Address
IPv4 address of the DNS server
display ip host
Syntax
display ip host [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ip host command to display the host names and corresponding IPv4 addresses in the
static domain name resolution table.
Examples
# Display the host names and corresponding IPv4 addresses in the static domain name resolution table.
<Sysname> display ip host
Host
Age
Flags
Address
My
0
static
1.1.1.1
Aa
0
static
2.2.2.4
Table 21 Output description
Field
Description
Host
Host name
101
Field
Description
Time to live. 0 means that the static mapping will never age out.
Age
Flags
Address
You can only manually remove the static mappings between host names and IPv4
addresses.
Mapping type
Static represents static IPv4 domain name resolution.
Host IPv4 address
dns domain
Syntax
dns domain domain-name
undo dns domain [ domain-name ]
View
System view
Default level
2: System level
Parameters
domain-name: Domain name suffix, consisting of character strings separated by a dot (for example,
aabbcc.com). Each separated string contains no more than 63 characters. A domain name suffix may
include case-insensitive letters, digits, hyphens (-), underscores (_), and dots (.), with a total length of 238
characters.
Description
Use the dns domain command to configure a domain name suffix. The system can automatically add the
suffix to part of the domain name you entered for resolution.
Use the undo dns domain command to delete a domain name suffix (with a domain name suffix
specified) or all domain name suffixes (with no domain name suffix specified).
No domain name suffix is configured by default. Only the provided domain name is resolved.
NOTE:
• The domain name suffix configured with the dns domain command is applicable to both IPv4 DNS and
IPv6 DNS.
• You can configure a maximum of 10 domain name suffixes.
Related commands: display dns domain.
Examples
# Configure com as a DNS suffix.
<Sysname> system-view
[Sysname] dns domain com
102
dns resolve
Syntax
dns resolve
undo dns resolve
View
System view
Default level
2: System level
Parameters
None
Description
Use the dns resolve command to enable dynamic domain name resolution.
Use the undo dns resolve command to disable dynamic domain name resolution.
Dynamic domain name resolution is disabled by default.
This command is applicable to both IPv4 DNS and IPv6 DNS.
Examples
# Enable dynamic domain name resolution.
<Sysname> system-view
[Sysname] dns resolve
dns server
Syntax
In system view:
dns server ip-address
undo dns server [ ip-address ]
In interface view:
dns server ip-address
undo dns server ip-address
View
System view, interface view
Default level
2: System level
Parameters
ip-address: Specifies the IPv4 address of the DNS server.
Description
Use the dns server command to specify a DNS server.
103
Use the undo dns server to remove DNS servers.
No DNS server is specified by default.
•
You can configure up to six DNS servers, including those with IPv6 addresses, in system view, and
up to six DNS servers on all interfaces of a device.
•
A DNS server configured in system view has a higher priority than one configured in interface view.
A DNS server configured earlier has a higher priority than one configured later in the same view.
A DNS server manually configured has a higher priority than one dynamically obtained through
DHCP.
•
Running the undo dns server command in system view will delete all DNS servers configured in
system view and interface view. Running the undo dns server ip-address command in system view
or interface view will delete the specific DNS server in system view or interface view.
Related commands: display dns server.
Examples
# Specify the DNS server 172.16.1.1 in system view.
<Sysname> system-view
[Sysname] dns server 172.16.1.1
ip host
Syntax
ip host hostname ip-address
undo ip host hostname [ ip-address ]
View
System view
Default level
2: System level
Parameters
hostname: Specifies the host name, consisting of 1 to 255 characters, including case-insensitive letters,
numbers, hyphens (-), underscores (_), or dots (.). The host name must include at least one letter.
ip-address: Specifies the IPv4 address of the specified host in dotted decimal notation.
Description
Use the ip host command to create a host name to IPv4 address mapping in the static resolution table.
Use the undo ip host command to remove a mapping.
No mappings are created by default.
Each host name can correspond to only one IPv4 address. The IPv4 address you last assign to the host
name will overwrite the previous one if there is any.
Related commands: display ip host.
Examples
# Map the IP address 10.110.0.1 to the host name aaa.
<Sysname> system-view
[Sysname] ip host aaa 10.110.0.1
104
reset dns host
Syntax
reset dns host [ ip | ipv6 | naptr | srv ]
View
User view
Default level
2: System level
Parameters
ip: Clears the dynamic cache information of type A queries. A type A query resolves a domain name to
the mapped IPv4 address.
ipv6: Clears the dynamic cache information of type AAAA queries. A type AAAA query resolves a
domain name to the mapped IPv6 address.
naptr: Clears the dynamic cache information of NAPTR queries. A NAPTR query offers the replacement
rule of a character string to convert the character string to a domain name.
srv: Clears the dynamic cache information of SRV queries. An SRV query offers the domain name of a
certain service site.
Description
Use the reset dns host command to clear information of the dynamic DNS cache.
Without any keyword specified, this command clears the dynamic DNS cache information of all query
types.
Related commands: display dns host.
Examples
# Clear the dynamic DNS cache information of all query types.
<Sysname> reset dns host
105
IP performance optimization configuration
commands
NOTE:
The term interface in this document refers to Layer 3 interfaces, including VLAN interfaces and route-mode
(or Layer 3) Ethernet ports. You can set an Ethernet port to operate in route mode by using the port
link-mode route command (see Layer 2—LAN Switching Configuration Guide).
display fib
Syntax
display fib [ vpn-instance vpn-instance-name ] [ acl acl-number | ip-prefix ip-prefix-name ] [ | { begin |
exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance vpn-instance-name: Displays the FIB entries of the specified VPN. The vpn-instance-name
argument is a case-sensitive string of 1 to 31 characters. Without this option specified, FIB entries of the
public network are displayed.
acl acl-number: Displays FIB entries matching a specified ACL numbered from 2000 to 2999. If the
specified ACL does not exist, all FIB entries are displayed.
ip-prefix ip-prefix-name: Displays FIB entries matching a specified IP prefix list, a string of 1 to 19
characters. If the specified IP prefix list does not exist, all FIB entries are displayed.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display fib command to display FIB entries. If no parameters are specified, all FIB entries will be
displayed.
Examples
# Display all FIB entries.
<Sysname> display fib
106
Destination count: 4
FIB entry count: 4
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
R:Relay
Destination/Mask
Nexthop
Flag
OutInterface
10.2.0.0/16
10.2.1.1
U
Vlan1
InnerLabel Token
10.2.1.1/32
127.0.0.1
UH
InLoop0
Null
Invalid
127.0.0.0/8
127.0.0.1
U
InLoop0
Null
Invalid
127.0.0.1/32
127.0.0.1
UH
InLoop0
Null
Invalid
Null
Invalid
# Display FIB information matching ACL 2000.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 10.2.0.0 0.0.255.255
[Sysname-acl-basic-2000] display fib acl 2000
Destination count: 2
FIB entry count: 2
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
R:Relay
Destination/Mask
Nexthop
Flag
OutInterface
10.2.0.0/16
10.2.1.1
U
Vlan1
10.2.1.1/32
127.0.0.1
UH
InLoop0
InnerLabel Token
Null
Invalid
Null
Invalid
# Display all entries that contain the string 127 and start from the first one.
<Sysname> display fib | begin 127
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
R:Relay
Destination/Mask
Nexthop
Flag
OutInterface
InnerLabel Token
10.2.1.1/32
127.0.0.1
UH
InLoop0
Null
Invalid
127.0.0.0/8
127.0.0.1
U
InLoop0
Null
Invalid
127.0.0.1/32
127.0.0.1
UH
InLoop0
Null
Invalid
# Display FIB information passing the IP prefix list abc0.
<Sysname> system-view
[Sysname] ip ip-prefix abc0 permit 10.2.0.0 16
[Sysname] display fib ip-prefix abc0
Destination count: 1
FIB entry count: 1
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
R:Relay
Destination/Mask Nexthop
Flag
10.2.0.0/16
U
10.2.1.1
OutInterface
Vlan1
107
InnerLabel Token
Null
Invalid
Table 22 Output description
Field
Description
Destination count
Total number of destination addresses
FIB entry count
Total number of FIB entries
Destination/Mask
Destination address/length of mask
Nexthop
Next hop address
Flags of routes:
Flag
•
•
•
•
•
•
•
“U”—Usable route
“G”—Gateway route
“H”—Host route
“B”—Blackhole route
“D”—Dynamic route
“S”—Static route
“R”—Relay route
OutInterface
Outbound interface
InnerLabel
Inner label
Token
Link-state packet (LSP) index number
display fib ip-address
Syntax
display fib [ vpn-instance vpn-instance-name ] ip-address [ mask | mask-length ] [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance vpn-instance-name: Displays the FIB entries of the specified VPN. The vpn-instance-name
argument is a case-sensitive string of 1 to 31 characters. Without this option specified, FIB entries of the
public network are displayed.
ip-address: Destination IP address, in dotted decimal notation.
mask: IP address mask.
mask-length: Length of IP address mask.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
108
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display fib ip-address command to display FIB entries that match the specified destination IP
address.
If no mask or mask length is specified, the FIB entry that matches the destination IP address and has the
longest mask will be displayed; if the mask is specified, the FIB entry that exactly matches the specified
destination IP address will be displayed.
Examples
# Display the FIB entries that match the destination IP address of 10.2.1.1.
<Sysname> display fib 10.2.1.1
Destination count: 1
FIB entry count: 1
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
R:Relay
Destination/Mask
Nexthop
Flag
OutInterface
InnerLabel Token
10.2.1.1/32
127.0.0.1
UH
InLoop0
Null
Invalid
For description about the output, see Table 22.
display icmp statistics
Syntax
In standalone mode:
display icmp statistics [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display icmp statistics [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays the ICMP statistics of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Displays the ICMP statistics of a card on an IRF member switch.
The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument refers
to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
109
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display icmp statistics command to display ICMP statistics.
Related commands: display ip interface and reset ip statistics.
Examples
# Display ICMP statistics.
<Sysname> display icmp statistics
Input: bad formats
0
bad checksum
0
echo
5
destination unreachable 0
source quench 0
redirects
0
echo reply
10
parameter problem
0
timestamp
0
information request
0
mask replies
0
mask requests 0
time exceeded 0
Output:echo
10
destination unreachable 0
source quench 0
redirects
0
echo reply
5
parameter problem
0
timestamp
0
information reply
0
mask replies
0
mask requests 0
time exceeded 0
Table 23 Output description
Field
Description
bad formats
Number of input wrong format packets
bad checksum
Number of input wrong checksum packets
echo
Number of input/output echo packets
destination unreachable
Number of input/output destination unreachable packets
source quench
Number of input/output source quench packets
redirects
Number of input/output redirection packets
echo reply
Number of input/output replies
parameter problem
Number of input/output parameter problem packets
timestamp
Number of input/output time stamp packets
information request
Number of input information request packets
mask requests
Number of input/output mask requests
mask replies
Number of input/output mask replies
information reply
Number of output information reply packets
time exceeded
Number of input/output expiration packets
110
display ip socket
Syntax
In standalone mode:
display ip socket [ socktype sock-type ] [ task-id socket-id ] [ slot slot-number ] [ | { begin | exclude |
include } regular-expression ]
In IRF mode:
display ip socket [ socktype sock-type ] [ task-id socket-id ] [ chassis chassis-number slot slot-number ] [ |
{ begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
socktype sock-type: Displays the socket information of this type. The sock type is in the range of 1 to 3,
corresponding to TCP, UDP, and raw IP, respectively.
task-id: Displays the socket information of this task. Task ID is in the range of 1 to 180.
socket-id: Displays the information of the socket. Socket ID is in the range of 0 to 3072.
slot slot-number: Displays the socket information of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Displays the socket information of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ip socket command to display socket information.
Examples
# Display the TCP socket information.
<Sysname> display ip socket
SOCK_STREAM:
Task = VTYD(38), socketid = 1, Proto = 6,
LA = 0.0.0.0:23, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket
option
SO_SETKEEPALIVE,
=
SO_ACCEPTCONN
SO_KEEPALIVE
socket state = SS_PRIV SS_ASYNC
111
SO_REUSEPORT
SO_SENDVPNID(3073)
Task = HTTP(36), socketid = 1, Proto = 6,
LA = 0.0.0.0:80, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_REUSEPORT,
socket state = SS_PRIV SS_NBIO
Task = ROUT(69), socketid = 10, Proto = 6,
LA = 0.0.0.0:179, FA = 192.168.1.45:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_REUSEADDR SO_REUSEPORT SO_SENDVPNID(0),
socket state = SS_PRIV SS_ASYNC
Task = VTYD(38), socketid = 4, Proto = 6,
LA = 192.168.1.40:23, FA = 192.168.1.52:1917,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 237, rb_cc = 0,
socket option = SO_KEEPALIVE SO_OOBINLINE SO_REUSEPORT SO_SENDVPNID(0) SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV SS_ASYNC
Task = VTYD(38), socketid = 3, Proto = 6,
LA = 192.168.1.40:23, FA = 192.168.1.84:1503,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_KEEPALIVE SO_OOBINLINE SO_REUSEPORT SO_SENDVPNID(0) SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV SS_ASYNC
Task = ROUT(69), socketid = 11, Proto = 6,
LA = 192.168.1.40:1025, FA = 192.168.1.45:179,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR SO_LINGER SO_SENDVPNID(0),
socket state = SS_ISCONNECTED SS_PRIV SS_ASYNC
SOCK_DGRAM:
Task = NTPT(37), socketid = 1, Proto = 17,
LA = 0.0.0.0:123, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM SO_SENDVPNID(3073),
socket state = SS_PRIV
Task = AGNT(51), socketid = 1, Proto = 17,
LA = 0.0.0.0:161, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM SO_SENDVPNID(3073),
socket state = SS_PRIV SS_NBIO SS_ASYNC
Task = RDSO(56), socketid = 1, Proto = 17,
LA = 0.0.0.0:1024, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM,
socket state = SS_PRIV
112
Task = TRAP(52), socketid = 1, Proto = 17,
LA = 0.0.0.0:1025, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 0, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM,
socket state = SS_PRIV
Task = RDSO(56), socketid = 2, Proto = 17,
LA = 0.0.0.0:1812, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM,
socket state = SS_PRIV
SOCK_RAW:
Task = ROUT(69), socketid = 8, Proto = 89,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 262144, rcvbuf = 262144, sb_cc = 0, rb_cc = 0,
socket option = SO_SENDVPNID(0) SO_RCVVPNID(0),
socket state = SS_PRIV SS_ASYNC
Task = ROUT(69), socketid = 3, Proto = 2,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 32767, rcvbuf = 256000, sb_cc = 0, rb_cc = 0,
socket option = SO_SENDVPNID(0) SO_RCVVPNID(0),
socket state = SS_PRIV SS_NBIO SS_ASYNC
Task = ROUT(69), socketid = 2, Proto = 103,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 65536, rcvbuf = 256000, sb_cc = 0, rb_cc = 0,
socket option = SO_SENDVPNID(0) SO_RCVVPNID(0),
socket state = SS_PRIV SS_NBIO SS_ASYNC
Task = ROUT(69), socketid = 1, Proto = 65,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 32767, rcvbuf = 256000, sb_cc = 0, rb_cc = 0,
socket option = 0,
socket state = SS_PRIV SS_NBIO SS_ASYNC
Task = RSVP(73), socketid = 1, Proto = 46,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 4194304, rcvbuf = 4194304, sb_cc = 0, rb_cc = 0,
socket option = 0,
socket state = SS_PRIV SS_NBIO SS_ASYNC
Table 24 Output description
Field
Description
SOCK_STREAM
TCP socket
113
Field
Description
SOCK_DGRAM
UDP socket
SOCK_RAW
Raw IP socket
Task
Task number
socketid
Socket ID
Proto
Protocol number of the socket, indicating the protocol type that IP carries
LA
Local address and local port number
FA
Remote address and remote port number
sndbuf
Sending buffer size of the socket, in bytes
rcvbuf
Receiving buffer size of the socket, in bytes
sb_cc
Current data size in the sending buffer (available only for a TCP that can buffer
data)
rb_cc
Data size currently in the receiving buffer
socket option
Socket option
socket state
Socket state
display ip statistics
Syntax
In standalone mode:
display ip statistics [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display ip statistics [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays the IP packet statistics of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Displays the IP packet statistics of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
114
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ip statistics command to display statistics of IP packets.
Related commands: display ip interface and reset ip statistics.
Examples
# Display statistics of IP packets.
<Sysname> display ip statistics
Input:
Output:
sum
7120
local
112
bad protocol
0
bad format
0
bad checksum
0
bad options
0
forwarding
0
local
27
dropped
0
no route
2
output
0
compress fails 0
Fragment:input
0
dropped
0
fragmented
0
couldn't fragment 0
0
timeouts
Reassembling:sum
0
Table 25 Output description
Field
Input:
Output:
Fragment:
Reassembling
Description
sum
Total number of packets received
local
Total number of packets with destination being local
bad protocol
Total number of unknown protocol packets
bad format
Total number of packets with incorrect format
bad checksum
Total number of packets with incorrect checksum
bad options
Total number of packets with incorrect option
forwarding
Total number of packets forwarded
local
Total number of packets sent from the local
dropped
Total number of packets discarded
no route
Total number of packets for which no route is available
compress fails
Total number of packets failed to be compressed
input
Total number of fragments received
output
Total number of fragments sent
dropped
Total number of fragments dropped
fragmented
Total number of packets successfully fragmented
couldn't fragment
Total number of packets that failed to be fragmented
sum
Total number of packets reassembled
timeouts
Total number of reassembly timeout fragments
115
display tcp statistics
Syntax
display tcp statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display tcp statistics command to display statistics of TCP traffic.
Related commands: display tcp status and reset tcp statistics.
Examples
# Display statistics of TCP traffic.
<Sysname> display tcp statistics
Received packets:
Total: 8457
packets in sequence: 3660 (5272 bytes)
window probe packets: 0, window update packets: 0
checksum error: 0, offset error: 0, short error: 0
duplicate packets: 1 (8 bytes), partially duplicate packets: 0 (0 bytes)
out-of-order packets: 17 (0 bytes)
packets of data after window: 0 (0 bytes)
packets received after close: 0
ACK packets: 4625 (141989 bytes)
duplicate ACK packets: 1702, too much ACK packets: 0
Sent packets:
Total: 6726
urgent packets: 0
control packets: 21 (including 0 RST)
window probe packets: 0, window update packets: 0
data packets: 6484 (141984 bytes) data packets retransmitted: 0 (0 bytes)
ACK-only packets: 221 (177 delayed)
116
Retransmitted timeout: 0, connections dropped in retransmitted timeout: 0
Keepalive timeout: 1682, keepalive probe: 1682, Keepalive timeout, so connections
disconnected : 0
Initiated connections: 0, accepted connections: 22, established connections: 22
Closed connections: 49 (dropped: 0, initiated dropped: 0)
Packets dropped with MD5 authentication: 0
Packets permitted with MD5 authentication: 0
Table 26 Output description
Field
Received
packets:
Sent packets:
Description
Total
Total number of packets received
packets in sequence
Number of packets arriving in sequence
window probe packets
Number of window probe packets received
window update packets
Number of window update packets received
checksum error
Number of checksum error packets received
offset error
Number of offset error packets received
short error
Number of received packets with length being too small
duplicate packets
Number of completely duplicate packets received
partially duplicate packets
Number of partially duplicate packets received
out-of-order packets
Number of out-of-order packets received
packets of data after window
Number of packets outside the receiving window
packets received after close
Number of packets that arrived after connection is closed
ACK packets
Number of ACK packets received
duplicate ACK packets
Number of duplicate ACK packets received
too much ACK packets
Number of ACK packets for data unsent
Total
Total number of packets sent
urgent packets
Number of urgent packets sent
control packets
Number of control packets sent
window probe packets
Number of window probe packets sent; in the brackets are
resent packets
window update packets
Number of window update packets sent
data packets
Number of data packets sent
data packets retransmitted
Number of data packets retransmitted
ACK-only packets
Number of ACK packets sent; in brackets are delayed ACK
packets
Retransmitted timeout
Number of retransmission timer timeouts
connections dropped in retransmitted timeout
Number of connections broken due to retransmission
timeouts
Keepalive timeout
Number of keepalive timer timeouts
117
Field
Description
keepalive probe
Number of keepalive probe packets sent
Keepalive timeout, so connections disconnected
Number of connections broken due to timeout of the
keepalive timer
Initiated connections
Number of connections initiated
accepted connections
Number of connections accepted
established connections
Number of connections established
Closed connections
Number of connections closed; in brackets are connections
closed accidentally (before receiving SYN from the peer)
and connections closed initiatively (after receiving SYN from
the peer)
Packets dropped with MD5 authentication
Number of packets dropped by MD5 authentication
Packets permitted with MD5 authentication
Number of packets permitted by MD5 authentication
display udp statistics
Syntax
display udp statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display udp statistics command to display statistics of UDP packets.
Related commands: reset udp statistics.
Examples
# Display statistics of UDP packets.
<Sysname> display udp statistics
Received packets:
Total: 0
checksum error: 0
shorter than header: 0, data length larger than packet: 0
unicast(no socket on port): 0
118
broadcast/multicast(no socket on port): 0
not delivered, input socket full: 0
input packets missing pcb cache: 0
Sent packets:
Total: 0
Table 27 Output description
Field
Received
packets:
Sent packets:
Description
Total
Total number of UDP packets received
checksum error
Total number of packets with incorrect checksum
shorter than header
Number of packets with data shorter than head
data length larger than packet
Number of packets with data longer than packet
unicast(no socket on port)
Number of unicast packets with no socket on port
broadcast/multicast(no socket on
port)
Number of broadcast/multicast packets without socket
on port
not delivered, input socket full
Number of packets not delivered to an upper layer due to
a full socket cache
input packets missing pcb cache
Number of packets without matching protocol control
block (PCB) cache
Total
Total number of UDP packets sent
ip forward-broadcast (interface view)
Syntax
ip forward-broadcast [ acl acl-number ]
undo ip forward-broadcast
View
Interface view
Default level
2: System level
Parameters
acl acl-number: Specifies the ACL number, in the range of 2000 to 3999. Numbers between 2000 and
2999 are for basic ACLs, and between 3000 and 3999 are for advanced ACLs. Only directed
broadcasts permitted by the ACL can be forwarded.
Description
Use the ip forward-broadcast command to enable the interface to forward directed broadcasts to a
directly connected network.
Use the undo ip forward-broadcast command to disable the interface from forwarding directed
broadcasts to a directly connected network.
By default, an interface is disabled from forwarding directed broadcasts to a directly connected network.
119
Examples
# Enable VLAN-interface 2 to forward the directed broadcasts to a directly-connected network matching
ACL 2001.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ip forward-broadcast acl 2001
ip forward-broadcast (system view)
Syntax
ip forward-broadcast
undo ip forward-broadcast
View
System view
Default level
2: System level
Parameters
None
Description
Use the ip forward-broadcast command to enable the switch to receive directed broadcasts.
Use the undo ip forward-broadcast command to disable the switch from receiving directed broadcasts.
By default, the switch is disabled from receiving directed broadcast.
Examples
# Enable the switch to receive directed broadcasts.
<Sysname> system-view
[Sysname] ip forward-broadcast
ip icmp-extensions
Syntax
ip icmp-extensions { compliant | non-compliant }
undo ip icmp-extensions
View
System view
Default level
2: System level
Parameters
compliant: Specifies the compliant mode.
non-compliant: Specifies the non-compliant mode.
120
Description
Use the ip icmp-extensions command to enable support for ICMP extensions.
Use the undo ip icmp-extensions command to disable support for ICMP extensions.
By default, ICMP extensions are not supported.
Examples
# Enable support for ICMP extensions in compliant mode.
<Sysname> system-view
[Sysname] ip icmp-extensions compliant
ip redirects enable
Syntax
ip redirects enable
undo ip redirects
View
System view
Default level
2: System level
Parameters
None
Description
Use the ip redirects enable command to enable sending of ICMP redirection packets.
Use the undo ip redirects command to disable sending of ICMP redirection packets.
This feature is disabled by default.
Examples
# Enable sending of ICMP redirect packets.
<Sysname> system-view
[Sysname] ip redirects enable
ip ttl-expires enable
Syntax
ip ttl-expires enable
undo ip ttl-expires
View
System view
Default level
2: System level
Parameters
None
121
Description
Use the ip ttl-expires enable command to enable sending of ICMP timeout packets.
Use the undo ip ttl-expires command to disable sending of ICMP timeout packets.
Sending ICMP timeout packets is disabled by default.
If the feature is disabled, the device will not send TTL timeout ICMP packets, but still send “reassembly
timeout” ICMP packets.
Examples
# Enable sending of ICMP timeout packets.
<Sysname> system-view
[Sysname] ip ttl-expires enable
ip unreachables enable
Syntax
ip unreachables enable
undo ip unreachables
View
System view
Default level
2: System level
Parameters
None
Description
Use the ip unreachables enable command to enable sending of ICMP destination unreachable packets.
Use the undo ip unreachables command to disable sending of ICMP destination unreachable packets.
Sending ICMP destination unreachable packets is disabled by default.
Examples
# Enable sending of ICMP destination unreachable packets.
<Sysname> system-view
[Sysname] ip unreachables enable
reset ip statistics
Syntax
In standalone mode:
reset ip statistics [ slot slot-number ]
In IRF mode:
reset ip statistics [ chassis chassis-number slot slot-number ]
View
User view
122
Default level
1: Monitor level
Parameters
slot slot-number: Clears the IP packet statistics of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Clears the IP packet statistics of a card on an IRF member switch.
The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument refers
to the number of the slot where the card resides. (In IRF mode)
Description
Use the reset ip statistics command to clear statistics of IP packets.
Related commands: display ip statistics and display ip interface.
Examples
# Clear statistics of IP packets.
<Sysname> reset ip statistics
reset tcp statistics
Syntax
reset tcp statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the reset tcp statistics command to clear statistics of TCP traffic.
Related commands: display tcp statistics.
Examples
# Display statistics of TCP traffic.
<Sysname> reset tcp statistics
reset udp statistics
Syntax
reset udp statistics
View
User view
Default level
1: Monitor level
123
Parameters
None
Description
Use the reset udp statistics command to clear statistics of UDP traffic.
Examples
# Display statistics of UDP traffic.
<Sysname> reset udp statistics
tcp path-mtu-discovery
Syntax
tcp path-mtu-discovery [ aging minutes | no-aging ]
undo tcp path-mtu-discovery
View
System view
Default level
2: System level
Parameters
aging minutes: Specifies the aging time of the path MTU, in the range of 10 to 30 minutes. The default
aging time is 10 minutes.
no-aging: Do not age out the path MTU.
Description
Use the tcp path-mtu-discovery command to enable TCP path MTU discovery.
Use the undo tcp path-mtu-discovery command to disable TCP path MTU discovery, and disable all
running path MTU timers. New TCP connections do not perform TCP path MTU discovery but existing
TCP connections can still use TCP path MTU discovery.
By default, TCP path MTU discovery is disabled.
Examples
# Enable TCP path MTU discovery and set the path MTU age timer to 20 minutes.
<Sysname> system-view
[Sysname] tcp path-mtu-discovery aging 20
tcp timer fin-timeout
Syntax
tcp timer fin-timeout time-value
undo tcp timer fin-timeout
View
System view
124
Default level
2: System level
Parameters
time-value: Specifies the TCP finwait timer in seconds, in the range of 76 to 3,600.
Description
Use the tcp timer fin-timeout command to configure the length of the TCP finwait timer.
Use the undo tcp timer fin-timeout command to restore the default.
By default, the length of the TCP finwait timer is 675 seconds.
The actual length of the finwait timer is determined by the following formula:
Actual length of the finwait timer = (Configured length of the finwait timer – 75) + configured length of
the synwait timer
Related commands: tcp timer syn-timeout and tcp window.
Examples
# Set the length of the TCP finwait timer to 800 seconds.
<Sysname> system-view
[Sysname] tcp timer fin-timeout 800
tcp timer syn-timeout
Syntax
tcp timer syn-timeout time-value
undo tcp timer syn-timeout
View
System view
Default level
2: System level
Parameters
time-value: Specifies the TCP synwait timer in seconds, in the range of 2 to 600.
Description
Use the tcp timer syn-timeout command to configure the length of the TCP synwait timer.
Use the undo tcp timer syn-timeout command to restore the default.
By default, the value of the TCP synwait timer is 75 seconds.
Related commands: tcp timer fin-timeout and tcp window.
Examples
# Set the length of the TCP synwait timer to 80 seconds.
<Sysname> system-view
[Sysname] tcp timer syn-timeout 80
125
tcp window
Syntax
tcp window window-size
undo tcp window
View
System view
Default level
2: System level
Parameters
window-size: Specifies the size of the send/receive buffer in KB, in the range of 1 to 32.
Description
Use the tcp window command to configure the size of the TCP send/receive buffer.
Use the undo tcp window command to restore the default.
The size of the TCP send/receive buffer is 8 KB by default.
Related commands: tcp timer fin-timeout and tcp timer syn-timeout.
Examples
# Configure the size of the TCP send/receive buffer as 3 KB.
<Sysname> system-view
[Sysname] tcp window 3
126
UDP Helper configuration commands
display udp-helper server
Syntax
display udp-helper server [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
2: System level
Parameters
interface interface-type interface-number: Displays information of forwarded UDP packets on a specified
interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display udp-helper server command to display the information of forwarded UDP packets on the
specified interface or all interfaces.
If interface-type interface-number is not specified, this command displays the information of forwarded
UDP packets on all interfaces.
Examples
# Display the information of forwarded UDP packets on the interface VLAN-interface 1.
<Sysname> display udp-helper server interface vlan-interface 1
Interface name
Vlan-interface1
Server address
Packets sent
192.1.1.2
0
The output shows that the IP address of the destination server corresponding to the interface
VLAN-interface 1 is 192.1.1.2, and that no packets are forwarded to the destination server.
reset udp-helper packet
Syntax
reset udp-helper packet
View
User view
127
Default level
1: Monitor level
Parameters
None
Description
Use the reset udp-helper packet command to clear the statistics of forwarded UDP packets.
Related commands: display udp-helper server.
Examples
# Clear the statistics of the forwarded UDP packets.
<Sysname> reset udp-helper packet
udp-helper enable
Syntax
udp-helper enable
undo udp-helper enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the udp-helper enable command to enable UDP Helper. A device enabled with UDP Helper
functions as a relay agent that converts UDP broadcast packets into unicast packets and forwards them
to a specified destination server.
Use the undo udp-helper enable command to disable UDP Helper.
By default, UDP Helper is disabled.
Examples
# Enable UDP Helper
<Sysname> system-view
[Sysname] udp-helper enable
udp-helper port
Syntax
udp-helper port { port-number | dns | netbios-ds | netbios-ns | tacacs | tftp | time }
undo udp-helper port { port-number | dns | netbios-ds | netbios-ns | tacacs | tftp | time }
View
System view
128
Default level
2: System level
Parameters
port-number: Specifies the UDP port number with which packets need to be forwarded, in the range of
1 to 65535 (except 67 and 68).
dns: Forwards DNS data packets. The corresponding UDP port number is 53.
netbios-ds: Forwards NetBIOS data packets. The corresponding UDP port number is 138.
netbios-ns: Forwards NetBIOS name service data packets. The corresponding UDP port number is 137.
tacacs: Forwards terminal access controller access control system (TACACS) data packet. The
corresponding UDP port number is 49.
tftp: Forwards TFTP data packets. The corresponding UDP port number is 69.
time: Forwards time service data packets. The corresponding UDP port number is 37.
Description
Use the udp-helper port command to enable the forwarding of packets with the specified UDP port
number.
Use the undo udp-helper port command to remove the configured UDP port numbers.
By default, no UDP port number is specified.
You can configure up to 256 UDP ports on a device.
All of the specified UDP port numbers will be removed if UDP Helper is disabled.
Examples
# Forward broadcast packets with the UDP destination port number 100.
<Sysname> system-view
[Sysname] udp-helper port 100
udp-helper server
Syntax
udp-helper server ip-address
undo udp-helper server [ ip-address ]
View
Interface view
Default level
2: System level
Parameters
ip-address: Specifies the IP address of the destination server, in dotted decimal notation.
Description
Use the udp-helper server command to specify the destination server to which UDP packets are
forwarded.
Use the undo udp-helper server command to remove the destination server.
129
No destination server is configured by default.
You can configure up to 20 destination servers on an interface.
Without the ip-address argument, the undo udp-helper server command removes all the destination
servers on an interface.
Related commands: display udp-helper server.
Examples
# Specify the IP address of the destination server as 192.1.1.2 on the interface VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] udp-helper server 192.1.1.2
130
IPv6 basics configuration commands
NOTE:
The term interface in this document refers to Layer 3 interfaces, including VLAN interfaces and route-mode
(or Layer 3) Ethernet ports. You can set an Ethernet port to operate in route mode by using the port
link-mode route command (see Layer 2—LAN Switching Configuration Guide).
display ipv6 fib
Syntax
display ipv6 fib [ vpn-instance vpn-instance-name ] [ acl6 acl6-number | ipv6-prefix ipv6-prefix-name ]
[ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance vpn-instance-name: Displays the IPv6 FIB entries of the specified MPLS L3VPN. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. Without this option specified,
the display ipv6 fib command displays the IPv6 FIB entries of the public network.
acl6 acl6-number: Displays the IPv6 FIB entries permitted by a specified ACL. The ACL number is in the
range of 2000 to 2999. If the specified ACL does not exist, all IPv6 FIB entries are displayed.
ipv6-prefix ipv6-prefix-name: Displays the IPv6 FIB entries matching a specified prefix list. The
ipv6-prefix-name argument is a case-sensitive string of 1 to 19 characters. If the specified prefix list does
not exist, all IPv6 FIB entries are displayed.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 fib command to display IPv6 FIB entries. If no argument is specified, all IPv6 FIB
entries will be displayed.
The device looks up a matching IPv6 FIB entry for forwarding an IPv6 packet.
Examples
# Display all IPv6 FIB entries.
<Sysname> display ipv6 fib
131
FIB Table:
Total number of Routes : 1
Flag:
U:Useable
G:Gateway
Destination:
NextHop
Label
Interface
:
:
:
H:Host
B:Blackhole
D:Dynamic
::1
S:Static
PrefixLength : 128
::1
Flag
: HU
NULL
Token
: 0
InLoopBack0
Table 28 Output description
Field
Description
Total number of Routes
Total number of routes in the FIB
Destination
Destination address
PrefixLength
Prefix length of the destination address
NextHop
Next hop
Route flag:
•
•
•
•
•
•
Flag
U—Usable route
G—Gateway route
H—Host route
B—Black hole route
D—Dynamic route
S—Static route
Label
Label
Token
LSP index number
Interface
Outgoing interface
display ipv6 fib ipv6-address
Syntax
display ipv6 fib [ vpn-instance vpn-instance-name ] ipv6-address [ prefix-length ] [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance vpn-instance-name: Displays the IPv6 FIB entries for a specified MPLS L3VPN. The
vpn-instance-name argument is case-sensitive string of 1 to 31 characters. Without this option specified,
the display ipv6 fib ipv6-address command displays IPv6 FIB entries on the public network and all
private networks.
ipv6-address: Specifies the destination IPv6 address.
132
prefix-length: Specifies the Prefix length of the destination IPv6 address, in the range of 0 to 128.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 fib ipv6-address command to display the IPv6 FIB entry of the specified destination
IPv6 address.
Without the prefix-length argument specified, this command displays the matching IPv6 FIB entry with the
longest prefix.
With the prefix-length argument specified, this command displays the IPv6 FIB entry exactly matching the
specified destination IPv6 address and prefix length.
Examples
# Display the matching IPv6 FIB entry with the longest prefix.
<Sysname> display ipv6 fib ::1
Flag:
U:Useable
G:Gateway
H:Host
B:Blackhole
D:Dynamic
S:Static
Destination:
::1
PrefixLength : 128
NextHop
:
::1
Flag
: HU
Label
:
NULL
Token
: 0
Interface
:
InLoopBack0
Table 29 Output description
Field
Description
Total number of Routes
Total number of routes in the FIB
Destination
Destination address
PrefixLength
Prefix length of the destination address
NextHop
Next hop
Route flag:
•
•
•
•
•
•
Flag
U—Usable route
G—Gateway route
H—Host route
B—Black hole route
D—Dynamic route
S—Static route
Label
Label
Token
LSP index number
Interface
Outgoing interface
133
display ipv6 interface
Syntax
display ipv6 interface [ interface-type [ interface-number ] ] [ brief ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type: Interface type.
interface-number: Interface number.
brief: Displays the brief IPv6 information of an interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 interface command to display the IPv6 information of an interface.
•
If interface-type interface-number is not specified, the IPv6 information of all interfaces is displayed.
•
If only interface-type is specified, the IPv6 information of the interfaces of the specified type is
displayed.
•
If interface-type interface-number is specified, the IPv6 information of the specified interface is
displayed. If the brief keyword is also specified, the brief IPv6 information of the interface is
displayed.
Examples
# Display the IPv6 information of VLAN-interface 2.
<Sysname> display ipv6 interface vlan-interface 2
Vlan-interface2 current state :UP
Line protocol current state :UP
IPv6 is enabled, link-local address is FE80::1234:56FF:FE65:4322
Global unicast address(es):
2001::1, subnet is 2001::/64
10::1234:56FF:FE65:4322, subnet is 10::/64 [AUTOCFG]
[valid lifetime 4641s/preferred lifetime 4637s]
Joined group address(es):
FF02::1:FF00:1
FF02::1:FF65:4322
134
FF02::2
FF02::1
MTU is 1500 bytes
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives:
0
InTooShorts:
0
InTruncatedPkts:
0
InHopLimitExceeds:
0
InBadHeaders:
0
InBadOptions:
0
ReasmReqds:
0
ReasmOKs:
0
InFragDrops:
0
InFragTimeouts:
0
OutFragFails:
0
InUnknownProtos:
0
InDelivers:
0
OutRequests:
0
OutForwDatagrams:
0
InNoRoutes:
0
InTooBigErrors:
0
OutFragOKs:
0
OutFragCreates:
0
InMcastPkts:
0
InMcastNotMembers:
0
OutMcastPkts:
0
InAddrErrors:
0
InDiscards:
0
OutDiscards:
0
Table 30 Output description
Field
Description
Physical state of the interface:
• Administratively DOWN—Indicates that the VLAN interface is
administratively down. The interface is shut down by using the
shutdown command.
Vlan-interface2 current state
• DOWN—Indicates that the VLAN interface is administratively up but
its physical state is down. No ports in the VLAN are up due to a
connection or link failure.
• UP—Indicates that the administrative and physical states of the VLAN
interface are both up.
135
Field
Description
Link layer protocol state of the interface:
Line protocol current state
• DOWN—Indicates that the link layer protocol state of the VLAN
interface is down.
• UP—Indicates that the link layer protocol state of the VLAN interface
is up.
IPv6 is enabled
IPv6 packet forwarding state of the interface (after an IPv6 address is
configured for an interface, IPv6 is automatically enabled on it; IPv6
packet forwarding is enabled in the example)
link-local address
Link-local address configured for the interface
Global unicast address(es)
Global unicast address(es) configured for the interface
valid lifetime
Valid lifetime of the global unicast address obtained through stateless
autoconfiguration
preferred lifetime
Preferred lifetime of the global unicast address obtained through
stateless autoconfiguration
Joined group address(es)
Address(es) of multicast group(s) that the interface has joined
MTU
Maximum transmission unit of the interface
Whether Duplicate Address Detection (DAD) is enabled. In this
example, DAD is enabled.
• If DAD is enabled, the number of attempts to send a Neighbor
ND DAD is enabled, number of
DAD attempts
Solicitation (NS) message for DAD (configured by using the ipv6 nd
dad attempts command) is also displayed.
• If DAD is disabled, ND DAD is disabled is displayed. (You can
disable DAD by setting the number of attempts to send an NS
message for DAD to 0.)
ND reachable time
Time that a neighboring node is considered reachable after reachability
has been confirmed
ND retransmit interval
Interval for retransmitting an NS message
Hosts use stateless autoconfig for
addresses
Hosts use stateless autoconfiguration mode to acquire IPv6 addresses
InReceives
All IPv6 packets received by the interface, including all types of error
packets.
InTooShorts
Received IPv6 packets that are too short, with a length less than 40
bytes, for example.
InTruncatedPkts
Received IPv6 packets with a length less than that specified in the
packets
InHopLimitExceeds
Received IPv6 packets with a hop count exceeding the limit
InBadHeaders
Received IPv6 packets with bad basic headers
InBadOptions
Received IPv6 packets with bad extension headers
ReasmReqds
Received IPv6 fragments
ReasmOKs
Number of packets after reassembly rather than the number of fragments
InFragDrops
IPv6 fragments discarded due to certain error
136
Field
Description
InFragTimeouts
IPv6 fragments discarded because the interval for which they had stayed
in the system buffer exceeded the specified period
OutFragFails
Packets failed in fragmentation on the outbound interface
InUnknownProtos
Received IPv6 packets with unknown or unsupported protocol type
InDelivers
Received IPv6 packets that were delivered to application layer protocols
(such as ICMPv6, TCP, and UDP)
OutRequests
Local IPv6 packets sent by IPv6 application protocols
OutForwDatagrams
Packets forwarded by the outbound interface.
InNoRoutes
IPv6 packets that were discarded because no matched route can be
found
InTooBigErrors
IPv6 packets that were discarded because they exceeded the PMTU
OutFragOKs
Packets that were fragmented on the outbound interface
OutFragCreates
Number of packet fragments after fragmentation on the outbound
interface
InMcastPkts
IPv6 multicast packets received on the interface
InMcastNotMembers
Incoming IPv6 multicast packets that were discarded because the
interface did not belong to the corresponding multicast groups
OutMcastPkts
IPv6 multicast packets sent by the interface
InAddrErrors
IPv6 packets that were discarded due to invalid destination addresses
InDiscards
Received IPv6 packets that were discarded due to resource problems
rather than packet content errors
OutDiscards
Sent packets that were discarded due to resource problems rather than
packet content errors
# Display the brief IPv6 information of all interfaces.
<Sysname> display ipv6 interface brief
*down: administratively down
(s): spoofing
Interface
Physical
Protocol
IPv6 Address
Vlan-interface1
down
down
Unassigned
Vlan-interface2
up
up
2001::1
Vlan-interface100
up
down
Unassigned
Table 31 Output description
Field
Description
*down: administratively down
The interface is down. The interface is shut down by using the
shutdown command.
(s): spoofing
Spoofing attribute of the interface. The link protocol state of the
interface is up, but the link does not exist, or the link is established on
demand, instead of being permanent.
Interface
Name of the interface
137
Field
Description
Physical state of the interface:
• *down—Indicates that the VLAN interface is administratively down.
The interface is shut down using the shutdown command.
Physical
• down—Indicates that the VLAN interface is administratively up but
its physical state is down. No port in the VLAN is up due to a
connection or link failure.
• up—Indicates that the administrative and physical states of the
VLAN interface are both up.
Link layer protocol state of the interface:
• down—Indicates that the network layer protocol state of the VLAN
Protocol
interface is down.
• up—Indicates that the network layer protocol state of the VLAN
interface is up.
IPv6 Address
IPv6 address of the interface. Only the first of configured IPv6
addresses is displayed. If no address is configured for the interface,
Unassigned will be displayed.
display ipv6 neighbors
Syntax
In standalone mode:
display ipv6 neighbors { { ipv6-address | all | dynamic | static } [ slot slot-number ] | interface
interface-type interface-number | vlan vlan-id } [ verbose ] [ | { begin | exclude | include }
regular-expression ]
In IRF mode:
display ipv6 neighbors { { ipv6-address | all | dynamic | static } [ chassis chassis-number slot
slot-number ] | interface interface-type interface-number | vlan vlan-id } [ verbose ] [ | { begin | exclude
| include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ipv6-address: Specifies the IPv6 address whose neighbor information is to be displayed.
all: Displays information of all neighbors, including neighbors acquired dynamically and configured
statically on the public network and all private networks.
dynamic: Displays information of all neighbors acquired dynamically.
static: Displays information of all neighbors configured statically.
slot slot-number: Displays the neighbor information of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Displays the neighbor information of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
138
interface interface-type interface-number: Displays information of the neighbors of a specified interface.
vlan vlan-id: Displays information of the neighbors of a specified VLAN whose ID ranges from 1 to 4094.
verbose: Displays the detailed information of neighbors.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 neighbors command to display neighbor information.
You can use the reset ipv6 neighbors command to clear specific IPv6 neighbor information.
Related commands: ipv6 neighbor, reset ipv6 neighbors.
Examples
# Display all neighbor information.
<Sysname> display ipv6 neighbors all
Type: S-Static
IPv6 Address
D-Dynamic
Link-layer
FE80::200:5EFF:FE32:B800
VID
0000-5e32-b800
Interface State T
N/A GE1/0/1
REACH
Age
S
-
# Display the detailed information of all neighbors.
<Sysname> display ipv6 neighbors all verbose
Type: S-Static
D-Dynamic
IPv6 Address
: FE80::200:5EFF:FE32:B800
Link-layer
: 0000-5e32-b800
State
Vpn-instance
VID : N/A
: REACH
Type: S
Interface
Age
: GE1/0/1
: -
: vpn1
Table 32 Output description
Field
Description
IPv6 Address
IPv6 address of a neighbor
Link-layer
Link layer address (MAC address) of a neighbor
VID
VLAN to which the interface connected with a neighbor belongs
Interface
Interface connected with a neighbor
139
Field
Description
State of a neighbor:
• INCMP—The address is being resolved. The link layer address of the neighbor is
unknown.
State
• REACH—The neighbor is reachable.
• STALE—The reachability of the neighbor is unknown. The device will not verify the
reachability any longer unless data is sent to the neighbor.
• DELAY—The reachability of the neighbor is unknown. The device sends an NS
message after a delay.
• PROBE—The reachability of the neighbor is unknown. The device sends an NS
message to verify the reachability of the neighbor.
Type
Type of neighbor information, including static configuration (represented by S) and
dynamic acquisition (represented by D).
Age
For a static entry, a hyphen (-) is displayed. For a dynamic entry, the reachable time
(in seconds) elapsed is displayed, and if it is never reachable, a number sign (#) is
displayed (for a neighbor acquired dynamically).
Vpn-instance
Name of a VPN. [No Vrf] indicates no VPN is configured.
display ipv6 neighbors count
Syntax
In standalone mode:
display ipv6 neighbors { { all | dynamic | static } [ slot slot-number ] | interface interface-type
interface-number | vlan vlan-id } count [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display ipv6 neighbors { { all | dynamic | static } [ chassis chassis-number slot slot-number ] | interface
interface-type interface-number | vlan vlan-id } count [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays the total number of all neighbor entries, including neighbor entries acquired dynamically
and configured statically.
dynamic: Displays the total number of all neighbor entries acquired dynamically.
static: Displays the total number of neighbor entries configured statically.
slot slot-number: Displays the total number of neighbor entries of the specified card. (In standalone
mode)
chassis chassis-number slot slot-number: Displays the total number of neighbor entries of a card on an IRF
member switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number
argument refers to the number of the slot where the card resides. (In IRF mode)
140
interface interface-type interface-number: Displays the total number of neighbor entries of a specified
interface.
vlan vlan-id: Displays the total number of neighbor entries of a specified VLAN whose ID ranges from 1
to 4094.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 neighbors count command to display the total number of neighbor entries satisfying
the specified condition.
Examples
# Display the total number of neighbor entries acquired dynamically.
<Sysname> display ipv6 neighbors dynamic count
Total dynamic entry(ies):
2
display ipv6 neighbors vpn-instance
Syntax
display ipv6 neighbors vpn-instance vpn-instance-name [ count ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance-name: Specifies the MPLS L3 VPN for which neighbor entries are to be displayed. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
count: Displays the total number of neighbor entries in the specified VPN.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 neighbors vpn-instance command to display the neighbor information for the
specified VPN.
141
Examples
# Display the neighbor information for the VPN vpn1.
<Sysname> display ipv6 neighbors vpn-instance vpn1
Type: S-Static
IPv6 Address
FE80::200:5EFF:FE32:B800
D-Dynamic
Link-layer
0000-5e32-b800
VID
N/A
Interface
GE1/0/1
State
T
REACH
S
Age
-
Table 33 Output description
Field
Description
IPv6 Address
IPv6 address of a neighbor
Link-layer
Link layer address (MAC address) of a neighbor
VID
VLAN to which the interface connected with a neighbor belongs
Interface
Interface connected with a neighbor
State of a neighbor:
• INCMP—The address is being resolved. The link layer address of the
neighbor is unknown.
State
• REACH—The neighbor is reachable.
• STALE—The reachability of the neighbor is unknown. The device will not
verify the reachability any longer unless data is sent to the neighbor.
• DELAY—The reachability of the neighbor is unknown. The device sends an
NS message after a delay.
• PROBE—The reachability of the neighbor is unknown. The device sends
an NS message to verify the reachability of the neighbor.
T
Type of neighbor information, which can be static (represented by S) or
dynamic (represented by D).
Age
For a static entry, a hyphen (-) is displayed. For a dynamic entry, the time (in
seconds) elapsed since it became reachable is displayed, and if it is never
reachable, a number sign (#) is displayed.
display ipv6 pathmtu
Syntax
display ipv6 pathmtu [ vpn-instance vpn-instance-name ] { ipv6-address | all | dynamic | static } [ |
{ begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
vpn-instance vpn-instance-name: Displays the IPv6 PMTU information for the specified MPLS L3VPN. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. Without this option specified,
the display ipv6 pathmtu command displays the IPv6 PMTU information for the public network.
ipv6-address: Destination IPv6 address for which the PMTU information is to be displayed.
142
all: Displays all PMTU information on the public network.
dynamic: Displays all dynamic PMTU information.
static: Displays all static PMTU information.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 pathmtu command to display the IPv6 PMTU information.
Examples
# Display all PMTU information.
<Sysname> display ipv6 pathmtu all
IPv6 Destination Address ZoneID
fe80::12
2222::3
PathMTU
0
0
Age
1300
1280
Type
40
--
Dynamic
Static
Table 34 Output description
Field
Description
IPv6 Destination Address
Destination IPv6 address
ZoneID
ID of address zone, currently invalid
PathMTU
Path MTU (PMTU) value on the network path to an IPv6 address
Age
Time for a PMTU to live. For a static PMTU, two consecutive hyphens (--)
are displayed.
Type
Indicates that the PMTU is dynamically negotiated or statically
configured.
display ipv6 socket
Syntax
In standalone mode:
display ipv6 socket [ socktype socket-type ] [ task-id socket-id ] [ slot slot-number ] [ | { begin | exclude
| include } regular-expression ]
In IRF mode:
display ipv6 socket [ socktype socket-type ] [ task-id socket-id ] [ chassis chassis-number slot slot-number ]
[ | { begin | exclude | include } regular-expression ]
View
Any view
143
Default level
1: Monitor level
Parameters
socktype socket-type: Displays the socket information of this type. The socket type is in the range of 1 to
3. The value “1” represents a TCP socket, “2” a UDP socket, and “3” a raw socket.
task-id: Displays the socket information of the task. The task ID is in the range of 1 to 100.
socket-id: Displays the information of the socket. The socket ID is in the range of 0 to 3072.
slot slot-number: Displays the socket information of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Displays the socket information of a card on an IRF member
switch. The chassis-number argument refers to the ID of the IRF member switch. The slot-number argument
refers to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 socket command to display socket information.
With no parameter specified, this command displays the information about all the sockets; with only the
socket type specified, the command displays the information about sockets of the specified type; with the
socket type, task ID and socket ID specified, the command displays the information about the specified
socket.
Examples
# Display the information of all sockets.
<Sysname> display ipv6 socket
SOCK_STREAM:
Task = VTYD(14), socketid = 4, Proto = 6,
LA = ::->22, FA = ::->0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_REUSEPORT SO_SENDVPNID,
socket state = SS_PRIV SS_ASYNC
Task = VTYD(14), socketid = 3, Proto = 6,
LA = ::->23, FA = ::->0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_REUSEPORT SO_SENDVPNID,
socket state = SS_PRIV SS_ASYNC
SOCK_DGRAM:
Task = AGNT(51), socketid = 2, Proto = 17,
LA = ::->161, FA = ::->0,
sndbuf = 9216, rcvbuf = 42080, sb_cc = 0, rb_cc = 0,
144
socket option = SO_REUSEPORT,
socket state = SS_PRIV SS_NBIO SS_ASYNC
Task = TRAP(52), socketid = 2, Proto = 17,
LA = ::->1024, FA = ::->0,
sndbuf = 9216, rcvbuf = 42080, sb_cc = 0, rb_cc = 0,
socket option =,
socket state = SS_PRIV
SOCK_RAW:
Task = ROUT(86), socketid = 5, Proto = 89,
LA = ::, FA = ::,
sndbuf = 262144, rcvbuf = 262144, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR,
socket state = SS_PRIV SS_ASYNC
Table 35 Output description
Field
Description
SOCK_STREAM
TCP socket
SOCK_DGRAM
UDP socket
SOCK_RAW
Raw IP socket
Task
Task name and ID of the created socket
socketid
ID assigned by the kernel to the created socket
Proto
Protocol type, for example, 6 indicates TCP and 17 indicates UDP.
LA
Local address and local port number
FA
Remote address and remote port number
sndbuf
Size of the send buffer
rcvbuf
Size of the receive buffer
sb_cc
Number of bytes sent by the send buffer
rb_cc
Number of bytes received by the receive buffer
Socket option set by the application:
socket option
socket state
•
•
•
•
SO_ACCEPTCONN—Detects connection request at the server end.
SO_REUSEADDR—Allows for reuse of a local address.
SO_REUSEPORT—Allows for reuse of a local port.
SO_SENDVPNID—Enables sending of the VPN ID.
State of the socket
display ipv6 statistics
Syntax
In standalone mode:
display ipv6 statistics [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
145
In IRF mode:
display ipv6 statistics [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays the IPv6 and ICMPv6 packets statistics of the specified card. (In standalone
mode)
chassis chassis-number slot slot-number: Displays the IPv6 and ICMPv6 packets statistics of a card on an
IRF member switch. The chassis-number argument refers to the ID of the IRF member switch. The
slot-number argument refers to the number of the slot where the card resides. (In IRF mode)
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 statistics command to display statistics of IPv6 packets and ICMPv6 packets.
You can use the reset ipv6 statistics command to clear all IPv6 and ICMPv6 packet statistics.
Examples
# Display the statistics of IPv6 packets and ICMPv6 packets.
<Sysname> display ipv6 statistics
IPv6 Protocol:
Sent packets:
Total:
0
Local sent out:
0
forwarded:
0
raw packets:
0
discarded:
0
routing failed:
0
fragments:
0
fragments failed:
0
Received packets:
Total:
0
local host:
0
hopcount exceeded:
0
format error:
0
option error:
0
protocol error:
0
fragments:
0
reassembled:
0
reassembly failed:
0
reassembly timeout:
0
146
ICMPv6 protocol:
Sent packets:
Total:
0
unreached:
0
too big:
0
hopcount exceeded:
0
reassembly timeout:
0
parameter problem:
0
echo request:
0
echo replied:
0
neighbor solicit:
0
neighbor advert:
0
router solicit:
0
router advert:
0
redirected:
0
router renumbering:
0
Send failed:
ratelimited:
0
other errors:
0
Received packets:
Total:
0
checksum error:
0
bad code:
0
too short:
0
unreached:
hopcount exceeded:
0
too big:
0
0
reassembly timeout:
0
parameter problem:
0
unknown error type:
0
echo request:
0
echo replied:
0
neighbor solicit:
0
neighbor advert:
0
router solicit:
0
router advert:
0
redirected:
0
router renumbering:
0
unknown info type:
0
Deliver failed:
bad length:
0
ratelimited:
0
Table 36 Output description
Field
Description
IPv6 Protocol:
Statistics of IPv6 packets
Statistics of sent IPv6 packets:
•
•
•
•
•
•
•
•
Sent packets:
Total:
0
Local sent out: 0 forwarded: 0
raw packets: 0 discarded:
routing failed: 0 fragments:
0
0
fragments failed: 0
147
Total number of packets sent and forwarded locally
Number of packets sent locally
Number of forwarded packets
Number of packets sent via raw socket
Number of discarded packets
Number of packets failing to be routed
Number of sent fragment packets
Number of fragments failing to be sent
Field
Description
Statistics of received IPv6 packets:
•
•
•
•
•
•
•
•
•
•
Received packets:
Total:
0
local host:
0 hopcount exceeded:
format error:
0 option error:
protocol error:0 fragments:
0
0
0
reassembled: 0 reassembly failed: 0
reassembly timeout:
0
ICMPv6 protocol:
Total number of received packets
Number of packets received locally
Number of packets exceeding the hop limit
Number of packets in an incorrect format
Number of packets with incorrect options
Number of packets with incorrect protocol
Number of received fragment packets
Number of reassembled packets
Number of packets failing to be reassembled
Number of packets whose reassembly times out
Statistics of ICMPv6 packets
Statistics of sent ICMPv6 packets:
Sent packets:
Total:
0
unreached:
0 too big:
0
hopcount exceeded: 0 reassembly timeout: 0
parameter problem: 0
echo request:
0 echo replied:
0
neighbor solicit:
0 neighbor advert:
0
router solicit:
0 router advert
0
redirected:
0 router renumbering:
0
0 other errors:
0
Send failed:
ratelimited:
•
•
•
•
•
Total number of sent packets
•
•
•
•
•
•
•
•
•
•
Number of Parameter Problem packets
Number of Destination Unreachable packets
Number of Packet Too Big packets
Number of Hop Limit Exceeded packets
Number of Fragment Reassembly Time Exceeded
packets
Number of Echo Request packets
Number of Echo Reply packets
Number of neighbor solicitation packets
Number of neighbor advertisement packets
Number of router solicitation packets
Number of router advertisement packets
Number of Redirect packets
Number of router renumber (RR) packets
Number of packets failing to be sent due to rate
limitation
• Number of packets with other errors
148
Field
Description
Statistics of received ICMPv6 packets:
Received packets:
Total:
0
checksum error:
bad code:
unreached:
0 too short:
0
0
0 too big:
0
hopcount exceeded: 0 reassembly timeout: 0
parameter problem: 0 unknown error type: 0
echo request:
0 echo replied:
0
neighbor solicit:
0 neighbor advert:
0
router solicit:
0 router advert
redirected:
0 router renumbering 0
0
unknown info type: 0
Deliver failed:
bad length:
0 ratelimited:
0
•
•
•
•
•
•
•
•
Total number of received packets
•
•
•
•
•
•
•
•
•
•
•
•
•
Number of Parameter Problem packets
Number of packets with checksum errors
Number of too small packets
Number of packets with error codes
Number of Destination Unreachable packets
Number of Packet Too Big packets
Number of Hop Limit Exceeded packets
Number of Fragment Reassembly Times Exceeded
packets
Number of packets with unknown errors
Number of Echo Request packets
Number of Echo Reply packets
Number of neighbor solicitation messages
Number of neighbor advertisement packets
Number of router solicitation packets
Number of router advertisement packets
Number of Redirect packets
Number of RR packets
Number of unknown type of packets
Number of packets with a incorrect size
Number of packets failing to be received due to
rate limitation
display tcp ipv6 statistics
Syntax
display tcp ipv6 statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
149
Description
Use the display tcp ipv6 statistics command to display IPv6 TCP connection statistics.
You can use the reset tcp ipv6 statistics command to clear statistics of all IPv6 TCP packets.
Examples
# Display the statistics of IPv6 TCP connections.
<Sysname> display tcp ipv6 statistics
Received packets:
Total: 0
packets in sequence: 0 (0 bytes)
window probe packets: 0, window update packets: 0
checksum error: 0, offset error: 0, short error: 0
duplicate packets: 0 (0 bytes), partially duplicate packets: 0 (0 bytes)
out-of-order packets: 0 (0 bytes)
packets with data after window: 0 (0 bytes)
packets after close: 0
ACK packets: 0 (0 bytes)
duplicate ACK packets: 0, too much ACK packets: 0
Sent packets:
Total: 0
urgent packets: 0
control packets: 0 (including 0 RST)
window probe packets: 0, window update packets: 0
data packets: 0 (0 bytes) data packets retransmitted: 0 (0 bytes)
ACK only packets: 0 (0 delayed)
Retransmitted timeout: 0, connections dropped in retransmitted timeout: 0
Keepalive timeout: 0, keepalive probe: 0, Keepalive timeout, so connections disconnected :
0
Initiated connections: 0, accepted connections: 0, established connections: 0
Closed connections: 0 (dropped: 0, initiated dropped: 0)
Packets dropped with MD5 authentication: 0
Packets permitted with MD5 authentication: 0
150
Table 37 Output description
Field
Description
Received packets:
Statistics of received packets:
Total: 0
packets in sequence:
0 (0 bytes)
window probe packets: 0
window update packets: 0
checksum error:
0
offset error:
0
short error:
0
duplicate packets:
0 (0 bytes), partially
duplicate packets: 0 (0 bytes)
out-of-order packets:
0 (0 bytes)
packets with data after window:
packets after close:
0 (0 bytes)
0
•
•
•
•
•
•
•
Total number of received packets
•
•
•
•
Number of duplicate packets
Number of packets received in sequence
Number of window probe packets
Number of window size update packets
Number of packets with checksum errors
Number of packets with offset errors
Number of packets whose total length is less than
specified by the packet header
Number of partially duplicate packets
Number of out-of-order packets
Number of packets exceeding the size of the
receiving window
• Number of packets received after the connection is
closed
ACK packets:
0 (0 bytes)
duplicate ACK packets:
0
• Number of ACK packets
• Number of duplicate ACK packets
• Number of excessive ACK packets
too much ACK packets: 0
Sent packets:
Statistics of sent packets:
Total: 0
urgent packets:
0
control packets:
0 (including 0 RST)
window probe packets:
0
window update packets: 0
data packets:
packets retransmitted:
ACK only packets:
0 (0 bytes) data
0 (0 bytes)
•
•
•
•
•
•
•
•
Total number of packets
Number of packets containing an urgent indicator
Number of control packets
Number of window probe packets
Number of window update packets
Number of data packets
Number of retransmitted packets
Number of ACK packets
0 (0 delayed)
Retransmitted timeout
Number of packets whose retransmission times out
connections dropped in retransmitted timeout
Number of connections dropped because of
retransmission timeout
Keepalive timeout
Number of keepalive timeouts
keepalive probe
Number of keepalive probes
Keepalive timeout, so connections disconnected
Number of connections dropped because of
keepalive response timeout
Initiated connections
Number of initiated connections
accepted connections
Number of accepted connections
established connections
Number of established connections
Closed connections
Number of closed connections
151
Field
Description
dropped
Number of dropped connections (after SYN is
received from the peer)
initiated dropped
Number of initiated but dropped connections (before
SYN is received from the peer)
Packets dropped with MD5 authentication
Number of packets that fail the MD5 authentication
and are dropped
Packets permitted with MD5 authentication
Number of packets that pass the MD5 authentication
display tcp ipv6 status
Syntax
display tcp ipv6 status [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display tcp ipv6 status command to display the IPv6 TCP connection status, including the IPv6
TCP control block address, local and peer IPv6 addresses, and status of the IPv6 TCP connection.
Examples
# Display the IPv6 TCP connection status.
<Sysname> display tcp ipv6 status
*: TCP6 MD5 Connection
TCP6CB
Local Address
045d8074
::->21
Foreign Address
::->0
State
Listening
Table 38 Output description
Field
Description
*: TCP6 MD5 Connection
The asterisk (*) indicates that the TCP6 connection is secured with
MD5 authentication.
TCP6CB
IPv6 TCP control block address (hexadecimal)
Local Address
Local IPv6 address
152
Field
Description
Foreign Address
Remote IPv6 address
IPv6 TCP connection status:
State
•
•
•
•
•
•
•
•
•
•
•
Closed
Listening
Syn_Sent
Syn_Rcvd
Established
Close_Wait
Fin_Wait1
Closing
Last_Ack
Fin_Wait2
Time_Wait
display udp ipv6 statistics
Syntax
display udp ipv6 statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display udp ipv6 statistics command to display the statistics of IPv6 UDP packets.
You can use the reset udp ipv6 statistics command to clear the statistics of all IPv6 UDP packets.
Examples
# Display the statistics information of IPv6 UDP packets.
<Sysname> display udp ipv6 statistics
Received packets:
Total: 0
checksum error: 0
shorter than header: 0, data length larger than packet: 0
unicast(no socket on port): 0
broadcast/multicast(no socket on port): 0
153
not delivered, input socket full: 0
input packets missing pcb cache: 0
Sent packets:
Total: 0
Table 39 Output description
Field
Description
Total
Total number of received/sent packets
checksum error
Total number of packets with a checksum error
shorter than header
Total number of IPv6 UDP packets whose total length is less than
that specified by the packet header
data length larger than packet
Total number of packets whose data length exceeds that
specified by the packet header
unicast(no socket on port)
Total number of received unicast packets without any socket
broadcast/multicast(no socket on port)
Total number of received broadcast/multicast packets without
any socket
not delivered, input socket full
Number of packets not handled because of the receive buffer
being full
input packet missing pcb cache
Number of packets failing to match the protocol control block
(PCB) cache
ipv6
Syntax
ipv6
undo ipv6
View
System view
Default level
2: System level
Parameters
None
Description
Use the ipv6 command to enable IPv6.
Use the undo ipv6 command to disable IPv6.
By default, IPv6 is disabled.
Examples
# Enable IPv6.
<Sysname> system-view
[Sysname] ipv6
154
ipv6 address
Syntax
ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
undo ipv6 address [ ipv6-address prefix-length | ipv6-address/prefix-length ]
View
Interface view
Default level
2: System level
Parameters
ipv6-address: Specifies the IPv6 address.
prefix-length: Specifies the prefix length of the IPv6 address, in the range of 1 to 128.
Description
Use the ipv6 address command to configure an IPv6 global unicast address for an interface.
Use the undo ipv6 address command to remove the IPv6 address from the interface.
By default, no global unicast address is configured for an interface.
Except for the link-local address automatically obtained and the link-local address generated through
stateless autoconfiguration, all IPv6 addresses will be removed from the interface if the undo ipv6
address command is executed without any parameter specified.
Examples
# Set the global IPv6 unicast address of VLAN-interface 100 to 2001::1 with prefix length 64.
Method I:
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address 2001::1/64
Method II:
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address 2001::1 64
ipv6 address anycast
Syntax
ipv6 address ipv6-address/prefix-length anycast
undo ipv6 address ipv6-address/prefix-length anycast
View
Interface view
Default level
2: System level
155
Parameters
ipv6-address/prefix-length: Specifies an IPv6 anycast address and its prefix length. The prefix length
ranges 1 to 128.
Description
Use the ipv6 address anycast command to configure an IPv6 anycast address for an interface.
Use the undo ipv6 address anycast command to remove the IPv6 anycast address from the interface.
By default, no IPv6 anycast address is configured for an interface.
Examples
# Set the IPv6 anycast address of VLAN-interface 100 to 2001::1 with prefix length 64.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address 2001::1/64 anycast
ipv6 address auto
Syntax
ipv6 address auto
undo ipv6 address auto
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 address auto command to enable the stateless address autoconfiguration function on the
interface. With this function enabled, the interface can automatically generate a global unicast address.
Use the undo ipv6 address auto command to disable this function.
The stateless address autoconfiguration function is disabled by default.
NOTE:
After a global unicast address is generated through stateless autoconfiguration, a link-local address is
generated automatically, which can be removed only by executing the undo ipv6 address auto
command.
Examples
# Enable stateless address autoconfiguration on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address auto
156
ipv6 address auto link-local
Syntax
ipv6 address auto link-local
undo ipv6 address auto link-local
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 address auto link-local command to automatically generate a link-local address for an
interface.
Use the undo ipv6 address auto link-local command to remove the automatically generated link-local
address for the interface.
By default, no link-local address is configured on an interface, and a link-local address will be
automatically generated after a global IPv6 unicast address is configured for the interface.
•
After an IPv6 global unicast address is configured for an interface, a link-local address is generated
automatically. The automatically generated link-local address is the same as the one generated by
using the ipv6 address auto link-local command.
•
The undo ipv6 address auto link-local command can only remove the link-local addresses
generated through the ipv6 address auto link-local command. After the undo ipv6 address auto
link-local command is used on an interface that has an IPv6 global unicast address configured, the
interface still has a link-local address. If the interface has no IPv6 global unicast address configured,
it will have no link-local address.
•
Manual assignment takes precedence over automatic generation. If you first adopt automatic
generation and then manual assignment, the manually assigned link-local address will overwrite
the automatically generated address. If you first use manual assignment and then automatic
generation, the automatically generated link-local address will not take effect and the link-local
address of an interface is still the manually assigned address. If you delete the manually assigned
address, the automatically generated link-local address is validated. For more information about
manual assignment of an IPv6 link-local address, see the ipv6 address link-local command.
Examples
# Configure VLAN-interface 100 to automatically generate a link-local address.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address auto link-local
ipv6 address eui-64
Syntax
ipv6 address ipv6-address/prefix-length eui-64
157
undo ipv6 address ipv6-address/prefix-length eui-64
View
Interface view
Default level
2: System level
Parameters
ipv6-address/prefix-length: IPv6 address and IPv6 prefix. The ipv6-address and prefix-length arguments
jointly specify the prefix of an EUI-64 IPv6 address.
Description
Use the ipv6 address eui-64 command to configure an EUI-64 IPv6 address for an interface.
Use the undo ipv6 address eui-64 command to remove the configured EUI-64 IPv6 address for the
interface.
By default, no EUI-64 IPv6 address is configured for an interface.
An EUI-64 IPv6 address is generated based on the specified prefix and the automatically generated
interface identifier and is displayed by using the display ipv6 interface command.
The prefix length of an EUI-64 IPv6 address cannot be greater than 64.
Examples
# Configure an EUI-64 IPv6 address for VLAN-interface 100. The prefix length of the address is the same
as that of 2001::1/64, and the interface ID is generated based on the MAC address of the device.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address 2001::1/64 eui-64
ipv6 address link-local
Syntax
ipv6 address ipv6-address link-local
undo ipv6 address ipv6-address link-local
View
Interface view
Default level
2: System level
Parameters
ipv6-address: IPv6 link-local address. The first 10 bits of an address must be 1111111010 (binary). The first
group of hexadecimals in the address must be FE80 to FEBF.
Description
Use the ipv6 address link-local command to configure a link-local address for the interface.
Use the undo ipv6 address link-local command to remove the configured link-local address for the
interface.
158
Manual assignment takes precedence over automatic generation. If you first adopt automatic generation
and then manual assignment, the manually assigned link-local address will overwrite the automatically
generated one. If you first adopt manual assignment and then automatic generation, the automatically
generated link-local address will not take effect and the link-local address of an interface is still the
manually assigned one. If you delete the manually assigned address, the automatically generated
link-local address is validated. For automatic generation of an IPv6 link-local address, see the ipv6
address auto link-local command.
Examples
# Configure a link-local address for VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 address fe80::1 link-local
ipv6 hoplimit-expires enable
Syntax
ipv6 hoplimit-expires enable
undo ipv6 hoplimit-expires
View
System view
Default level
2: System level
Parameters
None
Description
Use the ipv6 hoplimit-expires enable command to enable the sending of ICMPv6 Time Exceeded
packets.
Use the undo ipv6 hoplimit-expires command to disable the sending of ICMPv6 Time Exceeded packets.
By default, the sending of ICMPv6 Time Exceeded packets is enabled.
After you disable the sending of ICMPv6 Time Exceeded packets, the device will still send Fragment
Reassembly Time Exceeded packets.
Examples
# Disable the sending of ICMPv6 Time Exceeded packets.
<Sysname> system-view
[Sysname] undo ipv6 hoplimit-expires
ipv6 icmp-error
Syntax
ipv6 icmp-error { bucket bucket-size | ratelimit interval } *
undo ipv6 icmp-error
159
View
System view
Default level
2: System level
Parameters
bucket bucket-size: Number of tokens in the token bucket, in the range of 1 to 200.
ratelimit interval: Update period of the token bucket in milliseconds, in the range of 0 to 2,147,483,647.
The update period “0” indicates that the number of ICMPv6 error packets sent is not restricted.
Description
Use the ipv6 icmp-error command to configure the size and update period of the token bucket.
Use the undo ipv6 icmp-error command to restore the defaults.
By default, the size is 10 and the update period is 100 milliseconds. A maximum of 10 ICMPv6 error
packets can be sent within 100 milliseconds.
Examples
# Set the capacity of the token bucket to 50 and the update period to 100 milliseconds.
<Sysname> system-view
[Sysname] ipv6 icmp-error bucket 50 ratelimit 100
ipv6 icmpv6 multicast-echo-reply enable
Syntax
ipv6 icmpv6 multicast-echo-reply enable
undo ipv6 icmpv6 multicast-echo-reply
View
System view
Default level
2: System level
Parameters
None
Description
Use the ipv6 icmpv6 multicast-echo-reply enable command to enable replying to multicast echo
requests.
Use the undo ipv6 icmpv6 multicast-echo-reply command to disable replying to multicast echo requests.
By default, the device is disabled from replying to multicast echo requests.
Examples
# Enable replying to multicast echo requests.
<Sysname> system-view
[Sysname] ipv6 icmpv6 multicast-echo-reply enable
160
ipv6 nd autoconfig managed-address-flag
Syntax
ipv6 nd autoconfig managed-address-flag
undo ipv6 nd autoconfig managed-address-flag
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 nd autoconfig managed-address-flag command to set the managed address configuration
(M) flag to 1 so that the host can acquire an IPv6 address through stateful autoconfiguration (for example,
from a DHCP server).
Use the undo ipv6 nd autoconfig managed-address-flag command to restore the default.
By default, the M flag is set to 0 so that the host can acquire an IPv6 address through stateless
autoconfiguration.
Examples
# Configure the host to acquire an IPv6 address through stateful autoconfiguration.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd autoconfig managed-address-flag
ipv6 nd autoconfig other-flag
Syntax
ipv6 nd autoconfig other-flag
undo ipv6 nd autoconfig other-flag
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 nd autoconfig other-flag command to set the other stateful configuration flag (O) to 1 so that
the host can acquire information other than IPv6 address through stateful autoconfiguration (for example,
from a DHCP server).
Use the undo ipv6 nd autoconfig other-flag command to restore the default.
161
By default, the O flag is set to 0 so that the host can acquire other information through stateless
autoconfiguration.
Examples
# Configure the host to acquire information other than IPv6 address through stateless autoconfiguration.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] undo ipv6 nd autoconfig other-flag
ipv6 nd dad attempts
Syntax
ipv6 nd dad attempts value
undo ipv6 nd dad attempts
View
Interface view
Default level
2: System level
Parameters
value: Specifies the number of attempts to send an NS message for DAD, in the range of 0 to 600. The
default value is 1. When it is set to 0, DAD is disabled.
Description
Use the ipv6 nd dad attempts command to configure the number of attempts to send an NS message for
DAD.
Use the undo ipv6 nd dad attempts command to restore the default.
By default, the number of attempts to send an NS message for DAD is 1.
Related commands: display ipv6 interface.
Examples
# Set the number of attempts to send an NS message for DAD to 20.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd dad attempts 20
ipv6 nd hop-limit
Syntax
ipv6 nd hop-limit value
undo ipv6 nd hop-limit
View
System view
Default level
2: System level
162
Parameters
value: Specifies the number of hops, in the range of 0 to 255. When it is set to 0, the Hop Limit field in
RA messages sent by the device is 0. The number of hops is determined by the requesting device itself.
Description
Use the ipv6 nd hop-limit command to configure the hop limit advertised by the device.
Use the undo ipv6 nd hop-limit command to restore the default hop limit.
By default, the hop limit advertised by the device is 64.
Examples
# Set the hop limit advertised by the device to 100.
<Sysname> system-view
[Sysname] ipv6 nd hop-limit 100
ipv6 nd ns retrans-timer
Syntax
ipv6 nd ns retrans-timer value
undo ipv6 nd ns retrans-timer
View
Interface view
Default level
2: System level
Parameters
value: Specifies the interval for retransmitting an NS message in milliseconds, in the range of 1000 to
4,294,967,295.
Description
Use the ipv6 nd ns retrans-timer command to set the interval for retransmitting an NS message. The local
interface retransmits an NS message at intervals of this value. Furthermore, the Retrans Timer field in RA
messages sent by the local interface is equal to this value.
Use the undo ipv6 nd ns retrans-timer command to restore the default.
By default, the local interface sends NS messages at an interval of 1000 millisecond and the Retrans
Timer field in the RA messages sent is 0, so that the interval for retransmitting an NS message is
determined by the receiving device.
Related commands: display ipv6 interface.
Examples
# Specify VLAN-interface 100 to retransmit NS messages at intervals of 10,000 milliseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ns retrans-timer 10000
163
ipv6 nd nud reachable-time
Syntax
ipv6 nd nud reachable-time value
undo ipv6 nd nud reachable-time
View
Interface view
Default level
2: System level
Parameters
value: Specifies the neighbor reachable time in milliseconds, in the range of 1 to 3,600,000.
Description
Use the ipv6 nd nud reachable-time command to configure the neighbor reachable time on an interface.
This time value serves as not only the neighbor reachable time on the local interface, but also the value
of the Reachable Time field in RA messages sent by the local interface.
Use the undo ipv6 nd nud reachable-time command to restore the default.
By default, the neighbor reachable time on the local interface is 30,000 milliseconds and the value of
the Reachable Time field in RA messages is 0, so that the reachable time is determined by the receiving
device.
Related commands: display ipv6 interface.
Examples
# Set the neighbor reachable time on VLAN-interface 100 to 10,000 milliseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd nud reachable-time 10000
ipv6 nd ra halt
Syntax
ipv6 nd ra halt
undo ipv6 nd ra halt
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 nd ra halt command to enable RA message suppression.
Use the undo ipv6 nd ra halt command to disable RA message suppression.
164
By default, RA messages are suppressed.
Examples
# Suppress RA messages on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ra halt
ipv6 nd ra interval
Syntax
ipv6 nd ra interval max-interval-value min-interval-value
undo ipv6 nd ra interval
View
Interface view
Default level
2: System level
Parameters
max-interval-value: Specifies the maximum interval for advertising RA messages in seconds, in the range
of 4 to 1800.
min-interval-value: Specifies the minimum interval for advertising RA messages in seconds, in the range
of 3 to 1350.
Description
Use the ipv6 nd ra interval command to set the maximum and minimum intervals for advertising RA
messages. The device advertises RA messages at intervals of a random value between the maximum
interval and the minimum interval.
Use the undo ipv6 nd ra interval command to restore the default.
By default, the maximum interval between RA messages is 600 seconds, and the minimum interval is
200 seconds.
NOTE:
• The minimum interval should be three-fourths of the maximum interval or less.
• The maximum interval for sending RA messages should be less than or equal to the router lifetime in RA
messages.
Examples
# Set the maximum interval for advertising RA messages to 1,000 seconds and the minimum interval to
700 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ra interval 1000 700
165
ipv6 nd ra no-advlinkmtu
Syntax
ipv6 nd ra no-advlinkmtu
undo ipv6 nd ra no-advlinkmtu
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the ipv6 nd ra no-advlinkmtu command to turn off the MTU option in RA messages.
Use the undo ipv6 nd ra no-advlinkmtu command to restore the default.
By default, RA messages contain the MTU option.
Examples
# Turn off the MTU option in RA messages on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ra no-advlinkmtu
ipv6 nd ra prefix
Syntax
ipv6 nd ra prefix { ipv6-prefix prefix-length | ipv6-prefix/prefix-length } valid-lifetime preferred-lifetime
[ no-autoconfig | off-link ] *
undo ipv6 nd ra prefix { ipv6-prefix | ipv6-prefix/prefix-length }
View
Interface view
Default level
2: System level
Parameters
ipv6-prefix: Specifies the IPv6 prefix.
prefix-length: Specifies the prefix length of the IPv6 address.
valid-lifetime: Specifies the valid lifetime of a prefix in seconds, in the range of 0 to 4,294,967,295.
preferred-lifetime: Specifies the preferred lifetime of a prefix used for stateless autoconfiguration in
seconds, in the range of 0 to 4,294,967,295.
no-autoconfig: Specifies a prefix not to be used for stateless autoconfiguration. If this keyword is not
provided, the prefix is used for stateless autoconfiguration.
166
off-link: Indicates that the address with the prefix is not directly reachable on the link. If this keyword is
not provided, the address with the prefix is directly reachable on the link.
Description
Use the ipv6 nd ra prefix command to configure the prefix information in RA messages.
Use the undo ipv6 nd ra prefix command to remove the prefix information from RA messages.
By default, no prefix information is configured in RA messages and the IPv6 address of the interface
sending RA messages is used as the prefix information with valid lifetime 2,592,000 seconds (that is, 30
days) and preferred lifetime 604,800 seconds (that is, 7 days).
Examples
# Configure the prefix information for RA messages on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ra prefix 2001:10::100/64 100 10
ipv6 nd ra router-lifetime
Syntax
ipv6 nd ra router-lifetime value
undo ipv6 nd ra router-lifetime
View
Interface view
Default level
2: System level
Parameters
value: Specifies the router lifetime in seconds, in the range of 0 to 9000. When it is set to 0, the device
does not serve as the default router.
Description
Use the ipv6 nd ra router-lifetime command to configure the router lifetime in RA messages.
Use the undo ipv6 nd ra router-lifetime command to restore the default.
By default, the router lifetime in RA messages is 1,800 seconds.
The router lifetime in RA messages should be greater than or equal to the advertising interval.
Examples
# Set the router lifetime in RA messages on VLAN-interface 100 to 1,000 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 nd ra router-lifetime 1000
167
ipv6 neighbor
Syntax
ipv6 neighbor ipv6-address mac-address { vlan-id port-type port-number | interface interface-type
interface-number } [ vpn-instance vpn-instance-name ]
undo ipv6 neighbor ipv6-address interface-type interface-number
undo ipv6 neighbor ipv6-address mac-address { vlan-id port-type port-number | interface interface-type
interface-number } [ vpn-instance vpn-instance-name ]
View
System view
Default level
2: System level
Parameters
ipv6-address: Specifies the IPv6 address of the static neighbor entry.
mac-address: Specifies the MAC address of the static neighbor entry (48 bits long, in the format of
H-H-H).
vlan-id: Specifies the VLAN ID of the static neighbor entry, in the range of 1 to 4094.
port-type port-number: Specifies a Layer 2 port of the static neighbor entry by its type and number .
interface interface-type interface-number: Specifies a Layer 3 interface of the static neighbor entry by its
type and number.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN that the static neighbor entry belongs to. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the static neighbor entry is
for the public network, do not specify this option.
Description
Use the ipv6 neighbor command to configure a static neighbor entry.
Use the undo ipv6 neighbor command to remove a static neighbor entry.
You can use a Layer 3 VLAN interface or a Layer 2 port in the VLAN to configure a static neighbor entry.
•
If the first method is used, the neighbor entry is in the INCMP state. After the device obtains the
corresponding Layer 2 port information, the neighbor entry will go into the REACH state.
•
If the second method is used, the corresponding VLAN interface must exist and the port specified by
port-type port-number must belong to the VLAN specified by vlan-id. After the static neighbor entry
is configured, the device will relate the VLAN interface with the IPv6 address to identify the static
neighbor entry uniquely and the entry will be in the REACH state.
To remove a static neighbor entry, you only need to specify the corresponding VLAN interface and the
neighbor address.
Related commands: display ipv6 neighbors.
Examples
# Configure a static neighbor entry for Layer 2 port GigabitEthernet 1/0/1 of VLAN 100.
<Sysname> system-view
[Sysname] ipv6 neighbor 2000::1 fe-e0-89 100 GigabitEthernet 1/0/1
168
ipv6 neighbor stale-aging
Syntax
ipv6 neighbor stale-aging aging-time
undo ipv6 neighbor stale-aging
View
System view
Default level
2: System level
Parameters
aging-time: Age timer for ND entries in stale state, ranging from 1 to 24 hours.
Description
Use the ipv6 neighbor stale-aging command to set the age timer for ND entries in stale state.
Use the undo ipv6 neighbor stale-aging command to restore the default.
By default, the age timer for ND entries in stale state is four hours.
Examples
# Set the age timer for ND entries in stale state to two hours.
<Sysname> system-view
[Sysname] ipv6 neighbor stale-aging 2
ipv6 neighbors max-learning-num
Syntax
ipv6 neighbors max-learning-num number
undo ipv6 neighbors max-learning-num
View
Layer 2 Ethernet port view, Layer 3 Ethernet port view, Layer 3 Ethernet subinterface view, VLAN interface
view, Layer 2 aggregate interface view, Layer 3 aggregate interface view, Layer 3 aggregate
subinterface view
Default level
2: System level
Parameters
number: Maximum number of neighbors that can be dynamically learned by the interface, ranging from
1 to 2048.
Description
Use the ipv6 neighbors max-learning-num command to configure the maximum number of neighbors
that can be dynamically learned on the interface.
Use the undo ipv6 neighbors max-learning-num command to restore the default.
By default, a Layer 2 interface does not limit the number of neighbors dynamically learned. A Layer 3
interface can learn up to 2048 neighbors dynamically.
169
Examples
# Set the maximum number of neighbors that can be dynamically learned on VLAN-interface 100 to 10.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ipv6 neighbors max-learning-num 10
ipv6 pathmtu
Syntax
ipv6 pathmtu [ vpn-instance vpn-instance-name ] ipv6-address [ value ]
undo ipv6 pathmtu [ vpn-instance vpn-instance-name ] ipv6-address
View
System view
Default level
2: System level
Parameters
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN that the PMTU belongs to. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the PMTU is for the public
network, do not specify this option.
ipv6-address: IPv6 address.
value: PMTU of a specified IPv6 address, ranging from 1280 to 10000 bytes.
Description
Use the ipv6 pathmtu command to configure a static PMTU for a specified IPv6 address.
Use the undo ipv6 pathmtu command to remove the PMTU configuration for a specified IPv6 address.
By default, no static PMTU is configured.
Examples
# Configure a static PMTU for a specified IPv6 address.
<Sysname> system-view
[Sysname] ipv6 pathmtu fe80::12 1300
ipv6 pathmtu age
Syntax
ipv6 pathmtu age age-time
undo ipv6 pathmtu age
View
System view
Default level
2: System level
170
Parameters
age-time: Specifies the aging time for PMTU in minutes, in the range of 10 to 100.
Description
Use the ipv6 pathmtu age command to configure the aging time for a dynamic PMTU.
Use the undo ipv6 pathmtu age command to restore the default.
By default, the aging time is 10 minutes.
The aging time is invalid for a static PMTU.
Related commands: display ipv6 pathmtu.
Examples
# Set the aging time for a dynamic PMTU to 40 minutes.
<Sysname> system-view
[Sysname] ipv6 pathmtu age 40
ipv6 prefer temporary-address
Syntax
ipv6 prefer temporary-address [ valid-lifetime preferred-lifetime ]
undo ipv6 prefer temporary-address
View
System view
Default level
2: System level
Parameters
valid-lifetime: Specifies the valid lifetime of temporary IPv6 addresses in seconds, in the range of 600 to
4,294,967,295. The default valid lifetime is 604,800 seconds, that is, seven days.
preferred-lifetime: Specifies the preferred lifetime of temporary IPv6 addresses in seconds, in the range
of 600 to 4,294,967,295. The default valid lifetime is 86,400 seconds, that is, one day.
Description
Use the ipv6 prefer temporary-address command to configure the system to generate and preferably use
the temporary IPv6 address of the sending interface as the source address of the packet to be sent.
Use the undo ipv6 prefer temporary-address command to disable the system from generating temporary
IPv6 addresses and remove existing temporary IPv6 addresses.
By default, the system does not generate or use any temporary IPv6 address.
Note the following:
•
Configure the valid lifetime greater than (or equal to) the preferred lifetime.
•
Enable stateless address autoconfiguration before configuring this function.
•
The preferred lifetime of a temporary IPv6 address takes the value of the preferred lifetime of the
address prefix, or the value of the preferred lifetime you configure for temporary IPv6 addresses
minus DESYNC_FACTOR (which is a random number ranging 0 to 600, in seconds), whichever is
smaller.
171
•
The valid lifetime of a temporary IPv6 address takes the value of the valid lifetime of the address
prefix, or the value of the valid lifetime you configure for temporary IPv6 addresses, whichever is
smaller.
Examples
# Configure the system to generate and preferably use the temporary IPv6 address of the sending
interface as the source address of the packet to be sent.
<Sysname> system-view
[Sysname] ipv6 prefer temporary-address
ipv6 unreachables enable
Syntax
ipv6 unreachables enable
undo ipv6 unreachables
View
System view
Default level
2: System level
Parameters
None
Description
Use the ipv6 unreachables enable command to enable sending of ICMPv6 destination unreachable
packets.
Use the undo ipv6 unreachables command to disable sending of ICMPv6 destination unreachable
packets.
By default, sending of ICMPv6 destination unreachable packets is disabled.
Examples
# Enable sending of ICMPv6 destination unreachable packets.
<Sysname> system-view
[Sysname] ipv6 unreachables enable
reset ipv6 neighbors
Syntax
In standalone mode:
reset ipv6 neighbors { all | dynamic | interface interface-type interface-number | slot slot-number |
static }
In IRF mode:
reset ipv6 neighbors { all | dynamic | interface interface-type interface-number | chassis
chassis-number slot slot-number | static }
View
User view
172
Default level
2: System level
Parameters
all: Clears static and dynamic neighbor information on all interfaces.
dynamic: Clears dynamic neighbor information on all interfaces.
interface interface-type interface-number: Clears dynamic neighbor information on a specified interface.
slot slot-number: Clears the dynamic neighbor information of the specified card. (In standalone mode)
chassis chassis-number slot slot-number: Clears the dynamic neighbor information of the a card on an
IRF member switch. The chassis-number argument refers to the ID of the IRF member switch. The
slot-number argument refers to the number of the slot where the card resides. (In IRF mode)
static: Clears static neighbor information on all interfaces.
Description
Use the reset ipv6 neighbors command to clear IPv6 neighbor information.
You can use the display ipv6 neighbors command to display the current IPv6 neighbor information.
Examples
# Clear neighbor information on all interfaces.
<Sysname> reset ipv6 neighbors all
# Clear dynamic neighbor information on all interfaces.
<Sysname> reset ipv6 neighbors dynamic
# Clear all neighbor information on GigabitEthernet 1/0/1.
<Sysname> reset ipv6 neighbors interface GigabitEthernet 1/0/1
reset ipv6 pathmtu
Syntax
reset ipv6 pathmtu { all | static | dynamic }
View
User view
Default level
2: System level
Parameters
all: Clears all PMTUs.
static: Clears all static PMTUs.
dynamic: Clears all dynamic PMTUs.
Description
Use the reset ipv6 pathmtu the command to clear the PMTU information.
Examples
# Clear all PMTUs.
<Sysname> reset ipv6 pathmtu all
173
reset ipv6 statistics
Syntax
In standalone mode:
reset ipv6 statistics [ slot slot-number ]
In IRF mode:
reset ipv6 statistics [ chassis chassis-number slot slot-number ]
View
User view
Default level
1: Monitor level
Parameters
slot slot-number: Clears the IPv6 and ICMPv6 packets statistics of the specified card. (In standalone
mode).
chassis chassis-number slot slot-number: Clears the IPv6 and ICMPv6 packets statistics of a card on an
IRF member switch. The chassis-number argument refers to the ID of the IRF member switch. The
slot-number argument refers to the number of the slot where the card resides. (In IRF mode)
Description
Use the reset ipv6 statistics command to clear the statistics of IPv6 packets and ICMPv6 packets.
You can use the display ipv6 statistics command to display the statistics of IPv6 and ICMPv6 packets.
Examples
# Clear the statistics of IPv6 packets and ICMPv6 packets.
<Sysname> reset ipv6 statistics
reset tcp ipv6 statistics
Syntax
reset tcp ipv6 statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the reset tcp ipv6 statistics command to clear the statistics of all IPv6 TCP connections.
You can use the display tcp ipv6 statistics command to display the statistics of IPv6 TCP connections.
Examples
# Clear the statistics of all IPv6 TCP connections.
174
<Sysname> reset tcp ipv6 statistics
reset udp ipv6 statistics
Syntax
reset udp ipv6 statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the reset udp ipv6 statistics command to clear the statistics of all IPv6 UDP packets.
You can use the display udp ipv6 statistics command to display the statistics of IPv6 UDP packets.
Examples
# Clear the statistics of all IPv6 UDP packets.
<Sysname> reset udp ipv6 statistics
tcp ipv6 timer fin-timeout
Syntax
tcp ipv6 timer fin-timeout wait-time
undo tcp ipv6 timer fin-timeout
View
System view
Default level
2: System level
Parameters
wait-time: Specifies the finwait timer for IPv6 TCP connections in seconds, in the range of 76 to 3,600.
Description
Use the tcp ipv6 timer fin-timeout command to set the finwait timer for IPv6 TCP connections.
Use the undo tcp ipv6 timer fin-timeout command to restore the default.
By default, the length of the finwait timer is 675 seconds.
Examples
# Set the finwait timer length of IPv6 TCP connections to 800 seconds.
<Sysname> system-view
[Sysname] tcp ipv6 timer fin-timeout 800
175
tcp ipv6 timer syn-timeout
Syntax
tcp ipv6 timer syn-timeout wait-time
undo tcp ipv6 timer syn-timeout
View
System view
Default level
2: System level
Parameters
wait-time: Specifies the synwait timer for IPv6 TCP connections in seconds, in the range of 2 to 600.
Description
Use the tcp ipv6 timer syn-timeout command to set the synwait timer for IPv6 TCP connections
Use the undo tcp ipv6 timer syn-timeout command to restore the default.
By default, the length of the synwait timer of IPv6 TCP connections is 75 seconds.
Examples
# Set the synwait timer length of IPv6 TCP connections to 100 seconds.
<Sysname> system-view
[Sysname] tcp ipv6 timer syn-timeout 100
tcp ipv6 window
Syntax
tcp ipv6 window size
undo tcp ipv6 window
View
System view
Default level
2: System level
Parameters
size: Specifies the size of the IPv6 TCP send/receive buffer in KB (kilobyte), in the range of 1 to 32.
Description
Use the tcp ipv6 window command to set the size of the IPv6 TCP send/receive buffer.
Use the undo tcp ipv6 window command to restore the default.
By default, the size of the IPv6 TCP send/receive buffer is 8 KB.
Examples
# Set the size of the IPv6 TCP send/receive buffer to 4 KB.
<Sysname> system-view
[Sysname] tcp ipv6 window 4
176
DHCPv6 configuration commands
DHCPv6 common configuration commands
display ipv6 dhcp duid
Syntax
display ipv6 dhcp duid [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 dhcp duid command to display the DUID of the local device.
Examples
# Display the DUID of the device.
<Sysname> display ipv6 dhcp duid
The DUID of this device: 0003-0001-00e0-fc00-5552
DHCPv6 relay agent configuration commands
display ipv6 dhcp relay server-address
Syntax
display ipv6 dhcp relay server-address { all | interface interface-type interface-number } [ | { begin |
exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
177
Parameters
all: Displays all DHCPv6 server address information.
interface interface-type interface-number: Displays DHCPv6 server address information of the specified
interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 dhcp relay server-address command to display information about DHCPv6 server
addresses specified on the DHCPv6 relay agent.
Examples
# Display all the DHCPv6 server address information.
<Sysname> display ipv6 dhcp relay server-address all
Interface: Vlan2
Server address(es)
Output Interface
1::1
FF02::1:2
Vlan4
Interface: Vlan3
Server address(es)
Output Interface
1::1
FF02::1:2
Vlan4
# Display DHCPv6 server address information of VLAN-interface 2.
<Sysname> display ipv6 dhcp relay server-address interface vlan-interface 2
Interface: Vlan2
Server address(es)
Output Interface
1::1
FF02::1:2
Vlan4
Table 40 Output description
Field
Description
Interface
Interface that serves as the DHCPv6 relay agent
Server address(es)
DHCPv6 server address(es) specified on the interface
Output Interface
Outgoing interface of DHCPv6 packets
display ipv6 dhcp relay statistics
Syntax
display ipv6 dhcp relay statistics [ | { begin | exclude | include } regular-expression ]
178
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 dhcp relay statistics command to display packet statistics on the DHCPv6 relay
agent.
Related commands: reset ipv6 dhcp relay statistics.
Examples
# Display packet statistics on the DHCPv6 relay agent.
<Sysname> display ipv6 dhcp relay statistics
Packets dropped
:
4
Error
:
4
Excess of rate limit
:
0
Packets received
:
14
SOLICIT
:
0
REQUEST
:
0
CONFIRM
:
0
RENEW
:
0
REBIND
:
0
RELEASE
:
0
DECLINE
:
0
INFORMATION-REQUEST
:
7
RELAY-FORWARD
:
0
RELAY-REPLY
:
7
Packets sent
:
14
ADVERTISE
:
0
RECONFIGURE
:
0
REPLY
:
7
RELAY-FORWARD
:
7
RELAY-REPLY
:
0
Table 41 Output description
Field
Description
Packets dropped
Number of discarded packets
Error
Number of discarded error packets
179
Field
Description
Excess of rate limit
Number of packets discarded due to excess of rate limit
Packets received
Number of received packets
SOLICIT
Number of received solicit packets
REQUEST
Number of received request packets
CONFIRM
Number of received confirm packets
RENEW
Number of received renew packets
REBIND
Number of received rebind packets
RELEASE
Number of received release packets
DECLINE
Number of received decline packets
INFORMATION-REQUEST
Number of received information request packets
RELAY-FORWARD
Number of received relay-forward packets
RELAY-REPLY
Number of received relay-reply packets
Packets sent
Number of sent packets
ADVERTISE
Number of sent advertise packets
RECONFIGURE
Number of sent reconfigure packets
REPLY
Number of sent reply packets
RELAY-FORWARD
Number of sent Relay-forward packets
RELAY-REPLY
Number of sent Relay-reply packets
ipv6 dhcp relay server-address
Syntax
ipv6 dhcp relay server-address ipv6-address [ interface interface-type interface-number ]
undo ipv6 dhcp relay server-address ipv6-address [ interface interface-type interface-number ]
View
Interface view
Default level
2: System level
Parameters
ipv6-address: Specifies the IPv6 address of the DHCPv6 server.
interface interface-type interface-number: Specifies an outgoing interface for DHCPv6 packets.
Description
Use the ipv6 dhcp relay server-address command to enable DHCPv6 relay agent on the interface and
specify a DHCPv6 server.
Use the undo ipv6 dhcp relay server-address command to remove the DHCPv6 server from the interface.
By default, DHCPv6 relay agent is disabled and no DHCPv6 server is specified on the interface.
180
Upon receiving a request from a DHCPv6 client, the interface that operates as a DHCPv6 relay agent
encapsulates the request into a Relay-forward message and forwards the message to the specified
DHCPv6 server, which then assigns an IPv6 address and other configuration parameters to the DHCPv6
client.
Executing the ipv6 dhcp relay server-address command repeatedly can specify multiple DHCPv6 servers,
and up to eight DHCP servers can be specified for an interface. After receiving requests from DHCPv6
clients, the DHCPv6 relay agent forwards the requests to all the specified DHCPv6 servers.
If the DHCPv6 server address is a link-local address or link-scoped multicast address on the local link, you
must specify an outgoing interface. If no outgoing interface is specified, DHCPv6 packets may fail to be
forwarded to the DHCPv6 server.
After you remove all the specified DHCPv6 servers from an interface with the undo ipv6 dhcp relay
server-address command, DHCPv6 relay agent is disabled on the interface.
An interface cannot serve as a DHCPv6 client and DHCPv6 relay agent at the same time.
Related commands: display ipv6 dhcp relay server-address.
Examples
# Enable DHCPv6 relay agent on VLAN-interface 2, and specify the DHCPv6 server address as
2001:1::3.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp relay server-address 2001:1::3
reset ipv6 dhcp relay statistics
Syntax
reset ipv6 dhcp relay statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the reset ipv6 dhcp relay statistics command to clear packets statistics on the DHCPv6 relay agent.
After this command is executed, the packets statistics is displayed as 0 when you use the display ipv6
dhcp relay statistics command.
Related commands: display ipv6 dhcp relay statistics.
Examples
# Clear packet statistics on the DHCPv6 relay agent.
<Sysname> reset ipv6 dhcp relay statistics
181
DHCPv6 client configuration commands
display ipv6 dhcp client
Syntax
display ipv6 dhcp client [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the DHCPv6 client information of a specified
interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 dhcp client command to display DHCPv6 client information.
With no parameters specified, the DHCPv6 client information of all the interfaces is displayed.
Examples
# Display the DHCPv6 client information of VLAN-interface 2.
<Sysname> display ipv6 dhcp client interface vlan-interface 2
Vlan-interface2 is in stateless DHCPv6 client mode
State is OPEN
Preferred Server:
Reachable via address
:
FE80::213:7FFF:FEF6:C818
DUID
:
0003000100137ff6c818
DNS servers
:
1:2:3::5
Domain names
:
1:2:4::7
abc.com
Table 42 Output description
Field
Description
in stateless DHCPv6 client
mode
Indicates the client is in the stateless DHCPv6 configuration mode.
182
Field
Description
Current state of the DHCPv6 client:
• INIT—After enabled, the DHCPv6 client enters the INIT state.
• IDLE—After receiving an RA message with the “M” flag set to 0 and “O” flag
State is OPEN
set to 1 and enabled with stateless DHCPv6, the DHCPv6 client enters the
IDLE state.
• INFO-REQUESTING—The DHCPv6 client is requesting configuration
information.
• OPEN—The DHCPv6 client successfully obtained configuration parameters
and completed stateless configuration based on the obtained parameters.
Preferred Server
Information about the DHCPv6 server selected by the DHCPv6 client
Reachable via address
Reachable address, which is the link local address of the DHCPv6 server or relay
agent.
DUID
DHCP unique identifier (DUID) of the DHCPv6 server
DNS servers
DNS server address sent by the DHCPv6 server
Domain names
Domain name information sent by the DHCPv6 server
display ipv6 dhcp client statistics
Syntax
display ipv6 dhcp client statistics [ interface interface-type interface-number ] [ | { begin | exclude |
include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the DHCPv6 client statistics of a specified interface.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 dhcp client statistics command to display DHCPv6 client statistics.
With no parameters specified, DHCPv6 client statistics of all the interfaces is displayed.
Related commands: reset ipv6 dhcp client statistics.
Examples
# Display DHCPv6 client statistics of VLAN-interface 2.
183
<Sysname> display ipv6 dhcp client statistics interface vlan-interface 2
Interface
:
Vlan-interface2
Packets Received
:
1
Reply
:
1
Advertise
:
0
Reconfigure
:
0
Invalid
:
0
:
5
Solicit
:
0
Request
:
0
Confirm
:
0
Renew
:
0
Rebind
Packets Sent
:
0
Information-request :
5
Release
:
0
Decline
:
0
Table 43 Output description
Field
Description
Interface
Interface that servers as the DHCPv6 client
Packets Received
Number of received packets
Reply
Number of received reply packets
Advertise
Number of received advertise packets
Reconfigure
Number of received reconfigure packets
Invalid
Number of invalid packets
Packets Sent
Number of sent packets
Solicit
Number of sent solicit packets
Request
Number of sent request packets
Confirm
Number of sent confirm packets
Renew
Number of sent renew packets
Rebind
Number of sent rebind packets
Information-request
Number of sent information request packets
Release
Number of sent release packets
Decline
Number of sent decline packets
reset ipv6 dhcp client statistics
Syntax
reset ipv6 dhcp client statistics [ interface interface-type interface-number ]
View
User view
184
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Clears DHCPv6 client statistics of a specified interface.
Description
Use the reset ipv6 dhcp client statistics command to clear DHCPv6 client statistics.
With no parameters specified, DHCPv6 client statistics of all the interfaces is cleared.
After this command is executed, the packets statistics is displayed as 0 when you use the display ipv6
dhcp client statistics command.
Related commands: display ipv6 dhcp client statistics.
Examples
# Clear DHCPv6 client statistics of all the interfaces.
<Sysname> reset ipv6 dhcp client statistics
185
IPv6 DNS configuration commands
display dns ipv6 server
Syntax
display dns ipv6 server [ dynamic ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
dynamic: Displays IPv6 DNS server information acquired dynamically through DHCP or other protocols.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display dns ipv6 server command to display IPv6 DNS server information.
Examples
# Display IPv6 DNS server information.
<Sysname> display dns ipv6 server
Type:
D:Dynamic
DNS Server
S:Static
Type
IPv6 Address
1
S
1::1
2
S
FE80::1
(Interface Name)
Vlan999
Table 44 Output description
Field
Description
DNS Server
Sequence number of the DNS server, which is assigned automatically by the
system, starting from 1.
Type
Type of the DNS server: “S” represents a statically configured DNS server, and
“D” represents a DNS server obtained dynamically through DHCP or other
protocols.
IPv6 Address
IPv6 address of the DNS server
186
Field
Description
Interface Name
Interface name, which is available only for a DNS server with an IPv6 link-local
address configured.
display ipv6 host
Syntax
display ipv6 host [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 host command to display the mappings between host names and IPv6 addresses in
the static domain name resolution table.
Related commands: ipv6 host.
Examples
# Display the mappings between host names and IPv6 addresses in the static domain name resolution
table.
<Sysname> display ipv6 host
Host
Age
Flags
IPv6Address
aaa
0
static
2002::1
bbb
0
static
2002::2
Table 45 Output description
Field
Description
Host
Host name
Age
Time for the entry to live. “0” is displayed in the case of static configuration.
Flags
Type of the mapping. Static indicates a static mapping.
IPv6Address
IPv6 address of a host
187
dns server ipv6
Syntax
dns server ipv6 ipv6-address [ interface-type interface-number ]
undo dns server ipv6 ipv6-address [ interface-type interface-number ]
View
System view
Default level
2: System level
Parameters
ipv6-address: Specifies the IPv6 address of a DNS server.
interface-type interface-number: Specifies an interface by its type and number. When the IPv6 address
of the DNS server is a link-local address, the two arguments must be specified.
Description
Use the dns server ipv6 command to specify a DNS server.
Use the undo dns server ipv6 command to remove the specified DNS server.
By default, no DNS server is configured.
You can configure a maximum of six DNS servers, including those with IPv4 addresses.
Examples
# Specify a DNS server at 2002::1.
<Sysname> system-view
[Sysname] dns server ipv6 2002::1
ipv6 host
Syntax
ipv6 host hostname ipv6-address
undo ipv6 host hostname [ ipv6-address ]
View
System view
Default level
2: System level
Parameters
hostname: Specifies the host name, a string of up to 255 characters. The character string can contain
letters, numbers, underscores (_), hyphens (-), or dots (.) and must contain at least one letter.
ipv6-address: Specifies the IPv6 address.
Description
Use the ipv6 host command to configure a mapping between host name and IPv6 address.
Use the undo ipv6 host command to remove a mapping between host name and IPv6 address.
188
No mappings are created by default.
Each host name can correspond to only one IPv6 address. The IPv6 address you last assign to the host
name will overwrite the previous one if there is any.
Related commands: display ipv6 host.
Examples
# Configure the mapping between a host name and an IPv6 address.
<Sysname> system-view
[Sysname] ipv6 host aaa 2001::1
Tunneling configuration commands
default
Syntax
default
View
Tunnel interface view
Default level
2: System level
Parameters
None
Description
Use the default command to restore the default settings for the tunnel interface.
This command might fail to restore the default settings for some commands for reasons such as command
dependencies and system restrictions. You can use the display this command in interface view to check
for these commands, and perform their undo forms or follow the command reference to individually
restore their default settings. If your restoration attempt still fails, follow the error message to resolve the
problem.
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of the
impacts of this command when you perform it on a live network.
Examples
# Restore the default settings of interface tunnel 1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] default
This command will restore the default settings. Continue? [Y/N]:y
189
description
Syntax
description text
undo description
View
Tunnel interface view
Default level
2: System level
Parameters
text: Description of an interface, a string of 1 to 80 characters.
Description
Use the description command to configure a description for the current interface.
Use the undo description command to restore the default.
By default, the description of a tunnel interface is Tunnelnumber Interface, for example, Tunnel1
Interface.
Related commands: display interface tunnel.
Examples
# Configure the description of interface Tunnel 1 as tunnel1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] description tunnel1
destination
Syntax
destination { ip-address | ipv6-address }
undo destination
View
Tunnel interface view
Default level
2: System level
Parameters
ip-address: Specifies the tunnel destination IPv4 address.
ipv6-address: Specifies the tunnel destination IPv6 address.
Description
Use the destination command to specify the destination address for the tunnel interface.
Use the undo destination command to remove the configured tunnel destination address.
By default, no tunnel destination address is configured.
190
The tunnel destination address is the address of the peer interface receiving packets and should be
configured as the source address of the peer tunnel interface.
Automatic tunnel interfaces using the same encapsulation protocol must have different source addresses.
Manual tunnel interfaces using the same encapsulation protocol must have different source and
destination addresses.
Related commands: source, interface tunnel, display interface tunnel, and display ipv6 interface tunnel.
Examples
# Configure interface VLAN-interface 100 (193.101.1.1) of Sysname 1 and interface VLAN-interface 100
(192.100.1.1) of Sysname 2 as the source and destination interfaces of a tunnel between the two devices,
respectively.
<Sysname1> system-view
[Sysname1] interface tunnel 0
[Sysname1-Tunnel0] source 193.101.1.1
[Sysname1-Tunnel0] destination 192.100.1.1
<Sysname2> system-view
[Sysname2] interface tunnel 1
[Sysname2-Tunnel1] source 192.100.1.1
[Sysname2-Tunnel1] destination 193.101.1.1
display interface tunnel
Syntax
display interface [ tunnel ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface tunnel number [ brief ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
number: Specifies the number of a tunnel interface. With this argument, the command displays
information about the specified tunnel interface.
brief: Displays brief interface information. If you do not specify this keyword, the command displays
detailed interface information.
down: Displays information about interfaces in the DOWN state and the causes. If you do not specify
this keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
191
Description
Use the display interface tunnel command to display information about tunnel interfaces, such as the
source address, destination address, and tunnel mode.
•
If you do not specify the tunnel keyword, this command displays information about all interfaces on
the device.
•
If you specify the tunnel keyword without the number argument, this command displays information
about all existing tunnel interfaces.
Related commands: interface tunnel, source, destination, and tunnel-protocol.
Examples
# Display detailed information about interface Tunnel 0.
<Sysname> display interface tunnel 0
Tunnel0 current state: UP
Line protocol current state: UP
Description: Tunnel0 Interface
The Maximum Transmit Unit is 1476
Internet Address is 58.0.0.1/24 Primary
Encapsulation is TUNNEL, service-loopback-group ID is 1.
Tunnel source 20.0.0.2 (Vlan-interface2000), destination 20.0.0.1
Tunnel bandwidth 64 (kbps)
Tunnel protocol/transport GRE/IP
GRE key disabled
Checksumming of GRE packets disabled
Last clearing of counters:
Never
Last 300 seconds input:
Last 300 seconds output:
1847 packets input,
0 bytes/sec, 0 packets/sec
28 bytes/sec, 0 packets/sec
136451 bytes
0 input error
5572 packets output,
428860 bytes
0 output error
Table 46 Output description
Field
Description
Physical state of the tunnel interface:
• DOWN (Administratively)—Indicates that the interface is
Tunnel0 current state
administratively down; that is, the interface is shut down with the
shutdown command.
• DOWN—Indicates that the interface is administratively up but its
physical state is down.
• UP—Indicates that both the administrative and physical states of the
interface are up.
Link layer state of the tunnel interface:
Line protocol current state
• DOWN—Indicates that the protocol state of the interface is down.
• UP—Indicates that the protocol state of the interface is up.
Description
Description of the tunnel interface
Maximum Transmit Unit
Maximum transmit unit allowed on the tunnel interface
192
Field
Description
IP address of the tunnel interface
If no IP address is assigned to the interface, "Internet protocol
processing : disabled" will be displayed, which means that packets
cannot be processed.
Internet Address
"Primary" indicates the primary IP address of the interface; "Sub"
indicates a secondary IP address of the interface.
Encapsulation is TUNNEL
The encapsulation protocol is tunnel.
ID of the service loopback group referenced by the tunnel.
service-loopback-group ID
If service loopback group is not specified, "service-loopback-group ID
not set" will be displayed.
Tunnel source
Source address of the tunnel
destination
Destination address of the tunnel
Tunnel bandwidth
Bandwidth of the tunnel interface
Tunnel mode and transport protocol:
•
•
•
•
•
•
•
•
•
Tunnel protocol/transport
GRE/IP—GRE over IPv4 tunnel mode
GRE/IPv6—GRE over IPv6 tunnel mode
IP/IP—IPv4 over IPv4 tunnel mode
IP/IPv6—IPv4 over IPv6 tunnel mode
IPv6/IP—IPv6 over IPv4 manual tunnel mode
IPv6/IP 6to4—IPv6 over IPv4 6to4 tunnel mode
IPv6/IP ISATAP—IPv6 over IPv4 ISATAP tunnel mode
IPv6/IPv6—IPv6 over IPv6 tunnel mode
CR_LSP—MPLS TE tunnel mode
GRE key disabled
The tunnel interface key option of GRE is not configured.
Checksumming of GRE packets
disabled
The GRE packet checksum function is disabled.
Last clearing of counters
Last time of clearing of counters
Last 300 seconds input: 0 bytes/sec,
0 packets/sec
Average input rate in the last 300 seconds in bytes/sec or packets/sec
Last 300 seconds output: 0
bytes/sec, 0 packets/sec
Average output rate in the last 300 seconds in bytes/sec or
packets/sec
packets input
Total number of input packets
input error
Number of input error packets
packets output
Total number of output packets
output error
Number of output error packets
# Display brief information about interface Tunnel 0.
<Sysname> display interface tunnel 0 brief
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
193
Description
Tun0
UP
UP
1.1.1.1
# Display brief information about interface Tunnel 1 in the DOWN state.
<Sysname> display interface tunnel brief down
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Interface
Link Cause
Tun1
DOWN Not connected
Table 47 Output description
Field
Description
The brief information of
interface(s) under route mode
Brief information about Layer 3 interfaces
Link: ADM - administratively
down; Stby - standby
ADM—The interface has been administratively shut down. To recover
its physical state, perform the undo shutdown command.
Protocol: (s) - spoofing
(s) indicates that the network layer protocol state is UP, but the link is not
available because it is an on-demand link or not present at all.
Interface
Abbreviated interface name
Physical link state of the interface:
Link
• UP—The link is up.
• DOWN—The link is down.
• ADM—The link has been administratively shut down. To bring it up,
perform the undo shutdown command.
• Stby—The interface is a backup interface.
Protocol state:
Protocol
• DOWN—The protocol is disabled.
• UP—The protocol is enabled.
Main IP
Primary IP address of the interface
Description
Description of the interface
Cause
Cause of a DOWN physical link. If the port has been shut down with the
shutdown command, this field displays Administratively. To bring up the
port, use the undo shutdown command.
display ipv6 interface tunnel
Syntax
display ipv6 interface tunnel [ number ] [ brief ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
number: Displays IPv6 information on a specific tunnel interface. If no interface number is specified, IPv6
information about all tunnel interfaces will be displayed.
194
brief: Displays brief information of tunnel interfaces. If this keyword is not specified, detailed information
and IPv6 packet statistics for tunnel interfaces are displayed.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display ipv6 interface tunnel command to display IPv6 information for tunnel interfaces.
Examples
# Display detailed IPv6 information and IPv6 packet statistics for interface Tunnel 0.
<Sysname> display ipv6 interface tunnel 0
Tunnel0 current state :UP
Line protocol current state :UP
IPv6 is enabled, link-local address is FE80::202:201
Global unicast address(es):
3000::1, subnet is 3000::/64
Joined group address(es):
FF02::1:FF02:201
FF02::1:FF00:1
FF02::1:FF00:0
FF02::2
FF02::1
MTU is 1480 bytes
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives:
45
InTooShorts:
0
InTruncatedPkts:
0
InHopLimitExceeds:
0
InBadHeaders:
0
InBadOptions:
0
ReasmReqds:
0
ReasmOKs:
0
InFragDrops:
0
InFragTimeouts:
0
OutFragFails:
0
InUnknownProtos:
0
InDelivers:
45
OutRequests:
45
OutForwDatagrams:
0
InNoRoutes:
0
195
InTooBigErrors:
0
OutFragOKs:
0
OutFragCreates:
0
InMcastPkts:
0
InMcastNotMembers:
0
OutMcastPkts:
0
InAddrErrors:
0
InDiscards:
0
OutDiscards:
0
Table 48 Output description
Field
Description
Physical state of the tunnel interface:
• Administratively DOWN—Indicates that the interface is
Tunnel0 current state
administratively down; that is, the interface is shut down with the
shutdown command.
• DOWN—Indicates that the interface is administratively up but its
physical state is down.
• UP—Indicates that both the administrative and physical states of the
interface are up.
Link layer state of the tunnel interface:
Line protocol current state
• DOWN—Indicates that the protocol state of the interface is down.
• UP—Indicates that the protocol state of the interface is up.
IPv6 is enabled
IPv6 packet forwarding state of the tunnel interface. IPv6 packet
forwarding is automatically enabled after an IPv6 address is assigned to
the interface. IPv6 packet forwarding is enabled in the example.
link-local address
Link-local address configured for the tunnel interface
Global unicast address(es)
Global unicast address(es) configured for the tunnel interface
Joined group address(es)
Multicast address(es) of the tunnel interface
MTU is 1480 bytes
Maximum transmission unit of the tunnel interface. It is 1480 bytes in the
example.
ND reachable time
Neighbor reachable time
ND retransmit interval
Interval for retransmitting a neighbor solicitation message
Hosts use stateless autoconfig for
addresses
Hosts use stateless autoconfiguration mode to acquire IPv6 addresses.
InReceives
All IPv6 packets received by the tunnel interface, including types of error
packets.
InTooShorts
Received IPv6 packets that are too short, with a length less than 40 bytes,
for example.
InTruncatedPkts
Received IPv6 packets with a length less than that specified in the packets
InHopLimitExceeds
Received IPv6 packets with a hop count exceeding the limit
InBadHeaders
Received IPv6 packets with bad basic headers
InBadOptions
Received IPv6 packets with bad extension headers
ReasmReqds
Received IPv6 fragments
196
Field
Description
ReasmOKs
Number of packets after reassembly rather than the number of fragments
InFragDrops
IPv6 fragments discarded due to certain errors
InFragTimeouts
IPv6 fragments discarded because the interval for which they had stayed
in the system buffer exceeded the specified period
OutFragFails
Packets failed in fragmentation on the outbound interface
InUnknownProtos
Received IPv6 packets with unknown or unsupported protocol type
InDelivers
Received IPv6 packets that were delivered to application layer protocols
(such as ICMPv6, TCP, and UDP)
OutRequests
Local IPv6 packets sent by IPv6 application protocols
OutForwDatagrams
Packets forwarded by the outbound interface
InNoRoutes
IPv6 packets that were discarded because no matched route can be
found
InTooBigErrors
IPv6 packets that were received normally but discarded before they were
forwarded because they exceeded the PMTU
OutFragOKs
Packets that were fragmented on the outbound interface
OutFragCreates
Number of packet fragments after fragmentation on the outbound
interface
InMcastPkts
IPv6 multicast packets received on the interface
InMcastNotMembers
Incoming IPv6 multicast packets that were discarded because the
interface did not belong to the corresponding multicast groups
OutMcastPkts
IPv6 multicast packets sent by the interface
InAddrErrors
IPv6 packets that were discarded due to invalid destination addresses
InDiscards
Received IPv6 packets that were discarded due to resource problems
rather than packet content errors
OutDiscards
Sent packets that were discarded due to resource problems rather than
packet content errors
# Display brief IPv6 information for interface Tunnel 0.
<Sysname> display ipv6 interface tunnel 0 brief
*down: administratively down
(s): spoofing
Interface
Physical
Tunnel0
up
Protocol
up
IPv6 Address
3000::1
Table 49 Output description
Field
Description
*down
The tunnel interface is administratively down, that is, the interface is closed by using
the shutdown command.
(s)
Spoofing attribute of the tunnel interface, that is, the link protocol state of the tunnel
interface is up, but the link does not exist, or the link is established on demand, instead
of being permanent.
Interface
Name of the tunnel interface
197
Field
Description
Physical state of the tunnel interface:
• *down—Indicates that the interface is administratively down; that is, the interface
is shut down with the shutdown command.
Physical
• down—Indicates that the interface is administratively up but its physical state is
down.
• up—Indicates that both the administrative and physical states of the interface are
up.
Link layer protocol state of the tunnel interface:
Protocol
IPv6 Address
• down—Indicates that the protocol state of the interface is down.
• up—Indicates that the protocol state of the interface is up.
IPv6 address of the tunnel interface. Only the first of configured IPv6 addresses is
displayed. (If no address is configured for the interface, “Unassigned” will be
displayed.)
encapsulation-limit
Syntax
encapsulation-limit [ number ]
undo encapsulation-limit
View
Tunnel interface view
Default level
2: System level
Parameters
number: Specifies the number of nested encapsulations, in the range of 1 to 10. The default value is 4.
Description
Use the encapsulation-limit command to configure the maximum number of nested encapsulations of a
packet in the tunnel.
Use the undo encapsulation-limit command to remove the configured encapsulation limit.
The encapsulation limit is only applicable to the IPv6 over IPv6 tunnel.
Examples
# Configure the maximum number of nested encapsulations in a tunnel as 3.
<Sysname> system-view
[Sysname] interface tunnel 2
[Sysname-Tunnel2] tunnel-protocol ipv6-ipv6
[Sysname-Tunnel2] encapsulation-limit 3
interface tunnel
Syntax
interface tunnel number
198
undo interface tunnel number
View
System view
Default level
2: System level
Parameters
number: Specifies the number of the tunnel interface. The number of tunnels that can be created is
restricted by the total number of interfaces and the memory.
Description
Use the interface tunnel command to create a tunnel interface and enter its view.
Use the undo interface tunnel command to delete a specific tunnel interface.
By default, no tunnel interface is created on the device.
Use the interface tunnel command to enter the interface view of a specific tunnel. If the specified tunnel
interface does not exist, the system will create the interface and enter its view.
A tunnel interface number is only locally significant. Thus, the tunnel interfaces on the two ends of a
tunnel can use the same or different interface numbers.
Related commands: display interface tunnel, display ipv6 interface tunnel, source, destination, and
tunnel-protocol.
Examples
# Create interface Tunnel 3 and enter its view.
<Sysname> system-view
[Sysname] interface tunnel 3
[Sysname-Tunnel3]
mtu
Syntax
mtu mtu-size
undo mtu
View
Tunnel interface view
Default level
2: System level
Parameters
mtu-size: Specifies the MTU on the tunnel interface, in the range of 100 to 64000 bytes.
Description
Use the mtu command to set the MTU on a tunnel interface.
Use the undo mtu command to restore the default.
By default, the MTU on a tunnel interface is 64000 bytes.
199
Examples
# Set the MTU for IPv4 packets on interface Tunnel 3 to 1432 bytes.
<Sysname> system-view
[Sysname] interface tunnel 3
[Sysname-Tunnel3] mtu 1432
reset counters interface
Syntax
reset counters interface [ tunnel [ number ] ]
View
User view
Default level
2: System level
Parameters
number: Specifies the tunnel interface number.
Description
Use the reset counters interface command to clear the statistics of tunnel interfaces.
Before sampling network traffic within a specific period of time on an interface, you need to clear the
existing statistics.
•
If neither the tunnel keyword nor interface number is specified, this command clears the statistics of
all interfaces.
•
If only the tunnel keyword is specified, this command clears the statistics of all tunnel interfaces.
•
If both the tunnel keyword and interface number are specified, this command clears the statistics of
the specified tunnel interface.
Examples
# Clear the statistics of Tunnel 3.
<Sysname> reset counters interface tunnel 3
service-loopback-group
Syntax
service-loopback-group number
undo service-loopback-group
View
Tunnel interface view
Default level
2: System level
Parameters
number: Specifies the service loopback group ID.
200
Description
Use the service-loopback-group command to reference a service loopback group on the tunnel interface.
Use the undo service-loopback-group command to remove the referenced service loopback group from
the tunnel interface.
By default, no service loopback group is referenced on a tunnel interface.
The service loopback group to be referenced must have been configured and have the service type set
to tunnel in system view.
One tunnel interface can reference only one service loopback group.
Related commands: display interface tunnel; service-loopback group (Layer 2—LAN Switching
Command Reference).
Examples
# Create service loopback group 1 of tunnel type.
<Sysname> system-view
[Sysname] service-loopback group 1 type tunnel
# Add a Layer 2 Ethernet port to service loopback group 1.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo stp enable
[Sysname-GigabitEthernet1/0/1] undo lldp enable
[Sysname-GigabitEthernet1/0/1] port service-loopback group 1
[Sysname-GigabitEthernet1/0/1] quit
# Reference service loopback group 1 on interface Tunnel 2.
[Sysname] interface tunnel 2
[Sysname-Tunnel2] service-loopback-group 1
shutdown
Syntax
shutdown
undo shutdown
View
Tunnel interface view
Default level
2: System level
Parameters
None
Description
Use the shutdown command to shut down a tunnel interface.
Use the undo shutdown command to bring up a tunnel interface.
By default, a tunnel interface is in the up state.
201
Examples
# Shut down interface Tunnel 1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] shutdown
source
Syntax
source { ip-address | ipv6-address | interface-type interface-number }
undo source
View
Tunnel interface view
Default level
2: System level
Parameters
ip-address: Specifies the tunnel source IPv4 address.
ipv6-address: Specifies the tunnel source IPv6 address.
interface-type interface-number: Specifies an interface, which can be a VLAN interface, Layer 3 Ethernet
port, tunnel interface, or loopback interface.
Description
Use the source command to specify the source address or interface of the tunnel interface.
Use the undo source command to remove the configured source address or interface of the tunnel
interface.
By default, no source address or interface is specified for the tunnel interface.
The tunnel source address is the address of the interface sending packets and should be configured as
the destination address of the peer tunnel interface.
Automatic tunnel interfaces using the same encapsulation protocol must have different source addresses.
Manual tunnel interfaces using the same encapsulation protocol must have different source and
destination addresses.
Related commands: destination, interface tunnel, display interface tunnel, and display ipv6 interface
tunnel.
Examples
# Set the tunnel source address to 192.100.1.1 (or the interface VLAN-interface 100) on the interface
Tunnel 5.
<Sysname> system-view
[Sysname] interface tunnel 5
[Sysname-Tunnel5] source 192.100.1.1
Or
<Sysname> system-view
[Sysname] interface tunnel 5
[Sysname-Tunnel5] source vlan-interface 100
202
tunnel bandwidth
Syntax
tunnel bandwidth bandwidth-value
undo tunnel bandwidth
View
Tunnel interface view
Default level
2: System level
Parameters
bandwidth-value: Specifies the bandwidth value of the tunnel interface in kbps, in the range of 1 to
10000000.
Description
Use the tunnel bandwidth command to set the bandwidth of the tunnel interface.
Use the undo tunnel bandwidth command to restore the default.
By default, the bandwidth of the tunnel interface is 64 kbps.
The tunnel interface bandwidth set with the tunnel bandwidth command is for dynamical routing
protocols to calculate the cost of a tunnel path, rather than changes the bandwidth of the tunnel interface.
Refer to the bandwidth of the output interface of the packet when you set the bandwidth of the tunnel
interface.
Examples
# Configure the bandwidth of Tunnel 0 as 100 kbps.
<Sysname> system-view
[Sysname] interface tunnel 0
[Sysname-Tunnel0] tunnel bandwidth 100
tunnel discard ipv4-compatible-packet
Syntax
tunnel discard ipv4-compatible-packet
undo tunnel discard ipv4-compatible-packet
View
System view
Default level
2: System level
Parameters
None
Description
Use the tunnel discard ipv4-compatible-packet command to enable dropping of IPv6 packets using
IPv4-compatible IPv6 addresses.
203
Use the undo tunnel discard ipv4-compatible-packet command to restore the default.
By default, IPv6 packets using IPv4-compatible IPv6 addresses are not dropped.
The tunnel discard ipv4-compatible-packet command enables the device to check the source and
destination IPv6 addresses of the de-encapsulated IPv6 packets from the tunnel and discard packets that
use a source or destination IPv4-compatible IPv6 address.
Examples
# Enable dropping of IPv6 packets using IPv4-compatible IPv6 addresses.
<Sysname> system-view
[Sysname] tunnel discard ipv4-compatible-packet
tunnel-protocol
Syntax
tunnel-protocol { gre [ ipv6 ] | ipv4-ipv4 | ipv4-ipv6 | ipv6-ipv4 [ 6to4 | isatap ] | ipv6-ipv6 | mpls
te }
undo tunnel-protocol
View
Tunnel interface view
Default level
2: System level
Parameters
gre: Specifies the GRE over IPv4 tunnel mode.
gre ipv6: Specifies the GRE over IPv6 tunnel mode.
ipv4-ipv4: Specifies the IPv4 over IPv4 tunnel mode.
ipv4-ipv6: Specifies the IPv4 over IPv6 manual tunnel mode.
ipv6-ipv4: Specifies the IPv6 over IPv4 manual tunnel mode.
ipv6-ipv4 6to4: Specifies the IPv6 over IPv4 6to4 tunnel mode.
ipv6-ipv4 isatap: Specifies the IPv6 over IPv4 ISATAP tunnel mode.
ipv6-ipv6: Specifies the IPv6 over IPv6 tunnel mode.
mpls te: Specifies the MPLS TE tunnel mode.
Description
Use the tunnel-protocol command to specify the tunnel mode for the tunnel interface.
Use the undo tunnel-protocol command to restore the default.
The default tunnel is a GRE over IPv4 tunnel.
You can select a tunnel mode according to the actual network topology and application. The two ends
of a tunnel must have the same tunnel mode specified; otherwise, traffic transmission may fail.
Only one automatic tunnel can be created at the start point of a tunnel.
Examples
# Specify the IPv4 over IPv4 tunnel mode for interface Tunnel 2.
204
<Sysname> system-view
[Sysname] interface tunnel 2
[Sysname-Tunnel2] tunnel-protocol ipv4-ipv4
205
Index
ABDEFGILMNOPRSTUV
dhcp server ip-pool,27
A
dhcp server ping packets,28
arp check enable,1
dhcp server ping timeout,29
arp max-learning-num,1
dhcp server relay information enable,29
arp send-gratuitous-arp,10
dhcp server threshold,30
arp static,2
dhcp-snooping,80
arp timer aging,3
dhcp-snooping binding database filename,80
B
dhcp-snooping binding database update interval,81
bims-server,22
dhcp-snooping binding database update now,82
bootfile-name,22
dhcp-snooping check mac-address,82
D
dhcp-snooping check request-message,83
dhcp-snooping information circuit-id format-type,84
default,189
dhcp-snooping information circuit-id string,84
description,190
dhcp-snooping information enable,85
destination,190
dhcp-snooping information format,86
dhcp enable,23
dhcp-snooping information remote-id format-type,87
dhcp relay address-check enable,55
dhcp-snooping information remote-id string,87
dhcp relay check mac-address,56
dhcp-snooping information strategy,88
dhcp relay client-detect enable,56
dhcp-snooping rate-limit,89
dhcp relay information circuit-id format-type,57
dhcp-snooping trust,90
dhcp relay information circuit-id string,58
display arp,4
dhcp relay information enable,58
display arp ip-address,5
dhcp relay information format,59
display arp timer aging,6
dhcp relay information remote-id format-type,60
display arp vpn-instance,7
dhcp relay information remote-id string,60
display dhcp client,76
dhcp relay information strategy,61
display dhcp relay,67
dhcp relay release ip,62
display dhcp relay information,68
dhcp relay security refresh enable,63
display dhcp relay security,70
dhcp relay security static,62
display dhcp relay security statistics,71
dhcp relay security tracker,64
display dhcp relay security tracker,71
dhcp relay server-detect,65
display dhcp relay server-group,72
dhcp relay server-group,65
display dhcp relay statistics,73
dhcp relay server-select,66
display dhcp server conflict,31
dhcp select relay,67
display dhcp server expired,32
dhcp select server global-pool,24
display dhcp server forbidden-ip,33
dhcp server apply ip-pool,24
display dhcp server free-ip,33
dhcp server client-detect enable,25
display dhcp server ip-in-use,34
dhcp server detect,26
display dhcp server statistics,36
dhcp server forbidden-ip,26
206
dns server,103
display dhcp server tree,37
display dhcp-snooping,91
dns server ipv6,188
display dhcp-snooping binding database,92
dns-list,39
display dhcp-snooping information,93
domain-name,40
display dhcp-snooping packet statistics,94
E
display dhcp-snooping trust,95
encapsulation-limit,198
display dns domain,98
expired,40
display dns host,99
display dns ipv6 server,186
F
display dns server,100
forbidden-ip,41
display fib,106
G
display fib ip-address,108
gateway-list,42
display icmp statistics,109
gratuitous-arp-learning enable,11
display interface tunnel,191
gratuitous-arp-sending enable,11
display ip host,101
display ip interface,16
I
display ip interface brief,18
interface tunnel,198
display ip socket,111
ip address,20
display ip statistics,114
ip address dhcp-alloc,78
display ipv6 dhcp client,182
ip forward-broadcast (interface view),119
display ipv6 dhcp client statistics,183
ip forward-broadcast (system view),120
display ipv6 dhcp duid,177
ip host,104
display ipv6 dhcp relay server-address,177
ip icmp-extensions,120
display ipv6 dhcp relay statistics,178
ip redirects enable,121
display ipv6 fib,131
ip ttl-expires enable,121
display ipv6 fib ipv6-address,132
ip unreachables enable,122
display ipv6 host,187
ipv6,154
display ipv6 interface,134
ipv6 address,155
display ipv6 interface tunnel,194
ipv6 address anycast,155
display ipv6 neighbors,138
ipv6 address auto,156
display ipv6 neighbors count,140
ipv6 address auto link-local,157
display ipv6 neighbors vpn-instance,141
ipv6 address eui-64,157
display ipv6 pathmtu,142
ipv6 address link-local,158
display ipv6 socket,143
ipv6 dhcp relay server-address,180
display ipv6 statistics,145
ipv6 hoplimit-expires enable,159
display local-proxy-arp,13
ipv6 host,188
display proxy-arp,13
ipv6 icmp-error,159
display tcp ipv6 statistics,149
ipv6 icmpv6 multicast-echo-reply enable,160
display tcp ipv6 status,152
ipv6 nd autoconfig managed-address-flag,161
display tcp statistics,116
ipv6 nd autoconfig other-flag,161
display udp ipv6 statistics,153
ipv6 nd dad attempts,162
display udp statistics,118
ipv6 nd hop-limit,162
display udp-helper server,127
ipv6 nd ns retrans-timer,163
dns domain,102
ipv6 nd nud reachable-time,164
dns resolve,103
ipv6 nd ra halt,164
207
ipv6 nd ra interval,165
reset ip statistics,122
ipv6 nd ra no-advlinkmtu,166
reset ipv6 dhcp client statistics,184
ipv6 nd ra prefix,166
reset ipv6 dhcp relay statistics,181
ipv6 nd ra router-lifetime,167
reset ipv6 neighbors,172
ipv6 neighbor,168
reset ipv6 pathmtu,173
ipv6 neighbor stale-aging,169
reset ipv6 statistics,174
ipv6 neighbors max-learning-num,169
reset tcp ipv6 statistics,174
ipv6 pathmtu,170
reset tcp statistics,123
ipv6 pathmtu age,170
reset udp ipv6 statistics,175
ipv6 prefer temporary-address,171
reset udp statistics,123
ipv6 unreachables enable,172
reset udp-helper packet,127
L
S
local-proxy-arp enable,14
service-loopback-group,200
M
shutdown,201
source,202
mac-address station-move,7
static-bind client-identifier,49
mtu,199
static-bind ip-address,50
N
static-bind mac-address,51
naturemask-arp enable,8
T
nbns-list,42
tcp ipv6 timer fin-timeout,175
netbios-type,43
tcp ipv6 timer syn-timeout,176
network,44
tcp ipv6 window,176
network ip range,45
tcp path-mtu-discovery,124
network mask,45
tcp timer fin-timeout,124
next-server,46
tcp timer syn-timeout,125
O
tcp window,126
option,47
tftp-server domain-name,51
P
tftp-server ip-address,52
tunnel bandwidth,203
proxy-arp enable,15
tunnel discard ipv4-compatible-packet,203
R
tunnel-protocol,204
reset arp,8
U
reset counters interface,200
udp-helper enable,128
reset dhcp relay statistics,75
udp-helper port,128
reset dhcp server conflict,48
udp-helper server,129
reset dhcp server ip-in-use,48
reset dhcp server statistics,49
V
reset dhcp-snooping,96
vendor-class-identifier,53
reset dhcp-snooping packet statistics,96
voice-config,54
reset dns host,105
208
Support and other resources
Contacting HP
For worldwide technical support information, see the HP support website:
http://www.hp.com/support
Before contacting HP, collect the following information:
•
Product model names and numbers
•
Technical support registration number (if applicable)
•
Product serial numbers
•
Error messages
•
Operating system type and revision level
•
Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/wwalerts
After registering, you will receive email notification of product enhancements, new driver versions,
firmware updates, and other product resources.
Related information
Documents
To find related documents, browse to the Manuals page of the HP Business Support Center website:
http://www.hp.com/support/manuals
•
For related documentation, navigate to the Networking section, and select a networking category.
•
For a complete list of acronyms and their definitions, see HP A-Series Acronyms.
Websites
•
HP.com http://www.hp.com
•
HP Networking http://www.hp.com/go/networking
•
HP manuals http://www.hp.com/support/manuals
•
HP download drivers and software http://www.hp.com/support/downloads
•
HP software depot http://www.software.hp.com
•
HP Education http://www.hp.com/learn
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention
Description
Boldface
Bold text represents commands and keywords that you enter literally as shown.
Italic
Italic text represents arguments that you replace with actual values.
[]
Square brackets enclose syntax choices (keywords or arguments) that are optional.
{ x | y | ... }
Braces enclose a set of required syntax choices separated by vertical bars, from which
you select one.
[ x | y | ... ]
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
which you select one or none.
{ x | y | ... } *
Asterisk-marked braces enclose a set of required syntax choices separated by vertical
bars, from which you select at least one.
[ x | y | ... ] *
Asterisk-marked square brackets enclose optional syntax choices separated by vertical
bars, from which you select one choice, multiple choices, or none.
&<1-n>
The argument or keyword and argument combination before the ampersand (&) sign can
be entered 1 to n times.
#
A line that starts with a pound (#) sign is comments.
GUI conventions
Convention
Description
Boldface
Window names, button names, field names, and menu items are in bold text. For
example, the New User window appears; click OK.
>
Multi-level menus are separated by angle brackets. For example, File > Create > Folder.
Convention
Description
Symbols
WARNING
An alert that calls attention to important information that if not understood or followed can
result in personal injury.
CAUTION
An alert that calls attention to important information that if not understood or followed can
result in data loss, data corruption, or damage to hardware or software.
IMPORTANT
An alert that calls attention to essential information.
NOTE
TIP
An alert that contains additional or supplementary information.
An alert that provides helpful information.
Network topology icons
Represents a generic network device, such as a router, switch, or firewall.
Represents a routing-capable device, such as a router or Layer 3 switch.
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.
Port numbering in examples
The port numbers in this document are for illustration only and might be unavailable on your device.
Download PDF
Similar pages