TP-Link TL-SG2016P CLI Reference Guide [EN]

CLI Reference Guide
Jetstream Switches
1910013256 REV5.0.0
I
COPYRIGHT & TRADEMARKS
Specifications are subject to change without notice. is a registered trademark of
TP-Link Corporation Limited. Other brands and product names are trademarks or registered
trademarks of their respective holders.
No part of the specifications may be reproduced in any form or by any means or used to make
any derivative such as translation, transformation, or adaptation without permission from
TP-Link Corporation Limited. Copyright © 2020 TP-Link Corporation Limited. All rights
reserved.
https://www.tp-link.com
II
CONTENTS
Preface 1
Chapter 1 Using the CLI ................................................................................................... 6
1.1 Accessing the CLI ................................................................................................................ 6
1.1.1 Logon by a console port ............................................................................................. 6
1.1.2 Logon by Telnet ........................................................................................................... 9
1.1.3 Logon by SSH ............................................................................................................. 11
1.2 CLI Command Modes ........................................................................................................ 16
1.3 Privilege Restrictions ........................................................................................................ 19
1.4 Conventions ........................................................................................................................ 20
1.4.1 PoE Disclaimer ............................................................................................................ 20
1.4.2 Format Conventions .................................................................................................. 20
1.4.3 Special Characters .................................................................................................... 20
1.4.4 Parameter Format ...................................................................................................... 20
Chapter 2 Line Commands (Only for Certain Devices) .......................................... 21
2.1 line ........................................................................................................................................ 21
2.2 media-type rj45 .................................................................................................................. 22
Chapter 3 User Interface ............................................................................................... 23
3.1 enable ................................................................................................................................... 23
3.2 service password-encryption .......................................................................................... 23
3.3 enable password ................................................................................................................ 24
3.4 enable secret ...................................................................................................................... 25
3.5 configure ............................................................................................................................. 26
3.6 exit ........................................................................................................................................ 27
3.7 end ........................................................................................................................................ 27
3.8 clipaging .............................................................................................................................. 28
3.9 history .................................................................................................................................. 28
3.10 history clear ........................................................................................................................ 29
Chapter 4 User Management Commands ................................................................. 30
4.1 user name (password) ....................................................................................................... 30
4.2 user name (secret) ............................................................................................................. 31
4.3 service password-recovery ............................................................................................. 32
4.4 show user account-list ...................................................................................................... 33
4.5 show user configuration ................................................................................................... 34
III
Chapter 5 System Configuration Commands .......................................................... 35
5.1 system-time manual .......................................................................................................... 35
5.2 system-time ntp ................................................................................................................. 35
5.3 system-time dst predefined............................................................................................. 37
5.4 system-time dst date ........................................................................................................ 38
5.5 system-time dst recurring ................................................................................................ 39
5.6 hostname ............................................................................................................................. 40
5.7 location ................................................................................................................................ 41
5.8 contact-info ........................................................................................................................ 41
5.9 led ......................................................................................................................................... 42
5.10 ip address ............................................................................................................................ 42
5.11 ip address-alloc .................................................................................................................. 43
5.12 controller cloud-based (Only for Certain Devices) ...................................................... 44
5.13 controller inform-url (Only for Certain Devices) ........................................................... 45
5.14 reset ..................................................................................................................................... 46
5.15 service reset-disable ......................................................................................................... 46
5.16 reboot................................................................................................................................... 47
5.17 reboot-schedule ................................................................................................................ 47
5.18 copy running-config startup-config ............................................................................... 48
5.19 copy startup-config tftp ................................................................................................... 49
5.20 copy tftp startup-config ................................................................................................... 49
5.21 copy backup-config tftp ................................................................................................... 50
5.22 copy backup-config startup-config ............................................................................... 51
5.23 copy running-config backup-config ............................................................................... 51
5.24 copy tftp backup-config ................................................................................................... 52
5.25 boot application ................................................................................................................. 52
5.26 boot config .......................................................................................................................... 53
5.27 remove backup-image ...................................................................................................... 54
5.28 firmware upgrade ............................................................................................................... 54
5.29 boot autoinstall start ......................................................................................................... 55
5.30 boot autoinstall persistent-mode ................................................................................... 56
5.31 boot autoinstall auto-save................................................................................................ 56
5.32 boot autoinstall auto-reboot ............................................................................................ 57
5.33 boot autoinstall retry-count ............................................................................................. 57
5.34 show boot autoinstall ........................................................................................................ 58
5.35 show boot autoinstall downloaded-config .................................................................... 59
5.36 ping ....................................................................................................................................... 59
IV
5.37 tracert .................................................................................................................................. 60
5.38 show system-info............................................................................................................... 61
5.39 show image-info ................................................................................................................. 62
5.40 show boot ............................................................................................................................ 62
5.41 show running-config ......................................................................................................... 63
5.42 show startup-config .......................................................................................................... 63
5.43 show system-time ............................................................................................................. 64
5.44 show system-time dst ....................................................................................................... 64
5.45 show system-time ntp....................................................................................................... 65
5.46 show cable-diagnostics interface ................................................................................... 65
5.47 show cpu-utilization ........................................................................................................... 66
5.48 show memory-utilization .................................................................................................. 66
5.49 show controller ................................................................................................................... 67
5.50 show temperature .............................................................................................................. 67
5.51 show voltage ....................................................................................................................... 68
5.52 clear config interace .......................................................................................................... 68
Chapter 6 EEE Configuration Commands ................................................................. 70
6.1 eee ........................................................................................................................................ 70
6.2 show interface eee ............................................................................................................ 70
Chapter 7 SDM Template Commands ........................................................................ 72
7.1 sdm prefer ........................................................................................................................... 72
7.2 show sdm prefer ................................................................................................................ 73
Chapter 8 Time Range Commands ............................................................................. 75
8.1 time-range ........................................................................................................................... 75
8.2 absolute ............................................................................................................................... 75
8.3 periodic ................................................................................................................................ 76
8.4 holiday (time-range mode) ............................................................................................... 77
8.5 holiday .................................................................................................................................. 78
8.6 show holiday ....................................................................................................................... 78
8.7 show time-range ................................................................................................................ 79
Chapter 9 Port Configuration Commands ................................................................ 80
9.1 interface ............................................................................................................................... 80
9.2 interface range ................................................................................................................... 81
9.3 description .......................................................................................................................... 82
9.4 shutdown ............................................................................................................................. 82
V
9.5 flow-control ......................................................................................................................... 83
9.6 duplex ................................................................................................................................... 84
9.7 jumbo-size ........................................................................................................................... 84
9.8 speed ................................................................................................................................... 85
9.9 clear counters ..................................................................................................................... 86
9.10 show fiber-ports ................................................................................................................. 86
9.11 show interface status ........................................................................................................ 87
9.12 show interface counters ................................................................................................... 87
9.13 show interface configuration ........................................................................................... 88
Chapter 10 Port Isolation Commands .......................................................................... 90
10.1 port isolation ....................................................................................................................... 90
10.2 show port isolation interface ........................................................................................... 91
Chapter 11 Loopback Detection Commands ............................................................. 92
11.1 loopback-detection (global) ............................................................................................. 92
11.2 loopback-detection interval ............................................................................................. 92
11.3 loopback-detection recovery-time ................................................................................ 93
11.4 loopback-detection (interface) ........................................................................................ 94
11.5 loopback-detection config process-mode ................................................................... 94
11.6 loopback-detection recover ............................................................................................ 95
11.7 show loopback-detection global .................................................................................... 96
11.8 show loopback-detection interface ............................................................................... 97
Chapter 12 DDM Commands (Only for Certain Devices)......................................... 98
12.1 ddm state enable ............................................................................................................... 98
12.2 ddm shutdown .................................................................................................................... 99
12.3 ddm temperature_threshold ............................................................................................ 99
12.4 ddm voltage_threshold ................................................................................................... 100
12.5 ddm bias_current_threshold .......................................................................................... 101
12.6 ddm tx_power_threshold ................................................................................................ 102
12.7 ddm rx_power_threshold................................................................................................ 103
12.8 show ddm configuration ................................................................................................. 104
12.9 show ddm status .............................................................................................................. 105
12.10 show fiber-ports ............................................................................................................... 105
Chapter 13 Etherchannel Commands ........................................................................ 107
13.1 channel-group .................................................................................................................. 107
13.2 port-channel load-balance ............................................................................................. 108
VI
13.3 lacp system-priority ........................................................................................................ 109
13.4 lacp port-priority .............................................................................................................. 110
13.5 show etherchannel .......................................................................................................... 110
13.6 show etherchannel load-balance .................................................................................. 111
13.7 show lacp ........................................................................................................................... 112
13.8 show lacp sys-id ............................................................................................................... 112
Chapter 14 MAC Address Commands ........................................................................ 114
14.1 mac address-table static ................................................................................................ 114
14.2 no mac address-table dynamic ..................................................................................... 115
14.3 mac address-table aging-time ...................................................................................... 115
14.4 mac address-table filtering ............................................................................................ 116
14.5 mac address-table notification ..................................................................................... 117
14.6 mac address-table max-mac-count ............................................................................. 118
14.7 mac address-table notification (interface) .................................................................. 119
14.8 mac address-table security ........................................................................................... 120
14.9 mac address-table vlan-security .................................................................................. 121
14.10 show mac address-table ................................................................................................ 122
14.11 clear mac address-table ................................................................................................. 123
14.12 show mac address-table aging-time ............................................................................ 123
14.13 show mac address-table max-mac-count .................................................................. 124
14.14 show mac address-table interface ............................................................................... 124
14.15 show mac address-table count ..................................................................................... 125
14.16 show mac address-table address ................................................................................. 126
14.17 show mac address-table vlan ........................................................................................ 126
14.18 show mac address-table notification ........................................................................... 127
14.19 show mac address-table security ................................................................................. 128
Chapter 15 IEEE 802.1Q VLAN Commands ............................................................... 129
15.1 vlan ..................................................................................................................................... 129
15.2 name ................................................................................................................................... 130
15.3 vlan_trunk (globally) ......................................................................................................... 130
15.4 vlan_trunk (interface) ....................................................................................................... 131
15.5 switchport general allowed vlan .................................................................................... 132
15.6 switchport pvid ................................................................................................................. 132
15.7 switchport check ingress ............................................................................................... 133
15.8 switchport acceptable frame ......................................................................................... 134
15.9 show vlan summary ......................................................................................................... 134
VII
15.10 show vlan brief .................................................................................................................. 135
15.11 show vlan ........................................................................................................................... 135
15.12 show interface switchport .............................................................................................. 136
Chapter 16 MAC-based VLAN Commands ................................................................ 137
16.1 mac-vlan mac-address ................................................................................................... 137
16.2 mac-vlan ............................................................................................................................ 138
16.3 show mac-vlan .................................................................................................................. 138
16.4 show mac-vlan interface ................................................................................................ 139
Chapter 17 Protocol-based VLAN Commands ........................................................ 140
17.1 protocol-vlan template ................................................................................................... 140
17.2 protocol-vlan vlan ............................................................................................................ 141
17.3 protocol-vlan group ......................................................................................................... 142
17.4 show protocol-vlan template ......................................................................................... 143
17.5 show protocol-vlan vlan .................................................................................................. 143
Chapter 18 Private VLAN Commands (Only for Certain Devices) ...................... 144
18.1 private-vlan primary ......................................................................................................... 144
18.2 private-vlan community .................................................................................................. 144
18.3 private-vlan isolated ........................................................................................................ 145
18.4 private-vlan association.................................................................................................. 146
18.5 switchport private-vlan ................................................................................................... 146
18.6 switchport private-vlan host-association .................................................................... 147
18.7 switchport private-vlan mapping .................................................................................. 148
18.8 show vlan private-vlan .................................................................................................... 149
18.9 show vlan private-vlan interface ................................................................................... 149
Chapter 19 VLAN-VPN Commands (Only for Certain Devices) ........................... 151
19.1 dot1q-tunnel ..................................................................................................................... 151
19.2 switchport dot1q-tunnel tpid ......................................................................................... 152
19.3 dot1q-tunnel mapping .................................................................................................... 152
19.4 switchport dot1q-tunnel mode ..................................................................................... 153
19.5 switchport dot1q-tunnel missdrop ............................................................................... 154
19.6 switchport dot1q-tunnel use_inner_priority ............................................................... 155
19.7 switchport dot1q-tunnel mapping ................................................................................ 155
19.8 switchport dot1q-tunnel replace .................................................................................. 156
19.9 switchport dot1q-tunnel replace-out ........................................................................... 157
19.10 show dot1q-tunnel........................................................................................................... 158
VIII
19.11 show dot1q-tunnel mapping .......................................................................................... 159
19.12 show dot1q-tunnel interface ......................................................................................... 159
Chapter 20 ERPS Commands ........................................................................................ 161
20.1 erps ring ............................................................................................................................. 161
20.2 control-vlan ....................................................................................................................... 161
20.3 description ........................................................................................................................ 162
20.4 guard-timer ....................................................................................................................... 163
20.5 wtr-timer ............................................................................................................................ 163
20.6 holdoff-timer ..................................................................................................................... 164
20.7 protected-instance .......................................................................................................... 165
20.8 raps-mel ............................................................................................................................. 165
20.9 revertive ............................................................................................................................. 166
20.10 sub-ring .............................................................................................................................. 167
20.11 tc-notify erps .................................................................................................................... 167
20.12 tc-protection interval ...................................................................................................... 168
20.13 tc-protection threshold .................................................................................................. 168
20.14 version ............................................................................................................................... 169
20.15 virtual-channel .................................................................................................................. 170
20.16 erps ring rpl ....................................................................................................................... 170
20.17 erps ring protect-switch ................................................................................................. 171
20.18 show erps ring .................................................................................................................. 172
Chapter 21 GVRP Commands ....................................................................................... 173
21.1 gvrp..................................................................................................................................... 173
21.2 gvrp (interface) ................................................................................................................. 173
21.3 gvrp registration ............................................................................................................... 174
21.4 gvrp timer .......................................................................................................................... 175
21.5 show gvrp interface ......................................................................................................... 176
21.6 show gvrp global .............................................................................................................. 177
Chapter 22 IGMP Snooping Commands..................................................................... 178
22.1 ip igmp snooping (global) ................................................................................................ 178
22.2 ip igmp snooping version ............................................................................................... 178
22.3 ip igmp snooping drop-unknown .................................................................................. 179
22.4 ip igmp snooping header-validation ............................................................................. 180
22.5 ip igmp snooping vlan-config ........................................................................................ 180
22.6 ip igmp snooping vlan-config (immediate-leave) ....................................................... 182
22.7 ip igmp snooping vlan-config (report-suppression) .................................................. 183
IX
22.8 ip igmp snooping vlan-config (router-ports-forbidden) ............................................ 184
22.9 ip igmp snooping vlan-config (rport interface) ........................................................... 185
22.10 ip igmp snooping vlan-config (static) ........................................................................... 185
22.11 ip igmp snooping vlan-config (querier) ........................................................................ 186
22.12 ip igmp snooping (interface) .......................................................................................... 188
22.13 ip igmp snooping max-groups ....................................................................................... 188
22.14 ip igmp snooping immediate-leave............................................................................... 190
22.15 ip igmp snooping authentication ................................................................................... 190
22.16 ip igmp snooping accounting ........................................................................................ 191
22.17 ip igmp profile ................................................................................................................... 192
22.18 deny .................................................................................................................................... 192
22.19 permit ................................................................................................................................. 193
22.20 range .................................................................................................................................. 193
22.21 ip igmp filter ...................................................................................................................... 194
22.22 clear ip igmp snooping statistics .................................................................................. 195
22.23 show ip igmp snooping ................................................................................................... 195
22.24 show ip igmp snooping interface .................................................................................. 196
22.25 show ip igmp snooping vlan ........................................................................................... 197
22.26 show ip igmp snooping groups ..................................................................................... 197
22.27 show ip igmp profile ......................................................................................................... 198
Chapter 23 MLD Snooping Commands ...................................................................... 200
23.1 ipv6 mld snooping (global) .............................................................................................. 200
23.2 ipv6 mld snooping drop-unknown ................................................................................ 200
23.3 ipv6 mld snooping vlan-config ...................................................................................... 201
23.4 ipv6 mld snooping vlan-config (immediate-leave) ..................................................... 202
23.5 ipv6 mld snooping vlan-config (report-suppression) ................................................ 203
23.6 ipv6 mld snooping vlan-config (router-ports-forbidden) .......................................... 204
23.7 ipv6 mld snooping vlan-config (rport interface) ......................................................... 205
23.8 ipv6 mld snooping vlan-config (static) ......................................................................... 205
23.9 ipv6 mld snooping vlan-config (querier) ...................................................................... 206
23.10 ipv6 mld snooping (interface) ........................................................................................ 208
23.11 ipv6 mld snooping max-groups ..................................................................................... 208
23.12 ipv6 mld snooping immediate-leave ............................................................................ 210
23.13 ipv6 mld profile ................................................................................................................. 210
23.14 deny .................................................................................................................................... 211
23.15 permit ................................................................................................................................. 211
23.16 range .................................................................................................................................. 212
X
23.17 ipv6 mld filter .................................................................................................................... 213
23.18 clear ipv6 mld snooping statistics ................................................................................ 213
23.19 show ipv6 mld snooping ................................................................................................. 214
23.20 show ipv6 mld snooping interface ................................................................................ 214
23.21 show ipv6 mld snooping vlan ......................................................................................... 215
23.22 show ipv6 mld snooping groups ................................................................................... 216
23.23 show ipv6 mld profile ...................................................................................................... 216
Chapter 24 MVR Commands ......................................................................................... 218
24.1 mvr (global) ........................................................................................................................ 218
24.2 mvr group .......................................................................................................................... 218
24.3 mvr mode........................................................................................................................... 219
24.4 mvr querytime ................................................................................................................... 220
24.5 mvr vlan .............................................................................................................................. 221
24.6 mvr (interface) ................................................................................................................... 221
24.7 mvr type ............................................................................................................................. 222
24.8 mvr immediate .................................................................................................................. 223
24.9 mvr vlan (group) ................................................................................................................ 223
24.10 mvr vlan (rule) .................................................................................................................... 224
24.11 mvr mode dynamic auto-enable ................................................................................... 225
24.12 show mvr ........................................................................................................................... 225
24.13 show mvr interface .......................................................................................................... 226
24.14 show mvr members ......................................................................................................... 226
Chapter 25 MSTP Commands ....................................................................................... 228
25.1 debug spanning-tree ....................................................................................................... 228
25.2 spanning-tree (global) ..................................................................................................... 229
25.3 spanning-tree (interface) ................................................................................................ 229
25.4 spanning-tree common-config ..................................................................................... 230
25.5 spanning-tree mode ........................................................................................................ 231
25.6 spanning-tree mst configuration .................................................................................. 232
25.7 instance ............................................................................................................................. 233
25.8 name ................................................................................................................................... 233
25.9 revision .............................................................................................................................. 234
25.10 spanning-tree mst instance ........................................................................................... 235
25.11 spanning-tree mst ........................................................................................................... 235
25.12 spanning-tree priority ..................................................................................................... 236
25.13 spanning-tree timer ......................................................................................................... 237
XI
25.14 spanning-tree hold-count .............................................................................................. 238
25.15 spanning-tree max-hops ................................................................................................ 238
25.16 spanning-tree bpdufilter ................................................................................................. 239
25.17 spanning-tree bpduflood ................................................................................................ 240
25.18 spanning-tree bpduguard .............................................................................................. 240
25.19 spanning-tree guard loop ............................................................................................... 241
25.20 spanning-tree guard root ............................................................................................... 242
25.21 spanning-tree guard tc ................................................................................................... 242
25.22 spanning-tree mcheck .................................................................................................... 243
25.23 show spanning-tree active ............................................................................................. 243
25.24 show spanning-tree bridge ............................................................................................ 244
25.25 show spanning-tree interface ........................................................................................ 244
25.26 show spanning-tree interface-security ....................................................................... 245
25.27 show spanning-tree mst ................................................................................................. 246
Chapter 26 Debug Command ....................................................................................... 249
26.1 debug tppacket packet-print ......................................................................................... 249
26.2 debug spanning-tree ....................................................................................................... 249
Chapter 27 LLDP Commands ........................................................................................ 251
27.1 lldp ...................................................................................................................................... 251
27.2 lldp forward_message ..................................................................................................... 251
27.3 lldp hold-multiplier ........................................................................................................... 252
27.4 lldp timer ............................................................................................................................ 253
27.5 lldp receive ........................................................................................................................ 254
27.6 lldp transmit ...................................................................................................................... 254
27.7 lldp snmp-trap .................................................................................................................. 255
27.8 lldp tlv-select .................................................................................................................... 256
27.9 lldp management-address ............................................................................................. 256
27.10 lldp med-fast-count ......................................................................................................... 257
27.11 lldp med-status ................................................................................................................ 258
27.12 lldp med-tlv-select ........................................................................................................... 258
27.13 lldp med-location ............................................................................................................. 259
27.14 show lldp ............................................................................................................................ 260
27.15 show lldp interface ........................................................................................................... 260
27.16 show lldp local-information interface ........................................................................... 261
27.17 show lldp neighbor-information interface ................................................................... 262
27.18 show lldp traffic interface ............................................................................................... 262
XII
Chapter 28 L2PT Commands (Only for Certain Devices) ...................................... 264
28.1 l2protocol-tunnel ............................................................................................................ 264
28.2 l2protocol-tunnel type .................................................................................................. 265
28.3 show l2protocol-tunnel global .................................................................................... 266
28.4 show l2protocol-tunnel interface .............................................................................. 267
28.5 l2protocol-tunnel dst-mac ............................................................................................. 267
28.6 Switch(config)#l2protocol-tunnel dst-mac 192.168.0.100show l2protocol-tunnel dst-mac 268
Chapter 29 PPPoE ID-Insertion Commands (Only for Certain Devices) ............ 269
29.1 pppoe id-insertion (global) ........................................................................................... 269
29.2 pppoe circuit-id (interface) .......................................................................................... 270
29.3 pppoe circuit-id type ..................................................................................................... 270
29.4 pppoe remote-id ............................................................................................................. 271
29.5 show pppoe id-insertion global .................................................................................. 272
29.6 show pppoe id-insertion interface ............................................................................. 273
Chapter 30 Static Routes Commands ........................................................................ 274
30.1 ip routing ............................................................................................................................ 274
30.2 interface vlan .................................................................................................................... 274
30.3 interface loopback ........................................................................................................... 275
30.4 switchport ......................................................................................................................... 275
30.5 interface range port-channel ......................................................................................... 276
30.6 description ........................................................................................................................ 277
30.7 shutdown ........................................................................................................................... 277
30.8 interface port-channel .................................................................................................... 278
30.9 ip route ............................................................................................................................... 279
30.10 ipv6 routing ....................................................................................................................... 280
30.11 ipv6 route .......................................................................................................................... 280
30.12 show interface vlan .......................................................................................................... 281
30.13 show ip interface .............................................................................................................. 281
30.14 show ip interface brief ..................................................................................................... 282
30.15 show ip route .................................................................................................................... 283
30.16 show ip route specify ...................................................................................................... 283
30.17 show ip route summary ................................................................................................... 284
30.18 show ipv6 interface ......................................................................................................... 285
30.19 show ipv6 route ................................................................................................................ 285
30.20 show ipv6 route summary .............................................................................................. 286
XIII
Chapter 31 IPv6 Address Configuration Commands ............................................. 287
31.1 ipv6 enable ........................................................................................................................ 287
31.2 ipv6 address autoconfig ................................................................................................. 287
31.3 ipv6 address link-local .................................................................................................... 288
31.4 ipv6 address dhcp ........................................................................................................... 289
31.5 ipv6 address ra ................................................................................................................. 289
31.6 ipv6 address eui-64 ......................................................................................................... 290
31.7 ipv6 address ..................................................................................................................... 291
31.8 show ipv6 interface ......................................................................................................... 292
Chapter 32 ARP Commands .......................................................................................... 293
32.1 arp ....................................................................................................................................... 293
32.2 clear arp-cache ................................................................................................................ 294
32.3 arp dynamicrenew ........................................................................................................... 294
32.4 arp timeout ........................................................................................................................ 295
32.5 gratuitous-arp intf-status-up enable ............................................................................ 295
32.6 gratuitous-arp dup-ip-detected enable ....................................................................... 296
32.7 gratuitous-arp learning enable ...................................................................................... 297
32.8 gratuitous-arp send-interval .......................................................................................... 297
32.9 ip proxy-arp ....................................................................................................................... 298
32.10 ip local-proxy-arp ............................................................................................................. 299
32.11 show arp ............................................................................................................................ 299
32.12 show ip arp (interface) ..................................................................................................... 300
32.13 show ip arp summary ...................................................................................................... 301
32.14 show gratuitous-arp ........................................................................................................ 301
32.15 show ip proxy-arp ............................................................................................................ 302
Chapter 33 DHCP Server Commands ......................................................................... 303
33.1 service dhcp server ......................................................................................................... 303
33.2 ip dhcp server extend-option capwap-ac-ip .............................................................. 303
33.3 ip dhcp server extend-option vendor-class-id ........................................................... 304
33.4 ip dhcp server exclude-address ................................................................................... 305
33.5 ip dhcp server pool .......................................................................................................... 306
33.6 ip dhcp server ping timeout ........................................................................................... 306
33.7 ip dhcp server ping packets ........................................................................................... 307
33.8 network .............................................................................................................................. 308
33.9 lease ................................................................................................................................... 308
33.10 address hardware-address ............................................................................................ 309
XIV
33.11 address client-identifier .................................................................................................. 310
33.12 default-gateway ............................................................................................................... 310
33.13 dns-server ......................................................................................................................... 311
33.14 netbios-name-server ...................................................................................................... 312
33.15 netbios-node-type ........................................................................................................... 312
33.16 next-server ........................................................................................................................ 313
33.17 domain-name .................................................................................................................... 314
33.18 bootfile ............................................................................................................................... 314
33.19 option ................................................................................................................................. 315
33.20 Switch(config)#option code IP 1show ip dhcp server status ................................... 316
33.21 show ip dhcp server statistics ....................................................................................... 316
33.22 show ip dhcp server extend-option .............................................................................. 317
33.23 show ip dhcp server pool ............................................................................................... 317
33.24 show ip dhcp server excluded-address ....................................................................... 318
33.25 show ip dhcp server manual-binding ........................................................................... 318
33.26 show ip dhcp server binding .......................................................................................... 319
33.27 clear ip dhcp server statistics ........................................................................................ 319
33.28 clear ip dhcp server binding ........................................................................................... 320
Chapter 34 DHCP Relay Commands ........................................................................... 321
34.1 service dhcp relay ............................................................................................................ 321
34.2 ip dhcp relay hops ............................................................................................................ 321
34.3 ip dhcp relay time ............................................................................................................. 322
34.4 ip helper-address ............................................................................................................. 323
34.5 ip dhcp relay information ................................................................................................ 323
34.6 ip dhcp relay information strategy ................................................................................ 324
34.7 ip dhcp relay information format ................................................................................... 325
34.8 ip dhcp relay information circuit-id ............................................................................... 326
34.9 ip dhcp relay information remote-id ............................................................................. 326
34.10 ip dhcp relay default-interface ...................................................................................... 327
34.11 ip dhcp relay vlan ............................................................................................................. 328
34.12 show ip dhcp relay ........................................................................................................... 328
Chapter 35 DHCPV6 Relay Commands ...................................................................... 330
35.1 ipv6 dhcp relay ................................................................................................................. 330
35.2 ipv6 dhcp relay vlan 1 helper-address ......................................................................... 330
35.3 ipv6 dhcp relay information ............................................................................................ 331
35.1 ..................................................................................................................................................... 332
XV
35.2 ..................................................................................................................................................... 332
35.3 ..................................................................................................................................................... 332
35.4 ipv6 dhcp relay information remote-id ......................................................................... 332
35.5 show ipv6 dhcp relay ....................................................................................................... 332
35.6 show ipv6 dhcp relay counters...................................................................................... 333
Chapter 36 DHCP L2 Relay Commands ..................................................................... 334
36.1 ip dhcp l2relay .................................................................................................................. 334
36.2 ip dhcp l2relay vlan .......................................................................................................... 334
36.3 ip dhcp l2relay information ............................................................................................. 335
36.4 ip dhcp l2relay information strategy ............................................................................. 335
36.5 ip dhcp l2relay information format ................................................................................ 336
36.6 ip dhcp l2relay information circuit-id ............................................................................ 337
36.7 ip dhcp l2relay information remote-id .......................................................................... 338
36.8 show ip dhcp l2relay ........................................................................................................ 339
36.9 show ip dhcp l2relay interface ....................................................................................... 339
Chapter 37 DHCPV6 L2 Relay Commands ................................................................ 340
37.1 ipv6 dhcp l2relay .............................................................................................................. 340
37.2 ipv6 dhcp l2relay vlan ...................................................................................................... 340
37.3 ipv6 dhcp l2relay information ........................................................................................ 341
37.4 ..................................................................................................................................................... 342
37.5 ..................................................................................................................................................... 342
37.6 ..................................................................................................................................................... 342
37.4 ipv6 dhcp l2relay information remote-id ..................................................................... 342
37.5 show ipv6 dhcp l2relay interface .................................................................................. 342
Chapter 38 QoS Commands .......................................................................................... 344
38.1 qos trust mode ................................................................................................................. 344
38.2 qos port-priority ............................................................................................................... 345
38.3 qos cos-map ..................................................................................................................... 345
38.4 qos dot1p-remap ............................................................................................................. 346
38.5 qos dscp-map................................................................................................................... 347
38.6 qos dscp-remap ............................................................................................................... 348
38.7 qos queue bandwidth ...................................................................................................... 349
38.8 qos queue mode .............................................................................................................. 350
38.9 show qos cos-map .......................................................................................................... 351
38.10 show qos dot1p-remap interface ................................................................................. 352
38.11 show qos dot1p-remap .................................................................................................. 352
XVI
38.12 show qos dscp-map interface ....................................................................................... 353
38.13 show qos dscp-map ........................................................................................................ 354
38.14 show qos dscp-remap interface ................................................................................... 354
38.15 show qos dscp-remap .................................................................................................... 355
38.16 show qos port-priority interface ................................................................................... 355
38.17 show qos trust interface ................................................................................................. 356
38.18 show qos queue interface .............................................................................................. 357
Chapter 39 Bandwidth Control Commands .............................................................. 358
39.1 storm-control rate-mode ............................................................................................... 358
39.2 storm-control.................................................................................................................... 359
39.3 storm-control exceed ..................................................................................................... 360
39.4 storm-control recover .................................................................................................... 361
39.5 bandwidth .......................................................................................................................... 361
39.6 show storm-control ......................................................................................................... 362
39.7 show bandwidth ............................................................................................................... 363
Chapter 40 Voice VLAN Commands ........................................................................... 364
40.1 voice vlan ........................................................................................................................... 364
40.2 voice vlan (interface) ....................................................................................................... 364
40.3 voice vlan priority ............................................................................................................. 365
40.4 voice vlan oui .................................................................................................................... 366
40.5 show voice vlan ................................................................................................................ 366
40.6 show voice vlan oui-table ............................................................................................... 367
40.7 show voice vlan interface ............................................................................................... 367
Chapter 41 Auto VoIP Commands ............................................................................... 369
41.1 auto-voip ........................................................................................................................... 369
41.2 auto-voip (interface) ........................................................................................................ 369
41.3 auto-voip dot1p ................................................................................................................ 370
41.4 auto-voip untagged ......................................................................................................... 371
41.5 auto-voip none ................................................................................................................. 371
41.6 no auto-voip (interface) ................................................................................................... 372
41.7 auto-voip dscp ................................................................................................................. 372
41.8 auto-voip data priority ..................................................................................................... 373
41.9 show auto-voip ................................................................................................................. 373
Chapter 42 Commands ................................................................................................... 375
42.1 user access-control ip-based enable .......................................................................... 375
XVII
42.2 user access-control ip-based ....................................................................................... 375
42.3 user access-control mac-based enable ...................................................................... 376
42.4 user access-control mac-based ................................................................................... 377
42.5 user access-control port-based enable ...................................................................... 378
42.6 user access-control port-based ................................................................................... 378
42.7 user access-control ipv6-based enable ...................................................................... 379
42.8 user access-control ipv6-based ................................................................................... 380
Chapter 43 HTTP and HTTPS Commands ................................................................. 381
43.1 ip http server ..................................................................................................................... 381
43.2 ip http port ......................................................................................................................... 382
43.3 ip http max-users ............................................................................................................. 382
43.4 ip http session timeout ................................................................................................... 383
43.5 ip http secure-server ....................................................................................................... 384
43.6 ip http secure-port ........................................................................................................... 384
43.7 ip http secure-protocol ................................................................................................... 385
43.8 ip http secure-ciphersuite .............................................................................................. 386
43.9 ip http secure-max-users ............................................................................................... 387
43.10 ip http secure-session timeout ..................................................................................... 388
43.11 ip http secure-server download certificate ................................................................. 388
43.12 ip http secure-server download key ............................................................................. 389
43.13 show ip http configuration .............................................................................................. 390
43.14 show ip http secure-server ............................................................................................ 391
Chapter 44 SSH Commands .......................................................................................... 392
44.1 ip ssh server ...................................................................................................................... 392
44.2 ip ssh port .......................................................................................................................... 392
44.3 ip ssh version .................................................................................................................... 393
44.4 ip ssh algorithm ................................................................................................................ 394
44.5 ip ssh timeout ................................................................................................................... 394
44.6 ip ssh max-client .............................................................................................................. 395
44.7 ip ssh download ................................................................................................................ 396
44.8 remove public-key ........................................................................................................... 396
44.9 show ip ssh ........................................................................................................................ 397
Chapter 45 Telnet Commands ...................................................................................... 398
45.1 telnet .................................................................................................................................. 398
45.2 telnet enable ..................................................................................................................... 398
45.3 telnet port .......................................................................................................................... 399
XVIII
45.4 show telnet-status ........................................................................................................... 399
Chapter 46 Serial Port Commands .............................................................................. 401
46.1 serial_port baud-rate ....................................................................................................... 401
Chapter 47 AAA Commands ......................................................................................... 402
47.1 tacacs-server host .......................................................................................................... 402
47.2 show tacacs-server ......................................................................................................... 403
47.3 radius-server host ........................................................................................................... 404
47.4 show radius-server .......................................................................................................... 405
47.5 aaa group ........................................................................................................................... 406
47.6 server ................................................................................................................................. 406
47.7 show aaa group ................................................................................................................ 407
47.8 aaa authentication login .................................................................................................. 408
47.9 aaa authentication enable .............................................................................................. 409
47.10 aaa authentication dot1x default................................................................................... 410
47.11 aaa accounting dot1x default ........................................................................................ 410
47.12 show aaa authentication ................................................................................................. 411
47.13 show aaa accounting ....................................................................................................... 412
47.14 line telnet ........................................................................................................................... 412
47.15 login authentication (telnet) ............................................................................................ 413
47.16 line ssh ............................................................................................................................... 413
47.17 login authentication (ssh) ................................................................................................ 414
47.18 line console ....................................................................................................................... 415
47.19 login authentication (console) ....................................................................................... 415
47.20 enable authentication (telnet) ........................................................................................ 416
47.21 enable authentication (ssh) ............................................................................................ 417
47.22 enable authentication (console) .................................................................................... 418
47.23 ip http login authentication............................................................................................. 418
47.24 ip http enable authentication ......................................................................................... 419
47.25 show aaa global ................................................................................................................ 420
47.26 enable admin password .................................................................................................. 420
47.27 enable admin secret ........................................................................................................ 422
47.28 enable-admin .................................................................................................................... 423
Chapter 48 IEEE 802.1x Commands ............................................................................ 424
48.1 dot1x system-auth-control ............................................................................................ 424
48.2 dot1x handshake.............................................................................................................. 425
48.3 dot1x auth-protocol ........................................................................................................ 425
XIX
48.4 dot1x vlan-assignment ................................................................................................... 426
48.5 dot1x accounting ............................................................................................................. 427
48.6 dot1x mab ......................................................................................................................... 428
48.7 dot1x guest-vlan .............................................................................................................. 428
48.8 dot1x timeout quiet-period ............................................................................................ 429
48.9 dot1x timeout supp-timeout .......................................................................................... 430
48.10 dot1x max- req ................................................................................................................. 431
48.11 dot1x .................................................................................................................................. 431
48.12 dot1x port-control ........................................................................................................... 432
48.13 dot1x port-method .......................................................................................................... 433
48.14 dot1x auth-init .................................................................................................................. 434
48.15 dot1x auth-reauth ............................................................................................................ 434
48.16 show dot1x global ............................................................................................................ 435
48.17 show dot1x interface ....................................................................................................... 436
48.18 show dot1x auth-state interface ................................................................................... 436
Chapter 49 Port Security Commands ......................................................................... 438
49.1 mac address-table max-mac count .............................................................................. 438
49.2 show mac address-table max-mac-count .................................................................. 439
Chapter 50 Port Mirroring Commands ....................................................................... 440
50.1 monitor session destination interface ......................................................................... 440
50.2 monitor session source .................................................................................................. 441
50.3 show monitor session ..................................................................................................... 442
Chapter 51 ACL Commands .......................................................................................... 444
51.1 access-list create ............................................................................................................ 444
51.2 access-list packet-content profile ............................................................................... 444
51.3 access-list resequence .................................................................................................. 445
51.4 access-list mac ................................................................................................................ 446
51.5 access-list ip ..................................................................................................................... 447
51.6 access-list combined ...................................................................................................... 449
51.7 access-list ipv6 ................................................................................................................ 451
51.8 access-list packet-content config ................................................................................ 453
51.9 access-list action ............................................................................................................. 454
51.10 redirect .............................................................................................................................. 455
51.11 s-condition ........................................................................................................................ 456
51.12 s-mirror .............................................................................................................................. 457
51.13 qos-remark ........................................................................................................................ 457
XX
51.14 access bind ....................................................................................................................... 458
51.15 show access-list .............................................................................................................. 459
51.16 show access-list bind ...................................................................................................... 459
51.17 show access-list status .................................................................................................. 460
51.18 show access-list counter ............................................................................................... 460
51.19 clear access-list ............................................................................................................... 461
Chapter 52 IPv4 IMPB Commands ............................................................................... 462
52.1 ip source binding .............................................................................................................. 462
52.2 ip dhcp snooping ............................................................................................................. 463
52.3 ip dhcp snooping vlan ..................................................................................................... 464
52.4 ip dhcp snooping max-entries ....................................................................................... 464
52.5 ip dhcp snooping trust .................................................................................................... 465
52.6 show ip source binding ................................................................................................... 466
52.7 show ip dhcp snooping ................................................................................................... 466
52.8 show ip dhcp snooping interface .................................................................................. 467
Chapter 53 IPv6 IMPB Commands ............................................................................... 468
53.1 ipv6 source binding ......................................................................................................... 468
53.2 ipv6 dhcp snooping ......................................................................................................... 469
53.3 ipv6 dhcp snooping vlan ................................................................................................. 470
53.4 ipv6 dhcp snooping max-entries .................................................................................. 470
53.5 ipv6 nd snooping .............................................................................................................. 471
53.6 ipv6 nd snooping vlan ..................................................................................................... 472
53.7 ipv6 nd snooping max-entries ....................................................................................... 472
53.8 show ipv6 source binding ............................................................................................... 473
53.9 show ipv6 dhcp snooping............................................................................................... 474
53.10 show ipv6 dhcp snooping interface ............................................................................. 474
53.11 show ipv6 nd snooping ................................................................................................... 475
53.12 show ipv6 nd snooping interface .................................................................................. 475
Chapter 54 IP Verify Source Commands ................................................................... 477
54.1 ip verify source ................................................................................................................. 477
54.2 ip verify source logging ................................................................................................... 478
54.3 show ip verify source ...................................................................................................... 478
54.4 show ip verify source interface ..................................................................................... 479
Chapter 55 IPv6 Verify Source Commands .............................................................. 480
55.1 ipv6 verify source ............................................................................................................. 480
XXI
55.2 show ipv6 verify source .................................................................................................. 481
55.3 show ipv6 verify source interface ................................................................................. 481
Chapter 56 DHCPv4 Filter Commands ....................................................................... 483
56.1 ip dhcp filter ...................................................................................................................... 483
56.2 ip dhcp filter (interface) ................................................................................................... 483
56.3 ip dhcp filter mac-verify .................................................................................................. 484
56.4 ip dhcp filter limit rate ...................................................................................................... 485
56.5 ip dhcp filter decline rate ................................................................................................ 486
56.6 ip dhcp filter server permit-entry .................................................................................. 487
56.7 show ip dhcp filter ............................................................................................................ 488
56.8 show ip dhcp filter interface ........................................................................................... 488
56.9 show ip dhcp filter server permit-entry ........................................................................ 489
Chapter 57 DHCPv6 Filter Commands ....................................................................... 490
57.1 ipv6 dhcp filter .................................................................................................................. 490
57.2 ipv6 dhcp filter (interface) ............................................................................................... 490
57.3 ipv6 dhcp filter limit rate ................................................................................................. 491
57.4 ipv6 dhcp filter decline rate ............................................................................................ 492
57.5 ipv6 dhcp filter server permit-entry .............................................................................. 493
57.6 show ipv6 dhcp filter ....................................................................................................... 494
57.7 show ipv6 dhcp filter interface ...................................................................................... 494
57.8 show ip dhcp filter server permit-entry ........................................................................ 495
Chapter 58 DoS Defend Commands ........................................................................... 496
58.1 ip dos-prevent .................................................................................................................. 496
58.2 ip dos-prevent type ......................................................................................................... 496
58.3 show ip dos-prevent ........................................................................................................ 498
Chapter 59 sFlow Commands (Only for Certain Devices) ..................................... 500
59.1 sflow address .................................................................................................................... 500
59.2 sflow enable ...................................................................................................................... 501
59.3 sflow collector collector-ID ............................................................................................ 501
59.4 sflow sampler .................................................................................................................... 502
59.5 show sflow global ............................................................................................................. 503
59.6 show sflow collector ........................................................................................................ 504
59.7 show sflow sampler ......................................................................................................... 504
XXII
Chapter 60 Ethernet OAM Commands (Only for Certain Devices) ..................... 505
60.1 ethernet-oam .................................................................................................................... 505
60.2 ethernet-oam mode ........................................................................................................ 506
60.3 ethernet-oam link-monitor symbol-period.................................................................. 506
60.4 ethernet-oam link-monitor frame ................................................................................. 507
60.5 ethernet-oam link-monitor frame-period .................................................................... 508
60.6 ethernet-oam link-monitor frame-seconds ................................................................ 510
60.7 ethernet-oam remote-failure ......................................................................................... 511
60.8 ethernet-oam remote-loopback received-remote- loopback................................. 512
60.9 ethernet-oam remote-loopback ................................................................................... 513
60.10 clear ethernet-oam statistics ........................................................................................ 513
60.11 clear ethernet-oam event-log ........................................................................................ 514
60.12 show ethernet-oam configuration ................................................................................ 515
60.13 show ethernet-oam event-log ....................................................................................... 516
60.14 show ethernet-oam statistics ........................................................................................ 516
60.15 show ethernet-oam status ............................................................................................. 517
Chapter 61 DLDP Commands (Only for Certain Devices) ..................................... 518
61.1 dldp (global) ....................................................................................................................... 518
61.2 dldp interval....................................................................................................................... 518
61.3 dldp shut-mode ................................................................................................................ 519
61.4 dldp reset (global) ............................................................................................................ 520
61.5 dldp(interface) .................................................................................................................. 520
61.6 dldp reset (interface) ....................................................................................................... 521
61.7 show dldp .......................................................................................................................... 521
61.8 show dldp interface ......................................................................................................... 522
Chapter 62 SNMP Commands ...................................................................................... 523
62.1 snmp-server...................................................................................................................... 523
62.2 snmp-server view ............................................................................................................ 523
62.3 snmp-server group .......................................................................................................... 524
62.4 snmp-server user ............................................................................................................. 526
62.5 snmp-server community ................................................................................................ 527
62.6 snmp-server host............................................................................................................. 528
62.7 snmp-server engineID .................................................................................................... 530
62.8 snmp-server traps snmp ................................................................................................ 531
62.9 snmp-server traps ........................................................................................................... 532
62.10 snmp-server traps ddm .................................................................................................. 533
XXIII
62.11 snmp-server traps vlan ................................................................................................... 534
62.12 snmp-server traps security ............................................................................................ 535
62.13 snmp-server traps security dhcp6-filter ..................................................................... 536
62.14 snmp-server traps acl ..................................................................................................... 536
62.15 snmp-server traps ip ....................................................................................................... 537
62.16 snmp-server traps power (Only for Certain Devices) ................................................ 538
62.17 snmp-server traps link-status ....................................................................................... 539
62.18 rmon history ...................................................................................................................... 539
62.19 rmon event ........................................................................................................................ 540
62.20 rmon alarm ........................................................................................................................ 541
62.21 rmon statistics .................................................................................................................. 543
62.22 show snmp-server ........................................................................................................... 544
62.23 show snmp-server view .................................................................................................. 544
62.24 show snmp-server group ............................................................................................... 545
62.25 show snmp-server user .................................................................................................. 545
62.26 show snmp-server community ...................................................................................... 545
62.27 show snmp-server host .................................................................................................. 546
62.28 show snmp-server engineID .......................................................................................... 546
62.29 show rmon history ........................................................................................................... 547
62.30 show rmon event .............................................................................................................. 547
62.31 show rmon alarm .............................................................................................................. 548
62.32 show rmon statistics ....................................................................................................... 549
Chapter 63 PoE Commands (Only for Certain Devices) ........................................ 550
63.1 power inline consumption (global) ................................................................................ 550
63.2 power profile ..................................................................................................................... 550
63.3 power inline consumption (interface) ........................................................................... 552
63.4 power inline priority ......................................................................................................... 552
63.5 power inline supply .......................................................................................................... 553
63.6 power inline profile........................................................................................................... 554
63.7 power inline time-range .................................................................................................. 554
63.8 show power inline ............................................................................................................ 555
63.9 show power inline configuration interface .................................................................. 555
63.10 show power inline information interface ...................................................................... 556
63.11 show power profile .......................................................................................................... 556
63.12 power recovery ststus enable ....................................................................................... 557
63.13 power recovery status .................................................................................................... 557
63.14 show power recovery ...................................................................................................... 558
XXIV
63.15 show power recovery interface ..................................................................................... 559
Chapter 64 ARP Inspection Commands ..................................................................... 560
64.1 ip arp inspection ............................................................................................................... 560
64.2 ip arp inspection validate ................................................................................................ 560
64.3 ip arp inspection vlan ...................................................................................................... 561
64.4 ip arp inspection vlan logging ........................................................................................ 562
64.5 ip arp inspection trust ..................................................................................................... 563
64.6 ip arp inspection limit-rate .............................................................................................. 563
64.7 ip arp inspection burst-interval ..................................................................................... 564
64.8 ip arp inspection recover ................................................................................................ 565
64.9 ip arp inspection exceed ................................................................................................ 566
64.10 show ip arp inspection .................................................................................................... 566
64.11 show ip arp inspection interface ................................................................................... 567
64.12 show ip arp inspection vlan ............................................................................................ 568
64.13 show ip arp inspection statistics ................................................................................... 568
64.14 clear ip arp inspection statistics ................................................................................... 569
Chapter 65 ND Detection Commands ........................................................................ 570
65.1 ipv6 nd detection ............................................................................................................. 570
65.2 ipv6 nd detection vlan ..................................................................................................... 570
65.3 ipv6 nd detection vlan logging....................................................................................... 571
65.4 ipv6 nd detection trust .................................................................................................... 571
65.5 show ipv6 nd detection ................................................................................................... 572
65.6 show ipv6 nd detection interface .................................................................................. 573
65.7 show ipv6 nd detection statistics ................................................................................. 573
65.8 show ipv6 nd detection vlan .......................................................................................... 574
Chapter 66 System Log Commands ........................................................................... 575
66.1 logging buffer ................................................................................................................... 575
66.2 logging buffer level .......................................................................................................... 575
66.3 logging file flash ............................................................................................................... 576
66.4 logging file flash frequency ............................................................................................ 577
66.5 logging file flash level ...................................................................................................... 578
66.6 logging host index ............................................................................................................ 578
66.7 logging console ................................................................................................................ 579
66.8 logging console level ....................................................................................................... 580
66.9 logging monitor ................................................................................................................ 581
66.10 logging monitor level ....................................................................................................... 581
XXV
66.11 clear logging ..................................................................................................................... 582
66.12 show logging local-config .............................................................................................. 583
66.13 show logging loghost ...................................................................................................... 583
66.14 show logging buffer ......................................................................................................... 584
66.15 show logging flash ........................................................................................................... 584
1
Preface
This Guide is intended for network administrator to provide referenced information about CLI (Command Line Interface). The device mentioned in this Guide stands for JetStream Switch without any explanation. Some models featured in this guide may be unavailable in your country or region. For local sales information, visit https://www.tp-link.com.
Overview of this Guide
Chapter 1: Using the CLI
Provide information about how to use the CLI, CLI Command Modes, Security Levels and some
Conventions.
Chapter 2: Line Commands (Only for Certain Devices)
Provide information about the commands used to make related configurations for the desired
users and set the priority of the console media type.
Chapter 3: User Interface
Provide information about the commands used to switch between five CLI Command Modes.
Chapter 4: User Management Commands
Provide information about the commands used for user management.
Chapter 5: System Configuration Commands
Provide information about the commands used for configuring the System information and
System IP, reboot and reset the switch, upgrade the switch system and commands used for
cable test.
Chapter 6: EEE Configuration Commands
Provide information about the commands used for configuring EEE.
Chapter 7: SDM Template Commands
Provide information about the commands used for configuring the SDM templates.
Chapter 8: Time Range Commands
Provide information about the commands used for configuring the time range.
Chapter 9: Port Configuration Commands
Provide information about the commands used for configuring the Speed, Negotiation Mode,
and Flow Control for Ethernet ports.
Chapter 10: Port Isolation Commands
Provide information about the commands used for configuring Port Isolation function.
2
Chapter 11: Loopback Detection Commands
Provide information about the commands used for configuring the Loopback Detection
function.
Chapter 12: DDM Commands (Only for Certain Devices)
Provide information about the commands used for DDM (Digital Diagnostic Monitoring)
function.
Chapter 13: Etherchannel Commands
Provide information about the commands used for configuring LAG (Link Aggregation Group)
and LACP (Link Aggregation Control Protocol).
Chapter 14: MAC Address Commands
Provide information about the commands used for Address configuration.
Chapter 15: IEEE 802.1Q VLAN Commands
Provide information about the commands used for configuring IEEE 802.1Q VLAN.
Chapter 16: MAC-based VLAN Commands
Provide information about the commands used for configuring MAC-based VLAN.
Chapter 17: Protocol-based VLAN Commands
Provide information about the commands used for configuring Protocol VLAN.
Chapter 18: Private VLAN Commands (Only for Certain Devices)
Provide information about the commands used for configuring Private VLAN.
Chapter 19: VLAN-VPN Commands (Only for Certain Devices)
Provide information about the commands used for configuring VLAN-VPN (Virtual Private
Network) function.
Chapter 20: GVRP Commands
Provide information about the commands used for configuring GVRP (GARP VLAN registration
protocol).
Chapter 21: IGMP Snooping Commands
Provide information about the commands used for configuring the IGMP Snooping (Internet
Group Management Protocol Snooping).
Chapter 22: MLD Snooping Commands
Provide information about the commands used for configuring the MLD Snooping (Multicast
Listener Discovery Snooping).
Chapter 23: MVR Commands
Provide information about the commands used for configuring the MVR.
3
Chapter 24: MSTP Commands
Provide information about the commands used for configuring the MSTP (Multiple Spanning
Tree Protocol).
Chapter 25: LLDP Commands
Provide information about the commands used for configuring LLDP function.
Chapter 26: L2PT Commands (Only for Certain Devices)
Provide information about the commands used for configuring L2PT (Layer 2 Protocol
Tunneling).
Chapter 27: PPPoE ID-Insertion Commands (Only for Certain Devices)
Provide information about the commands used for configuring PPPoE ID-Insertion.
Chapter 28: Static Routes Commands
Provide information about the commands used for configuring the Static Route function.
Chapter 29: IPv6 Address Configuration Commands
Provide information about the commands used for configuring the System IPv6 addresses.
Chapter 30: ARP Commands
Provide information about the commands used for configuring the ARP (Address Resolution
Protocol) functions.
Chapter 31: DHCP Server Commands
Provide information about the commands used for configuring the DHCP Server function.
Chapter 32: DHCP Relay Commands
Provide information about the commands used for configuring the DHCP Relay function.
Chapter 33: DHCPV6 Relay Commands
Provide information about the commands used for configuring the DHCPV6 Relay function.
Chapter 33: DHCP L2 Relay Commands
Provide information about the commands used for configuring the DHCP L2 Relay function.
Chapter 34: QoS Commands
Provide information about the commands used for configuring the QoS function.
Chapter 35: Bandwidth Commands
Provide information about the commands used for configuring the Bandwidth Control.
Chapter 36: Voice VLAN Commands
Provide information about the commands used for configuring Voice VLAN.
Chapter 37 Auto VoIP Commands
Provide information about the commands used for configuring Auto VoIP.
4
Chapter 38: Access Control Commands
Provide information about the commands used for configuring Access Control.
Chapter 39: HTTP and HTTPS Commands
Provide information about the commands used for configuring the HTTP and HTTPS logon.
Chapter 40: SSH Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 41: Telnet Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 42: Serial Port Commands (Only for Certain Devices)
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 43: AAA Commands
Provide information about the commands used for configuring AAA (authentication,
authorization and accounting).
Chapter 44: IEEE 802.1X Commands
Provide information about the commands used for configuring IEEE 802.1X function.
Chapter 45: Port Security Commands
Provide information about the commands used for configuring Port Security.
Chapter 46: Port Mirroring Commands
Provide information about the commands used for configuring the Port Mirror function.
Chapter 47: ACL Commands
Provide information about the commands used for configuring the ACL (Access Control List).
Chapter 48: IPv4 IMPB Commands
Provide information about the commands used for binding the IP address, MAC address, VLAN
and the connected Port number of the Host together.
Chapter 49: IPv6 IMPB Commands
Provide information about the commands used for binding the IPv6 address, MAC address,
VLAN and the connected Port number of the Host together.
Chapter 50: IP Verify Source Commands
Provide information about the commands used for guarding the IP Source by filtering the IP
packets based on the IP-MAC Binding entries.
5
Chapter 51: IPv6 Verify Source Commands
Provide information about the commands used for guarding the IPv6 Source by filtering the IP
packets based on the IP-MAC Binding entries.
Chapter 52: DHCPv4 Filter Commands
Provide information about the commands used for configuring the DHCPv4 Filter.
Chapter 53: DHCPv6 Filter Commands
Provide information about the commands used for configuring the DHCPv6 Filter.
Chapter 54: DoS Defend Command
Provide information about the commands used for DoS defend and detecting the DoS attack.
Chapter 55: sFlow Commands (Only for Certain Devices)
Provide information about the commands used for configuring the Sampled Flow function.
Chapter 56: Ethernet OAM Commands (Only for Certain Devices)
Provide information about the commands used for configuring the Ethernet OAM (Operation,
Administration, and Maintenance) function.
Chapter 57: DLDP Commands
Provide information about the commands used for configuring the DLDP (Device Link
Detection Protocol).
Chapter 58: SNMP Commands
Provide information about the commands used for configuring the SNMP (Simple Network
Management Protocol) functions.
Chapter 59: PoE Commands (Only for Certain Devices)
Provide information about the commands used for configuring PoE function.
Chapter 60: ARP Inspection Commands
Provide information about the commands used for protecting the switch from the ARP
cheating or ARP Attack.
Chapter 61: ND Detection Commands
Provide information about the commands used for configuring ND detection.
Chapter 62: System Log Commands
Provide information about the commands used for configuring system log.
6
Chapter 1 Using the CLI
1.1 Accessing the CLI
You can log on to the switch and access the CLI by the following three methods:
1. Log on to the switch by the console port on the switch.
2. Log on to the switch remotely by a Telnet connection through an Ethernet port.
3. Log on to the switch remotely by an SSH connection through an Ethernet port.
1.1.1 Logon by a console port
Note: Console port is only available on certain devices.
Console Port
The switch has two console ports: an RJ-45 console port and a Micro-USB console port.
Console output is active on devices connected to both console ports, but console input is only
active on one console port at a time.
The Micro-USB connector takes precedence over the RJ-45 connector. When the switch
detects a valid connection on the Micro-USB console port, input from the RJ-45 console port is
immediately disabled, and input from the Micro-USB console port is enabled. Removing the
Micro-USB connection immediately reenables input from the RJ-45 console connection.
USB Console Driver
If you are using the USB port on the MAC OS X or Linux OS for console connection, there is no
need to run a USB driver.
If you are using the switch’s Micro-USB console port with the USB port of a Windows PC, a
driver for the USB port is required. The USB driver is provided on the resource CD. Follow the
InstallSheild Wizard to accomplish the installation.
The TP-Link USB Console Driver supports the following Windows operating systems:
32-bit Windows XP SP3
64-bit Windows XP
32-bit Windows Vista
64-bit Windows Vista
32-bit Windows 7
7
64-bit Windows 7
32-bit Windows 8
64-bit Windows 8
32-bit Windows 8.1
64-bit Windows 8.1
32-bit Windows 10
64-bit Windows 10
After the TP-Link USB Console Driver is installed, the PC’s USB port will act as RS-232 serial
port when the PC’s USB port is connected to the switch’s Micro-USB console port. And the
PC’s USB port will act as standard USB port when the PC’s USB port is unplugged from the
switch.
Logon
Take the following steps to log on to the switch by the console port.
1. Connect the PCs or Terminals to the console port on the switch by the provided cable.
2. Start the terminal emulation program (such as the HyperTerminal, PuTTY, Tera Term) on
the PC.
3. Specify the connection COM port in the terminal emulation program. If the Micro-USB
Console port is used, you can view which port is assigned to the USB serial port in the
following path:
Control Panel -> Hardware and Sound -> Device Manager -> Ports ->USB Serial Port.
8
Figure 1-1 USB Serial Port Number
4. Configure the terminal emulation program or the terminal to use the following settings:
Baud rate: 38400 bps
Data bits: 8
Parity: none
Stop bits: 1
Flow control: none
9
5. Type the Username and Password in the Hyper Terminal window. The default value for both
of them are admin. Press Enter in the main window and Switch> will appear indicating
that you have successfully logged in to the switch and you can use the CLI now.
Figure 1-2 Log in to the Switch
Note: The first time you log in, change the password to better protect your network and
devices.
1.1.2 Logon by Telnet
To log on to the switch by a Telnet connection, please take the following steps:
1. Click Start and type in cmd in the Search programs and files window and press the Enter
button.
Figure 1-1 Run Window
2. Type in telnet 192.168.0.1 in the cmd window and press Enter.
10
Figure 1-2 Type in the telnet command
3. Type in the login username and password (both admin by default). Press Enter and you will
enter User EXEC Mode.
Figure 1-2 Log in the Switch
Note: The first time you log in, change the password to better protect your network and
devices.
4. Type in enable command and you will enter Privileged EXEC Mode. By default, no
password is needed. Later you can set a password for users who want to access the
Privileged EXEC Mode.
Figure 1-3 Enter into Priviledged EXEC Mode
11
1.1.3 Logon by SSH
To log on by SSH, a Putty client software is recommended. There are two authentication modes to set up an SSH connection:
Password Authentication Mode: It requires username and password, which are both admin by default.
Key Authentication Mode: It requires a public key for the switch and a private key for the SSH client software. You can generate the public key and the private key through Putty Key Generator.
Note:
1. Before SSH login, please follow the steps shown in Figure 1-4 to enable the SSH function
through Telnet connection.
2. The first time you log in, change the password to better protect your network and devices.
Figure 1-4 Enable SSH function
12
Password Authentication Mode
1. Open the software to log on to the interface of PuTTY. Enter the IP address of the switch
into Host Name field; keep the default value 22 in the Port field; select SSH as the
Connection type.
Figure 1-5 SSH Connection Config
2. Click the Open button in the above figure to log on to the switch. Enter the login user name
and password to log on the switch, and then enter enable to enter Privileged EXEC Mode,
so you can continue to configure the switch.
Figure 1-6 Log on the Switch
13
Key Authentication Mode
2. Select the key type and key length, and generate SSH key.
Figure 1-7 Generate SSH Key
Note:
1. The key length is in the range of 512 to 3072 bits.
2. During the key generation, randomly moving the mouse quickly can accelerate the key
generation.
14
3. After the key is successfully generated, please save the public key and private key to a
TFTP server.
Figure 1-8 Save the Generated Key
4. Log on to the switch by Telnet and download the public key file from the TFTP server to the
switch, as the following figure shows:
Figure 1-9 Download the Public Key
15
Note:
1. The key type should accord with the type of the key file.
2. The SSH key downloading can not be interrupted.
5. After the public key is downloaded, please log on to the interface of PuTTY and enter the IP
address for login.
Figure 1-10 SSH Connection Config
16
6. Click Browse to download the private key file to SSH client software and click Open.
Figure 1-11 Download the Private Key
7. After successful authentication, please enter the login user name. If you log on to the
switch without entering password, it indicates that the key has been successfully
downloaded.
Figure 1-12 Log on the Switch
1.2 CLI Command Modes
The CLI is divided into different command modes: User EXEC Mode, Privileged EXEC Mode,
Global Configuration Mode, Interface Configuration Mode and VLAN Configuration Mode.
17
Interface Configuration Mode can also be divided into Interface Ethernet, Interface
link-aggregation and some other modes, which is shown as the following diagram.
The following table gives detailed information about the Accessing path, Prompt of each mode and how to exit the current mode and access the next mode.
Mode
Accessing Path
Prompt
Logout or Access the next
mode
User EXEC
Mode
Primary mode once it
is connected with the
switch.
Switch>
Use the exit command to
disconnect the switch.
Use the enable command to
access Privileged EXEC mode.
Privileged
EXEC Mode
Use the enable
command to enter
this mode from User
EXEC mode.
Switch#
Enter the disable or the exit
command to return to User EXEC
mode.
Enter configure command to
access Global Configuration
mode.
Global
Configuration
Mode
Use the configure
command to enter
this mode from
Privileged EXEC
mode.
Switch(config)#
Use the exit or the end
command or press Ctrl+Z to
return to Privileged EXEC mode.
Use the interface
gigabitEthernet
port
or
interface range gigabitEthernet
port-list
command to access
interface Configuration mode.
Use the vlan
vlan-list
to access
VLAN Configuration mode.
Interface
Configuration
Mode
Layer 2 Interface:
Use the interface
gigabitEthernet
port,
interface
port-channel
port-channel-id
or
interface range
gigabitEthernet
port-list
command to
enter this mode from
Global Configuration
mode.
Switch(config-if)#
or
Switch(config-if-range)#
Use the end command or press Ctrl+Z to return to Privileged
EXEC mode.
Enter the exit or the # command to return to Global Configuration mode.
A port number must be specified
in the interface command.
18
Mode
Accessing Path
Prompt
Logout or Access the next
mode
Interface
Configuration
Mode
Layer 3 Interface:
Use the no
switchport
command to enter Routed Port mode from Interface Configuration mode.
Use the interface vlan
vlan-id
command to enter VLAN Interface mode from Global Configuration mode.
Use the interface
loopback
id
command to enter
Loopback Interface
mode from Global
Configuration mode.
Switch (config-if)#
or
Switch(config-if-range)#
Use the switchport command to switch to the Layer 2 interface mode.
Use the end command or press Ctrl+Z to return to Privileged EXEC mode.
Enter the exit or the # command
to return to Global Configuration
mode.
VLAN
Configuration
Mode
Use the vlan
vlan-list
command to enter
this mode from
Global Configuration
mode.
Switch (config-vlan)#
Use the end command or press
Ctrl+Z to return to Privileged
EXEC mode.
Enter the exit command or the #
command to return to Global
configuration mode.
Note:
1. The user is automatically in User EXEC Mode after the connection between the PC and the
switch is established by a Telnet/SSH connection.
2. Global Configuration Mode/Interface Configuration Mode/VLAN Configuration Mode is only
available in standalone mode.
3. Each command mode has its own set of specific commands. To configure some
commands, you should access the corresponding command mode firstly.
Global Configuration Mode: In this mode, global commands are provided, such as the
Spanning Tree, Schedule Mode and so on.
Interface Configuration Mode: In this mode, users can configure one or several ports,
19
different ports corresponds to different commands
a). Interface fastEthernet/gigabitEthernet/two-gigabitEthernet/ten-gigabitEthernet:
Configure parameters for a
fastEthernet/gigabitEthernet/two-gigabitEthernet/ten-gigabitEthernet port, such
as Duplex-mode, flow control status.
b). Interface range
fastEthernet/gigabitEthernet/two-gigabitEthernet/ten-gigabitEthernet: Configure
parameters for several
fastEthernet/gigabitEthernet/two-gigabitEthernet/ten-gigabitEthernet ports.
c). Interface link-aggregation: Configure parameters for a link-aggregation, such as
broadcast storm.
d). Interface range link-aggregation: Configure parameters for multi-trunks.
e). Interface vlan: Configure parameters for the vlan-port.
VLAN Configuration Mode: In this mode, users can create a VLAN and add a specified
port to the VLAN.
4. Some commands are global, that means they can be performed in all modes:
show: Display all information of switch, for example: statistic information, port
information, VLAN information.
history: Display the commands history.
1.3 Privilege Restrictions
This switch’s security is divided into four privilege levels: User level, Power User level, Operator
level and Admin level. You can define username and password pairs, and assign a specific
privilege level to each pair. Different privilege levels have access to specified commands,
which is illustrated in the Privilege Requirement in each command. For details about how to
configure usename and password pairs, please refer to user name (password) and user name
(secret).
Users can enter Privileged EXEC mode from User EXEC mode by using the enable command. In
default case, no password is needed. In Global Configuration Mode, you can configure
password for Admin level by enable password command. Once password is configured, you
are required to enter it to access Privileged EXEC mode.
20
1.4 Conventions
1.4.1 PoE Disclaimer
PoE budget calculations are based on laboratory testing. Actual PoE power budget is not
guaranteed and will vary as a result of client limitations and environmental factors.
1.4.2 Format Conventions
The following conventions are used in this Guide:
Items in square brackets [ ] are optional
Items in braces { } are required
Alternative items are grouped in braces and separated by vertical bars. For example:
speed {10 | 100 | 1000 }
Bold indicates an unalterable keyword. For example: show logging
Normal Font indicates a constant (several options are enumerated and only one can be
selected). For example: mode {dynamic | static | permanent}
Italic Font indicates a variable (an actual value must be assigned). For example: bridge
aging-time
aging-time
1.4.3 Special Characters
You should pay attentions to the description below if the variable is a character string:
These six characters ” < > , \ & cannot be input.
If a blank is contained in a character string, single or double quotation marks should be
used, for example ’hello world’, ”hello world”, and the words in the quotation marks will be
identified as a string. Otherwise, the words will be identified as several strings.
1.4.4 Parameter Format
Some parameters must be entered in special formats which are shown as follows:
MAC address must be enter in the format of xx:xx:xx:xx:xx:xx.
One or several values can be typed for a port-list or a vlan-list using comma to separate.
Use a hyphen to designate a range of values, for instance, 1/0/1, 1/0/3-5, 1/0/7 indicates
choosing port 1/0/1, 1/0/3, 1/0/4, 1/0/5, 1/0/7.
21
Chapter 2 Line Commands (Only for Certain Devices)
Note: Line Commands are only available on certain devices.
2.1 line
Description
The line command is used to enter the Line Configuration Mode and make
related configurations for the desired user(s).
Syntax
line { console linenum | vty startlinenum endlinenum }
Parameter
linenum —— The number of users allowed to login through console port. Its
value is 0 in general, for the reason that console input is only active on one
console port at a time.
startlinenum ——The start serial number of the login user selected to
configure the login mode and password, ranging from 0 to 15. 0 means the
first login user number, 1 means the second, and the rest can be done on the
same manner.
endlinenum —— The end serial number of the login user selected to
configure the login mode and password, ranging from 0 to 15. 0 means the
first login user number, 1 means the second, and the rest can be done on the
same manner.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enter the Console port configuration mode and configure the console port 0:
Switch(config)#line console 0
22
Enter the Virtual Terminal configuration mode so as to prepare further
configurations such as password and login mode for virtual terminal 0 to 5:
Switch(config)#line vty 0 5
2.2 media-type rj45
Description
The media-type rj45 command is used to configure the console media type
as RJ-45 for input. The switch has two console ports available —— an RJ-45
console port and a micro-USB console port. Console input is active on only
one console port at a time. By default, the micro-USB connector takes
precedence over the RJ-45 connector, which means that, when both the
RJ-45 console connection and micro-USB console connection are valid,
input from the RJ-45 console is disabled, and input from the micro-USB
console is enabled. To return to the default configuration, please use no
media-type rj45 command.
Syntax
media-type rj45
no media-type rj45
Command Mode
Line Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enable the RJ-45 console input:
Switch(config)# line console 0
Switch(config-line)# media-type rj45
Receive the micro-USB console input prior to the RJ-45 console input:
Switch(config)# line console 0
Switch(config-line)# no media-type rj45
23
Chapter 3 User Interface
3.1 enable
Description
The enable command is used to access Privileged EXEC Mode from User EXEC Mode.
Syntax
enable
Command Mode
User EXEC Mode
Privilege Requirement
None.
Example
If you have set the password to access Privileged EXEC Mode from User EXEC Mode:
Switch>enable
Enter password:
Switch#
3.2 service
password-encryption
Description
The service password-encryption command is used to encrypt the
password when the password is defined or when the configuration is written,
using the symmetric encryption algorithm. Encryption prevents the password
from being readable in the configuration file. To disable the global encryption
function, please use no service password-encryption command.
Syntax
service password-encryption
no service password-encryption
24
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enable the global encryption function:
Switch(config)# service password-encryption
3.3 enable password
Description
The enable password command is used to set or change the password for
users to access Privileged EXEC Mode from User EXEC Mode. To remove the
password, please use no enable password command. This command uses
the symmetric encryption.
Syntax
enable password { [ 0 ]
password
| 7
encrypted-password
}
no enable password
Parameter
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
—— A string with 31 characters at most, which can contain only
English letters (case-sensitive), digits and 17 kinds of special characters. The
special characters are !$%’()*,-./[]_{|}. By default, it is empty.
7 —— Indicates a symmetric encrypted password with fixed length will follow.
encrypted-password
—— A symmetric encrypted password with fixed length,
which you can copy from another switch’s configuration file. After the
encrypted password is configured, you should use the corresponding
unencrypted password if you re-enter this mode.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
25
User Guidelines
If the password you configured here is unencrypted and the global
encryption function is enabled in service password-encryption, the password
in the configuration file will be displayed in the symmetric encrypted form.
If both the enable password and enable secret are defined, only the latest
configured password will take effect.
Example
Set the super password as “admin” and unencrypted to access Privileged
EXEC Mode from User EXEC Mode:
Switch(config)#enable password 0 admin
3.4 enable secret
Description
The enable secret command is used to set a secret password, which is using
an MD5 encryption algorithm, for users to access Privileged EXEC Mode from
User EXEC Mode. To return to the default configuration, please use no enable
secret command. This command uses the MD5 encryption.
Syntax
enable secret { [ 0 ]
password
| 5
encrypted-password
}
no enable secret
Parameter
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
—— A string with 31 characters at most, which can contain only
English letters (case-sensitive), digits and 17 kinds of special characters. The
special characters are !$%’()*,-./[]_{|}. By default, it is empty. The password in
the configuration file will be displayed in the MD5 encrypted form.
5 —— Indicates an MD5 encrypted password with fixed length will follow.
encrypted-password
—— An MD5 encrypted password with fixed length,
which you can copy from another switch’s configuration file. After the
encrypted password is configured, you should use the corresponding
unencrypted password if you re-enter this mode.
26
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
User Guidelines
If both the enable password and enable secret are defined, only the latest
configured password will take effect.
Example
Set the secret password as “admin” and unencrypted to access Privileged
EXEC Mode from User EXEC Mode. The password will be displayed in the
encrypted form.
Switch(config)#enable secret 0 admin
3.5 configure
Description
The configure command is used to access Global Configuration Mode from Privileged EXEC Mode.
Syntax
configure
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Access Global Configuration Mode from Privileged EXEC Mode:
Switch# configure
Switch (config)#
27
3.6 exit
Description
The exit command is used to return to the previous Mode from the current Mode.
Syntax
exit
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Return to Global Configuration Mode from Interface Configuration Mode, and then return to Privileged EXEC Mode:
Switch (config-if)# exit
Switch (config)#exit
Switch#
3.7 end
Description
The end command is used to return to Privileged EXEC Mode.
Syntax
end
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Return to Privileged EXEC Mode from Interface Configuration Mode:
Switch (config-if)#end
Switch #
28
3.8 clipaging
Description
The clipaging command is used to enable the pause function for the screen display. If you want to display all the related information of the switch at once when using the show command, please use no clipaging command.
Syntax
clipaging
no clipaging
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Disable the pause function for the screen display:
Switch (config)#no clipaging
3.9 history
Description
The history command is used to show the latest 20 commands you entered
in the current mode since the switch is powered.
Syntax
history
Command Mode
Privileged EXEC Mode and any Configuration Mode
Privilege Requirement
None.
Example
Show the commands you have entered in the current mode:
Switch (config)# history
1 history
29
3.10 history clear
Description
The history clear command is used to clear the commands you have entered
in the current mode; therefore, these commands will not be shown next time
you use the history command.
Syntax
history clear
Command Mode
Privileged EXEC Mode and any Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Clear the commands you have entered in the current mode:
Switch (config)#history clear
30
Chapter 4 User Management Commands
User Management commands are used to manage the user’s logging information by Web,
Telnet or SSH, so as to protect the settings of the switch from being randomly changed.
4.1 user name (password)
Description
The user name command is used to add a new user or modify the existed
users’ information. To delete the existed users, please use no user name
command. This command uses the symmetric encryption.
Syntax
user name
name
[ privilege admin | operator | power_user | user ] password
{ [ 0 ]
password
| 7
encrypted-password
}
no user name
name
Parameter
name
——Type a name for users' login. It contains 16 characters at most,
composed of digits, English letters and symbols. No spaces, question marks
and double quotation marks are allowed.
admin | operator | power_user | user —— Access level. “admin” means that
you can edit, modify and view all the settings of different functions. “operator”
means that you can edit, modify and view most of the settings of different
functions. “power-user” means that you can edit, modify and view some of
the settings of different functions. “user” means that you can only view some
of the settings of different functions without the right to edit or modify. It is
“admin” by default. For more details about privilege restrictions, please refer
to the Privilege Requirement part in each command.
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
—— Users’ login password, a string with 6–31 alphanumeric
characters (case-sensitive) and symbols. No spaces are allowed.
7 —— Indicates a symmetric encrypted password with fixed length will follow.
encrypted-password
—— A symmetric encrypted password with fixed length,
which you can copy from another switch’s configuration file. After the
31
encrypted password is configured, you should use the corresponding
unencrypted password if you re-enter this mode.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
User Guidelines
If the password you configured here is unencrypted and the global
encryption function is enabled in service password-encryption, the password
in the configuration file will be displayed in the symmetric encrypted form.
If both the user name (password) and user name (secret) are defined, only
the latest configured password will take effect.
Example
Add and enable a new admin user named “tplink”, of which the password is
“admin” and unencrypted:
Switch(config)#user name tplink privilege admin password 0 admin
4.2 user name (secret)
Description
The user name command is used to add a new user or modify the existed
users’ information. To delete the existed users, please use no user name
command. This command uses the MD5 encryption.
Syntax
user name
name
[ privilege admin | operator | power_user | user ] secret { [ 0 ]
password
| 5
encrypted-password
}
no user name
name
Parameter
name
——Type a name for users' login. It contains 16 characters at most,
composed of digits, English letters and symbols. No spaces, question marks
and double quotation marks are allowed.
admin | operator | power_user | user —— Access level. “admin” means that
you can edit, modify and view all the settings of different functions. “operator”
32
means that you can edit, modify and view most of the settings of different
functions. “power-user” means that you can edit, modify and view some of
the settings of different functions. “user” means that you can only view some
of the settings of different functions without the right to edit or modify. It is
“admin” by default.
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
——Users’ login password, a string with 6–31 alphanumeric
characters (case-sensitive) and symbols. No spaces are allowed.
5 —— Indicates an MD5 encrypted password with fixed length will follow.
encrypted-password
—— An MD5 encrypted password with fixed length,
which you can copy from another switch’s configuration file.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
User Guidelines
If both the user name (password) and user name (secret) are defined, only
the latest configured password will take effect.
Example
Add and enable a new admin user named “tplink”, of which the password is
“admin”. The password will be displayed in the encrypted form.
Switch (config)#user name tplink privilege admin secret 0 admin
4.3 service password-recovery
Note: This command is only available on certain devices.
Description
The service password-recovery command is used to enable the
password-recovery feature. To disable the password-recovery feature,
please use no service password-recovery command.
With password-recovery enabled, you can connect to the switch’s console
port and delete all your previous set accounts. You can use the default
33
username and password (which are both admin) to login the switch after its
startup.
Syntax
service password-recovery
no service password-recovery
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enable the switch’s password-recovery feature:
Switch(config)# service password-recovery
4.4 show user account-list
Description
The show user account-list command is used to display the information of
the current users.
Syntax
show user account-list
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Display the information of the current users:
Switch (config)# show user account-list
34
4.5 show user configuration
Description
The show user configuration command is used to display the security
configuration information of the users, including access-control, max-number
and the idle-timeout, etc.
Syntax
show user configuration
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the security configuration information of the users:
Switch (config)# show user configuration
35
Chapter 5 System Configuration Commands
System Commands can be used to configure the System information and System IP, reboot
and reset the switch, upgrade the switch system and other operations.
5.1 system-time manual
Description
The system-time manual command is used to configure the system time
manually.
Syntax
system-time manual
time
Parameter
time
—— Set the date and time manually, MM/DD/YYYY-HH:MM:SS. The valid
value of the year ranges from 2000 to 2037.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system mode as manual, and the time is 12/20/2010 17:30:35
Switch (config)# system-time manual 12/20/2010-17:30:35
5.2 system-time ntp
Description
The system-time ntp command is used to configure the time zone and the IP address for the NTP Server. The switch will get UTC automatically if it has connected to an NTP Server.
Syntax
system-time ntp {
timezone
} {
ntp-server
} {
backup-ntp-server
}
{
fetching-rate
}
Parameter
timezone
—— Your local time-zone, and it ranges from UTC-12:00 to
UTC+13:00.
36
The detailed information that each time-zone means are displayed as follow:
UTC-12:00 —— TimeZone for International Date Line West.
UTC-11:00 —— TimeZone for Coordinated Universal Time-11.
UTC-10:00 —— TimeZone for Hawaii.
UTC-09:00 —— TimeZone for Alaska.
UTC-08:00 —— TimeZone for Pacific Time(US Canada).
UTC-07:00 —— TimeZone for Mountain Time(US Canada).
UTC-06:00 —— TimeZone for Central Time(US Canada).
UTC-05:00 —— TimeZone for Eastern Time(US Canada).
UTC-04:30 —— TimeZone for Caracas.
UTC-04:00 —— TimeZone for Atlantic Time(Canada).
UTC-03:30 —— TimeZone for Newfoundland.
UTC-03:00 —— TimeZone for Buenos Aires, Salvador, Brasilia.
UTC-02:00 —— TimeZone for Mid-Atlantic.
UTC-01:00 —— TimeZone for Azores, Cape Verde Is.
UTC —— TimeZone for Dublin, Edinburgh, Lisbon, London.
UTC+01:00 —— TimeZone for Amsterdam, Berlin, Bern, Rome, Stockholm,
Vienna.
UTC+02:00 —— TimeZone for Cairo, Athens, Bucharest, Amman, Beirut,
Jerusalem.
UTC+03:00 —— TimeZone for Kuwait, Riyadh, Baghdad.
UTC+03:30 —— TimeZone for Tehran.
UTC+04:00—— TimeZone for Moscow, St.Petersburg, Volgograd, Tbilisi, Port
Louis.
UTC+04:30 —— TimeZone for Kabul.
UTC+05:00 —— TimeZone for Islamabad, Karachi, Tashkent.
UTC+05:30 —— TimeZone for Chennai, Kolkata, Mumbai, New Delhi.
UTC+05:45 —— TimeZone for Kathmandu.
UTC+06:00 —— TimeZone for Dhaka,Astana, Ekaterinburg.
UTC+06:30 —— TimeZone for Yangon (Rangoon).
UTC+07:00 —— TimeZone for Novosibrisk, Bangkok, Hanoi, Jakarta.
UTC+08:00—— TimeZone for Beijing, Chongqing, Hong Kong, Urumqi,
Singapore.
UTC+09:00 —— TimeZone for Seoul, Irkutsk, Osaka, Sapporo, Tokyo.
UTC+09:30 —— TimeZone for Darwin, Adelaide.
UTC+10:00 —— TimeZone for Canberra, Melbourne, Sydney, Brisbane.
UTC+11:00 —— TimeZone for Solomon Is., New Caledonia, Vladivostok.
UTC+12:00 —— TimeZone for Fiji, Magadan, Auckland, Welington.
UTC+13:00 —— TimeZone for Nuku'alofa, Samoa.
ntp-server
—— The IP address for the Primary NTP Server.
37
backup-ntp-server
—— The IP address for the Secondary NTP Server.
fetching-rate
—— Specify the rate fetching time from NTP server.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system time mode as NTP, the time zone is UTC-12:00, the
primary NTP server is 133.100.9.2 and the secondary NTP server is
139.78.100.163, the fetching-rate is 11 hours:
Switch(config)# system-time ntp UTC-12:00 133.100.9.2 139.79.100.163 11
5.3 system-time dst predefined
Description
The system-time dst predefined command is used to select a daylight
saving time configuration from the predefined mode. The configuration can
be used recurrently. To disable DST function, please use no system-time dst
command.
Syntax
system-time dst predefined [ USA
|
Australia | Europe | New-Zealand ]
no system-time dst
Parameter
USA
|
Australia | Europe | New-Zealand —— The mode of daylight saving time.
There are 4 options which are USA, Australia, Europe and New-Zealand
respectively. The default value is Europe.
Following are the time ranges of each option:
USA —— Second Sunday in March, 02:00 – First Sunday in November, 02:00.
Australia —— First Sunday in October, 02:00 – First Sunday in April, 03:00.
Europe —— Last Sunday in March, 01:00 – Last Sunday in October, 01:00.
New Zealand —— Last Sunday in September, 02:00 – First Sunday in April,
03:00.
Command Mode
Global Configuration Mode
38
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the daylight saving time as USA standard:
Switch(config)#system-time dst predefined USA
5.4 system-time dst date
Description
The system-time dst date command is used to configure the one-off
daylight saving time. The start date is in the current year by default. The time
range of the daylight saving time must shorter than one year, but you can
configure it spanning years. To disable DST function, please use no
system-time dst command.
Syntax
system-time dst date {
smonth
} {
sday
} {
stime
} {
syear
} {
emonth
} {
eday
}
{
etime
} {
eyear }[offset ]
no system-time dst
Parameter
smonth
——The start month of the daylight saving time. There are 12 values
showing as follows: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
sday
—— The start day of the daylight saving time, ranging from 1 to 31. Here
you should show special attention to February and the differences between a
solar month and a lunar month.
stime
—— The start moment of the daylight saving time, HH:MM.
syear
—— The start year of the daylight saving time.
emonth
—— The end month of the daylight saving time. There are 12 values
showing as follows: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
eday
—— The end day of the daylight saving time, ranging from q to 31. Here
you should show special attention to February and the differences between a
solar month and a lunar month.
etime
—— The end moment of the daylight saving time, HH:MM.
eyear
—— The end year of the daylight saving time.
offset
—— The number of minutes to add during the daylight saving time. It is
60 minutes by default.
39
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the daylight saving time from zero clock, Apr 1st to zero clock Oct
1st and the offset is 30 minutes in 2015:
Switch(config)# system-time dst date Apr 1 00:00 2015 Oct 1 00:00 2015
30
5.5 system-time dst recurring
Description
The system-time dst recurring command is used to configure the recurring
daylight saving time. It can be configured spanning years. To disable DST
function, please use no system-time dst command.
Syntax
system-time dst recurring {
sweek
} {
sday
} {
smonth
} {
stime
} {
eweek
} {
eday}
{
emonth
} {
etime
} [
offset
]
no system-time dst
Parameter
sweek
——The start week of the daylight saving time. There are 5 values
showing as follows: first, second, third, fourth, last.
sday
—— The start day of the daylight saving time. There are 7 values
showing as follows: Sun, Mon, Tue, Wed, Thu, Fri, Sat.
smonth
—— The start month of the daylight saving time. There are 12 values
showing as follows: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
stime
—— The start moment of the daylight saving time, HH:MM.
eweek
——The end week of the daylight saving time. There are 5 values
showing as follows: first, second, third, fourth, last.
eday
—— The end day of the daylight saving time. There are 5 values
showing as follows: Sun, Mon, Tue, Wed, Thu, Fri, Sat.
emonth
—— The end month of the daylight saving time. There are 12 values
showing as following: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov,
Dec.
40
etime
—— The end moment of the daylight saving time, HH:MM.
offset
—— The number of minutes to add during the daylight saving time. It is
60 minutes by default.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the daylight saving time from 2:00am, the first Sunday of May to
2:00am, the last Sunday of Oct and the offset is 45 minutes:
Switch(config)# system-time dst recurring first Sun May 02:00 last Sun Oct
02:00 45
5.6 hostname
Description
The hostname command is used to configure the system name. To clear the
system name information, please use no hostname command.
Syntax
hostname [
hostname
]
no hostname
Parameter
hostname
—— System Name. The length of the name ranges from 1 to 32
characters. By default, it is the device name, for example “T1600G-28TS”.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system name as TP-Link
Switch(config)# hostname TP-Link
41
5.7 location
Description
The location command is used to configure the system location. To clear the
system location information, please use no location command.
Syntax
location [
location
]
no location
Parameter
location
—— Device Location. It consists of 32 characters at
most. It is Hong Kong” by default.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system location as Hong Kong:
Switch(config)# location Hong Kong
5.8 contact-info
Description
The contact-info command is used to configure the system contact
information. To clear the system contact information, please use no
contact-info command.
Syntax
contact-info [
contact_info
]
no contact-info
Parameter
contact_info
—— Contact Information. It consists of 32 characters at most. It
is “www.tp-link.com” by default.
Command Mode
Global Configuration Mode
42
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system contact information as www.tp-link.com:
Switch(config)# contact-info www.tp-link.com
5.9 led
Note: This command is only available on certain devices.
Description
The led command is used to control the LEDs.
Syntax
led {on | off}
Parameter
on | off—— The LEDs are configured as on or off. By default, they are on.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Configure the LED as off:
Switch(config)# led off
5.10 ip address
Description
This ip address command is used to configure the IP address and IP subnet
mask for the specified interface manually. The interface type includes: routed
port, port-channel interface, loopback interface and VLAN interface.
Syntax
ip address {
ip-addr
} {
mask
} [ secondary ]
no ip address [
ip-addr
] [
mask
]
43
Parameter
ip-addr
—— The IP address of the Layer 3 interface.
mask
—— The subnet mask of the Layer 3 interface.
secondary —— Specify the interface’s secondary IP address. If this
parameter is omitted here, the configured IP address is the interface’s
primary address.
Command Mode
Interface Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Create the VLAN interface 2 with the primary IP address as 192.168.1.1/24
and secondary IP address as 192.168.2.1/24:
Switch (config)# interface vlan 2
Switch (config-if)# ip address 192.168.1.1 255.255.255.0
Switch (config-if)# ip address 192.168.2.1 255.255.255.0 secondary
5.11 ip address-alloc
Description
The IP address-alloc command is used to enable the DHCP Client function or
the BOOTP Protocol. When this function is enabled, the specified interface
will obtain IP from DHCP Server or BOOTP server. To disable the IP obtaining
function on the specified interface, please use the no ip address command.
This command applies to the routed port, the port-channel interface and the
VLAN interface.
Syntax
ip address-alloc { dhcp | bootp }
no ip address
Parameter
dhcp —— Specify the Layer 3 interface to obtain IP address from the DHCP
Server.
44
bootp —— Specify the Layer 3 interface to obtain IP address from the
BOOTP Server.
Command Mode
Interface Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Enable the DHCP Client function on the Lay 3 routed port 1/0/1:
Switch (config)# interface gigabitEthernet 1/0/1
Switch (config-if)# no switchport
Switch (config-if)# ip address-alloc dhcp
Disable the IP address obtaining function on the VLAN interface 2:
Switch (config)# interface vlan 2
Switch (config-if)# no ip address
5.12 controller cloud-based (Only for
Certain Devices)
Note: This command is only available on certain devices
Description
The controller cloud-based command is used to enable Cloud-Based
Controller managment. When this feature is enabled, you can further add your
devices to your Omada Cloud-Based Controller. To disable the feature, use
the no controller cloud-based command.
Syntax
controller cloud-based
no controller cloud-based
Command Mode
Global Configuration Mode
45
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
5.13 controller inform-url (Only for
Certain Devices)
Note: This command is only available on certain devices
Description
If your switch and Omada SDN Controller are not located on the same subnet,
the controller inform-url command is used to inform the switch of the
controller’s URL/IP address. To disable the feature, use the no controller
inform-url command.
Syntax
controller inform-url { controller-url | controller-ip }
no controller inform-url
Parameter
controller-url —— Specify the URL of Omada SDN Controller.
controller-ip —— Specify the IP address of Omada SDN Controller.
Command Mode
Gloabal Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Inform the switch of the controller whose IP address is 192.168.1.1:
Switch (config)# controller inform-url 192.168.1.1
46
5.14 reset
Description
The reset command is used to reset the switch’s software. After resetting, all
configuration of the switch will restore to the factory defaults and your
current settings will be lost.
Syntax
reset [ except-ip ]
Parameter
except-ip ——Maintain the IP address when resetting the switch.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Reset all settings of the switch except its IP address:
Switch # reset except-ip
5.15 service reset-disable
Description
The service reset-disable command is used to disable the reset function of
the console port or reset button. To enable the reset function, use no service
reset-disable command. By default, the reset function is enabled.
Syntax
service reset-disable
no service reset-disable
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Disable the reset function of console port or reset button:
47
Switch (config)# service reset-disable
5.16 reboot
Description
The reboot command is used to reboot the Switch. To avoid damage, please
don’t turn off the device while rebooting.
Syntax
reboot
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Reboot the switch:
Switch # reboot
5.17 reboot-schedule
Description
This reboot-schedule command is used to configure the switch to reboot at
a certain time point. To delete the reboot schedule settings, please use the
reboot-schedule cancel command.
Syntax
reboot-schedule at
time [ date
] [ save_before_reboot ]
reboot-schedule in
interval
[ save_before_reboot ]
reboot-schedule cancel
Parameter
time
—— Specify the time point for the switch to reboot, in the format of
hh:mm.
date
—— Specify the date for the switch to reboot, in the format of
DD:MM:YYYY. The date should be within 30 days.
48
save_before_reboot —— Save the configuration file before the switch
reboots.
interval
—— Specify a time period after which the switch reboots. It ranges
from 1 to 43200 minutes.
cancel —— Delete the reboot schedule settings.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
User Guidelines
In the command reboot-schedule at
time [ date
] [ save_before_reboot ], if
no date is specified and the time you set here is later than the time that this
command is executed, the switch will reboot later that day; otherwise the
switch will reboot at the time point the next day.
Example
Specify the switch to save the configuration files and reboot in 200 minutes:
Switch (config)# reboot-schedule in 200 save_before_reboot
5.18 copy running-config
startup-config
Description
The copy running-config startup-config command is used to save the
current settings.
Syntax
copy running-config startup-config
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Save current settings:
Switch # copy running-config startup-config
49
5.19 copy startup-config tftp
Description
The copy startup-config tftp command is used to backup the configuration
file to TFTP server.
Syntax
copy startup-config tftp ip-address
ip-addr
filename
name
Parameter
ip-addr
—— IP Address of the TFTP server. Both IPv4 and IPv6 addresses are
supported, for example 192.168.0.1 or fe80::1234.
name
—— Specify the name for the configuration file which would be backup.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Backup the configuration files to TFTP server with the IP 192.168.0.148 and
name this file config.cfg:
Switch # copy startup-config tftp ip-address 192.168.0.148 filename config
Backup the configuration files to TFTP server with the IP fe80::1234 and name
this file config.cfg:
Switch # copy startup-config tftp ip-address fe80::1234 filename config
5.20 copy tftp startup-config
Description
The copy tftp startup-config command is used to download the
configuration file to the switch from TFTP server.
Syntax
copy tftp startup-config ip-address
ip-addr
filename
name
Parameter
ip-addr
—— IP Address of the TFTP server. Both IPv4 and IPv6 addresses are
supported, for example 192.168.0.1 or fe80::1234.
50
name
—— Specify the name for the configuration file which would be
downloaded.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Download the configuration file named as config.cfg to the switch from TFTP
server with the IP 192.168.0.148:
Switch # copy tftp startup-config ip-address 192.168.0.148 filename config
Download the configuration file named as config.cfg to the switch from TFTP
server with the IP fe80::1234
Switch # copy tftp startup-config ip-address fe80::1234 filename config
5.21 copy backup-config tftp
Description
The copy backup-config tftp command is used to export the backup
configuration file of the switch to TFTP server.
Syntax
copy backup-config tftp ip-address
ip-addr
filename
name
Parameter
ip-addr
—— IP Address of the TFTP server. Both IPv4 and IPv6 addresses are
supported, for example 192.168.0.1 or fe80::1234.
name
—— Specify the name for the configuration file which would be exported.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Export the backup configuration file of the switch to the TFTP server with the
IP 192.168.0.148 and name the file config.cfg:
Switch # copy backup-config tftp ip-address 192.168.0.148 filename config
51
5.22 copy backup-config
startup-config
Description
The copy backup-config startup-config command is used to replace the
startup configuration file using the backup configuration file.
Syntax
copy backup-config startup-config
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Replace the startup configuration file using the backup configuration file.:
Switch # copy backup-config startup-config
5.23 copy running-config
backup-config
Description
The copy running-config backup-config tftp command is used to save the
current running configuration as the backup configuration file.
Syntax
copy running-config backup-config
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Save the current running configuration as the backup configuration file.
Switch # copy running-config backup-config
52
5.24 copy tftp backup-config
Description
The copy tftp backup-config command is used to download the backup
configuration file from a TFTP server.
Syntax
Copy tftp backup-config ip-address
ip-addr
filename
name
Parameter
ip-addr
—— IP Address of the TFTP server. Both IPv4 and IPv6 addresses are
supported, for example 192.168.0.1 or fe80::1234.
name
—— Specify the name for the configuration file which would be
downloaded.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Download the configuration file named config.cfg from the TFTP server with
the IP 192.168.0.148:
Switch # copy tftp backup-config ip-address 192.168.0.148 filename config
5.25 boot application
Description
The boot application command is used to configure the image file as startup
image or backup image.
Syntax
boot application filename { image1 | image 2 } { startup | backup }
no boot application
Parameter
image1 | image2 —— Specify the image file to be configured. By default, the
image1.bin is the startup image and the image2.bin is the backup image.
53
startup | backup —— Specify the property of the image, either startup image
or backup image.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Configure the image2.bin as the startup image:
Switch (config)# boot application filename image2 startup
5.26 boot config
Description
The boot config command is used to configure the configuration file as
startup configuration or backup configuration.
Syntax
boot config filename { config1 | config 2 } { startup | backup }
no boot application
Parameter
config1 | config2 —— Specify the configuration file to be configured. By
default, the config1.cfg is the startup image and the config2.cfg is the backup
image.
startup | backup—— Specify the property of the configuration.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Configure the config2.cfg as the startup image:
Switch (config)# boot config filename config2 startup
54
5.27 remove backup-image
Description
The remove backup-image command is used to delete the backup-image.
Syntax
remove backup-image
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Delete the backup image file:
Switch # remove backup-image
5.28 firmware upgrade
Description
The firmware upgrade command is used to upgrade the switch’s backup
image file via the TFTP server. The uploaded firmware file will take place of
the Backup Image, and user can choose whether to reboot the switch with
the Backup Image.
Syntax
firmware upgrade ip-address
ip-addr
filename
name
Parameter
ip-addr
—— IP Address of the TFTP server. Both IPv4 and IPv6 addresses are
supported, for example 192.168.0.1 or fe80::1234.
name
—— Specify the name for the firmware file.
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin level users have access to these commands.
55
Example
Upgrade the switch’s backup image file with the file firmware.bin in the TFTP
server with the IP address 192.168.0.148, and reboot the switch with this
firmware:
Switch # firmware upgrade ip-address 192.168.0.148 filename firmware.bin
It will only upgrade the backup image. Continue? (Y/N):y
Operation OK!
Reboot with the backup image? (Y/N): y
Upgrade the switch’s backup image file with the file firmware.bin in the TFTP
server with the IP address fe80::1234, but do not reboot the switch:
Switch # firmware upgrade ip-address fe80::1234 filename firmware.bin
It will only upgrade the backup image. Continue? (Y/N):y
Operation OK!
Reboot with the backup image? (Y/N): n
5.29 boot autoinstall start
Note: This command is only available on certain devices.
Description
The boot autoinstall start command is used to start Auto Install function. To
stop the Auto Install function, use no boot autoinstall start.
Syntax
boot autoinstall start
no boot autoinstall start
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Start Auto Install function:
Switch(config)# boot autoinstall start
56
5.30 boot autoinstall
persistent-mode
Note: This command is only available on certain devices.
Description
The boot autoinstall persistent-mode command is used to start Auto Install
function to next reboot cycle. To disable persistent mode, use no boot
autoinstall persistent-mode.
Syntax
boot autoinstall persistent-mode
no boot autoinstall persistent-mode
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Start Auto Install function:
Switch Switch(config)# boot autoinstall persistent-mode
5.31 boot autoinstall auto-save
Note: This command is only available on certain devices.
Description
The boot autoinstall auto-save command is used to automatically save the
new configuration file that was downloaded by Auto Install function to
start-up configuration file Auto Install. To disable auto-save configuration
feature use no boot autoinstall auto-save.
Syntax
boot autoinstall auto-save
no boot autoinstall auto-save
Command Mode
Global Configuration Mode
57
Privilege Requirement
Only Admin level users have access to these commands.
Example
Configure Auto Install function to auto-save new configuration file to start-up
configuration file:
Switch(config)# boot autoinstall auto-save
5.32 boot autoinstall
auto-reboot
Note: This command is only available on certain devices.
Description
The boot autoinstall auto-reboot command is used to automatically reboot
the switch after Auto Install function is completed successfully. To disable
auto-reboot feature use no boot autoinstall auto-reboot.
Syntax
boot autoinstall auto-reboot
no boot autoinstall auto-reboot
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Configure the switch to auto reboot after Auto Install function completed
successfully:
Switch(config)# boot autoinstall auto-reboot
5.33 boot autoinstall retry-count
Note: This command is only available on certain devices.
Description
The boot autoinstall retry-count command is used to configure retry count
when Auto Install function uses TFTP to download configuration files in a
58
cycle of Auto Install process. To set retry count to default value use no boot
autoinstall retry-count.
Syntax
boot autoinstall retry-count
count
no boot autoinstall retry-count
Parameter
count
—— The count of retrying auto install. The value ranges from 1 to 3.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Configure TFTP retry 2 times when download files failed:
Switch(config)# boot autoinstall retry-count 2
5.34 show boot autoinstall
Note: This command is only available on certain devices.
Description
The show boot autoinstall command is used to display the configuration of
Auto Install function.
Syntax
show boot autoinstall
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the configuration of Auto Install function:
Switch# show boot autoinstall
59
5.35 show boot autoinstall
downloaded-config
Note: This command is only available on certain devices.
Description
The show boot autoinstall downloaded-config command is used to display
the configuration file which downloaded by Auto Install.
Syntax
show boot autoinstall downloaded-config
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the configuration file which downloaded by Auto Install:
Switch# show boot autoinstall downloaded-config
5.36 ping
Description
The ping command is used to test the connectivity between the switch and
one node of the network.
Syntax
ping [ ip | ipv6 ] {
ip_addr
} [ -n
count
] [ -l
size
] [ -i
interval
]
Parameter
ip
—— The type of the IP address for ping test should be IPv4.
ipv6
—— The type of the IP address for ping test should be IPv6.
ip_addr
—— The IP address of the destination node for ping test. If the
parameter ip/ipv6 is not selected, both IPv4 and IPv6 addresses are
supported, for example 192.168.0.100 or fe80::1234.
-n
count
—— The amount of times to send test data during Ping testing. It
ranges from 1 to 10. By default, this value is 4.
60
-l
size
—— The size of the sending data during ping testing. It ranges from 1 to
1500 bytes. By default, this value is 64.
-i
interval
—— The interval to send ICMP request packets. It ranges from 100
to 1000 milliseconds. By default, this value is 1000.
Command Mode
Privileged EXEC Mode
Privilege Requirement
None.
Example
To test the connectivity between the switch and the network device with the
IP 192.168.0.131, please specify the
count
(-l) as 512 bytes and
count
(-i) as
1000 milliseconds. If there is not any response after 8 times’ Ping test, the
connection between the switch and the network device is failed to establish:
Switch # ping 192.168.0.131 –n 8 –l 512
To test the connectivity between the switch and the network device with the
IP fe80::1234, please specify the
count
(-l) as 512 bytes and
count
(-i) as 1000
milliseconds. If there is not any response after 8 times’ Ping test, the
connection between the switch and the network device is failed to establish:
Switch # ping fe80::1234 –n 8 –l 512
5.37 tracert
Description
The tracert command is used to test the connectivity of the gateways during
its journey from the source to destination of the test data.
Syntax
tracert [ ip | ipv6 ]
ip_addr [ maxHops
]
Parameter
ip —— The type of the IP address for tracert test should be IPv4.
ipv6 —— The type of the IP address for tracert test should be IPv6.
ip_addr
—— The IP address of the destination device. If the parameter ip/ipv6
is not selected, both IPv4 and IPv6 addresses are supported, for example
192.168.0.100 or fe80::1234.
maxHops
—— The maximum number of the route hops the test data can pass
though. It ranges from 1 to 30. By default, this value is 4.
61
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Test the connectivity between the switch and the network device with the IP
192.168.0.131. If the destination device has not been found after 20
maxHops,
the connection between the switch and the destination device is
failed to establish:
Switch # tracert 192.168.0.131 20
Test the connectivity between the switch and the network device with the IP
fe80::1234. If the destination device has not been found after 20
maxHops,
the connection between the switch and the destination device is failed to
establish:
Switch # tracert fe80::1234 20
5.38 show system-info
Description
The show system-info command is used to display System Description,
Device Name, Device Location, System Contact, Hardware Version, Firmware
Version, System Time, Run Time and so on.
Syntax
show system-info
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the system information:
Switch # show system-info
62
5.39 show image-info
Description
The show image-info command is used to display the information of image
files in the system.
Syntax
show image-info
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Display the system image files’ information:
Switch# show image-info
5.40 show boot
Description
The show boot command is used to display the boot configuration of the
system.
Syntax
show boot
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Display the system boot configuration information:
Switch# show boot
63
5.41 show running-config
Description
The show running-config command is used to display the current operating
configurations of the whole system, a specified unit, or a specified port.
Syntax
show running-config [
unit
{all | | [exclude
keyword
] [include
keyword
] |
interface {fastEthernet |gigabitEthernet | ten-gigabitEthernet}
port
} ]
show running-config [all | | [exclude
keyword
] [include
keyword
] | interface
{fastEthernet |gigabitEthernet | ten-gigabitEthernet}
port
]
Parameter
unit
—— Specify the unit number of a switch to show the unit’s operating
configurations. By default, it is 1.
all—— Display all the operating configurations of the whole system or a
specified unit.
|—— Enable filter to filtrate the configurations. You can use exclude and
include to set the filter rule.
keyword
—— The filter conditions, such as interface, vlan, and user.
port
—— Specify the number of the port to show the port’s operating
configurations.
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Display the current operating configurations only related to the user:
Switch# show running-config | include user
5.42 show startup-config
Description
The show startup-config command is used to display the current
configuration saved in the switch. These configuration settings will not be lost
the next time you reboot the switch.
64
Syntax
show startup-config
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Display the saved configuration:
Switch# show startup-config
5.43 show system-time
Description
The show system-time command is used to display the time information of
the switch.
Syntax
show system-time
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the time information of the switch
Switch# show system-time
5.44 show system-time dst
Description
The show system-time dst command is used to display the DST information
of the switch.
Syntax
show system-time dst
Command Mode
Privileged EXEC Mode and Any Configuration Mode
65
Privilege Requirement
None.
Example
Display the DST information of the switch
Switch# show system-time dst
5.45 show system-time ntp
Description
The show system-time ntp command is used to display the NTP mode
configuration information.
Syntax
show system-time ntp
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the NTP mode configuration information of the switch:
Switch# show system-time ntp
5.46 show cable-diagnostics
interface
Description
The show cable-diagnostics interface command is used to display the cable
diagnostics of the connected Ethernet Port., which facilitates you to check
the connection status of the cable connected to the switch, locate and
diagnose the trouble spot of the network.
Syntax
show cable-diagnostics interface { fastEthernet
port
| gigabitEthernet
port
| ten-gigabitEthernet
port
}
Parameter
port
—— The number of the port which is selected for Cable test.
66
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Show the cable-diagnostics of port 3:
Switch# show cable-diagnostics interface gigabitEthernet 1/0/3
5.47 show cpu-utilization
Description
The show cpu-utilization command is used to display the system’s CPU
utilization in the last 5 seconds/1minute/5minutes.
Syntax
show cpu-utilization
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the CPU utilization information of the switch:
Switch# show cpu-utilization
5.48 show memory-utilization
Description
The show memory-utilization command is used to display the current
system’s memory utilization in the last 5 seconds/1minute/5minutes.
Syntax
show memory-utilization
67
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the memory utilization information of the switch:
Switch# show memory-utilization
5.49 show controller
Note: This command is only available on certain devices.
Description
The show controller command is used to display the current controller
settings and status.
Syntax
show controller
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the current controller settings and status:
Switch# show controller
5.50 show temperature
Note: This command is only available on certain devices.
Description
The show temperature command is used to display the temperature of
switch.
68
Syntax
show temperature
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the temperature information of the switch:
Switch-DC# show temperature
5.51 show voltage
Note: This command is only available on certain devices.
Description
The show voltage command is used to display the voltage of DC power
board.
Syntax
show voltage
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Display the voltage information of the switch:
Switch # show voltage
5.52 clear config interace
Description
The clear config interace command is used to clear all configurations of a
specified port.
69
Syntax
clear config interace [fastEthernet | gigabitEthernet | two-gigabitEthernet
| ten-gigabitEthernet | port-channel ]
port
Parameter
port
—— The port number.
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Clear all configurations of gigabitEthernet port 1/0/3:
Switch(config)# clear config interace gigabitEthernet 1/0/3
70
Chapter 6 EEE Configuration Commands
EEE (Energy Efficient Ethernet) is used to save power consumption of the switch during periods
of low data activity. You can simply enable this feature on ports to allow power reduction.
6.1 eee
Description
The eee command is used to enable EEE on the port. To disable EEE on the
port, please use no eee command.
Syntax
eee
no eee
Command Mode
Interface Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these commands.
Example
Enable EEE on port 1/0/1:
Switch(config)#interface gigabitEthernet 1/0/1
Switch(config-if)#eee
6.2 show interface eee
Description
The show interface eee command is used to display the EEE configuration
on each port.
Syntax
show interface eee [ fastEthernet
port
| gigabitEthernet
port
|
two-gigabitEthernet
port
| ten-gigabitEthernet
port
]
Command Mode
Privileged EXEC Mode and Any Configuration Mode
71
Privilege Requirement
None.
Example
Display the EEE configuration of each port
Switch# show interface eee
72
Chapter 7 SDM Template Commands
This chapter describes how to configure the Switch Database Management (SDM) templates to
allocate hardware resources on the switch for different uses.
7.1 sdm prefer
Description
The sdm prefer command is used to specify the SDM template to be used.
The SDM template is used to allocate system resources to best support the
features being used in your application. To return to use the default template,
please use the sdm prefer default command. The template change will take
effect after a reboot.
Syntax
sdm prefer { default | enterpriseV4 | enterpriseV6 | enterpriseMix |
pca-default }
Parameter
default —— Specify the SDM template used in the switch as “default”.
enterpriseV4 —— Specify the SDM template used in the switch as
enterpriseV4”.
enterpriseV6 —— Specify the SDM template used in the switch as
enterpriseV6”.
enterpriseMix —— Specify the SDM template used in the switch as
enterpriseMix, which provides both IPv4/IPv6-ACL support and IMPBv4/v6
support.
pca-default —— Specify the SDM template used in the switch as “pca-default”,
which provides packet-content-ACL support.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
73
User Guidelines
Some models may not support pca-default template. Changes to the SDM
preferences cannot take effect until reboot the switch.
Example
Specify the SDM template as enterpriseV4:
Switch(config)# sdm prefer enterpriseV4
7.2 show sdm prefer
Description
The show sdm prefer command is used to display resource allocation of the
current SDM template in use, or the SDM templates that can be used.
Syntax
show sdm prefer { used | default | enterpriseV4 | enterpriseV6 | enterpriseMix
| pca-default}
Parameter
used —— Display the resource allocation of the template currently in use, and
the template that will become active after a reboot.
default —— Display the resource allocation of the default template.
enterpriseV4 —— Display the resource allocation of the enterpriseV4
template.
enterpriseV6 —— Display the resource allocation of the enterpriseV6
template.
enterpriseMix —— Specify the SDM template used in the switch as
enterpriseMix, which provides both IPv4/IPv6-ACL support and IMPBv4/v6
support.
pca-default —— Specify the SDM template used in the switch as “pca-default”,
which provides packet-content-ACL support.
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
74
Example
Display the resource allocation of the template currently in use, and the
template that will become active after a reboot:
Switch(config)#show sdm prefer used
Loading...