10 Security

HomeSupportReference GuidesCommand ReferencesH3C Access Controllers Command References(R5228P01)-6W10210 Security
Table of Contents
Related Documents
01-Text
Title Size Download
01-Text 2.76 MB

Contents

AAA commands· 1

General AAA commands· 1

aaa nas-id profile· 1

aaa session-limit 1

accounting command· 2

accounting default 3

accounting lan-access· 4

accounting login·· 5

accounting portal 6

accounting ppp· 8

accounting quota-out 9

accounting start-fail 10

accounting update-fail 10

authentication default 11

authentication ike· 12

authentication lan-access· 13

authentication login·· 14

authentication portal 15

authentication ppp· 16

authentication super 17

authorization command· 18

authorization default 20

authorization ike· 21

authorization lan-access· 22

authorization login·· 23

authorization portal 24

authorization ppp· 25

authorization-attribute (ISP domain view) 26

basic-service-ip-type· 27

dhcpv6-follow-ipv6cp· 28

display domain·· 29

domain·· 33

domain default enable· 34

domain if-unknown·· 34

ita-policy· 35

nas-id bind vlan·· 36

service-type (ISP domain view) 37

session-time include-idle-time· 37

state (ISP domain view) 38

user-address-type· 39

Local user commands· 40

access-limit 40

authorization-attribute (local user view/user group view) 40

bind-attribute· 43

company· 44

description·· 45

display local-guest waiting-approval 45

display local-user 46

display user-group· 50

email 51

full-name· 52

group· 53

local-guest auto-delete enable· 53

local-guest email format 54

local-guest email sender 55

local-guest email smtp-server 55

local-guest generate· 56

local-guest manager-email 57

local-guest send-email 58

local-guest timer 59

local-user 59

local-user-export class network guest 61

local-user-import class network guest 62

password· 64

phone· 65

reset local-guest waiting-approval 65

service-type (local user view) 66

sponsor-department 67

sponsor-email 67

sponsor-full-name· 68

state (local user view) 68

user-group· 69

validity-datetime· 70

Local BYOD authorization commands· 71

byod authorization·· 71

byod rule· 72

byod rule-order 73

display byod rule· 74

display byod rule-order 76

RADIUS commands· 76

accounting-on enable· 76

accounting-on extended· 77

attribute 15 check-mode· 78

attribute 25 car 79

attribute 31 mac-format 79

attribute remanent-volume· 80

client 81

data-flow-format (RADIUS scheme view) 82

display radius scheme· 83

display radius statistics· 85

key (RADIUS scheme view) 87

nas-ip (RADIUS scheme view) 87

port 89

primary accounting (RADIUS scheme view) 89

primary authentication (RADIUS scheme view) 90

radius dscp· 92

radius dynamic-author server 92

radius nas-ip· 93

radius scheme· 94

radius session-control client 95

radius session-control enable· 96

radius-server test-profile· 96

reset radius statistics· 97

retry· 98

retry realtime-accounting· 99

secondary accounting (RADIUS scheme view) 100

secondary authentication (RADIUS scheme view) 101

snmp-agent trap enable radius· 102

state primary· 103

state secondary· 104

timer quiet (RADIUS scheme view) 106

timer realtime-accounting (RADIUS scheme view) 106

timer response-timeout (RADIUS scheme view) 107

user-name-format (RADIUS scheme view) 108

HWTACACS commands· 109

data-flow-format (HWTACACS scheme view) 109

display hwtacacs scheme· 110

hwtacacs nas-ip· 112

hwtacacs scheme· 113

key (HWTACACS scheme view) 114

nas-ip (HWTACACS scheme view) 115

primary accounting (HWTACACS scheme view) 116

primary authentication (HWTACACS scheme view) 117

primary authorization·· 118

reset hwtacacs statistics· 119

secondary accounting (HWTACACS scheme view) 120

secondary authentication (HWTACACS scheme view) 121

secondary authorization·· 122

timer quiet (HWTACACS scheme view) 123

timer realtime-accounting (HWTACACS scheme view) 124

timer response-timeout (HWTACACS scheme view) 125

user-name-format (HWTACACS scheme view) 126

LDAP commands· 127

attribute-map· 127

authentication-server 127

authorization-server 128

display ldap scheme· 129

ip· 130

ipv6· 131

ldap attribute-map· 132

ldap scheme· 133

ldap server 133

login-dn·· 134

login-password· 135

map· 135

protocol-version·· 136

search-base-dn·· 137

search-scope· 138

server-timeout 138

user-parameters· 139

ITA policy commands· 140

accounting-level 140

accounting-merge enable· 141

accounting-method· 141

ita policy· 142

traffic-quota-out 143

traffic-separate· 143

802.1X commands· 145

display dot1x· 145

display dot1x connection·· 148

dot1x authentication-method· 150

dot1x domain-delimiter 151

dot1x ead-assistant enable· 152

dot1x ead-assistant free-ip· 153

dot1x ead-assistant url 153

dot1x retry· 154

dot1x timer 155

reset dot1x statistics· 157

802.1X client commands· 158

dot1x supplicant anonymous identify· 158

dot1x supplicant eap-method· 159

dot1x supplicant enable· 159

dot1x supplicant password· 160

dot1x supplicant username· 161

MAC authentication commands· 162

display mac-authentication·· 162

display mac-authentication connection·· 164

mac-authentication domain·· 166

mac-authentication timer server-timeout 166

mac-authentication user-name-format 167

reset mac-authentication statistics· 168

Portal commands· 170

aaa-fail nobinding enable· 170

aging-time· 170

app-id· 171

app-key· 172

authentication-timeout 173

auth-url 174

binding-retry· 174

captive-bypass enable· 175

default-logon-page· 176

display portal 177

display portal auth-error-record· 181

display portal auth-fail-record· 183

display portal captive-bypass statistics· 186

display portal dns free-rule-host 186

display portal extend-auth-server 187

display portal local-binding mac-address· 188

display portal logout-record· 189

display portal mac-trigger-server 191

display portal packet statistics· 194

display portal permit-rule statistics· 199

display portal redirect statistics· 200

display portal rule· 200

display portal safe-redirect statistics· 206

display portal server 207

display portal user 208

display portal user count 215

display portal web-server 215

display web-redirect rule· 217

exclude-attribute (MAC binding server view) 219

exclude-attribute (portal authentication server view) 221

free-traffic threshold· 222

if-match·· 222

ip (MAC binding server view) 224

ip (portal authentication server view) 225

ipv6· 226

local-binding aging-time· 227

local-binding enable· 228

logon-page bind· 228

logout-notify· 230

mail-domain-name· 231

mail-protocol 231

nas-port-type· 232

port (MAC binding server view) 233

port (portal authentication server view) 233

portal { bas-ip | bas-ipv6 } 234

portal { ipv4-max-user | ipv6-max-user } 235

portal apply mac-trigger-server 236

portal apply web-server 237

portal auth-error-record enable· 238

portal auth-error-record export 239

portal auth-error-record max· 240

portal auth-fail-record enable· 240

portal auth-fail-record export 241

portal auth-fail-record max· 242

portal authorization strict-checking· 243

portal captive-bypass optimize delay· 244

portal client-gateway interface· 244

portal client-traffic-report interval 245

portal delete-user 246

portal device-id· 247

portal domain·· 247

portal enable· 248

portal extend-auth domain·· 249

portal extend-auth-server 250

portal fail-permit server 251

portal fail-permit web-server 252

portal free-all except destination·· 252

portal free-rule· 253

portal free-rule destination·· 255

portal free-rule source· 256

portal host-check enable· 257

portal ipv6 free-all except destination·· 257

portal ipv6 user-detect 258

portal local-web-server 259

portal logout-record enable· 261

portal logout-record export 262

portal logout-record max· 263

portal mac-trigger-server 264

portal max-user 264

portal nas-id profile· 265

portal nas-port-id format 266

portal nas-port-type· 268

portal oauth user-sync interval 269

portal outbound-filter enable· 270

portal packet log enable· 271

portal pre-auth domain·· 271

portal pre-auth ip-pool 273

portal redirect log enable· 274

portal refresh enable· 274

portal roaming enable· 275

portal safe-redirect enable· 276

portal safe-redirect forbidden-file· 276

portal safe-redirect forbidden-url 277

portal safe-redirect method· 278

portal safe-redirect user-agent 278

portal server 280

portal temp-pass enable· 280

portal user-detect 281

portal user-dhcp-only· 282

portal user-logoff after-client-offline enable· 283

portal user-logoff ssid-switch enable· 284

portal user log enable· 284

portal web-server 285

redirect-url 286

reset portal auth-error-record· 287

reset portal auth-fail-record· 287

reset portal captive-bypass statistics· 288

reset portal local-binding mac-address· 289

reset portal logout-record· 289

reset portal packet statistics· 290

reset portal redirect statistics· 291

reset portal safe-redirect statistics· 291

server-detect (portal authentication server view) 292

server-detect (portal Web server view) 293

server-register 294

server-type (MAC binding server view) 294

server-type (portal server view/portal web-server view) 295

tcp-port 296

url 297

url-parameter 297

user-sync· 299

version·· 300

web-redirect url 301

User profile commands· 303

display user-profile· 303

user-profile· 305

Password control commands· 306

display password-control 306

display password-control blacklist 307

password-control { aging | composition | history | length } enable· 308

password-control aging· 309

password-control alert-before-expire· 310

password-control complexity· 311

password-control composition·· 312

password-control enable· 314

password-control expired-user-login·· 315

password-control history· 315

password-control length·· 316

password-control login idle-time· 317

password-control login-attempt 318

password-control super aging· 320

password-control super composition·· 321

password-control super length·· 322

password-control update-interval 322

reset password-control blacklist 323

reset password-control history-record· 323

Public key management commands· 325

display public-key local public· 325

display public-key peer 328

peer-public-key end· 330

public-key local create· 331

public-key local destroy· 333

public-key local export dsa· 335

public-key local export ecdsa· 337

public-key local export rsa· 338

public-key peer 340

public-key peer import sshkey· 341

PKI commands· 342

attribute· 342

ca identifier 343

certificate request entity· 344

certificate request from·· 345

certificate request mode· 345

certificate request polling· 347

certificate request url 348

common-name· 348

country· 349

crl check· 350

crl url 350

display pki certificate access-control-policy· 351

display pki certificate attribute-group· 352

display pki certificate domain·· 353

display pki certificate renew-status· 358

display pki certificate request-status· 359

display pki crl domain·· 361

fqdn·· 363

ip· 363

ldap-server 364

locality· 365

organization·· 365

organization-unit 366

pki abort-certificate-request 366

pki certificate access-control-policy· 367

pki certificate attribute-group· 368

pki delete-certificate· 369

pki domain·· 370

pki entity· 371

pki export 372

pki import 378

pki request-certificate· 383

pki retrieve-certificate· 384

pki retrieve-crl 385

pki storage· 386

pki validate-certificate· 387

public-key dsa· 389

public-key ecdsa· 390

public-key rsa· 391

root-certificate fingerprint 393

rule· 394

source· 395

state· 396

subject-dn·· 396

usage· 397

IPsec commands· 399

ah authentication-algorithm·· 399

description·· 400

display ipsec { ipv6-policy | policy } 400

display ipsec { ipv6-policy-template | policy-template } 405

display ipsec sa· 407

display ipsec statistics· 411

display ipsec transform-set 413

display ipsec tunnel 414

encapsulation-mode· 417

esn enable· 418

esp authentication-algorithm·· 419

esp encryption-algorithm·· 420

ike-profile· 421

ikev2-profile· 422

ipsec { ipv6-policy | policy } 423

ipsec { ipv6-policy | policy } isakmp template· 424

ipsec { ipv6-policy | policy } local-address· 425

ipsec { ipv6-policy-template | policy-template } 426

ipsec anti-replay check· 427

ipsec anti-replay window·· 427

ipsec apply· 428

ipsec decrypt-check enable· 429

ipsec df-bit 429

ipsec fragmentation·· 430

ipsec global-df-bit 431

ipsec limit max-tunnel 432

ipsec logging negotiation enable· 432

ipsec logging packet enable· 433

ipsec redundancy enable· 433

ipsec sa global-duration·· 434

ipsec sa idle-time· 435

ipsec transform-set 435

local-address· 436

pfs· 437

protocol 438

qos pre-classify· 438

redundancy replay-interval 439

remote-address· 440

reset ipsec sa· 441

reset ipsec statistics· 443

reverse-route dynamic· 443

reverse-route preference· 444

reverse-route tag· 445

sa duration·· 445

sa hex-key authentication·· 446

sa hex-key encryption·· 447

sa idle-time· 449

sa spi 449

sa string-key· 450

security acl 451

snmp-agent trap enable ipsec· 453

tfc enable· 454

transform-set 454

IKE commands· 456

aaa authorization·· 456

authentication-algorithm·· 457

authentication-method· 458

certificate domain·· 458

client-authentication·· 459

description·· 460

dh·· 461

display ike proposal 462

display ike sa· 463

display ike statistics· 466

dpd· 467

encryption-algorithm·· 468

exchange-mode· 469

ike address-group· 469

ike dpd· 470

ike identity· 471

ike invalid-spi-recovery enable· 472

ike keepalive interval 473

ike keepalive timeout 473

ike keychain·· 474

ike limit 475

ike logging negotiation enable· 476

ike nat-keepalive· 476

ike profile· 477

ike proposal 477

ike signature-identity from-certificate· 478

keychain·· 479

local-identity· 480

match local address (IKE keychain view) 481

match local address (IKE profile view) 482

match remote· 482

pre-shared-key· 484

priority (IKE keychain view) 485

priority (IKE profile view) 485

proposal 486

reset ike sa· 487

reset ike statistics· 488

sa duration·· 488

snmp-agent trap enable ike· 489

IKEv2 commands· 491

aaa authorization·· 491

address· 492

authentication-method· 493

certificate domain·· 494

config-exchange· 495

dh·· 496

display ikev2 policy· 497

display ikev2 profile· 498

display ikev2 proposal 500

display ikev2 sa· 501

display ikev2 statistics· 505

dpd· 506

encryption·· 507

hostname· 508

identity· 508

identity local 509

ikev2 address-group· 510

ikev2 cookie-challenge· 511

ikev2 dpd· 512

ikev2 ipv6-address-group· 513

ikev2 keychain·· 513

ikev2 nat-keepalive· 514

ikev2 policy· 515

ikev2 profile· 516

ikev2 proposal 516

integrity· 517

keychain·· 518

match local (IKEv2 profile view) 519

match local address (IKEv2 policy view) 520

match remote· 521

nat-keepalive· 522

peer 523

pre-shared-key· 524

prf 525

priority (IKEv2 policy view) 526

priority (IKEv2 profile view) 526

proposal 527

reset ikev2 sa· 528

reset ikev2 statistics· 529

sa duration·· 529

SSH commands· 531

SSH server commands· 531

display ssh server 531

display ssh user-information·· 532

scp server enable· 533

sftp server enable· 534

sftp server idle-timeout 534

ssh server acl 535

ssh server authentication-retries· 536

ssh server authentication-timeout 537

ssh server compatible-ssh1x enable· 537

ssh server dscp· 538

ssh server enable· 539

ssh server ipv6 acl 539

ssh server ipv6 dscp· 540

ssh server rekey-interval 541

ssh user 541

SSH client commands· 544

bye· 544

cd· 544

cdup· 545

delete· 545

dir 546

display sftp client source· 546

display ssh client source· 547

exit 547

get 548

help· 548

ls· 549

mkdir 550

put 550

pwd· 551

quit 551

remove· 552

rename· 552

rmdir 553

scp· 553

scp ipv6· 555

sftp· 557

sftp client ipv6 source· 558

sftp client source· 559

sftp ipv6· 560

ssh client ipv6 source· 562

ssh client source· 562

ssh2· 563

ssh2 ipv6· 565

SSH2 commands· 567

display ssh2 algorithm·· 567

ssh2 algorithm cipher 568

ssh2 algorithm key-exchange· 569

ssh2 algorithm mac· 570

ssh2 algorithm public-key· 570

SSL commands· 572

certificate-chain-sending enable· 572

ciphersuite· 572

client-verify· 574

display ssl client-policy· 575

display ssl server-policy· 576

pki-domain·· 576

prefer-cipher 577

server-verify enable· 579

session·· 579

ssl client-policy· 580

ssl renegotiation disable· 581

ssl server-policy· 581

ssl version ssl3.0 disable· 582

version·· 583

Session management commands· 584

display session aging-time state· 584

display session relation-table· 585

display session statistics ipv4· 586

display session statistics ipv6· 588

display session statistics· 589

display session statistics multicast 592

display session table ipv4· 592

display session table ipv6· 595

display session table multicast ipv4· 597

display session table multicast ipv6· 601

reset session relation-table· 604

reset session statistics· 605

reset session statistics multicast 605

reset session table· 606

reset session table ipv4· 606

reset session table ipv6· 607

reset session table multicast 608

reset session table multicast ipv4· 608

reset session table multicast ipv6· 609

session aging-time state· 610

session log { bytes-active | packets-active } 611

session log enable· 612

session log flow-begin·· 613

session log flow-end· 614

session log time-active· 614

session persistent acl 615

session state-machine mode loose· 616

session statistics enable· 617

Connection limit commands· 618

connection-limit 618

connection-limit apply· 618

connection-limit apply global 619

description·· 620

display connection-limit 621

display connection-limit ipv6-stat-nodes· 623

display connection-limit statistics· 626

display connection-limit stat-nodes· 626

limit 629

reset connection-limit statistics· 631

Attack detection and prevention commands· 632

ack-flood action·· 632

ack-flood detect 632

ack-flood detect non-specific· 633

ack-flood threshold· 634

attack-defense apply policy· 635

attack-defense local apply policy· 636

attack-defense login reauthentication-delay· 636

attack-defense policy· 637

attack-defense signature log non-aggregate· 638

attack-defense tcp fragment enable· 638

display attack-defense flood statistics ip· 639

display attack-defense flood statistics ipv6· 641

display attack-defense policy· 642

display attack-defense policy ip· 647

display attack-defense policy ipv6· 648

display attack-defense scan attacker ip· 650

display attack-defense scan attacker ipv6· 651

display attack-defense scan victim ip· 652

display attack-defense scan victim ipv6· 653

display attack-defense statistics interface· 654

display attack-defense statistics local 657

dns-flood action·· 659

dns-flood detect 659

dns-flood detect non-specific· 660

dns-flood port 661

dns-flood threshold· 662

exempt acl 663

fin-flood action·· 664

fin-flood detect 664

fin-flood detect non-specific· 665

fin-flood threshold· 666

http-flood action·· 667

http-flood detect 667

http-flood detect non-specific· 669

http-flood port 669

http-flood threshold· 670

icmp-flood action·· 671

icmp-flood detect ip· 671

icmp-flood detect non-specific· 672

icmp-flood threshold· 673

icmpv6-flood action·· 674

icmpv6-flood detect ipv6· 674

icmpv6-flood detect non-specific· 675

icmpv6-flood threshold· 676

reset attack-defense policy flood· 677

reset attack-defense statistics interface· 678

reset attack-defense statistics local 678

rst-flood action·· 678

rst-flood detect 679

rst-flood detect non-specific· 680

rst-flood threshold· 681

scan detect 682

signature { large-icmp | large-icmpv6 } max-length·· 682

signature detect 683

signature level action·· 686

signature level detect 687

syn-ack-flood action·· 688

syn-ack-flood detect 688

syn-ack-flood detect non-specific· 689

syn-ack-flood threshold· 690

syn-flood action·· 691

syn-flood detect 692

syn-flood detect non-specific· 693

syn-flood threshold· 693

udp-flood action·· 694

udp-flood detect 695

udp-flood detect non-specific· 696

udp-flood threshold· 696

IP source guard commands· 698

ip verify source· 698

ip verify unknown-ip· 698

ipv6 verify source· 699

ARP attack protection commands· 700

Source MAC-based ARP attack detection commands· 700

arp source-mac· 700

arp source-mac aging-time· 700

arp source-mac exclude-mac· 701

arp source-mac threshold· 702

display arp source-mac· 702

ARP packet source MAC consistency check commands· 703

arp valid-check enable· 703

ARP active acknowledgement commands· 703

arp active-ack enable· 703

Authorized ARP commands· 704

arp authorized enable· 704

ARP attack detection commands· 705

arp detection enable· 705

arp detection rule· 705

arp detection trust 706

arp detection validate· 707

arp restricted-forwarding enable· 707

display arp detection·· 708

display arp detection statistics· 708

ARP scanning and fixed ARP commands· 709

arp fixup· 709

arp scan·· 710

ARP gateway protection commands· 711

arp filter source· 711

ARP filtering commands· 711

arp filter binding· 711

ND attack defense commands· 713

ipv6 nd check log enable· 713

ipv6 nd mac-check enable· 713

User isolation commands· 715

display user-isolation statistics· 715

reset user-isolation statistics· 716

user-isolation enable· 716

user-isolation permit-broadcast 716

user-isolation vlan enable· 717

user-isolation vlan permit-mac· 718

ASPF commands· 720

aspf apply policy· 720

aspf policy· 720

detect 721

display aspf all 722

display aspf interface· 723

display aspf policy· 724

display aspf session·· 725

icmp-error drop· 727

reset aspf session·· 728

tcp syn-check· 728

Protocol packet rate limit commands· 730

anti-attack enable· 730

anti-attack protocol enable· 730

anti-attack protocol flow-threshold· 732

anti-attack protocol priority· 733

anti-attack protocol threshold· 734

display anti-attack protocol 734

Index· 737


AAA commands

General AAA commands

aaa nas-id profile

Use aaa nas-id profile to create a NAS-ID profile and enter its view, or enter the view of an existing NAS-ID profile.

Use undo aaa nas-id profile to delete a NAS-ID profile.

Syntax

aaa nas-id profile profile-name

undo aaa nas-id profile profile-name

Default

No NAS-ID profiles exist.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies the NAS-ID profile name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

Configure a NAS-ID profile to maintain NAS-ID and VLAN bindings on the device.

Examples

# Create a NAS-ID profile named aaa and enter its view.

<Sysname> system-view

[Sysname] aaa nas-id profile aaa

[Sysname-nas-id-prof-aaa]

Related commands

·          nas-id bind vlan

·          port-security nas-id-profile

·          portal nas-id-profile

aaa session-limit

Use aaa session-limit to set the maximum number of concurrent users that can log on to the device through the specified method.

Use undo aaa session-limit to restore the default maximum number of concurrent users for the specified login method.

Syntax

aaa session-limit { ftp | http | https | ssh | telnet } max-sessions

undo aaa session-limit { ftp | http | https | ssh | telnet }

Default

The maximum number of concurrent users is 32 for each user type.

Views

System view

Predefined user roles

network-admin

Parameters

ftp: FTP users.

http: HTTP users.

https: HTTPS users.

ssh: SSH users.

telnet: Telnet users.

max-sessions: Specifies the maximum number of concurrent login users. The value range for this argument is 1 to 32 for FTP, SSH, and Telnet users, and 1 to 64 for HTTP and HTTPS users.

Usage guidelines

After the maximum number of concurrent login users for a user type exceeds the upper limit, the system denies the subsequent users of this type.

Examples

# Set the maximum number of concurrent FTP users to 4.

<Sysname> system-view

[Sysname] aaa session-limit ftp 4

accounting command

Use accounting command to specify the command line accounting method.

Use undo accounting command to restore the default.

Syntax

accounting command hwtacacs-scheme hwtacacs-scheme-name

undo accounting command

Default

The default accounting methods of the ISP domain are used for command line accounting.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The command line accounting feature works with the accounting server to record valid commands that have been successfully executed on the device.

·          When the command line authorization feature is disabled, the accounting server records all valid commands that have been successfully executed.

·          When the command line authorization feature is enabled, the accounting server records only authorized commands that have been successfully executed.

Command line accounting can use only a remote HWTACACS server.

Examples

# In ISP domain test, perform command line accounting based on HWTACACS scheme hwtac.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting command hwtacacs-scheme hwtac

Related commands

·          accounting default

·          command accounting (Fundamentals Command Reference)

·          hwtacacs scheme

accounting default

Use accounting default to specify default accounting methods for an ISP domain.

Use undo accounting default to restore the default.

Syntax

accounting default { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo accounting default

Default

The default accounting method of an ISP domain is local.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local accounting.

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The default accounting methods are used for all users that support these methods and do not have an accounting method configured.

Local accounting is only used for monitoring and controlling the number of local user connections. It does not provide the statistics function that the accounting feature generally provides.

You can specify one primary default accounting method and multiple backup default accounting methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the accounting default radius-scheme radius-scheme-name local none command specifies the primary default RADIUS accounting method and two backup methods (local accounting and no accounting). The device performs RADIUS accounting by default and performs local accounting when the RADIUS server is invalid. The device does not perform accounting when both of the previous methods are invalid.

Examples

# In ISP domain test, use RADIUS scheme rd as the primary default accounting method and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting default radius-scheme rd local

Related commands

·          hwtacacs scheme

·          local-user

·          radius scheme

accounting lan-access

Use accounting lan-access to specify accounting methods for LAN users.

Use undo accounting lan-access to restore the default.

Syntax

accounting lan-access { broadcast radius-scheme radius-scheme-name1 radius-scheme radius-scheme-name2 [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo accounting lan-access

Default

The default accounting methods of the ISP domain are used for LAN users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

broadcast: Broadcasts accounting requests to servers in RADIUS schemes.

radius-scheme radius-scheme-name1: Specifies the primary broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

radius-scheme radius-scheme-name2: Specifies the backup broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local accounting.

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary accounting method and multiple backup accounting methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the accounting lan-access radius-scheme radius-scheme-name local none command specifies a primary RADIUS accounting method and two backup methods (local accounting and no accounting). The device performs RADIUS accounting by default and performs local accounting when the RADIUS server is invalid. The device does not perform accounting when both of the previous methods are invalid.

The following guidelines apply to broadcast accounting:

·          The device sends accounting requests to the primary accounting servers in the specified broadcast RADIUS schemes at the same time. If a primary server is unavailable, the device sends accounting requests to the secondary servers of the scheme in the order the servers are configured.

·          The accounting result is determined by the primary broadcast RADIUS scheme. The accounting result from the backup scheme is used as reference only. If the primary scheme does not return any result, the device considers the accounting as a failure.

Examples

# In ISP domain test, perform local accounting for LAN users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting lan-access local

# In ISP domain test, perform RADIUS accounting for LAN users based on scheme rd and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting lan-access radius-scheme rd local

# In ISP domain test, broadcast accounting requests of LAN users to RADIUS servers in schemes rd1 and rd2, and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting lan-access broadcast radius-scheme rd1 radius-scheme rd2 local

Related commands

·          accounting default

·          local-user

·          radius scheme

accounting login

Use accounting login to specify accounting methods for login users.

Use undo accounting login to restore the default.

Syntax

accounting login { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo accounting login

Default

The default accounting methods of the ISP domain are used for login users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local accounting.

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

Accounting is not supported for FTP, SFTP, and SCP users.

You can specify one primary accounting method and multiple backup accounting methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the accounting login radius-scheme radius-scheme-name local none command specifies a primary default RADIUS accounting method and two backup methods (local accounting and no accounting). The device performs RADIUS accounting by default and performs local accounting when the RADIUS server is invalid. The device does not perform accounting when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local accounting for login users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting login local

# In ISP domain test, perform RADIUS accounting for login users based on scheme rd and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting login radius-scheme rd local

Related commands

·          accounting default

·          hwtacacs scheme

·          local-user

·          radius scheme

accounting portal

Use accounting portal to specify accounting methods for portal users.

Use undo accounting portal to restore the default.

Syntax

accounting portal { broadcast radius-scheme radius-scheme-name1 radius-scheme radius-scheme-name2 [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo accounting portal

Default

The default accounting methods of the ISP domain are used for portal users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

broadcast: Broadcasts accounting requests to servers in RADIUS schemes.

radius-scheme radius-scheme-name1: Specifies the primary broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

radius-scheme radius-scheme-name2: Specifies the backup broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local accounting.

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary accounting method and multiple backup accounting methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the accounting portal radius-scheme radius-scheme-name local none command specifies a primary default RADIUS accounting method and two backup methods (local accounting and no accounting). The device performs RADIUS accounting by default and performs local accounting when the RADIUS server is invalid. The device does not perform accounting when both of the previous methods are invalid.

The following guidelines apply to broadcast accounting:

·          The device sends accounting requests to the primary accounting servers in the specified broadcast RADIUS schemes at the same time. If a primary server is unavailable, the device sends accounting requests to the secondary servers of the scheme in the order the servers are configured.

·          The accounting result is determined by the primary broadcast RADIUS scheme. The accounting result from the backup scheme is used as reference only. If the primary scheme does not return any result, the device considers the accounting as a failure.

Examples

# In ISP domain test, perform local accounting for portal users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting portal local

# In ISP domain test, perform RADIUS accounting for portal users based on scheme rd and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting portal radius-scheme rd local

# In ISP domain test, broadcast accounting requests of portal users to RADIUS servers in schemes rd1 and rd2, and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting portal broadcast radius-scheme rd1 radius-scheme rd2 local

Related commands

·          accounting default

·          local-user

·          radius scheme

accounting ppp

Use accounting ppp to specify accounting methods for PPP users.

Use undo accounting ppp to restore the default.

Syntax

accounting ppp { broadcast radius-scheme radius-scheme-name1 radius-scheme radius-scheme-name2 [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo accounting ppp

Default

The default accounting methods of the ISP domain are used for PPP users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

broadcast: Broadcasts accounting requests to servers in RADIUS schemes.

radius-scheme radius-scheme-name1: Specifies the primary broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

radius-scheme radius-scheme-name2: Specifies the backup broadcast RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local accounting.

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary accounting method and multiple backup accounting methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the accounting ppp radius-scheme radius-scheme-name local none command specifies a primary RADIUS accounting method and two backup methods (local accounting and no accounting). The device performs RADIUS accounting by default and performs local accounting when the RADIUS server is invalid. The device does not perform accounting when both of the previous methods are invalid.

The following guidelines apply to broadcast accounting:

·          The device sends accounting requests to the primary accounting servers in the specified broadcast RADIUS schemes at the same time. If a primary server is unavailable, the device sends accounting requests to the secondary servers of the scheme in the order the servers are configured.

·          The accounting result is determined by the primary broadcast RADIUS scheme. The accounting result from the backup scheme is used as reference only. If the primary scheme does not return any result, the device considers the accounting as a failure.

Examples

# In ISP domain test, perform local accounting for PPP users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting ppp local

# In ISP domain test, perform RADIUS accounting for PPP users based on scheme rd and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting ppp radius-scheme rd local

# In ISP domain test, broadcast accounting requests of PPP users to RADIUS servers in schemes rd1 and rd2, and use local accounting as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting ppp broadcast radius-scheme rd1 radius-scheme rd2 local

Related commands

·          accounting default

·          local-user

·          radius scheme

accounting quota-out

Use accounting quota-out to configure access control for users that have used up their data quotas.

Use undo accounting quota-out to restore the default.

Syntax

accounting quota-out { offline | online }

undo accounting quota-out

Default

The device logs off users that have used up their data quotas.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

offline: Logs off users that have used up their data quotas.

online: Allows users that have used up their data quotas to stay online.

Examples

# In ISP domain test, configure the device to allow users that have used up their data quotas to stay online.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting quota-out online

accounting start-fail

Use accounting start-fail to configure access control for users that encounter accounting-start failures.

Use undo accounting start-fail to restore the default.

Syntax

accounting start-fail { offline | online }

undo accounting start-fail

Default

The device allows users that encounter accounting-start failures to stay online.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

offline: Logs off users that encounter accounting-start failures.

online: Allows users that encounter accounting-start failures to stay online.

Examples

# In ISP domain test, configure the device to allow users that encounter accounting-start failures to stay online.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting start-fail online

accounting update-fail

Use accounting update-fail to configure access control for users that have failed all their accounting-update attempts.

Use undo accounting update-fail to restore the default.

Syntax

accounting update-fail { [ max-times times ] offline | online }

undo accounting update-fail

Default

The device allows users that have failed all their accounting-update attempts to stay online.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

max-times times: Specifies the maximum number of consecutive accounting-update failures allowed by the device for each user. The value range for the times argument is 1 to 255, and the default value is 1.

offline: Logs off users that have failed all their accounting-update attempts.

online: Allows users that have failed all their accounting-update attempts to stay online.

Examples

# In ISP domain test, configure the device to allow users that have failed all their accounting-update attempts to stay online.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] accounting update-fail online

authentication default

Use authentication default to specify default authentication methods for an ISP domain.

Use undo authentication default to restore the default.

Syntax

authentication default { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | ldap-scheme ldap-scheme-name [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo authentication default

Default

The default authentication method of an ISP domain is local.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

ldap-scheme ldap-scheme-name: Specifies an LDAP scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The default authentication methods are used for all users that support these methods and do not have an authentication method configured.

You can specify one primary default authentication method and multiple backup default authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication default radius-scheme radius-scheme-name local none command specifies a primary default RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, use RADIUS scheme rd as the primary default authentication method and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication default radius-scheme rd local

Related commands

·          hwtacacs scheme

·          ldap scheme

·          local-user

·          radius scheme

authentication ike

Use authentication ike to specify extended authentication methods for IKE users.

Use undo authentication ike to restore the default.

Syntax

authentication ike { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authentication ike

Default

The default authentication methods of the ISP domain are used for IKE extended authentication.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary authentication method and multiple backup authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication ike radius-scheme radius-scheme-name local none command specifies a primary RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, configure the device to perform local authentication through IKE extended authentication.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication ike local

# In ISP domain test, perform IKE extended authentication based on RADIUS scheme rd and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication ike radius-scheme rd local

Related commands

·          authentication default

·          local-user

·          radius scheme

authentication lan-access

Use authentication lan-access to specify authentication methods for LAN users.

Use undo authentication lan-access to restore the default.

Syntax

authentication lan-access { ldap-scheme ldap-scheme-name [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authentication lan-access

Default

The default authentication methods of the ISP domain are used for LAN users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

ldap-scheme ldap-scheme-name: Specifies an LDAP scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary authentication method and multiple backup authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication lan-access radius-scheme radius-scheme-name local none command specifies a primary RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authentication for LAN users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication lan-access local

# In ISP domain test, perform RADIUS authentication for LAN users based on scheme rd and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication lan-access radius-scheme rd local

Related commands

·          authentication default

·          hwtacacs scheme

·          ldap scheme

·          local-user

·          radius scheme

authentication login

Use authentication login to specify authentication methods for login users.

Use undo authentication login to restore the default.

Syntax

authentication login { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | ldap-scheme ldap-scheme-name [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo authentication login

Default

The default authentication methods of the ISP domain are used for login users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

ldap-scheme ldap-scheme-name: Specifies an LDAP scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary authentication method and multiple backup authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication login radius-scheme radius-scheme-name local none command specifies the default primary RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authentication for login users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication login local

# In ISP domain test, perform RADIUS authentication for login users based on scheme rd and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication login radius-scheme rd local

Related commands

·          authentication default

·          hwtacacs scheme

·          ldap scheme

·          local-user

·          radius scheme

authentication portal

Use authentication portal to specify authentication methods for portal users.

Use undo authentication portal to restore the default.

Syntax

authentication portal { ldap-scheme ldap-scheme-name [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authentication portal

Default

The default authentication methods of the ISP domain are used for portal users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

ldap-scheme ldap-scheme-name: Specifies an LDAP scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary authentication method and multiple backup authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication portal radius-scheme radius-scheme-name local none command specifies the default primary RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authentication for portal users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication portal local

# In ISP domain test, perform RADIUS authentication for portal users based on scheme rd and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication portal radius-scheme rd local

Related commands

·          authentication default

·          ldap scheme

·          local-user

·          radius scheme

authentication ppp

Use authentication ppp to specify authentication methods for PPP users.

Use undo authentication ppp to restore the default.

Syntax

authentication ppp { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authentication ppp

Default

The default authentication methods of the ISP domain are used for PPP users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authentication.

none: Does not perform authentication.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one primary authentication method and multiple backup authentication methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authentication ppp radius-scheme radius-scheme-name local none command specifies a primary RADIUS authentication method and two backup methods (local authentication and no authentication). The device performs RADIUS authentication by default and performs local authentication when the RADIUS server is invalid. The device does not perform authentication when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authentication for PPP users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication ppp local

# In ISP domain test, perform RADIUS authentication for PPP users based on scheme rd and use local authentication as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authentication ppp radius-scheme rd local

Related commands

·          authentication default

·          local-user

·          radius scheme

authentication super

Use authentication super to specify methods for user role authentication.

Use undo authentication super to restore the default.

Syntax

authentication super { hwtacacs-scheme hwtacacs-scheme-name | radius-scheme radius-scheme-name } *

undo authentication super

Default

The default authentication methods of the ISP domain are used for user role authentication.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

You can specify one authentication method and one backup authentication method to use in case that the previous authentication method is invalid.

If you specify a scheme to provide the method for user role authentication, the following rules apply:

·          If an HWTACACS scheme is specified, the device uses the entered username for role authentication. The username must already exist on the HWTACACS server to represent the highest user level that a user can obtain. For example, to obtain a level-3 user role of which username is test, the device uses the string test@domain-name or test for role authentication, depending on whether the domain name is required.

·          If a RADIUS scheme is specified, the device uses the username $enabn$ on the RADIUS server for role authentication of any usernames. The variable n represents a user role level. For example, to obtain a level-3 user role, the device uses the username string $enab3$.

For more information about user role authentication, see Fundamentals Configuration Guide.

Examples

# In ISP domain test, perform user role authentication based on HWTACACS scheme tac.

<Sysname> system-view

[Sysname] super authentication-mode scheme

[Sysname] domain test

[Sysname-isp-test] authentication super hwtacacs-scheme tac

Related commands

·          authentication default

·          hwtacacs scheme

·          radius scheme

authorization command

Use authorization command to specify command authorization methods.

Use undo authorization command to restore the default.

Syntax

authorization command { hwtacacs-scheme hwtacacs-scheme-name [ local ] [ none ] | local [ none ] | none }

undo authorization command

Default

The default authorization methods of the ISP domain are used for command authorization.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authorization.

none: Does not perform authorization. The authorization server does not verify whether the entered commands are permitted by the user role. The commands are executed successfully if the user role has permission to the commands.

Usage guidelines

Command authorization restricts login users to execute only authorized commands by employing an authorization server to verify whether or not each entered command is permitted.

When local command authorization is configured, the device compares each entered command with the user's configuration on the device. The command is executed only when it is permitted by the user's authorized user role.

The commands that can be executed are controlled by both the access permission of user roles and command authorization of the authorization server. Access permission only controls whether the authorized user roles have access to the entered commands, but it does not control whether the user roles have obtained authorization to these commands. If a command is permitted by the access permission but denied by command authorization, this command cannot be executed.

You can specify one primary command authorization method and multiple backup command authorization methods.

When the default authorization method is invalid, the device attempts to use the backup authorization methods in sequence. For example, the authorization command hwtacacs-scheme hwtacacs-scheme-name local none command specifies the default HWTACACS authorization method and two backup methods (local authorization and no authorization). The device performs HWTACACS authorization by default and performs local authorization when the HWTACACS server is invalid. The device does not perform command authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, configure the device to perform local command authorization.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization command local

# In ISP domain test, perform command authorization based on HWTACACS scheme hwtac and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization command hwtacacs-scheme hwtac local

Related commands

·          command authorization (Fundamentals Command Reference)

·          hwtacacs scheme

·          local-user

authorization default

Use authorization default to specify default authorization methods for an ISP domain.

Use undo authorization default to restore the default.

Syntax

authorization default { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo authorization default

Default

The default authorization method of an ISP domain is local.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authorization.

none: Does not perform authorization. The following default authorization information applies after users pass authentication:

·          Non-login users can access the network.

·          Login users obtain the level-0 user role. For more information about the level-0 user role, see RBAC configuration in Fundamentals Configuration Guide.

·          The working directory for FTP, SFTP, and SCP login users is the root directory of the NAS. However, the users do not have permission to access the root directory.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The default authorization methods are used for all users that support these methods and do not have an authorization method configured.

The RADIUS authorization configuration takes effect only when the authentication method and authorization method of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the default authorization method is invalid, the device attempts to use the backup authorization methods in sequence. For example, the authorization default radius-scheme radius-scheme-name local none command specifies the default RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, use RADIUS scheme rd as the primary default authorization method and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization default radius-scheme rd local

Related commands

·          hwtacacs scheme

·          local-user

·          radius scheme

authorization ike

Use authorization ike to specify authorization methods for IKE extended authentication.

Use undo authorization ike to restore the default.

Syntax

authorization ike { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authorization ike

Default

The default authorization methods of the ISP domain are used for IKE extended authentication.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authorization.

none: Does not perform authorization.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The RADIUS authorization configuration takes effect only when authentication and authorization methods of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authorization ike radius-scheme radius-scheme-name local none command specifies one primary RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authorization for IKE extended authentication.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization ike local

Related commands

·          authorization default

·          local-user

authorization lan-access

Use authorization lan-access to specify authorization methods for LAN users.

Use undo authorization lan-access to restore the default.

Syntax

authorization lan-access { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authorization lan-access

Default

The default authorization methods of the ISP domain are used for LAN users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authorization.

none: Does not perform authorization. An authenticated LAN user directly accesses the network.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The RADIUS authorization configuration takes effect only when authentication and authorization methods of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authorization lan-access radius-scheme radius-scheme-name local none command specifies a primary RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authorization for LAN users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization lan-access local

# In ISP domain test, perform RADIUS authorization for LAN users based on scheme rd and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization lan-access radius-scheme rd local

Related commands

·          authorization default

·          local-user

·          radius scheme

authorization login

Use authorization login to specify authorization methods for login users.

Use undo authorization login to restore the default.

Syntax

authorization login { hwtacacs-scheme hwtacacs-scheme-name [ radius-scheme radius-scheme-name ] [ local ] [ none ] | local [ none ] | none | radius-scheme radius-scheme-name [ hwtacacs-scheme hwtacacs-scheme-name ] [ local ] [ none ] }

undo authorization login

Default

The default authorization methods of the ISP domain are used for login users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters.

local: Performs local authorization.

none: Does not perform authorization. The following default authorization information applies after users pass authentication:

·          Login users obtain the level-0 user role. For more information about the level-0 user role, see RBAC configuration in Fundamentals Configuration Guide.

·          The working directory for FTP, SFTP, and SCP login users is the root directory of the NAS. However, the users do not have permission to access the root directory.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The RADIUS authorization configuration takes effect only when the authentication method and authorization method of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the default authorization method is invalid, the device attempts to use the backup authorization methods in sequence. For example, the authorization login radius-scheme radius-scheme-name local none command specifies the default RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authorization for login users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization login local

# In ISP domain test, perform RADIUS authorization for login users based on scheme rd and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization login radius-scheme rd local

Related commands

·          authorization default

·          hwtacacs scheme

·          local-user

·          radius scheme

authorization portal

Use authorization portal to specify authorization methods for portal users.

Use undo authorization portal to restore the default.

Syntax

authorization portal { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authorization portal

Default

The default authorization methods of the ISP domain are used for portal users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authorization.

none: Does not perform authorization. An authenticated portal user directly accesses the network.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The RADIUS authorization configuration takes effect only when the authentication method and authorization method of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the default authorization method is invalid, the device attempts to use the backup authorization methods in sequence. For example, the authorization portal radius-scheme radius-scheme-name local none command specifies the default RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authorization for portal users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization portal local

# In ISP domain test, perform RADIUS authorization for portal users based on scheme rd and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization portal radius-scheme rd local

Related commands

·          authorization default

·          local-user

·          radius scheme

authorization ppp

Use authorization ppp to specify authorization methods for PPP users.

Use undo authorization ppp to restore the default.

Syntax

authorization ppp { local [ none ] | none | radius-scheme radius-scheme-name [ local ] [ none ] }

undo authorization ppp

Default

The default authorization methods of the ISP domain are used for PPP users.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

local: Performs local authorization.

none: Does not perform authorization.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

The RADIUS authorization configuration takes effect only when the authentication method and authorization method of the ISP domain use the same RADIUS scheme.

You can specify one primary authorization method and multiple backup authorization methods.

When the primary method is invalid, the device attempts to use the backup methods in sequence. For example, the authorization ppp radius-scheme radius-scheme-name local none command specifies a primary RADIUS authorization method and two backup methods (local authorization and no authorization). The device performs RADIUS authorization by default and performs local authorization when the RADIUS server is invalid. The device does not perform authorization when both of the previous methods are invalid.

Examples

# In ISP domain test, perform local authorization for PPP users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization ppp local

# In ISP domain test, perform RADIUS authorization for PPP users based on scheme rd and use local authorization as the backup.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization ppp radius-scheme rd local

Related commands

·          authorization default

·          local-user

·          radius scheme

authorization-attribute (ISP domain view)

Use authorization-attribute to configure authorization attributes for users in an ISP domain.

Use undo authorization-attribute to restore the default of an authorization attribute.

Syntax

authorization-attribute { acl acl-number | idle-cut minute [ flow ] | igmp max-access-number number | ip-pool pool-name | ipv6-pool ipv6-pool-name | ipv6-prefix ipv6-prefix prefix-length | mld max-access-number number | { primary-dns | secondary-dns } { ip ipv4-address | ipv6 ipv6-address } | session-timeout minutes | url url-string | user-group user-group-name | user-profile profile-name }

undo authorization-attribute { acl | idle-cut | igmp | ip-pool | ipv6-pool | ipv6-prefix | mld | primary-dns | secondary-dns | session-timeout | url | user-group | user-profile }

Default

No authorization attributes are configured for users in an ISP domain and the idle cut feature is disabled.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

acl acl-number: Specifies an ACL to filter traffic for users. The value range for the acl-number argument is 2000 to 5999. Typically, the attribute applies to authenticated users. If you configure the attribute in a portal preauthentication domain, the ACL applies before portal authentication. This option is applicable only to LAN and portal users.

idle-cut minute: Sets an idle timeout period in minutes. The value range for the minute argument is 1 to 600.

flow: Specifies the minimum traffic that must be generated in the idle timeout period in bytes. The value range is 1 to 10240000, and the default value is 10240.

igmp max-access-number number: Specifies the maximum number of IGMP groups that an IPv4 user can join concurrently. The value range for the number argument is 1 to 64. This option is applicable only to portal and PPP users.

ip-pool pool-name: Specifies an IPv4 address pool for users. The pool-name argument is a case-insensitive string of 1 to 63 characters. This option is applicable only to portal and PPP users.

ipv6-pool ipv6-pool-name: Specifies an IPv6 address pool for users. The ipv6-pool-name argument is a case-insensitive string of 1 to 63 characters. This option is applicable only to portal and PPP users.

ipv6-prefix ipv6-prefix prefix-length: Specifies an IPv6 address prefix for users. The value range for the ipv6-prefix prefix-length argument is 1 to 128. This option is applicable only to PPP users.

mld max-access-number number: Specifies the maximum number of MLD groups that an IPv6 user can join concurrently. The value range for the number argument is 1 to 64. This option is applicable only to portal and PPP users.

primary-dns ip ipv4-address: Specifies the IPv4 address of the primary DNS server for users. This option is applicable only to PPP users.

primary-dns ipv6 ipv6-address: Specifies the IPv6 address of the primary DNS server for users. This option is applicable only to PPP users.

secondary-dns ip ipv4-address: Specifies the IPv4 address of the secondary DNS server for users. This option is applicable only to PPP users.

secondary-dns ipv6 ipv6-address: Specifies the IPv6 address of the secondary DNS server for users. This option is applicable only to PPP users.

session-timeout minutes: Specifies the session timeout timer for users, in minutes. The value range for the minutes argument is 1 to 4294967295. The device logs off a user when the user's session timeout timer expires. This option is applicable only to PPP, portal, and LAN users.

url url-string: Specifies the URL to which PPP users are redirected after they pass authentication. The url-string argument is a case-sensitive string of 1 to 255 characters. This option is applicable only to PPP users.

user-group user-group-name: Specifies a user group for users. The user-group-name argument is a case-insensitive string of 1 to 32 characters. Authenticated users obtain all attributes of the user group.

user-profile profile-name: Specifies an authorization user profile. The profile-name argument is a case-sensitive string of 1 to 31 characters. Typically, the attribute applies to authenticated users. If you configure the attribute in a portal preauthentication domain, the user profile applies before portal authentication. This option is applicable only to LAN, portal, and PPP users.

Usage guidelines

When the idle cut feature is configured, the device periodically detects the traffic of each online user. The device logs out users that do not meet the minimum traffic requirement in the idle timeout period. When the idle cut feature is disabled on the device, the idle cut feature of the server takes effect. The server considers a user idle if the user's traffic is less than 10240 bytes in a configurable idle timeout period.

If the server or NAS does not authorize any attributes to an authenticated user, the device authorizes the attributes in the ISP domain to the user.

You can configure multiple authorization attributes for users in an ISP domain. If you execute the command multiple times with the same attribute specified, the most recent configuration takes effect.

Examples

# Configure the idle cut feature for users in ISP domain test.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] authorization-attribute idle-cut 30 10240

Related commands

display domain

basic-service-ip-type

Use basic-service-ip-type to specify the types of IP addresses that PPPoE users must rely on to use the basic services.

Use undo basic-service-ip-type to restore the default.

Syntax

basic-service-ip-type { ipv4 | ipv6 | ipv6-pd } *

undo basic-service-ip-type

Default

PPPoE users do not rely on any types of IP addresses to use the basic services.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

ipv4: Specifies the IPv4 address type.

ipv6: Specifies the IPv6 address type.

ipv6-pd: Specifies the IPv6-PD address type. This type of IPv6 addresses are generated based on the DHCPv6 server-assigned prefix.

Usage guidelines

This command takes effect only when the device acts as a PPPoE server.

A PPPoE user might request multiple services of different IP address types. By default, the device logs off a PPPoE user if the user does not obtain the types of IP addresses required by all services. This command enables the device to allow the user to come online if the user has obtained IP addresses of all the specified types for the basic services.

The device does not allow a PPPoE user to come online if the user does not obtain IP addresses of all the specified types for the basic services. For example, if you execute the basic-service-ip-type ipv6 command, the device does not allow a PPPoE user to come online if the user does not obtain an IPv6 address.

Examples

# In ISP domain test, specify PPPoE users to rely on IPv4 addresses to use the basic services.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] basic-service-ip-type ipv4

dhcpv6-follow-ipv6cp

Use dhcpv6-follow-ipv6cp to set the DHCPv6 request timeout timer for PPPoE users.

Use undo dhcpv6-follow-ipv6cp to restore the default.

Syntax

dhcpv6-follow-ipv6cp timeout delay-time

undo dhcpv6-follow-ipv6cp

Default

The DHCPv6 request timeout timer for PPPoE users is 60 seconds.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

timeout delay-time: Specifies the DHCPv6 request timeout timer, in the range of 30 to 120 seconds.

Usage guidelines

This command takes effect only when the device acts as a PPPoE server.

After the device finishes IPv6CP negotiation with a PPPoE user, PPP instructs DHCPv6 to assign an IPv6 address to the user. The user cannot come online if the IP address assignment fails within the DHCPv6 request timeout timer and the user basic services rely on an IPv6 address.

As a best practice, increase the DHCPv6 request timeout timer in the following situations:

·          The network communication is unstable.

·          The ISP domain serves a large number of PPPoE users.

Examples

# In ISP domain test, set the DHCPv6 request timeout timer to 90 seconds for PPPoE users.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] dhcpv6-follow-ipv6cp timeout 90

Related commands

basic-service-ip-type

display domain

Use display domain to display ISP domain configuration.

Syntax

display domain [ isp-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

isp-name: Specifies an ISP domain by its name, a case-insensitive string of 1 to 255 characters. If you do not specify an ISP domain, this command displays the configuration of all ISP domains.

Examples

# Display the configuration of all ISP domains.

<Sysname> display domain

Total 2 domains

 

Domain: system

  State: Active

  Default authentication scheme:  Local

  Default authorization  scheme:  Local

  Default accounting     scheme:  Local

  Accounting start failure action: Online

  Accounting update failure action: Online

  Accounting quota out action: Offline

  Service type: HSI

  Session time: Exclude idle time

  DHCPv6-follow-IPv6CP timeout: 60 seconds

  Authorization attributes :

    Idle-cut: Disabled

    Session timeout: Disabled

    IGMP access number: 4

    MLD access number:  4

 

Domain: dm

  State: Active

  Login   authentication scheme:  RADIUS=rad

  Login   authorization  scheme:  HWTACACS=hw

  Super   authentication scheme:  RADIUS=rad

  PPP     accounting     scheme:  RADIUS=r1, (RADIUS=r2), HWTACACS=tc, Local

  Command authorization  scheme:  HWTACACS=hw

  LAN access authentication scheme:  RADIUS=r4

  Portal  authentication scheme:  LDAP=ldp

  Default authentication scheme:  LDAP=rad, Local, None

  Default authorization  scheme:  Local

  Default accounting     scheme:  None

  Accounting start failure action: Online

  Accounting update failure action: Online

  Accounting quota out action: Offline

  ITA service poilcy: ita1

  Service type: HSI

  Session time: Include idle time

  User basic service IP type: IPv4 IPv6 IPv6-PD

  DHCPv6-follow-IPv6CP timeout: 60 seconds

  Authorization attributes :

    Idle-cut : Enabled

      Idle timeout: 2 minutes

      Flow: 10240 bytes

    Session timeout: 34 minutes

    IP pool: appy

    User profile: test

    ACL number: 3000

    User group: ugg

    IPv6 prefix: 1::1/34

    IPv6 pool: ipv6pool

    Primary DNS server: 6.6.6.6

    Secondary DNS server: 3.6.2.3

    URL: http://portal

    IGMP access number: 12

    MLD access number: 35

 

Default domain name: system

Table 1 Command output

Field

Description

Domain

ISP domain name.

State

Status of the ISP domain.

Default authentication scheme

Default authentication method.

Default authorization scheme

Default authorization method.

Default accounting scheme

Default accounting method.

Accounting start failure action

Access control for users that encounter accounting-start failures:

·         OnlineAllows the users to stay online.

·         Offline—Logs off the users.

Accounting update failure max-times

Maximum number of consecutive accounting-update failures allowed by the device for each user in the domain.

Accounting update failure action

Access control for users that have failed all their accounting-update attempts:

·         OnlineAllows the users to stay online.

·         Offline—Logs off the users.

Accounting quota out action

Access control for users that have used up their data quotas:

·         OnlineAllows the users to stay online.

·         Offline—Logs off the users.

ITA service policy

ITA policy applied to the ISP domain.

Service type

Service type of the ISP domain, including HSI, STB, and VoIP.

Session time

Online duration sent to the server for users that went offline due to connection failure or malfunction:

·         Include idle time—The online duration includes the idle timeout period.

·         Exclude idle time—The online duration does not include the idle timeout period.

User basic service IP type

Types of IP addresses that PPPoE users rely on to use the basic services:

·         IPv4.

·         IPv6.

·         IPv6-PD.

DHCPv6-follow-IPv6CP timeout

DHCPv6 request timeout timer (in seconds) that starts after IPv6CP negotiation for PPPoE users.

Login authentication scheme

Authentication method for login users.

Login authorization scheme

Authorization method for login users.

Login accounting scheme

Accounting method for login users.

Authorization attributes

Authorization attributes for users in the ISP domain.

Idle-cut

Idle cut feature status:

·         Enabled—The feature is enabled. The device logs off users that do not meet the minimum traffic requirements in an idle timeout period.

·         Disabled—The feature is disabled. It is the default idle cut state.

Idle timeout

Idle timeout period, in minutes.

Flow

Minimum traffic that a login user must generate in an idle timeout period, in bytes.

Session timeout

Session timeout timer for users, in minutes.

IP pool

Name of the IPv4 address pool authorized to users.

User profile

Name of the authorization user profile.

ACL number

Authorization ACL for users.

User group

Authorization user group for users.

IPv6 prefix

IPv6 address prefix authorized to users.

IPv6 pool

Name of the IPv6 address pool for users.

Primary DNS server

IP address of the primary DNS server for users.

Secondary DNS server

IP address of the secondary DNS server for users.

URL

Redirect URL for users.

IGMP max access number

Maximum number of IGMP groups that an IPv4 user can join concurrently.

MLD max access number

Maximum number of MLD groups that an IPv6 user can join concurrently.

RADIUS

RADIUS scheme.

HWTACACS

HWTACACS scheme.

LDAP

LDAP scheme.

Local

Local scheme.

None

No authentication, no authorization, or no accounting.

Super authentication scheme

Authentication method for obtaining another user role without reconnecting to the device.

PPP authentication scheme

Authentication method for PPP users.

PPP authorization scheme

Authorization method for PPP users.

PPP accounting scheme

Accounting method for PPP users.

Command authorization scheme

Command line authorization method.

Command accounting scheme

Command line accounting method.

LAN access authentication scheme

Authentication method for LAN users.

LAN access authorization scheme

Authorization method for LAN users.

LAN access accounting scheme

Accounting method for LAN users.

Portal authentication scheme

Authentication method for portal users.

Portal authorization scheme

Authorization method for portal users.

Portal accounting scheme

Accounting method for portal users.

IKE authentication scheme

IKE extended authentication method.

IKE authorization scheme

Authorization method for IKE extended authentication.

 

domain

Use domain to create an ISP domain and enter its view, or enter the view of an existing ISP domain.

Use undo domain to delete an ISP domain.

Syntax

domain isp-name

undo domain isp-name

Default

A system-defined ISP domain exists. The domain name is system.

Views

System view

Predefined user roles

network-admin

Parameters

isp-name: Specifies the ISP domain name, a case-insensitive string of 1 to 255 characters. The name must meet the following requirements:

·          The name cannot contain a forward slash (/), backslash (\), vertical bar (|), quotation marks ("), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or at sign (@).

·          The name cannot be d, de, def, defa, defau, defaul, default, i, if, if-, if-u, if-un, if-unk, if-unkn, if-unkno, if-unknow, or if-unknown.

Usage guidelines

All ISP domains are in active state when they are created.

You can modify settings for the system-defined ISP domain system, but you cannot delete this domain.

An ISP domain cannot be deleted when it is the default ISP domain. Before you use the undo domain command, change the domain to a non-default ISP domain by using the undo domain default enable command.

Use short domain names to ensure that user names containing a domain name do not exceed the maximum name length required by different types of users.

Examples

# Create an ISP domain named test and enter ISP domain view.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test]

Related commands

·          display domain

·          domain default enable

·          domain if-unknown

·          state (ISP domain view)

domain default enable

Use domain default enable to specify the default ISP domain. Users without any domain name included in the usernames are considered in the default domain.

Use undo domain default enable to restore the default.

Syntax

domain default enable isp-name

undo domain default enable

Default

The default ISP domain is the system-defined ISP domain system.

Views

System view

Predefined user roles

network-admin

Parameters

isp-name: Specifies the ISP domain name, a case-insensitive string of 1 to 255 characters. The ISP domain must already exist.

Usage guidelines

The system has only one default ISP domain.

An ISP domain cannot be deleted when it is the default ISP domain. Before you use the undo domain command, change the domain to a non-default ISP domain by using the undo domain default enable command.

Examples

# Create an ISP domain named test, and configure the domain as the default ISP domain.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] quit

[Sysname] domain default enable test

Related commands

·          display domain

·          domain

domain if-unknown

Use domain if-unknown to specify an ISP domain that accommodates users that are assigned to nonexistent domains.

Use undo domain if-unknown to restore the default.

Syntax

domain if-unknown isp-domain-name

undo domain if-unknown

Default

No ISP domain is specified to accommodate users that are assigned to nonexistent domains.

Views

System view

Predefined user roles

network-admin

Parameters

isp-domain-name: Specifies the ISP domain name, a case-insensitive string of 1 to 255 characters. The name must meet the following requirements:

·          The name cannot contain a forward slash (/), backslash (\), vertical bar (|), quotation marks ("), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or at sign (@).

·          The name cannot be d, de, def, defa, defau, defaul, default, i, if, if-, if-u, if-un, if-unk, if-unkn, if-unkno, if-unknow, or if-unknown.

Usage guidelines

The device chooses an authentication domain for each user in the following order:

1.        The authentication domain specified for the access module.

2.        The ISP domain in the username.

3.        The default ISP domain of the device.

If the chosen domain does not exist on the device, the device searches for the ISP domain that accommodates users assigned to nonexistent domains. If no such ISP domain is configured, user authentication fails.

 

 

NOTE:

Support for the authentication domain configuration depends on the access module.

 

Examples

# Specify ISP domain test to accommodate users that are assigned to nonexistent domains.

<Sysname> system-view

[Sysname] domain if-unknown test

Related commands

display domain

ita-policy

Use ita-policy to apply an ITA policy to users in an ISP domain.

Use undo ita-policy to restore the default.

Syntax

ita-policy policy-name

undo ita-policy

Default

No ITA policy is applied to users in an ISP domain.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

policy-name: Specifies an ITA policy by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

The ITA policy assigned from a RADIUS server takes precedence over the ITA policy in an ISP domain. If an ISP domain user has been assigned an ITA policy from the RADIUS server, the ITA policy of the ISP domain does not take effect. The server-assigned ITA policy might not even exist on the device.

Examples

# Apply ITA policy ita1 to users in ISP domain test.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] ita-policy ita1

Related commands

ita policy

nas-id bind vlan

Use nas-id bind vlan to bind a NAS-ID with a VLAN.

Use undo nas-id bind vlan to remove a NAS-ID and VLAN binding.

Syntax

nas-id nas-identifier bind vlan vlan-id

undo nas-id nas-identifier bind vlan vlan-id

Default

No NAS-ID and VLAN bindings exist.

Views

NAS-ID profile view

Predefined user roles

network-admin

Parameters

nas-identifier: Specifies a NAS-ID, a case-sensitive string of 1 to 31 characters.

vlan-id: Specifies a VLAN ID in the range of 1 to 4094.

Usage guidelines

You can configure multiple NAS-ID and VLAN bindings in a NAS-ID profile.

A NAS-ID can be bound with more than one VLAN, but a VLAN can be bound with only one NAS-ID. If you configure multiple bindings for the same VLAN, the most recent configuration takes effect.

Examples

# Bind NAS-ID 222 with VLAN 2 in NAS-ID profile aaa.

<Sysname> system-view

[Sysname] aaa nas-id profile aaa

[Sysname-nas-id-prof-aaa] nas-id 222 bind vlan 2

Related commands

aaa nas-id profile

service-type (ISP domain view)

Use service-type to specify the service type for users in an ISP domain.

Use undo service-type to restore the default.

Syntax

service-type { hsi | stb | voip }

undo service-type

Default

The service type is hsi for users in an ISP domain.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

hsi: Specifies the High-Speed Internet (HSI) service.

stb: Specifies the Set Top Box (STB) service.

voip: Specifies the Voice over IP (VoIP) service.

Usage guidelines

You can configure only one service type for an ISP domain.

When the HSI service is specified, the multicast feature of the access module is disabled to save system resources.

When the STB service is specified, the multicast feature of the access module is enabled to improve the performance of the multicast module.

When the VoIP service is specified, the QoS module increases the priority of voice traffic to reduce the transmission delay for IP phone users.

For 802.1X and PPP (non-PPPoE) users, the system uses the HSI service forcibly even if the STB or VoIP service is specified.

Examples

# Specify the STB service for users in ISP domain test.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] service-type stb

session-time include-idle-time

Use session-time include-idle-time to configure the device to include the idle timeout period in the user online duration sent to the server.

Use undo session-time include-idle-time to restore the default.

Syntax

session-time include-idle-time

undo session-time include-idle-time

Default

The device excludes the idle timeout period from the user online duration sent to the server.

Views

ISP domain view

Predefined user roles

network-admin

Usage guidelines

Whether to configure the device to include the idle timeout period in the user online duration sent to the server, depending on the network accounting policy. The idle timeout period is authorized by the server after users pass authentication. For portal users, the idle timeout period set by using the portal [ ipv6 ] user-detect command takes priority over the idle timeout period authorized by the server.

If the user goes offline due to connection failure or malfunction, the user online duration sent to the server is not the same as the actual online duration.

·          If the session-time include-idle-time command is used, the device adds the idle timeout period to the actual online duration. The online duration sent to the server is longer than the actual online duration of the user.

·          If the undo session-time include-idle-time command is used, the device excludes the idle timeout period from the actual online duration. The online duration sent to the server is shorter than the actual online duration of the user.

Examples

# Configure the device to include the idle timeout period in the online duration sent to the server for the users in ISP domain test.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] session-time include-idle-time

Related commands

display domain

state (ISP domain view)

Use state to set the status of an ISP domain.

Use undo state to restore the default.

Syntax

state { active | block }

undo state

Default

An ISP domain is in active state.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

active: Places the ISP domain in active state to allow the users in the ISP domain to request network services.

block: Places the ISP domain in blocked state to prevent users in the ISP domain from requesting network services.

Usage guidelines

By blocking an ISP domain, you disable users of the domain from requesting network services. The online users are not affected.

Examples

# Place ISP domain test in blocked state.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] state block

Related commands

display domain

user-address-type

Use user-address-type to specify the user address type in the ISP domain.

Use undo user-address-type to restore the default.

Syntax

user-address-type { ds-lite | ipv6 | nat64 | private-ds | private-ipv4 | public-ds | public-ipv4 }

undo user-address-type

Default

No user address type is specified for the ISP domain.

Views

ISP domain view

Predefined user roles

network-admin

Parameters

ds-lite: Specifies the DS-Lite address type.

ipv6: Specifies the IPv6 address type.

nat64: Specifies the NAT64 address type.

private-ds: Specifies the private-DS address type.

private-ipv4: Specifies the private IPv4 address type.

public-ds: Specifies the public-DS address type.

public-ipv4: Specifies the public IPv4 address type.

Usage guidelines

Any change to the user address type does not affect online users.

Examples

# Specify the private-DS address type for users in ISP domain test.

<Sysname> system-view

[Sysname] domain test

[Sysname-isp-test] user-address-type private-ds

Related commands

display domain

Local user commands

access-limit

Use access-limit to set the maximum number of concurrent logins using the local user name.

Use undo access-limit to restore the default.

Syntax

access-limit max-user-number

undo access-limit

Default

The number of concurrent logins using the local user name is not limited.

Views

Local user view

Predefined user roles

network-admin

Parameters

max-user-number: Specifies the maximum number of concurrent logins, in the range of 1 to 1024.

Usage guidelines

This command takes effect only when local accounting is configured for the local user. The command does not apply to FTP, SFTP, or SCP users. These users do not support accounting.

Examples

# Set the maximum number of concurrent logins to 5 for the local user account named abc.

<Sysname> system-view

[Sysname] local-user abc

[Sysname-luser-manage-abc] access-limit 5

Related commands

display local-user

authorization-attribute (local user view/user group view)

Use authorization-attribute to configure authorization attributes for a local user or user group. After the local user or a local user in the user group passes authentication, the device assigns these attributes to the user.

Use undo authorization-attribute to restore the default of an authorization attribute.

Syntax

authorization-attribute { acl acl-number | callback-number callback-number | idle-cut minute | ip ipv4-address | ip-pool ipv4-pool-name | ipv6 ipv6-address | ipv6-pool ipv6-pool-name | ipv6-prefix ipv6-prefix prefix-length | { primary-dns | secondary-dns } { ip ipv4-address | ipv6 ipv6-address } | session-timeout minutes | url url-string | user-profile profile-name | user-role role-name | vlan vlan-id | work-directory directory-name } *

undo authorization-attribute { acl | callback-number | idle-cut | ip | ip-pool | ipv6 | ipv6-pool | ipv6-prefix | primary-dns | secondary-dns | session-timeout | url | user-profile | user-role role-name | vlan | work-directory } *

Default

The working directory for FTP, SFTP, and SCP users is the root directory of the NAS. However, the users do not have permission to access the root directory.

The local users created by a network-admin or level-15 user are assigned the network-operator user role.

Views

Local user view

User group view

Predefined user roles

network-admin

Parameters

acl acl-number: Specifies an authorization ACL. The value range for the acl-number argument is 2000 to 5999. After passing authentication, a local user can access the network resources specified by this ACL.

callback-number callback-number: Specifies an authorized PPP callback number. The callback-number argument is a case-sensitive string of 1 to 64 characters. After a local user passes authentication, the device uses this number to call the user.

idle-cut minute: Sets an idle timeout period in minutes. The value range for the minute argument is 1 to 120. The device logs off an online user if the user's idle period exceeds the specified idle timeout period.

ip ipv4-address: Assigns a static IPv4 address to the user after it passes authentication.

ip-pool ipv4-pool-name: Specifies an IPv4 address pool for the user. The ipv4-pool-name argument is a case-insensitive string of 1 to 63 characters.

ipv6 ipv6-address: Assigns a static IPv6 address to the user after it passes authentication.

ipv6-pool ipv6-pool-name: Specifies an IPv6 address pool for the user. The ipv6-pool-name argument is a case-insensitive string of 1 to 63 characters.

ipv6-prefix ipv6-prefix prefix-length: Specifies an IPv6 address prefix for the user. The value range for the prefix-length argument is 1 to 128.

primary-dns ip ipv4-address: Specifies the IPv4 address of the primary DNS server for the user.

primary-dns ipv6 ipv6-address: Specifies the IPv6 address of the primary DNS server for the user.

secondary-dns ip ipv4-address: Specifies the IPv4 address of the secondary DNS server for the user.

secondary-dns ipv6 ipv6-address: Specifies the IPv6 address of the secondary DNS server for the user.

session-timeout minutes: Sets the session timeout timer for the user, in minutes. The value range for the minutes argument is 1 to 1440. The device logs off the user after the timer expires.

url url-string: Specifies the URL to which the user is redirected after it passes authentication. The url-string argument is a case-sensitive string of 1 to 255 characters.

user-profile profile-name: Specifies an authorization user profile by its name. The profile-name argument is a case-sensitive string of 1 to 31 characters. The name can contain only letters, digits, and underscores (_). The user profile restricts the behavior of authenticated users. For more information, see Security Configuration Guide.

user-role role-name: Specifies an authorized user role. The role-name argument is a case-sensitive string of 1 to 63 characters. Up to 64 user roles can be specified for a user. For user role-related commands, see Fundamentals Command Reference for RBAC commands. This option is available only in local user view, and is not available in user group view.

vlan vlan-id: Specifies an authorized VLAN. The value range for the vlan-id argument is 1 to 4094. After passing authentication and being authorized a VLAN, a local user can access only the resources in this VLAN.

work-directory directory-name: Specifies the working directory for FTP, SFTP, or SCP users. The directory-name argument is a case-insensitive string of 1 to 255 characters. The directory must already exist.

Usage guidelines

Configure authorization attributes according to the application environments and purposes. Support for authorization attributes depends on the service types of users.

·          For PPP users, only the following authorization attributes take effect: callback-number, idle-cut, ip, ip-pool, ipv6-pool, ipv6-prefix, primary-dns, secondary-dns, session-timeout, url, and user-profile.

·          For portal users, only the following authorization attributes take effect: acl, idle-cut, ip-pool, ipv6-pool, session-timeout, and user-profile.

·          For LAN users, only the following authorization attributes take effect: acl, idle-cut, session-timeout, user-profile, and vlan.

·          For Telnet and terminal users, only the user-role and work-directory authorization attributes take effect.

·          For HTTP and HTTPS users, only the user-role authorization attribute takes effect.

·          For SSH and FTP users, only the user-role and work-directory authorization attributes take effect.

·          For IKE users, only the ip-pool authorization attribute takes effect.

·          For other types of local users, no authorization attribute takes effect.

Authorization attributes configured for a user group are intended for all local users in the group. You can group local users to improve configuration and management efficiency. An authorization attribute configured in local user view takes precedence over the same attribute configured in user group view.

To make sure FTP, SFTP, and SCP users can access the directory after an IRF master/subordinate switchover, do not specify slot information for the working directory.

To make sure the user has only the user roles authorized by this command, use the undo authorization-attribute user-role command to remove the default user role.

The security-audit user role has access to the commands for managing security log files and security log file system. To display all the accessible commands of the security-audit user role, use the display role name security-audit command. For more information about security log management, see Network Management and Monitoring Configuration Guide. For more information about file system management, see Fundamentals Configuration Guide.

You cannot delete a local user if the local user is the only user that has the security-audit user role.

The security-audit user role is mutually exclusive with other user roles.

·          When you assign the security-audit user role to a local user, the system requests confirmation for deleting all the other user roles of the user.

·          When you assign other user roles to a local user that has the security-audit user role, the system requests confirmation for deleting the security-audit user role for the local user.

Examples

# Configure the authorized VLAN of network access user abc as VLAN 2.

<Sysname> system-view

[Sysname] local-user abc class network

[Sysname-luser-network-abc] authorization-attribute vlan 2

# Configure the authorized VLAN of user group abc as VLAN 3.

<Sysname> system-view

[Sysname] user-group abc

[Sysname-ugroup-abc] authorization-attribute vlan 3

# Assign the security-audit user role to device management user xyz as the authorized user role.

<Sysname> system-view

[Sysname] local-user xyz class manage

[Sysname-luser-manage-xyz] authorization-attribute user-role security-audit

This operation will delete all other roles of the user. Are you sure? [Y/N]:y

Related commands

·          display local-user

·          display user-group

bind-attribute

Use bind-attribute to configure binding attributes for a local user.

Use undo bind-attribute to remove binding attributes of a local user.

Syntax

bind-attribute { call-number call-number [ : subcall-number ] | ip ip-address | location interface interface-type interface-number | mac mac-address | vlan vlan-id } *

undo bind-attribute { call-number | ip | location | mac | vlan } *

Default

No binding attributes are configured for a local user.

Views

Local user view

Predefined user roles

network-admin

Parameters

call-number call-number: Specifies a calling number for PPP user authentication. The call-number argument is a string of 1 to 64 characters. This option applies only to PPP users.

subcall-number: Specifies the subcalling number. The total length of the calling number and the subcalling number cannot be more than 62 characters.

ip ip-address: Specifies the IP address to which the user is bound. This option applies only to 802.1X users.

location interface interface-type interface-number: Specifies the interface to which the user is bound. The interface-type argument represents the interface type, and the interface-number argument represents the interface number. To pass authentication, the user must access the network through the bound interface. This option applies only to LAN, portal, and PPP users.

mac mac-address: Specifies the MAC address of the user in the format H-H-H. This option applies only to LAN, portal, and PPP users.

vlan vlan-id: Specifies the VLAN to which the user belongs. The vlan-id argument is in the range of 1 to 4094. This option applies only to LAN, portal, and PPP users.

Usage guidelines

To perform local authentication of a user, the device matches the actual user attributes with the configured binding attributes. If the user has a non-matching attribute or lacks a required attribute, the user will fail authentication.

Binding attribute check takes effect on all access services. Configure the binding attributes for a user based on the access services and make sure the device can obtain all attributes to be checked from the user's packets. For example, you can configure an IP address binding for an 802.1X user, because 802.1X authentication can include the user's IP address in the authentication packets. However, you cannot configure IP address bindings for MAC authentication users, because MAC authentication does not use IP addresses.

The binding interface type must meet the requirements of the local user. Configure the binding interface based on the service type of the user.

·          If the user is an 802.1X user, specify the 802.1X-enabled Layer 2 Ethernet interface through which the user accesses the device.

·          If the user is a MAC authentication user, specify the MAC authentication-enabled Layer 2 Ethernet interface through which the user accesses the device.

·          If the user is a portal user, specify the portal-enabled interface through which the user accesses the device. Specify the Layer 2 Ethernet interface if portal is enabled on a VLAN interface and the portal roaming enable command is not configured.

Examples

# Bind IP address 3.3.3.3 with network access user abc.

<Sysname> system-view

[Sysname] local-user abc class network

[Sysname-luser-network-abc] bind-attribute ip 3.3.3.3

Related commands

display local-user

company

Use company to specify the company of a local guest.

Use undo company to restore the default.

Syntax

company company-name

undo company

Default

No company is specified for a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

company-name: Specifies the company name, a case-sensitive string of 1 to 255 characters.

Examples

# Specify company yyy for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] company yyy

description

Use description to configure a description for a network access user.

Use undo description to restore the default.

Syntax

description text

undo description

Default

No description is configured for a network access user.

Views

Network access user view

Predefined user roles

network-admin

Parameters

text: Configures a description, a case-sensitive string of 1 to 255 characters.

Examples

# Configure a description for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] description Manager of MSC company

# Configure a description for network access user 123.

<Sysname> system-view

[Sysname] local-user 123 class network

[Sysname-luser-network-123] description Manager of MSC company

Related commands

display local-user

display local-guest waiting-approval

Use display local-guest waiting-approval to display pending registration requests for local guests.

Syntax

display local-guest waiting-approval [ user-name user-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

user-name user-name: Specifies a local guest by the user name, a case-sensitive string of 1 to 55 characters. The user name cannot be a, al, or all, and cannot contain the following items:

·          A domain name.

·          Any of the following characters: forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), and at sign (@).

If you do not specify a guest, this command displays pending registration requests for all local guests.

Usage guidelines

On the Web registration page, users submit local guest registration requests for approval. The guest manager can add supplementary information to the guest accounts and approves the requests. The device then creates local guest accounts based on the approved requests.

Examples

# Display all pending registration requests for local guests.

<Sysname> display local-guest waiting-approval

Total 1 guest informations matched.

 

Guest user Smith:

  Full name  : Smith Li

  Company    : YYY

  Email      : Smith@yyy.com

  Phone      : 139189301033

  Description: The employee of YYY company

Table 2 Command output

Field

Description

Total 1 guest informations matched.

Number of local guests.

Full name

Full name of the local guest.

Company

Company name of the local guest.

Email

Email address of the local guest.

Phone

Phone number of the local guest.

Description

Description of the local guest.

 

display local-user

Use display local-user to display the local user configuration and online user statistics.

Syntax

display local-user [ class { manage | network [ guest ] } | idle-cut { disable | enable } | service-type { ftp | http | https | ike | lan-access | portal | ppp | ssh | telnet | terminal } | state { active | block } | user-name user-name class { manage | network [ guest ] } | vlan vlan-id ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

class: Specifies the local user type.

manage: Device management user.

network: Network access user.

guest: Guest user account.

idle-cut { disable | enable }: Specifies local users with the idle cut feature disabled or enabled.

service-type: Specifies the local users that use a specific type of service.

ftp: FTP users.

http: HTTP users.

https: HTTPS users.

ike: IKE users that access the network through IKE extended authentication.

lan-access: LAN users that typically access the network through an Ethernet, such as 802.1X users.

portal: Portal users.

ppp: PPP users.

ssh: SSH users.

telnet: Telnet users.

terminal: Terminal users that log in through console ports.

state { active | block }: Specifies local users in active or blocked state. A local user in active state can access network services, but a local user in blocked state cannot.

user-name user-name: Specifies all local users using the specified username. The username must be a case-sensitive string of 1 to 55 characters and does not contain the domain name.

vlan vlan-id: Specifies all local users in a VLAN. The vlan-id argument is in the range of 1 to 4094.

Usage guidelines

If you do not specify any parameters, this command displays information about all local users.

Examples

# Display information about all local users.

<Sysname> display local-user

Device management user root:

 State:                    Active

 Service type:             SSH/Telnet/Terminal

 User group:               system

 Bind attributes:

 Authorization attributes:

  Work directory:          cfa0:

  User role list:          network-admin

 Password control configurations:

  Password aging:          Enabled (3 days)

Network access user jj:

 State:                    Active

 Service type:             Lan-access

 User group:               system

 Bind attributes:

  IP address:              2.2.2.2

  Location bound:          GigabitEthernet1/0/1

  MAC address:             0001-0001-0001

  VLAN ID:                 2

  Calling number:          2:2

 Authorization attributes:

  Idle timeout:            33 minutes

  Work directory:          cfa0:

  ACL number:              2000

  User profile:            pp

  User role list:          network-operator, level-0, level-3

Network access guest user user1:

  State:                     Active

  Service type:              LAN access/Portal

  User group:                guest1

  Full name:                 Jack

  Company:                   cc

  Email:                     Jack@cc.com

  Phone:                     131129237

  Description:               A guest from company cc

  Sponsor full name:         Sam

  Sponsor department:        security

  Sponsor email:             Sam@aa.com

  Validity period:

    Start date and time:     2015/04/01-08:00:00

    Expiration date and time:2015/04/03-18:00:00

Total 3 local users matched.

Table 3 Command output

Field

Description

State

Status of the local user: active or blocked.

Service type

Service types that the local user can use, including FTP, HTTP, HTTPS, IKE, LAN access, portal, PPP, SSH, Telnet, and terminal.

User group

Group to which the local user belongs.

Bind attributes

Binding attributes of the local user.

IP address

IP address of the local user.

Location bound

Binding port of the local user.

MAC address

MAC address of the local user.

VLAN ID

Binding VLAN of the local user.

Calling number

Calling number of the ISDN user.

Authorization attributes

Authorization attributes of the local user.

Idle timeout

Idle timeout period of the user, in minutes.

Callback number

Authorized PPP callback number of the local user.

Work directory

Directory that the FTP, SFTP, or SCP user can access.

ACL number

Authorization ACL of the local user.

VLAN ID

Authorized VLAN of the local user.

User profile

Authorization user profile of the local user.

User role list

Authorized roles of the local user.

IP address

IPv4 address authorized to the local user.

IPv6 address

IPv6 address authorized to the local user.

IPv6 prefix

IPv6 address prefix authorized to the local user.

IPv6 pool

IPv6 address pool authorized to the local user.

Primary DNS server

IP address of the primary DNS server for the local user.

Secondary DNS server

IP address of the secondary DNS server for the local user.

URL

Redirect URL of the local user.

Password aging

This field appears only when password aging is enabled. The aging time is displayed in parentheses.

Password length

This field appears only when password length control is enabled. The minimum password length is displayed in parentheses.

Password composition

This field appears only when password composition checking is enabled. The field also displays the following information in parentheses:

·         Minimum number of character types that the password must contain.

·         Minimum number of characters from each type in the password.

Password complexity

This field appears only when password complexity checking is enabled. The field also displays the following information in parentheses:

·         Whether the password can contain the username or the reverse of the username.

·         Whether the password can contain any character repeated consecutively three or more times.

Maximum login attempts

Maximum number of consecutive failed login attempts.

Action for exceeding login attempts

Action to take on the user that failed to log in after using up all login attempts.

Full name

Name of the local guest.

Company

Company name of the local guest.

Email

Email address of the local guest.

Phone

Phone number of the local guest.

Description

Description of the local guest.

Sponsor full name

Name of the guest sponsor.

Sponsor department

Department of the guest sponsor.

Sponsor email

Email address of the guest sponsor.

Validity period

Validity period of the local guest.

Start date and time

Date and time from which the local guest begins to take effect.

Expiration date and time

Date and time at which the local guest expires.

 

display user-group

Use display user-group to display user group configuration.

Syntax

display user-group { all | name group-name [ byod-authorization ] }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all user groups.

name group-name: Specifies a user group by its name, a case-insensitive string of 1 to 32 characters.

byod-authorization: Specifies BYOD authorization information. If you do not specify this keyword, the command does not display BYOD authorization information and only displays whether BYOD authorization attributes are configured.

Examples

# Display the configuration of all user groups.

<Sysname> display user-group all

Total 2 user groups matched.

 

User group system:

  Authorization attributes:

    Work directory:          cfa0:

  BYOD authorization attributes: Not configured

User group jj:

  Authorization attributes:

    Idle timeout:            2 minutes

    Callback number:         2:2

    Work directory:          cfa0:/

    ACL number:              2000

    VLAN ID:                 2

  User profile:            pp

  BYOD authorization attributes: Not configured

  Password control configurations:

    Password aging:          Enabled (2 days)

Table 4 Command output

Field

Description

Authorization attributes

Authorization attributes of the user group.

BYOD authorization attributes

BYOD authorization attributes of the user group.

Idle timeout

Idle timeout period, in minutes.

Callback number

Authorized PPP callback number.

Work directory

Directory that FTP, SFTP, or SCP users in the group can access.

ACL number

Authorization ACL.

VLAN ID

Authorized VLAN.

User profile

Authorization user profile.

IPv6 prefix

IPv6 address prefix authorized to the user group.

IPv6 pool

IPv6 address pool authorized to the user group.

Primary DNS server

IP address of the primary DNS server authorized to the user group.

Secondary DNS server

IP address of the secondary DNS server authorized to the user group.

URL

Redirect URL for the user group.

Password control configurations

Password control attributes that are configured for the user group.

Password aging

This field appears only when password aging is enabled. The aging time is displayed in parentheses.

Password length

This field appears only when password length control is enabled. The minimum password length is displayed in parentheses.

Password composition

This field appears only when password composition checking is enabled. The field also displays the following information in parentheses:

·         Minimum number of character types that the password must contain.

·         Minimum number of characters from each type in the password.

Password complexity

This field appears only when password complexity checking is enabled. The field also displays the following information in parentheses:

·         Whether the password can contain the username or the reverse of the username.

·         Whether the password can contain any character repeated consecutively three or more times.

Maximum login attempts

Maximum number of consecutive failed login attempts.

Action for exceeding login attempts

Action to take on the user that failed to log in after using up all login attempts.

 

email

Use email to configure the email address of a local guest.

Use undo email to restore the default.

Syntax

email email-string

undo email

Default

No email address is configured for a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

email-string: Specifies the email address for the local guest, a case-sensitive string of 1 to 255 characters. For example, sec@abc.com. The address must comply with RFC 822.

Usage guidelines

The local guest uses the email address to receive notifications from the device.

Examples

# Configure the email address as abc@yyy.com for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] email abc@yyy.com

Related commands

display local-user

full-name

Use full-name to configure the name of a local guest.

Use undo full-name to restore the default.

Syntax

full-name name-string

undo full-name

Default

No name is configured for a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

name-string: Specifies the local guest name, a case-sensitive string of 1 to 255 characters.

Examples

# Configure the name as abc Snow for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] full-name abc Snow

Related commands

display local-user

group

Use group to assign a local user to a user group.

Use undo group to restore the default.

Syntax

group group-name

undo group

Default

A local user belongs to user group system.

Views

Local user view

Predefined user roles

network-admin

Parameters

group-name: Specifies the user group name, a case-insensitive string of 1 to 32 characters.

Examples

# Assign device management user 111 to user group abc.

<Sysname> system-view

[Sysname] local-user 111 class manage

[Sysname-luser-manage-111] group abc

Related commands

display local-user

local-guest auto-delete enable

Use local-guest auto-delete enable to enable the guest auto-delete feature. This feature enables the device to automatically delete the local guest accounts when the accounts expire.

Use undo local-guest auto-delete enable to restore the default.

Syntax

local-guest auto-delete enable

undo local-guest auto-delete enable

Default

The guest auto-delete feature is disabled. The device does not automatically delete the local guest accounts when the accounts expire.

Views

System view

Predefined user roles

network-admin

Examples

# Enable the guest auto-delete feature.

<Sysname> system-view

[Sysname] local-guest auto-delete enable

Related commands

validity-datetime

local-guest email format

Use local-guest email format to configure the subject and body for the email notifications of local guest information.

Use undo local-guest email format to delete the configured subject or body for the email notifications of local guest information.

Syntax

local-guest email format to { guest | manager | sponsor } { body body-string | subject sub-string }

undo local-guest email format to { guest | manager | sponsor } { body | subject }

Default

No subject or body is configured for the email notifications of local guest information.

Views

System view

Predefined user roles

network-admin

Parameters

to: Specifies the email recipient.

guest: Specifies the local guest.

manager: Specifies the guest manager.

sponsor: Specifies the guest sponsor.

body body-string: Configures the body contents, a case-sensitive string of 1 to 255 characters.

subject sub-string: Configures the email subject, a case-sensitive string of 1 to 127 characters.

Usage guidelines

Email notifications need to be sent to notify the local guests, guest sponsors, or guest managers of the guest account information or guest registration requests. Use this command to configure the subject and body for the email notifications to be sent by the device.

You can configure one subject and one body for each email recipient. If you configure the subject or body content multiple times for the same recipient, the most recent configuration takes effect.

You must configure both the subject and body for each recipient.

Examples

# Configure the subject and body for the email notifications to send to the local guest.

<Sysname> system-view

[Sysname] local-guest email format to guest subject Guest account information

[Sysname] local-guest email format to guest body A guest account has been created for your use. The username, password, and valid dates for the account are given below.

Related commands

·          local-guest email sender

·          local-guest email smtp-server

·          local-guest manager-email

·          local-guest send-email

local-guest email sender

Use local-guest email sender to configure the email sender address in email notifications of local guests sent by the device.

Use undo local-guest email sender to restore the default.

Syntax

local-guest email sender email-address

undo local-guest email sender

Default

No email sender address is configured for the email notifications of local guests sent by the device.

Views

System view

Predefined user roles

network-admin

Parameters

email-address: Specifies the email sender address, a case-insensitive string of 1 to 255 characters.

Usage guidelines

If you do not specify an email sender address, the device cannot send email notifications.

The device supports only one email sender address. If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Specify the email sender address as abc@yyy.com for email notifications of local guests.

<Sysname> system-view

[Sysname] local-guest email sender abc@yyy.com

Related commands

·          local-guest email format

·          local-guest email smtp-server

·          local-guest manager-email

·          local-guest send-email

local-guest email smtp-server

Use local-guest email smtp-server to specify an SMTP server to send email notifications of local guests.

Use undo local-guest email smtp-server to restore the default.

Syntax

local-guest email smtp-server url-string

undo local-guest email smtp-server

Default

No SMTP server is specified to send email notifications of local guests.

Views

System view

Predefined user roles

network-admin

Parameters

url-string: Specifies the path of the SMTP server, a case-insensitive string of 1 to 255 characters. The path must comply with the standard SMTP protocol and starts with smtp://.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Specify the SMTP server at smtp://www.test.com/smtp to send email notifications of local guests.

<Sysname> system-view

[Sysname] local-guest email smtp-server smtp://www.test.com/smtp

Related commands

·          local-guest email format

·          local-guest email sender

·          local-guest manager-email

·          local-guest send-email

local-guest generate

Use local-guest generate to create local guests in batch.

Syntax

local-guest generate username-prefix name-prefix [ password-prefix password-prefix ] suffix suffix-number [ group group-name ] count user-count validity-datetime start-date start-time to expiration-date expiration-time

Views

System view

Predefined user roles

network-admin

Parameters

username-prefix name-prefix: Specifies the name prefix, a case-sensitive string of 1 to 45 characters. The prefix cannot contain any of the following characters: forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), and at sign (@).

password-prefix password-prefix: Specifies a prefix for the plaintext password. The password-prefix argument is a case-sensitive string of 1 to 53 characters. If you do not specify a password prefix, the device randomly generates passwords for the local guests.

suffix suffix-number: Specifies the start suffix number of the username and password. The suffix-number argument is a numeric string of 1 to 10 digits.

group group-name: Specifies a user group by the name. The user group name is a case-sensitive string of 1 to 32 characters. If you do not specify a user group, the guests are assigned to the system-defined user group named system.

count user-count: Specifies the number of local guests to be created. The value range for the user-count argument is 1 to 256.

validity-datetime: Specifies the validity period of the local guests.

start-date: Specifies the start date of the validity period, in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

start-time: Specifies the start time of the validity period, in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

to: Specifies the end date and time of the validity period.

expiration-date: Specifies the expiration date in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

expiration-time: Specifies the expiration time in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

Usage guidelines

Account names of batch created local guests start with the same string specified by the name prefix, and end with a different number as the suffix. The system increases the start suffix number by 1 for each new local guest created in the batch.

The device generates plaintext passwords by using the password prefix and suffix number in the same way it batch creates the local guest names.

Consider the system resources when you specify the number of local guests to create. The device might fail to create all accounts for a large batch of local guests because of insufficient resources.

If a local guest to be created has the same name as an existing local guest on the device, the new guest overrides the existing guest.

Examples

# Create 20 local guests in batch with user names abc01 through abc20 for user group visit. The validity period is 2016/06/01 00:00:00 to 2010/06/02 12:00:00.

<Sysname> system-view

[Sysname] local-guest generate username-prefix abc suffix 01 group visit count 20 validity-datetime 2016/06/01 00:00:00 to 2016/06/02 12:00:00

Related commands

·          display local-user

·          local-user

local-guest manager-email

Use local-guest manager-email to configure the email address of the guest manager.

Use undo local-guest manager-email to restore the default.

Syntax

local-guest manager-email email-address

undo local-guest manager-email

Default

No email address is configured for the guest manager.

Views

System view

Predefined user roles

network-admin

Parameters

email-address: Specifies the email address, a case-sensitive string of 1 to 255 characters. For example, sec@abc.com. The address must comply with RFC 822.

Usage guidelines

Use this command to specify the email address to which the device sends the local guest registration requests for approval.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure the email address of the guest manager as xyz@yyy.com.

<Sysname> system-view

[Sysname] local-guest manager-email xyz@yyy.com

Related commands

·          local-guest email format

·          local-guest email sender

·          local-guest email smtp-server

·          local-guest send-email

local-guest send-email

Use local-guest send-email to send emails to a local guest or guest sponsor.

Syntax

local-guest send-email user-name user-name to { guest | sponsor }

Views

User view

Predefined user roles

network-admin

Parameters

user-name user-name: Specifies a local guest by user name, a case-sensitive string of 1 to 55 characters. The name must meet the following requirements:

·          Cannot be a, al, or all.

·          Cannot contain a domain name.

·          Cannot contain any of the following characters: forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), and at sign (@).

to: Specifies the email recipient.

guest: Specifies the local guest.

sponsor: Specifies the guest sponsor.

Usage guidelines

Guest managers can use this command to inform local guests or guest sponsors of the guest password and validity period information.

Examples

# Send an email to notify local guest abc of the guest password and validity period information.

<Sysname> system-view

[Sysname] local-guest send-email user-name abc to guest

local-guest timer

Use local-guest timer to set the waiting-approval timeout timer for local guests.

Syntax

local-guest timer waiting-approval time-value

undo local-guest timer waiting-approval

Default

The setting is 24 hours.

Views

System view

Predefined user roles

network-admin

Parameters

time-value: Sets the waiting-approval timeout timer in the range of 1 to 720, in hours.

Usage guidelines

The waiting-approval timeout timer starts when the registration request of a local guest is sent for approval. If the request is not approved within the timer, the device deletes the registration request.

Examples

# Set the waiting-approval timeout timer to 12 hours.

<Sysname> system-view

[Sysname] local-guest timer waiting-approval 12

local-user

Use local-user to add a local user and enter its view, or enter the view of an existing local user.

Use undo local-user to delete local users.

Syntax

local-user user-name [ class { manage | network [ guest ] } ]

undo local-user { user-name class { manage | network } | all [ service-type { ftp | http | https | ike | lan-access | portal | ppp | ssh | telnet | terminal } | class { manage | network [ guest ] } ] }

Default

No local users exist.

Views

System view

Predefined user roles

network-admin

Parameters

user-name: Specifies the local user name, a case-sensitive string of 1 to 55 characters. The name must meet the following requirements:

·          Cannot contain a domain name.

·          Cannot contain any of the following characters: forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), and at sign (@).

·          Cannot be a, al, or all.

class: Specifies the local user type.

manage: Device management user that can configure and monitor the device after login. Device management users can use FTP, HTTP, HTTPS, Telnet, SSH, and terminal services.

network: Network access user that accesses network resources through the device. Except guests, network access users can use IKE, LAN access, portal, and PPP services.

guest: Guest that can access network resources through the device during the validity period. Guests can use LAN and portal services.

all: Specifies all users.

service-type: Specifies the local users that use a specific type of service.

ftp: FTP users.

http: HTTP users.

https: HTTPS users.

ike: IKE users that access the network through IKE extended authentication.

lan-access: LAN users that typically access the network through an Ethernet, such as 802.1X users.

portal: Portal users.

ppp: PPP users.

ssh: SSH users.

telnet: Telnet users.

terminal: Terminal users that log in through console ports.

Usage guidelines

If you do not specify the class { manage | network } option, this command adds a device management user.

Examples

# Add a device management user named user1 and enter local user view.

<Sysname> system-view

[Sysname] local-user user1 class manage

[Sysname-luser-manage-user1]

# Add a network access user named user2 and enter local user view.

<Sysname> system-view

[Sysname] local-user user2 class network

[Sysname-luser-network-user2]

# Add a local guest named user3 and enter local guest view.

<Sysname> system-view

[Sysname] local-user user3 class network guest

[Sysname-luser-network(guest)-user3]

Related commands

·          display local-user

·          service-type (local user view)

local-user-export class network guest

Use local-user-export class network guest to export local guest account information to a .csv file in the specified path.

Syntax

local-user-export class network guest url url-string

Views

System view

Predefined user roles

network-admin

Parameters

url url-string: Specifies the URL of the destination file, a case-insensitive string of 1 to 255 characters.

Usage guidelines

You can import the user account information back to the device or to other devices that support the local-user-import class network guest command. Before the import, you can edit the .csv file as needed. However, you must follow the restrictions in "local-user-import class network guest."

The device supports TFTP and FTP file transfer modes. Table 5 describes the valid URL formats of the .csv file.

Table 5 URL formats

Protocol

URL format

Description

TFTP

tftp://server/path/filename

Specify a TFTP server by IP address or hostname. For example, specify the file path as tftp://1.1.1.1/user/user.csv.

FTP

·         With FTP user name and password:
ftp://username:password@server/path/filename

·         Without FTP user name and password:
ftp://server/path/filename

Specify an FTP server by IP address or hostname.

The device ignores the domain name in the FTP user name.

For example, specify the file path as ftp://1:1@1.1.1.1/user/user.csv or ftp://1.1.1.1/user/user.csv.

 

Examples

# Export local guest account information to file guest.csv in path ftp://1.1.1.1/user/.

<Sysname> system-view

[Sysname] local-user-export class network guest url ftp://1.1.1.1/user/guest.csv

Related commands

·          display local-user

·          local-user-import class network guest

local-user-import class network guest

Use local-user-import class network guest to import local guest account information from a .csv file in the specified path to the device and create local guests based on the imported information.

Syntax

local-user-import class network guest url url-string validity-datetime start-date start-time to expiration-date expiration-time [ auto-create-group | override | start-line line-number ] *

Views

System view

Predefined user roles

network-admin

Parameters

url url-string: Specifies the source file path, a case-insensitive string of 1 to 255 characters.

validity-datetime: Specifies the guest validity period of the local guests.

start-date: Specifies the start date of the validity period, in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

start-time: Specifies the start time of the validity period, in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

to: Specifies the end date and time of the validity period.

expiration-date: Specifies the expiration date in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

expiration-time: Specifies the expiration time in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

auto-create-group: Enables the device to automatically create user groups for the imported local guests if the groups of the guests do not exist on the device. The local guests are automatically assigned to the created groups. If you do not specify this keyword, the device adds all imported local guests with nonexistent groups to the system-defined user group named system.

override: Enables the device to override the existing account with the same name as a guest account to be imported. If you do not specify this keyword, the command retains the existing account and does not import the local guest with the same name.

start-line line-number: Specifies the number of the line at which the account import begins. If you do not specify a line number, this command imports all accounts in the .csv file.

Usage guidelines

The .csv file contains multiple parameters for each account and the parameters must be strictly arranged in the following order:

·          Username—User name of the guest account. The user name is required for each account, and it must meet the following requirements:

?  Cannot contain any of the following characters: forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or at sign (@).

?  Cannot be a, al, or all.

An invalid name results in account import failure and interruption.

·          Password—Password of the guest account. If the password is empty, the device generates a random password for the guest.

·          User group—User group to which the guest belongs. If the user group is empty, the device assigns the guest to the system-defined user group system.

·          Guest full name—Name of the guest.

·          Guest company—Company of the guest.

·          Guest email—Email address of the guest.

·          Guest phone—Phone number of the guest.

·          Description—Description of the guest.

·          Sponsor full name—Name of the guest sponsor.

·          Sponsor department—Department of the guest sponsor.

·          Sponsor email—Email address of the guest sponsor.

Separate different account entries by a carriage return and separate each parameter value in an account entry by a comma (,). If the value of a parameter contains a comma (,), you must enclose the value within a pair of quotation marks ("") to avoid ambiguity. For example,

Jack,abc,visit,Jack Chen,ETP,jack@etp.com,1399899,"The manager of ETP, come from TP.",Sam Wang,Ministry of personnel,Sam@yy.com

The device supports TFTP and FTP file transfer modes. Table 6 describes the valid URL formats of the .csv file.

Table 6 URL formats

Protocol

URL format

Description

TFTP

tftp://server/path/filename

Specify a TFTP server by IP address or hostname. For example, specify the file path as tftp://1.1.1.1/user/user.csv.

FTP

·         With FTP user name and password:
ftp://username:password@server/path/filename

·         Without FTP user name and password:
ftp://server/path/filename

Specify an FTP server by IP address or hostname.

The device ignores the domain name in the FTP user name.

For example, specify the file path as ftp://1:1@1.1.1.1/user/user.csv or ftp://1.1.1.1/user/user.csv.

 

Examples

# Import guest account information from file ftp://1.1.1.1/user/guest.csv, and specify the guest validity period.

<Sysname> system-view

[Sysname] local-user-import class network guest url ftp://1.1.1.1/user/guest.csv validity-datetime 2014/10/01 00:00:00 to 2014/10/02 12:00:00

Related commands

·          display local-user

·          local-user-export class network guest

password

Use password to configure a password for a local user.

Use undo password to restore the default.

Syntax

password [ { cipher | hash | simple } string ]

undo password

Default

No password is configured for a local user. A local user can pass authentication after entering the correct username and passing attribute checks.

Views

Local user view

Predefined user roles

network-admin

Parameters

cipher: Specifies a password in encrypted form.

hash: Specifies a password encrypted by the hash algorithm.

simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password string. This argument is case sensitive.

·          The plaintext form of the password is a string of 1 to 63 characters.

·          The hashed form of the password is a string of 1 to 110 characters.

·          The encrypted form of the password is a string of 1 to 117 characters.

Usage guidelines

If you do not specify any parameters, you enter the interactive mode to set a plaintext password. Only device management users support passwords configured in interactive mode.

A non-password-protected user passes authentication if the user provides the correct username and passes attribute checks. To enhance security, configure a password for each local user.

Examples

# Set the password of device management user user1 to 123456TESTplat&! in plain text.

<Sysname> system-view

[Sysname] local-user user1 class manage

[Sysname-luser-manage-user1] password simple 123456TESTplat&!

# Set the password of device management user test in interactive mode.

<Sysname> system-view

[Sysname] local-user test class manage

[Sysname-luser-manage-test] password

Password:

Confirm :

# Set the password of network access user user2 to 123456TESTuser&! in plain text.

<Sysname> system-view

[Sysname] local-user user2 class network

[Sysname-luser-network-user2] password simple 123456TESTuser&!

Related commands

display local-user

phone

Use phone to specify the phone number of a local guest.

Use undo phone to restore the default.

Syntax

phone phone-number

undo phone

Default

No phone number is specified for a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

phone-number: Specifies the phone number, a string of 1 to 32 characters that can contain only digits and hyphens (-).

Examples

# Specify the phone number as 138-137239201 for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] phone 138-137239201

reset local-guest waiting-approval

Use reset local-guest waiting-approval to clear pending registration requests for local guests.

Syntax

reset local-guest waiting-approval [ user-name user-name ]

Views

User view

Predefined user roles

network-admin

Parameters

user-name user-name: Specifies a local guest by the user name, a case-sensitive string of 1 to 55 characters. The user name cannot contain a domain name. If you do not specify a guest, this command clears information about all registration requests for local guests.

Examples

# Clear information about all registration requests for local guests.

<Sysname> reset local-guest waiting-approval

Related commands

display local-guest waiting-approval

service-type (local user view)

Use service-type to specify the service types that a local user can use.

Use undo service-type to remove service types configured for a local user.

Syntax

service-type { ftp | ike | lan-access | { http | https | ssh | telnet | terminal } * | portal | ppp }

undo service-type { ftp | ike | lan-access | { http | https | ssh | telnet | terminal } * | portal | ppp }

Default

A local user is not authorized to use any service.

Views

Local user view

Predefined user roles

network-admin

Parameters

ftp: Authorizes the user to use the FTP service. The authorized directory can be modified by using the authorization-attribute work-directory command.

http: Authorizes the user to use the HTTP service.

https: Authorizes the user to use the HTTPS service.

ike: Authorizes the user to use the IKE extended authentication service.

lan-access: Authorizes the user to use the LAN access service. The users are typically Ethernet users, for example, 802.1X users.

ssh: Authorizes the user to use the SSH service.

telnet: Authorizes the user to use the Telnet service.

terminal: Authorizes the user to use the terminal service and log in from a console.

portal: Authorizes the user to use the Portal service.

ppp: Authorizes the user to use the PPP service.

Usage guidelines

You can assign multiple service types to a user.

Examples

# Authorize device management user user1 to use the Telnet and FTP services.

<Sysname> system-view

[Sysname] local-user user1 class manage

[Sysname-luser-manage-user1] service-type telnet

[Sysname-luser-manage-user1] service-type ftp

Related commands

display local-user

sponsor-department

Use sponsor-department to specify the department of the guest sponsor for a local guest.

Use undo sponsor-department to restore the default.

Syntax

sponsor-department department-string

undo sponsor-department

Default

No department is specified for the guest sponsor of a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

department-string: Specifies the department name, a case-sensitive string of 1 to 127 characters.

Examples

# Specify the department as test for the sponsor of local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] sponsor-department test

sponsor-email

Use sponsor-email to specify the email address of the guest sponsor for a local guest.

Use undo sponsor-email to restore the default.

Syntax

sponsor-email email-string

undo sponsor-email

Default

No email address is specified for the guest sponsor.

Views

Local guest view

Predefined user roles

network-admin

Parameters

email-string: Specifies the email address, a case-sensitive string of 1 to 255 characters. The address must comply with RFC 822.

Examples

# Specify the email address as Sam@a.com for the sponsor of local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] sponsor-email Sam@a.com

sponsor-full-name

Use sponsor-full-name to specify the sponsor name for a local guest.

Use undo sponsor-full-name to restore the default.

Syntax

sponsor-full-name name-string

undo sponsor-full-name

Default

No sponsor name is specified for a local guest.

Views

Local guest view

Predefined user roles

network-admin

Parameters

name-string: Specifies the sponsor name, a case-sensitive string of 1 to 255 characters.

Examples

# Specify the sponsor name as Sam Li for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] sponsor-full-name Sam Li

Related commands

display local-user

state (local user view)

Use state to set the status of a local user.

Use undo state to restore the default.

Syntax

state { active | block }

undo state

Default

A local user is in active state.

Views

Local user view

Predefined user roles

network-admin

Parameters

active: Places the local user in active state to allow the local user to request network services.

block: Places the local user in blocked state to prevent the local user from requesting network services.

Examples

# Place device management user user1 in blocked state.

<Sysname> system-view

[Sysname] local-user user1 class manage

[Sysname-luser-manage-user1] state block

Related commands

display local-user

user-group

Use user-group to create a user group and enter its view, or enter the view of an existing user group.

Use undo user-group to delete a user group.

Syntax

user-group group-name

undo user-group group-name

Default

A system-defined user group exists. The group name is system.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies the user group name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

A user group consists of a group of local users and has a set of local user attributes. You can configure local user attributes for a user group to implement centralized management of user attributes for the local users in the group.

A user group that has local users cannot be deleted.

You can modify settings for the system-defined user group system, but you cannot delete the user group.

Examples

# Create a user group named abc and enter user group view.

<Sysname> system-view

[Sysname] user-group abc

[Sysname-ugroup-abc]

Related commands

display user-group

validity-datetime

Use validity-datetime to specify the validity period for a local guest.

Use undo validity-datetime to restore the default.

Syntax

validity-datetime start-date start-time to expiration-date expiration-time

undo validity-datetime

Default

A local guest does not expire.

Views

Local guest view

Predefined user roles

network-admin

Parameters

start-date: Specifies the date on which the local guest becomes effective. The date is in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

start-time: Specifies the time when the local guest becomes effective. The time is in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

to: Specifies the expiration date and time for the local guest.

expiration-date: Specifies the date on which the local guest expires. The date is in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.

expiration-time: Specifies the time when the local guest expires. The time is in the format of hh:mm:ss. The value range for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.

Usage guidelines

The expiration date and time must be later than the start date and time.

Expired local guest accounts cannot be used for authentication.

Examples

# Specify the validity period for local guest abc.

<Sysname> system-view

[Sysname] local-user abc class network guest

[Sysname-luser-network(guest)-abc] validity-datetime 2014/10/01 00:00:00 to 2014/10/02 12:00:00

Related commands

display local-user

Local BYOD authorization commands

byod authorization

Use byod authorization to configure authorization attributes for a type of BYOD endpoints in a user group.

Use undo byod authorization to delete the authorization attributes for a type of BYOD endpoints in a user group.

Syntax

byod authorization device-type type-name { acl acl-number | callback-number callback-number | idle-cut minutes | ip-pool ipv4-pool-name | ipv6-pool ipv6-pool-name | ipv6-prefix ipv6-prefix prefix-length | { primary-dns | secondary-dns } { ip ipv4-address | ipv6 ipv6-address } | session-timeout minutes | url url-string | user-profile profile-name | vlan vlan-id } *

undo byod authorization device-type type-name { acl | callback-number | idle-cut | ip-pool | ipv6-pool | ipv6-prefix | primary-dns | secondary-dns | session-timeout | url | user-profile | vlan } *

Default

No authorization attributes are configured for any type of BYOD endpoints in a user group.

Views

User group view

Predefined user roles

network-admin

Parameters

device-type type-name: Specifies an endpoint type. The type-name argument is a case-insensitive string of 1 to 127 characters. If the type name contains spaces, you must enclose the type name into a pair of quotation marks (for example, "Chrome OS").

acl acl-number: Specifies an authorization ACL. The value range for the acl-number argument is 2000 to 5999. After passing authentication, a local user can access the network resources specified by this ACL.

callback-number callback-number: Specifies an authorized PPP callback number. The callback-number argument is a case-sensitive string of 1 to 64 characters. After a local user passes authentication, the device uses this number to call the user.

idle-cut minutes: Sets an idle timeout period in minutes. The value range for the minutes argument is 1 to 120. The device logs off an online user if the user's idle period exceeds the specified idle timeout period.

ip-pool ipv4-pool-name: Specifies an IPv4 address pool. The ipv4-pool-name argument is a case-insensitive string of 1 to 63 characters. After passing authentication, a local user can obtain an IP address from the pool.

ipv6-pool ipv6-pool-name: Specifies an IPv6 address pool. The ipv6-pool-name argument is a case-insensitive string of 1 to 63 characters. After passing authentication, a local user can obtain an IP address from the pool.

ipv6-prefix ipv6-prefix prefix-length: Specifies an IPv6 address prefix. The value range for the prefix-length argument is 1 to 128. After passing authentication, a local user can use the IPv6 address prefix.

primary-dns ip ipv4-address: Specifies the IPv4 address of the primary DNS server for users.

primary-dns ipv6 ipv6-address: Specifies the IPv6 address of the primary DNS server for users.

secondary-dns ip ipv4-address: Specifies the IPv4 address of the secondary DNS server for users.

secondary-dns ipv6 ipv6-address: Specifies the IPv6 address of the secondary DNS server for users.

session-timeout minutes: Sets the session timeout timer in minutes. The value range for the minutes argument is 1 to 1440. The device logs off a user after the user's session timeout timer expires.

url url-string: Specifies the URL to which a user is redirected after it passes authentication. The url-string argument is a case-sensitive string of 1 to 255 characters.

user-profile profile-name: Specifies an authorization user profile by the name. The profile-name argument is a case-sensitive string of 1 to 31 characters. The name can contain only letters, digits, and underscores (_). The user profile restricts the behavior of authenticated users. For more information, see Security Configuration Guide.

vlan vlan-id: Specifies an authorized VLAN. The value range for the vlan-id argument is 1 to 4094. After passing authentication and being authorized a VLAN, a local user can access only the resources in this VLAN.

Usage guidelines

Configure authorization attributes according to the application environments and purposes. Support for authorization attributes depends on the service types of users.

·          For PPP users, only the following authorization attributes take effect: callback-number, idle-cut, ip-pool, ipv6-pool, ipv6-prefix, primary-dns, secondary-dns, session-timeout, url, and user-profile.

·          For portal users, only the following authorization attributes take effect: acl, idle-cut, ip-pool, ipv6-pool, session-timeout, and user-profile.

·          For LAN users, only the following authorization attributes take effect: acl, session-timeout, user-profile, and vlan.

·          For other types of local users, no authorization attribute takes effect.

For a user, an endpoint type-specific authorization attribute takes precedence over the same common authorization attribute specified for the user. A common authorization attribute specified for the user takes precedence over the same common authorization attribute specified for the user group to which the user belongs. To specify common authorization attributes, use the authorization-attribute command.

Examples

# Specify VLAN 3 as the authorization VLAN for endpoints of the iPhone 6 type in user group abc.

<Sysname> system-view

[Sysname] user-group abc

[Sysname-ugroup-abc] byod authorization device-type iphone6 vlan 3

Related commands

·          display byod rule

·          display local-user

·          display user-group

byod rule

Use byod rule to configure a BYOD endpoint identification rule.

Use undo byod rule to delete a BYOD endpoint identification rule.

Syntax

byod rule { dhcp-option option-string | http-user-agent agent-string | mac-address mac-address mask mac-mask } device-type type-name

undo byod rule { dhcp-option option-string | http-user-agent agent-string | mac-address mac-address mask mac-mask }

Default

Predefined BYOD endpoint identification rules exist.

Views

System view

Predefined user roles

network-admin

Parameters

dhcp-option option-string: Specifies the DHCP Option 55 fingerprint. The option-string argument is a case-insensitive string of 1 to 255 characters. If the fingerprint contains spaces, you must enclose the fingerprint into a pair of quotation marks (for example, "Microsoft Windows 8").

http-user-agent agent-string: Specifies the HTTP user agent fingerprint. The agent-string argument is a case-insensitive string of 1 to 255 characters. If the fingerprint contains spaces, you must enclose the fingerprint into a pair of quotation marks (for example, "Apple iPod").

mac-address mac-address: Specifies the MAC address of an endpoint, in the H-H-H format. The address cannot be a multicast MAC address or an all-zero MAC address. You can omit the leading zeros in each section. For example, enter f-e2-1 to indicate 000f-00e2-0001.

mask mac-mask: Specifies the MAC address mask in the H-H-H format.

device-type type-name: Specifies an endpoint type, a case-insensitive string of 1 to 127 characters. If the type name contains spaces, you must enclose the type name into a pair of quotation marks (for example, "Chrome OS").

Usage guidelines

A BYOD endpoint identification rule defines the mapping between an endpoint type and a fingerprint string. The device obtains fingerprint information from the authentication request of an endpoint, and matches the fingerprint with the rules for the associated endpoint type.

A fingerprint string can match only one endpoint type. However, an endpoint type can be associated with multiple fingerprint strings. You can use the byod rule-order command to specify the fingerprint types supported by the device and their match priority order.

Examples

# Specify a rule to identify BYOD endpoints containing DHCP Option 55 fingerprint di2ns0ns as the iPhone 6 type.

<Sysname> system-view

[Sysname] byod rule dhcp-option di2ns0ns device-type iphone6

Related commands

·          byod authorization

·          display byod rule

byod rule-order

Use byod rule-order to specify the types of BYOD endpoint identification rules supported by the device and their priority order.

Use undo byod rule-order to restore the default.

Syntax

byod rule-order { dhcp-option | http-user-agent | mac-address } *

undo byod rule-order

Default

The device uses the following types of BYOD endpoint identification rules to identify an endpoint type and their match priority order is as follows:

1.        DHCP Option 55-based rules.

2.        HTTP user agent-based rules.

3.        MAC address-based rules.

Views

System view

Predefined user roles

network-admin

Parameters

dhcp-option: Specifies the DHCP Option 55-based rules.

http-user-agent: Specifies the HTTP user agent-based rules.

mac-address: Specifies the MAC address-based rules.

Usage guidelines

The type of BYOD endpoint identification rules not specified by this command will not be used for endpoint identification.

The order of the keywords determines the priority order of the BYOD endpoint identification rule types. For example, if you configure the byod rule-order mac-address http-user-agent command, the device only uses the MAC address-based and HTTP user agent-based rules to identify an endpoint type. The MAC address-based rules take precedence over the HTTP user agent-based rules.

Examples

# Specify the priority order of BYOD endpoint identification rules as MAC address-based rules, HTTP user agent-based rules, and DHCP Option 55-based rules.

<Sysname> system-view

[Sysname] byod rule-order mac-address http-user-agent dhcp-option

Related commands

byod rule

display byod rule

Use display byod rule to display BYOD endpoint identification rules.

Syntax

display byod rule { dhcp-option [ option-string ] | http-user-agent [ agent-string ] | mac-address [ mac-address ] }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

dhcp-option: Specifies identification rules based on DHCP Option 55 fingerprints.

option-string: Specifies a DHCP Option 55 fingerprint, a case-insensitive string of 1 to 255 characters. If you do not specify this argument, this command displays all identification rules based on DHCP Option 55 fingerprints.

http-user-agent: Specifies identification rules based on HTTP user agent fingerprints.

agent-string: Specifies an HTTP user agent fingerprint, a case-insensitive string of 1 to 255 characters. If you do not specify this argument, this command displays all identification rules based on HTTP user agent fingerprints.

mac-address: Specifies identification rules based on MAC addresses.

mac-address: Specifies the MAC address of an endpoint, in the H-H-H format. The address cannot be a multicast MAC address or an all-zero MAC address. You can omit the leading zeros in each section. For example, enter f-e2-1 to indicate 000f-00e2-0001. If you do not specify this argument, this command displays all identification rules based on MAC addresses.

Examples

# Display all identification rules based on DHCP Option 55 fingerprints.

<Sysname> display byod rule dhcp-option

Total 3 DHCP option rules matched.

 

  DHCP option: 1

  Device type: Defy

 

  DHCP option: 1,

  Device type: Galaxy Ace2 X

 

  DHCP option: 1,121,33,3,6,12,15,26,28,51,54,58,59,119,252

  Device type: Chrome OS

# Display all identification rules based on HTTP user agent fingerprints.

<Sysname> display byod rule http-user-agent

Total 2 HTTP user agent rules matched.

 

  HTTP user agent: ##_MAX 4G 5.0 _T-Mobile_4.2.2_android_en_5.0.4428_DID999

  Device type: Generic Android

 

  HTTP user agent: ##_SM-G900V_Network Extender_4.4.4_android_en_5.0.4402_VZW007

  Device type: Generic Android

# Display all identification rules based on MAC addresses.

<Sysname> display byod rule mac-address

Total 2 MAC rules matched.

 

  MAC address: 0000-4600-0000             MAC mask: ffff-ff00-0000

  Device type: OnePlus One

 

  MAC address: 0001-3600-0000             MAC mask: ffff-ff00-0000

  Device type: Generic Android

Table 7 Command output

Field

Description

Total n DHCP option rules matched.

Number of DHCP Option 55-based BYOD endpoint identification rules.

Total n HTTP user agent rules matched.

Number of HTTP user agent-based BYOD endpoint identification rules.

Total n MAC rules matched.

Number of MAC address-based BYOD endpoint identification rules.

DHCP option

DHCP Option 55 fingerprint.

HTTP user agent

HTTP user agent fingerprint.

MAC mask

MAC address mask.

Device type

BYOD endpoint type.

 

display byod rule-order

Use display byod rule-order to display BYOD endpoint identification rule types supported by the device and their priority order.

Syntax

display byod rule-order

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display BYOD endpoint identification rule types supported by the device and their priority order.

<Sysname> display byod rule-order

 BYOD rule matching order: mac-address http-user-agent dhcp-option

Related commands

byod rule-order

RADIUS commands

accounting-on enable

Use accounting-on enable to configure the accounting-on feature.

Use undo accounting-on enable to restore the default.

Syntax

accounting-on enable [ interval seconds | send send-times ] *

undo accounting-on enable

Default

The accounting-on feature is disabled.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

interval seconds: Specifies the time interval for retransmitting an accounting-on packet in seconds. The value range for the seconds argument is 1 to 15, and the default setting is 3 seconds.

send send-times: Specifies the maximum number of accounting-on packet transmission attempts. The value range for the send-times argument is 1 to 255, and the default setting is 50.

Usage guidelines

The accounting-on feature enables the device to automatically send an accounting-on packet to the RADIUS server after a device reboot. Upon receiving the accounting-on packet, the RADIUS server logs out all online users so they can log in again through the device.

Execute the save command to ensure that the accounting-on enable command takes effect at the next device reboot. For information about the save command, see Fundamentals Command Reference.

Parameters set by using the accounting-on enable command take effect immediately.

Examples

# In RADIUS scheme radius1, enable the accounting-on feature, and set the retransmission interval to 5 seconds and the transmission attempts to 15.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] accounting-on enable interval 5 send 15

Related commands

display radius scheme

accounting-on extended

Use accounting-on extended to enable the extended accounting-on feature.

Use undo accounting-on extended to disable the extended accounting-on feature.

Syntax

accounting-on extended

undo accounting-on extended

Default

The extended accounting-on feature is disabled.

Views

RADIUS scheme view

Predefined user roles

network-admin

network-operator

Usage guidelines

The extended accounting-on feature enhances the accounting-on feature by applying to a distributed architecture. For the extended accounting-on feature to take effect, the RADIUS server must run on IMC and the accounting-on feature must be enabled.

The extended accounting-on feature is applicable to LAN and PPP users. The user data is saved to the member devices through which the users access the IRF fabric.

When the extended accounting-on feature is enabled, the IRF fabric automatically sends an accounting-on packet to the RADIUS server after a member device reboot (IRF fabric not reboot). The packet contains the member device identifier. Upon receiving the accounting-on packet, the RADIUS server logs out all online users that access the IRF fabric through the member device.

The IRF fabric uses the packet retransmission interval and maximum transmission attempts set by using the accounting-on enable command for this feature.

Execute the save command to ensure that the accounting-on extended command takes effect at the next member device reboot. For information about the save command, see Fundamentals Command Reference.

Examples

# Enable the extended accounting-on feature for RADIUS scheme radius1.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] accounting-on extended

Related commands

·          accounting-on enable

·          display radius scheme

attribute 15 check-mode

Use attribute 15 check-mode to configure the Login-Service attribute check method for SSH, FTP, and terminal users.

Use undo attribute 15 check-mode to restore the default.

Syntax

attribute 15 check-mode { loose | strict }

undo attribute 15 check-mode

Default

The strict check method applies for SSH, FTP, and terminal users.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

loose: Matches the standard Login-Service attribute value 0 for SSH, FTP, and terminal services.

strict: Matches Login-Service attribute values 50, 51, and 52 for SSH, FTP, and terminal services, respectively.

Usage guidelines

Use the loose check method only when the server does not issue Login-Service attribute values 50, 51, and 52 for SSH, FTP, and terminal users.

Examples

# Configure the Login-Service attribute check method as loose for SSH, FTP, and terminal users in RADIUS scheme radius1.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] attribute 15 check-mode loose

Related commands

display radius scheme

attribute 25 car

Use attribute 25 car to configure the device to interpret the RADIUS class attribute (attribute 25) as CAR parameters.

Use undo attribute 25 car to configure the device to not interpret the RADIUS class attribute as CAR parameters.

Syntax

attribute 25 car

undo attribute 25 car

Default

The RADIUS class attribute is not interpreted as CAR parameters.

Views

RADIUS scheme view

Predefined user roles

network-admin

Usage guidelines

Configure the device to interpret the RADIUS class attribute if the RADIUS server uses the attribute to deliver CAR parameters for user-based traffic monitoring and control.

Examples

# In RADIUS scheme radius1, configure the device to interpret the RADIUS class attribute as CAR parameters.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] attribute 25 car

Related commands

display radius scheme

attribute 31 mac-format

Use attribute 31 mac-format to configure the MAC address format for RADIUS attribute 31.

Use undo attribute 31 mac-format to restore the default.

Syntax

attribute 31 mac-format section { six | three } separator separator-character { lowercase | uppercase }

undo attribute 31 mac-format

Default

A MAC address is in the format of HH-HH-HH-HH-HH-HH. The MAC address is separated by hyphens (-) into six sections with letters in upper case.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

section: Specifies the number of sections that a MAC address contains.

six: Specifies the six-section format HH-HH-HH-HH-HH-HH.

three: Specifies the three-section format HHHH-HHHH-HHHH.

separator separator-character: Specifies a case-sensitive character that separates the sections.

lowercase: Specifies the letters in a MAC address to be in lower case.

uppercase: Specifies the letters in a MAC address to be in upper case.

Usage guidelines

Configure the MAC address format for RADIUS attribute 31 to meet the requirements of the RADIUS servers.

Examples

# In RADIUS scheme radius1, specify the MAC address format as hh:hh:hh:hh:hh:hh for RADIUS attribute 31.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] attribute 31 mac-format section six separator : lowercase

Related commands

display radius scheme

attribute remanent-volume

Use attribute remanent-volume to set the data measurement unit for the Remanent_Volume attribute.

Use undo attribute remanent-volume to restore the default.

Syntax

attribute remanent-volume unit { byte | giga-byte | kilo-byte | mega-byte }

undo attribute remanent-volume unit

Default

The data measurement unit is kilobyte for the Remanent_Volume attribute.

Views

RADIUS scheme view

Predefined user roles

network-admin

network-operator

Parameters

byte: Specifies the unit as byte.

giga-byte: Specifies the unit as gigabyte.

kilo-byte: Specifies the unit as kilobyte.

mega-byte: Specifies the unit as megabyte.

Usage guidelines

Make sure the measurement unit is the same as the user data measurement unit on the RADIUS server.

Examples

# In RADIUS scheme radius1, set the data measurement unit to kilobyte for the Remanent_Volume attribute.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] attribute remanent-volume unit kilo-byte

Related commands

display radius scheme

client

Use client to specify a RADIUS DAC.

Use undo client to remove a RADIUS DAC.

Syntax

client { ip ipv4-address | ipv6 ipv6-address } [ key { cipher | simple } string ] *

undo client { ip ipv4-address | ipv6 ipv6-address }

Default

No RADIUS DACs are specified.

Views

RADIUS DAS view

Predefined user roles

network-admin

Parameters

ip ipv4-address: Specifies a DAC by its IPv4 address.

ipv6 ipv6-address: Specifies a DAC by its IPv6 address.

key: Specifies the shared key for secure communication between the RADIUS DAC and server. Make sure the shared key is the same as the key configured on the RADIUS DAC. If the RADIUS DAC does not have any shared key, do not specify this option.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

Usage guidelines

With the RADIUS DAS feature, the device listens to the default or specified UDP port to receive DAE requests from the specified DACs. The device processes the requests and sends DAE responses to the DACs.

The device discards any DAE packets sent from DACs that are not specified for the DAS.

You can execute the client command multiple times to specify multiple DACs for the DAS.

Examples

# Specify the DAC as 10.110.1.2. Set the shared key to 123456 in plaintext form for secure communication between the DAS and DAC.

<Sysname> system-view

[Sysname] radius dynamic-author server

[Sysname-radius-da-server] client ip 10.110.1.2 key simple 123456

Related commands

·          radius dynamic-author server

·          port

data-flow-format (RADIUS scheme view)

Use data-flow-format to set the data flow and packet measurement units for traffic statistics.

Use undo data-flow-format to restore the default.

Syntax

data-flow-format { data { byte | giga-byte | kilo-byte | mega-byte } | packet { giga-packet | kilo-packet | mega-packet | one-packet } } *

undo data-flow-format { data | packet }

Default

Traffic is counted in bytes and packets.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

data: Specifies the unit for data flows.

byte: Specifies the unit as byte.

giga-byte: Specifies the unit as gigabyte.

kilo-byte: Specifies the unit as kilobyte.

mega-byte: Specifies the unit as megabyte.

packet: Specifies the unit for data packets.

giga-packet: Specifies the unit as giga-packet.

kilo-packet: Specifies the unit as kilo-packet.

mega-packet: Specifies the unit as mega-packet.

one-packet: Specifies the unit as one-packet.

Usage guidelines

The data flow and packet measurement units for traffic statistics must be the same as configured on the RADIUS accounting servers. Otherwise, accounting results might be incorrect.

Examples

# In RADIUS scheme radius1, set the data flow and packet measurement units for traffic statistics to kilobyte and kilo-packet, respectively.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] data-flow-format data kilo-byte packet kilo-packet

Related commands

display radius scheme

display radius scheme

Use display radius scheme to display RADIUS scheme configuration.

Syntax

display radius scheme [ radius-scheme-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters. If you do not specify a RADIUS scheme, this command displays the configuration of all RADIUS schemes.

Examples

# Display the configuration of all RADIUS schemes.

<Sysname> display radius scheme

Total 1 RADIUS schemes

 

------------------------------------------------------------------

RADIUS scheme name  : radius1

  Index : 0

  Primary authentication server:

    IP   : 2.2.2.2                                  Port: 1812

    State: Active

    Test profile: 132

      Probe username: test

      Probe interval: 60 minutes

  Primary accounting server:

    IP : 1.1.1.1                                    Port: 1813

    State: Active

  Second authentication server:

    IP : 3.3.3.3                                    Port: 1812

    State: Block

    Test profile: Not configured

  Second accounting server:

    IP : 3.3.3.3                                    Port: 1813

    State: Block (Mandatory)

  Accounting-On function                     : Enabled

    extended function                        : Enabled

    retransmission times                     : 5

    retransmission interval(seconds)         : 2

  Timeout Interval(seconds)                  : 3

  Retransmission Times                       : 3

  Retransmission Times for Accounting Update : 5

  Server Quiet Period(minutes)               : 5

  Realtime Accounting Interval(minutes)      : 22

  NAS IP Address                             : 1.1.1.1

  User Name Format                           : with-domain

  Data flow unit                             : Megabyte

  Packet unit                                : One

  Attribute 15 check-mode                    : Strict

  Attribute 25                               : CAR

  Attribute Remanent-Volume unit             : Mega

  Attribute 31 MAC format                    : hh:hh:hh:hh:hh:hh

------------------------------------------------------------------

Table 8 Command output

Field

Description

Index

Index number of the RADIUS scheme.

Primary authentication server

Information about the primary authentication server.

Primary accounting server

Information about the primary accounting server.

Second authentication server

Information about the secondary authentication server.

Second accounting server

Information about the secondary accounting server.

IP

IP address of the server. If no server is configured, this field displays Not configured.

Port

Service port number of the server. If no port number is specified, this field displays the default port number.

State

Status of the server:

·         Active—The server is in active state.

·         Block—The server is changed to blocked state automatically.

·         Block (Mandatory)—The server is set to blocked state manually.

Test profile

Test profile used for RADIUS server status detection.

Probe username

Username used for RADIUS server status detection.

Probe interval

Server status detection interval, in minutes.

Accounting-On function

Whether the accounting-on feature is enabled.

extended function

Whether the extended accounting-on feature is enabled.

retransmission times

Number of accounting-on packet transmission attempts.

retransmission interval(seconds)

Interval at which the device retransmits accounting-on packets, in seconds.

Timeout Interval(seconds)

RADIUS server response timeout period, in seconds.

Retransmission times

Maximum number of attempts for transmitting a RADIUS packet to a single RADIUS server.

Retransmission Times for Accounting Update

Maximum number of accounting attempts.

Server Quiet Period(minutes)

Quiet period for the servers, in minutes.

Realtime Accounting Interval(minutes)

Interval for sending real-time accounting updates, in minutes.

NAS IP Address

Source IP address for outgoing RADIUS packets.

User Name Format

Format for the usernames sent to the RADIUS servers of the RADIUS scheme:

·         with-domain—Includes the domain name.

·         without-domain—Excludes the domain name.

·         keep-original—Forwards a username as the username is entered.

Data flow unit

Measurement unit for data flows.

Packet unit

Measurement unit for packets.

Attribute 15 check-mode

RADIUS Login-Service attribute check method for SSH, FTP, and terminal users:

·         StrictMatches Login-Service attribute values 50, 51, and 52 for SSH, FTP, and terminal services, respectively.

·         Loose—Matches the standard Login-Service attribute value 0 for SSH, FTP, and terminal services.

Attribute 25

RADIUS attribute 25 interpretation status:

·         Standard—The attribute is not interpreted as CAR parameters.

·         CAR—The attribute is interpreted as CAR parameters.

Attribute Remanent-Volume unit

Data measurement unit for the RADIUS Remanent_Volume attribute.

Attribute 31 MAC format

MAC address format for RADIUS attribute 31.

 

display radius statistics

Use display radius statistics to display RADIUS packet statistics.

Syntax

display radius statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display RADIUS packet statistics.

<Sysname> display radius statistics

 

                                 Auth.         Acct.       SessCtrl.

          Request Packet:          0             0             0

            Retry Packet:          0             0             -

          Timeout Packet:          0             0             -

        Access Challenge:          0             -             -

           Account Start:          -             0             -

          Account Update:          -             0             -

            Account Stop:          -             0             -

       Terminate Request:          -             -             0

              Set Policy:          -             -             0

    Packet With Response:          0             0             0

 Packet Without Response:          0             0             -

          Access Rejects:          0             -             -

          Dropped Packet:          0             0             0

          Check Failures:          0             0             0

Table 9 Command output

Field

Description

Auth.

Authentication packets.

Acct.

Accounting packets.

SessCtrl.

Session-control packets.

Request Packet

Number of request packets.

Retry Packet

Number of retransmitted request packets.

Timeout Packet

Number of request packets timed out.

Access Challenge

Number of access challenge packets.

Account Start

Number of start-accounting packets.

Account Update

Number of accounting update packets.

Account Stop

Number of stop-accounting packets.

Terminate Request

Number of packets for logging off users forcibly.

Set Policy

Number of packets for updating user authorization information.

Packet With Response

Number of packets for which responses were received.

Packet Without Response

Number of packets for which no responses were received.

Access Rejects

Number of Access-Reject packets.

Dropped Packet

Number of discarded packets.

Check Failures

Number of packets with checksum errors.

 

Related commands

reset radius statistics

key (RADIUS scheme view)

Use key to set the shared key for secure RADIUS authentication or accounting communication.

Use undo key to delete the shared key for secure RADIUS authentication or accounting communication.

Syntax

key { accounting | authentication } { cipher | simple } string

undo key { accounting | authentication }

Default

No shared key is configured for secure RADIUS authentication or accounting communication.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

accounting: Specifies the shared key for secure RADIUS accounting communication.

authentication: Specifies the shared key for secure RADIUS authentication communication.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

Usage guidelines

The shared keys configured by using this command apply to all servers in the scheme. Make sure the settings match the shared keys configured on the RADIUS servers.

The shared keys specified for specific RADIUS servers take precedence over the shared key specified with this command.

Examples

# In RADIUS scheme radius1, set the shared key to ok in plaintext form for secure accounting communication.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] key accounting simple ok

Related commands

display radius scheme

nas-ip (RADIUS scheme view)

Use nas-ip to specify a source IP address for outgoing RADIUS packets.

Use undo nas-ip to delete the source IP address of the specified type for outgoing RADIUS packets.

Syntax

nas-ip { ipv4-address | ipv6 ipv6-address }

undo nas-ip [ ipv6 ]

Default

The source IP address of an outgoing RADIUS packet is that specified by using the radius nas-ip command in system view.

If the radius nas-ip command is not configured, the source IP address is the primary IP address of the outbound interface.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address, which must be an address of the device. The IP address cannot be 0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.

ipv6 ipv6-address: Specifies an IPv6 address, which must be a unicast address of the device and cannot be a loopback address or a link-local address.

Usage guidelines

The source IP address of RADIUS packets that a NAS sends must match the IP address of the NAS that is configured on the RADIUS server. A RADIUS server identifies a NAS by its IP address. Upon receiving a RADIUS packet, a RADIUS server checks whether the source IP address of the packet is the IP address of a managed NAS.

·          If the source IP address of the packet is the IP address of a managed NAS, the server processes the packet.

·          If the source IP address of the packet is not the IP address of a managed NAS, the server drops the packet.

As a best practice, specify a loopback interface address as the source IP address for outgoing RADIUS packets to avoid RADIUS packet loss caused by physical port errors.

If you use both the nas-ip command and radius nas-ip command, the following guidelines apply:

·          The setting configured by using the nas-ip command in RADIUS scheme view applies only to the RADIUS scheme.

·          The setting configured by using the radius nas-ip command in system view applies to all RADIUS schemes.

·          The setting in RADIUS scheme view takes precedence over the setting in system view.

A RADIUS scheme can have only one source IPv4 address and one source IPv6 address for outgoing RADIUS packets.

Examples

# In RADIUS scheme radius1, specify IP address 10.1.1.1 as the source IP address for outgoing RADIUS packets.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] nas-ip 10.1.1.1

Related commands

·          display radius scheme

·          radius nas-ip

port

Use port to specify the RADIUS DAS port.

Use undo port to restore the default.

Syntax

port port-number

undo port

Default

The RADIUS DAS port number is 3799.

Views

RADIUS DAS view

Predefined user roles

network-admin

Parameters

port-number: Specifies a UDP port number in the range of 1 to 65535.

Usage guidelines

The destination port in DAE packets on the DAC must be the same as the RADIUS DAS port on the DAS.

Examples

# Enable the RADIUS DAS to listen to UDP port 3790 for DAE requests.

<Sysname> system-view

[Sysname] radius dynamic-author server

[Sysname-radius-da-server] port 3790

Related commands

·          client

·          radius dynamic-author server

primary accounting (RADIUS scheme view)

Use primary accounting to specify the primary RADIUS accounting server.

Use undo primary accounting to restore the default.

Syntax

primary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string ] *

undo primary accounting

Default

No primary RADIUS accounting server is specified.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the primary RADIUS accounting server.

ipv6 ipv6-address: Specifies the IPv6 address of the primary RADIUS accounting server.

port-number: Specifies the service port number of the primary RADIUS accounting server. The value range for the UDP port number is 1 to 65535. The default setting is 1813.

key: Specifies the shared key for secure communication with the primary RADIUS accounting server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

Usage guidelines

Make sure the port number and shared key settings of the primary RADIUS accounting server are the same as those configured on the server.

Two accounting servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

The shared key configured by using this command takes precedence over the shared key configured with the key accounting command.

If you use the primary accounting command to modify or delete the primary accounting server to which the device is sending a start-accounting request, communication with the primary server times out. The device tries to communicate with an active server that has the highest priority for accounting.

If you remove an actively used accounting server, the device no longer sends users' real-time accounting requests and stop-accounting requests. It does not buffer the stop-accounting requests. The device can generate incorrect accounting results.

Examples

# In RADIUS scheme radius1, specify the primary accounting server with IP address 10.110.1.2, UDP port number 1813, and plaintext shared key 123456TESTacct&!.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] primary accounting 10.110.1.2 1813 key simple 123456TESTacct&!

Related commands

·          display radius scheme

·          key (RADIUS scheme view)

·          secondary accounting (RADIUS scheme view)

primary authentication (RADIUS scheme view)

Use primary authentication to specify the primary RADIUS authentication server.

Use undo primary authentication to restore the default.

Syntax

primary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | test-profile profile-name ] *

undo primary authentication

Default

No primary RADIUS authentication server is specified.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the primary RADIUS authentication server.

ipv6 ipv6-address: Specifies the IPv6 address of the primary RADIUS authentication server.

port-number: Specifies the service port number of the primary RADIUS authentication server. The value range for the UDP port number is 1 to 65535. The default setting is 1812.

key: Specifies the shared key for secure communication with the primary RADIUS authentication server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

test-profile profile-name: Specifies a test profile for detecting the RADIUS server status. The profile-name argument specifies the test profile name, which is a case-sensitive string of 1 to 31 characters.

Usage guidelines

Make sure the service port and shared key settings of the primary RADIUS authentication server are the same as those configured on the server.

Two authentication servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

The shared key configured by this command takes precedence over the shared key configured with the key authentication command.

When you specify a test profile for the primary authentication server, make sure the test profile already exists on the device. Otherwise, the device cannot detect the server status.

If you use the primary authentication command to modify or delete the primary authentication server during an authentication process, communication with the primary server times out. The device tries to communicate with an active server that has the highest priority for authentication.

Examples

# In RADIUS scheme radius1, specify the primary authentication server with IP address 10.110.1.1, UDP port number 1812, and plaintext shared key 123456TESTauth&!.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] primary authentication 10.110.1.1 1812 key simple 123456TESTauth&!

Related commands

·          display radius scheme

·          key (RADIUS scheme view)

·          radius-server test-profile

·          secondary authentication (RADIUS scheme view)

radius dscp

Use radius dscp to change the DSCP priority of RADIUS packets.

Use undo radius dscp to restore the default.

Syntax

radius [ ipv6 ] dscp dscp-value

undo radius [ ipv6 ] dscp

Default

The DSCP priority of RADIUS packets is 0.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6: Specifies the IPv6 RADIUS packets. If you do not specify this keyword, the command sets the DSCP priority for the IPv4 RADIUS packets.

dscp-value: Specifies the DSCP priority of RADIUS packets, in the range of 0 to 63. A larger value represents a higher priority.

Usage guidelines

Use this command to set the DSCP priority in the ToS field of RADIUS packets for changing their transmission priority.

Examples

# Set the DSCP priority of IPv4 RADIUS packets to 10.

<Sysname> system-view

[Sysname] radius dscp 10

radius dynamic-author server

Use radius dynamic-author server to enable the RADIUS DAS feature and enter RADIUS DAS view.

Use undo radius dynamic-author server to restore the default.

Syntax

radius dynamic-author server

undo radius dynamic-author server

Default

The RADIUS DAS feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

After the RADIUS DAS feature is enabled, the device listens to the RADIUS DAS port to receive DAE packets from specified DACs.

Examples

# Enable the RADIUS DAS feature and enter RADIUS DAS view.

<Sysname> system-view

[Sysname] radius dynamic-author server

[Sysname-radius-da-server]

Related commands

·          client

·          port

radius nas-ip

Use radius nas-ip to specify a source IP address for outgoing RADIUS packets.

Use undo radius nas-ip to delete a source IP address for outgoing RADIUS packets.

Syntax

radius nas-ip { ipv4-address | ipv6 ipv6-address }

undo radius nas-ip { ipv4-address | ipv6 ipv6-address }

Default

The source IP address of an outgoing RADIUS packet is the primary IP address of the outbound interface.

Views

System view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address, which must be an address of the device. The IP address cannot be 0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.

ipv6 ipv6-address: Specifies an IPv6 address, which must be a unicast address of the device and cannot be a loopback address or a link-local address.

Usage guidelines

The source IP address of RADIUS packets that a NAS sends must match the IP address of the NAS that is configured on the RADIUS server. A RADIUS server identifies a NAS by its IP address. Upon receiving a RADIUS packet, a RADIUS server checks whether the source IP address of the packet is the IP address of a managed NAS.

·          If the source IP address of the packet is the IP address of a managed NAS, the server processes the packet.

·          If the source IP address of the packet is not the IP address of a managed NAS, the server drops the packet.

As a best practice, specify a loopback interface address as the source IP address for outgoing RADIUS packets to avoid RADIUS packet loss caused by physical port errors.

If you use both the nas-ip command and radius nas-ip command, the following guidelines apply:

·          The setting configured by using the nas-ip command in RADIUS scheme view applies only to the RADIUS scheme.

·          The setting configured by using the radius nas-ip command in system view applies to all RADIUS schemes.

·          The setting in RADIUS scheme view takes precedence over the setting in system view.

You can specify a maximum of 16 source IP addresses, including:

·          Zero or one public-network source IPv4 address.

·          Zero or one public-network source IPv6 address.

·          Private-network source IP addresses.

Examples

# Specify IP address 129.10.10.1 as the source address for outgoing RADIUS packets.

<Sysname> system-view

[Sysname] radius nas-ip 129.10.10.1

Related commands

nas-ip (RADIUS scheme view)

radius scheme

Use radius scheme to create a RADIUS scheme and enter its view, or enter the view of an existing RADIUS scheme.

Use undo radius scheme to delete a RADIUS scheme.

Syntax

radius scheme radius-scheme-name

undo radius scheme radius-scheme-name

Default

No RADIUS schemes exist.

Views

System view

Predefined user roles

network-admin

Parameters

radius-scheme-name: Specifies the RADIUS scheme name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

A RADIUS scheme can be used by more than one ISP domain at the same time.

The device supports a maximum of 16 RADIUS schemes.

Examples

# Create a RADIUS scheme named radius1 and enter RADIUS scheme view.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1]

Related commands

display radius scheme

radius session-control client

Use radius session-control client to specify a RADIUS session-control client.

Use undo radius session-control client to remove the specified RADIUS session-control clients.

Syntax

radius session-control client { ip ipv4-address | ipv6 ipv6-address } [ key { cipher | simple } string ] *

undo radius session-control client { all | { ip ipv4-address | ipv6 ipv6-address } }

Default

No RADIUS session-control clients are specified.

Views

System view

Predefined user roles

network-admin

Parameters

ip ipv4-address: Specifies a session-control client by its IPv4 address.

ipv6 ipv6-address: Specifies a session-control client by its IPv6 address.

key: Specifies the shared key for secure communication with the session-control client.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

all: Specifies all session-control clients.

Usage guidelines

To verify the session-control packets sent from a RADIUS server running on IMC, specify the RADIUS server as a session-control client to the device. The IP address and shared key settings of the session-control client must be the same as the corresponding settings of the RADIUS server.

You can specify multiple session-control clients on the device.

The device matches a session-control packet to a session-control client based on the IP address setting, and then uses the shared key of the matched client to validate the packet.

The device searches the session-control client settings prior to searching all RADIUS scheme settings for a server with matching IP address setting. This process narrows the search scope for finding the matched RADIUS server.

The session-control client settings take effect only when the RADIUS session-control feature is enabled.

Examples

# Specify a session-control client with IP address 10.110.1.2 and shared key 12345 in plaintext form.

<Sysname> system-view

[Sysname] radius session-control client ip 10.110.1.2 key simple 12345

Related commands

radius session-control enable

radius session-control enable

Use radius session-control enable to enable the RADIUS session-control feature.

Use undo radius session-control enable to disable the RADIUS session-control feature.

Syntax

radius session-control enable

undo radius session-control enable

Default

The RADIUS session-control feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

An H3C IMC RADIUS server uses session-control packets to deliver dynamic authorization change requests or disconnection requests to the device. The session-control feature enables the device to receive the RADIUS session-control packets on UDP port 1812.

This feature must work with H3C IMC servers.

Examples

# Enable the RADIUS session-control feature.

<Sysname> system-view

[Sysname] radius session-control enable

radius-server test-profile

Use radius-server test-profile to configure a test profile for detecting the RADIUS server status.

Use undo radius-server test-profile to delete a RADIUS test profile.

Syntax

radius-server test-profile profile-name username name [ interval interval ]

undo radius-server test-profile profile-name

Default

No RADIUS test profiles exist.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies the name of the test profile, which is a case-sensitive string of 1 to 31 characters.

username name: Specifies the username in the detection packets. The name argument is a case-sensitive string of 1 to 253 characters.

interval interval: Specifies the interval for sending a detection packet, in minutes. The value range for the interval argument is 1 to 3600, and the default value is 60.

Usage guidelines

You can execute this command multiple times to configure multiple test profiles.

If you specify a nonexistent test profile for a RADIUS server, the device does not detect the status of the server until you create the test profile on the device.

You can specify the same test profile for multiple RADIUS servers.

When you delete a test profile, the device stops detecting the status of the RADIUS servers that use the test profile.

Examples

# Configure a test profile named abc for RADIUS server status detection. The detection packet uses admin as the username and is sent every 10 minutes.

<Sysname> system-view

[Sysname] radius-server test-profile abc username admin interval 10

Related commands

·          primary authentication (RADIUS scheme view)

·          secondary authentication (RADIUS scheme view)

reset radius statistics

Use reset radius statistics to clear RADIUS statistics.

Syntax

reset radius statistics

Views

User view

Predefined user roles

network-admin

Examples

# Clear RADIUS statistics.

<Sysname> reset radius statistics

Related commands

display radius statistics

retry

Use retry to set the maximum number of attempts for transmitting a RADIUS packet to a single RADIUS server.

Use undo retry to restore the default.

Syntax

retry retries

undo retry

Default

The maximum number of RADIUS packet transmission attempts is 3.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

retries: Specifies the maximum number of RADIUS packet transmission attempts, in the range of 1 to 20.

Usage guidelines

Because RADIUS uses UDP packets to transmit data, the communication is not reliable.

·          If the device does not receive a response to its request from the RADIUS server within the response timeout period, it retransmits the RADIUS request.

·          If the device does not receive a response from the RADIUS server after the maximum number of transmission attempts is reached, the device considers the request a failure.

If the client times out during the authentication process, the user is immediately logged off. To avoid user logoffs, the value multiplied by the following items cannot be larger than the client timeout period defined by the access module:

·          The maximum number of RADIUS packet transmission attempts.

·          The RADIUS server response timeout period.

·          The number of RADIUS authentication servers in the RADIUS scheme.

When the device sends a RADIUS request to a new RADIUS server, it checks the total amount of time it has taken to transmit the RADIUS packet. If the amount of time has reached 300 seconds, the device stops sending the RADIUS request to the next RADIUS server. As a best practice, consider the number of RADIUS servers when you configure the maximum number of packet transmission attempts and the RADIUS server response timeout period.

Examples

# In RADIUS scheme radius1, set the maximum number of RADIUS packet transmission attempts to 5.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] retry 5

Related commands

·          radius scheme

·          timer response-timeout (RADIUS scheme view)

retry realtime-accounting

Use retry realtime-accounting to set the maximum number of accounting attempts.

Use undo retry realtime-accounting to restore the default.

Syntax

retry realtime-accounting retries

undo retry realtime-accounting

Default

The maximum number of accounting attempts is 5.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

retries: Specifies the maximum number of accounting attempts, in the range of 1 to 255.

Usage guidelines

Typically, a RADIUS accounting server checks whether a user is online by using a timeout timer. If the server does not receive a real-time accounting request for a user in the timeout period, it considers that a line or device failure has occurred. The server stops accounting for the user.

To work with the RADIUS server, the NAS needs to send real-time accounting requests to the server before the timer on the server expires and to keep pace with the server in disconnecting the user when a failure occurs. The NAS disconnects from a user according to the maximum number of accounting attempts and specific parameters.

For example, the following conditions exist:

·          The RADIUS server response timeout period is 3 seconds (set by using the timer response-timeout command).

·          The maximum number of RADIUS packet transmission attempts is 3 (set by using the retry command).

·          The real-time accounting interval is 12 minutes (set by using the timer realtime-accounting command).

·          The maximum number of accounting attempts is 5 (set by using the retry realtime-accounting command).

In the above case, the device generates an accounting request every 12 minutes, and retransmits the request if it sends the request but receives no response within 3 seconds. If the device receives no response after transmitting the request three times, it considers the accounting attempt a failure, and makes another accounting attempt. If five consecutive accounting attempts fail, the device cuts the user connection.

Examples

# In RADIUS scheme radius1, set the maximum number of accounting attempts to 10.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] retry realtime-accounting 10

Related commands

·          retry

·          timer realtime-accounting (RADIUS scheme view)

·          timer response-timeout (RADIUS scheme view)

secondary accounting (RADIUS scheme view)

Use secondary accounting to specify a secondary RADIUS accounting server.

Use undo secondary accounting to remove a secondary RADIUS accounting server.

Syntax

secondary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string ] *

undo secondary accounting [ { ipv4-address | ipv6 ipv6-address } [ port-number ] * ]

Default

No secondary RADIUS accounting servers are specified.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the secondary RADIUS accounting server.

ipv6 ipv6-address: Specifies the IPv6 address of the secondary RADIUS accounting server.

port-number: Specifies the service port number of the secondary RADIUS accounting server. The value range for the UDP port number is 1 to 65535. The default setting is 1813.

key: Specifies the shared key for secure communication with the secondary RADIUS accounting server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

Usage guidelines

Make sure the port number and shared key settings of each secondary RADIUS accounting server are the same as those configured on the corresponding server.

A RADIUS scheme supports a maximum of 16 secondary RADIUS accounting servers. If the primary server fails, the device tries to communicate with a secondary server in active state. The device connects to the secondary servers in the order they are configured.

Two accounting servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

The shared key configured by this command takes precedence over the shared key configured with the key accounting command.

If you use the secondary accounting command to modify or delete a secondary accounting server to which the device is sending a start-accounting request, communication with the secondary server times out. The device tries to communicate with an active server that has the highest priority for accounting.

If you remove an actively used accounting server, the device no longer sends users' real-time accounting requests and stop-accounting requests. The device does not buffer the stop-accounting requests, either.

Examples

# In RADIUS scheme radius1, specify a secondary accounting server with IP address 10.110.1.1 and UDP port 1813.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] secondary accounting 10.110.1.1 1813

# In RADIUS scheme radius2, specify two secondary accounting servers with the server IP addresses of 10.110.1.1 and 10.110.1.2 and the UDP port number of 1813.

<Sysname> system-view

[Sysname] radius scheme radius2

[Sysname-radius-radius2] secondary accounting 10.110.1.1 1813

[Sysname-radius-radius2] secondary accounting 10.110.1.2 1813

Related commands

·          display radius scheme

·          key (RADIUS scheme view)

·          primary accounting (RADIUS scheme view)

secondary authentication (RADIUS scheme view)

Use secondary authentication to specify a secondary RADIUS authentication server.

Use undo secondary authentication to remove a secondary RADIUS authentication server.

Syntax

secondary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | test-profile profile-name ] *

undo secondary authentication [ { ipv4-address | ipv6 ipv6-address } [ port-number ] * ]

Default

No secondary RADIUS authentication servers are specified.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the secondary RADIUS authentication server.

ipv6 ipv6-address: Specifies the IPv6 address of the secondary RADIUS authentication server.

port-number: Sets the service port number of the secondary RADIUS authentication server. The value range for the UDP port number is 1 to 65535. The default setting is 1812.

key: Specifies the shared key for secure communication with the secondary RADIUS authentication server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

test-profile profile-name: Specifies a test profile for detecting the RADIUS server status. The profile-name argument represents the test profile name, which is a case-sensitive string of 1 to 31 characters.

Usage guidelines

Make sure the port number and shared key settings of each secondary RADIUS authentication server are the same as those configured on the corresponding server.

A RADIUS scheme supports a maximum of 16 secondary RADIUS authentication servers. If the primary server fails, the device tries to communicate with a secondary server in active state. The device connects to the secondary servers in the order they are configured.

When you specify a test profile for secondary authentication servers, make sure the test profile already exists on the device. Otherwise, the device cannot detect the server status.

Two authentication servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

The shared key configured by this command takes precedence over the shared key configured with the key authentication command.

If you use the secondary authentication command to modify or delete a secondary authentication server during an authentication process, communication with the secondary server times out. The device tries to communicate with an active server that has the highest priority for authentication.

Examples

# In RADIUS scheme radius1, specify a secondary authentication server with IP address 10.110.1.2 and UDP port 1812.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] secondary authentication 10.110.1.2 1812

# In RADIUS scheme radius2, specify two secondary authentication servers with the server IP addresses of 10.110.1.1 and 10.110.1.2 and the UDP port number of 1812.

<Sysname> system-view

[Sysname] radius scheme radius2

[Sysname-radius-radius2] secondary authentication 10.110.1.1 1812

[Sysname-radius-radius2] secondary authentication 10.110.1.2 1812

Related commands

·          display radius scheme

·          key (RADIUS scheme view)

·          primary authentication (RADIUS scheme view)

·          radius-server test-profile

snmp-agent trap enable radius

Use snmp-agent trap enable radius to enable SNMP notifications for RADIUS.

Use undo snmp-agent trap enable radius to disable SNMP notifications for RADIUS.

Syntax

snmp-agent trap enable radius [ accounting-server-down | accounting-server-up | authentication-error-threshold | authentication-server-down | authentication-server-up ] *

undo snmp-agent trap enable radius [ accounting-server-down | accounting-server-up | authentication-error-threshold | authentication-server-down | authentication-server-up ] *

Default

All RADIUS SNMP notifications are disabled.

Views

System view

Predefined user roles

network-admin

Parameters

accounting-server-down: Specifies notifications to be sent when the RADIUS accounting server becomes unreachable.

accounting-server-up: Specifies notifications to be sent when the RADIUS accounting server becomes reachable.

authentication-error-threshold: Specifies notifications to be sent when the number of authentication failures exceeds the specified threshold. The threshold is represented by the ratio of the authentication failures to the total number of authentication attempts. The value range is 1 to 100, and the default value is 30. This threshold can only be configured through the MIB.

authentication-server-down: Specifies notifications to be sent when the RADIUS authentication server becomes unreachable.

authentication-server-up: Specifies notifications to be sent when the RADIUS authentication server becomes reachable.

Usage guidelines

If you do not specify any keywords, this command enables or disables all types of notifications for RADIUS.

When SNMP notifications for RADIUS are enabled, the device supports the following notifications generated by RADIUS:

·          RADIUS server unreachable notificationThe RADIUS server cannot be reached. RADIUS generates this notification if it cannot receive any response to an accounting or authentication request within the specified RADIUS request transmission attempts.

·          RADIUS server reachable notificationThe RADIUS server can be reached. RADIUS generates this notification for a previously blocked RADIUS server after the quiet timer expires.

·          Excessive authentication failures notification—RADIUS generates this notification when the number of authentication failures to the total number of authentication attempts exceeds the specified threshold.

Examples

# Enable the device to send RADIUS accounting server unreachable notifications.

<Sysname> system-view

[Sysname] snmp-agent trap enable radius accounting-server-down

state primary

Use state primary to set the status of a primary RADIUS server.

Syntax

state primary { accounting | authentication } { active | block }

Default

The primary RADIUS server is in active state.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

accounting: Specifies the primary RADIUS accounting server.

authentication: Specifies the primary RADIUS authentication server.

active: Specifies the active state.

block: Specifies the blocked state.

Usage guidelines

During an authentication or accounting process, the device first tries to communicate with the primary server if the primary server is in active state. If the primary server is unavailable, the device performs the following operations:

·          Changes the status of the primary server to blocked.

·          Starts a quiet timer for the server.

·          Tries to communicate with a secondary server in active state.

When the quiet timer of the primary server times out, the status of the server automatically changes to active. If you set the server status to blocked before the quiet timer times out, the server status cannot change back to active unless you manually set the status to active.

When the primary server and all secondary servers are in blocked state, the device tries to communicate with the primary server.

This command can affect the RADIUS server status detection feature when a valid test profile is specified for a primary RADIUS authentication server.

·          If you set the status of the server to blocked, the device stops detecting the status of the server.

·          If you set the status of the server to active, the device starts to detect the status of the server.

Examples

# In RADIUS scheme radius1, set the status of the primary authentication server to blocked.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] state primary authentication block

Related commands

·          display radius scheme

·          radius-server test-profile

·          state secondary

state secondary

Use state secondary to set the status of a secondary RADIUS server.

Syntax

state secondary { accounting | authentication } [ { ipv4-address | ipv6 ipv6-address } [ port-number ] * ] { active | block }

Default

A secondary RADIUS server is in active state.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

accounting: Specifies a secondary RADIUS accounting server.

authentication: Specifies a secondary RADIUS authentication server.

ipv4-address: Specifies the IPv4 address of a secondary RADIUS server.

ipv6 ipv6-address: Specifies the IPv6 address of a secondary RADIUS server.

port-number: Sets the service port number of a secondary RADIUS server. The value range for the UDP port number is 1 to 65535. The default port numbers for authentication and accounting are 1812 and 1813, respectively.

active: Specifies the active state.

block: Specifies the blocked state.

Usage guidelines

If you do not specify an IP address, this command changes the status of all configured secondary RADIUS servers.

If the device finds that a secondary server in active state is unreachable, the device performs the following operations:

·          Changes the status of the secondary server to blocked.

·          Starts a quiet timer for the server.

·          Tries to communicate with another secondary server in active state.

When the quiet timer of a server times out, the status of the server automatically changes to active. If you set the server status to blocked before the quiet timer times out, the server status cannot change back to active unless you manually set the status to active. If all configured secondary servers are unreachable, the device considers the authentication or accounting attempt a failure.

This command can affect the RADIUS server status detection feature when a valid test profile is specified for a secondary RADIUS authentication server.

·          If you set the status of the server to blocked, the device stops detecting the status of the server.

·          If you set the status of the server to active, the device starts to detect the status of the server.

Examples

# In RADIUS scheme radius1, set the status of all the secondary authentication servers to blocked.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] state secondary authentication block

Related commands

·          display radius scheme

·          radius-server test-profile

·          state primary

timer quiet (RADIUS scheme view)

Use timer quiet to set the quiet timer for the servers specified in a RADIUS scheme.

Use undo timer quiet to restore the default.

Syntax

timer quiet minutes

undo timer quiet

Default

The server quiet timer period is 5 minutes in a RADIUS scheme.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

minutes: Specifies the server quiet period in minutes, in the range of 1 to 255.

Usage guidelines

Make sure the server quiet timer is set correctly.

·          A timer that is too short might result in frequent authentication or accounting failures. This is because the device will continue to attempt to communicate with an unreachable server that is in active state.

·          A timer that is too long might temporarily block a reachable server that has recovered from a failure. This is because the server will remain in blocked state until the timer expires.

Examples

# In RADIUS scheme radius1, set the quiet timer to 10 minutes for the servers.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] timer quiet 10

Related commands

display radius scheme

timer realtime-accounting (RADIUS scheme view)

Use timer realtime-accounting to set the real-time accounting interval.

Use undo timer realtime-accounting to restore the default.

Syntax

timer realtime-accounting interval [ second ]

undo timer realtime-accounting

Default

The real-time accounting interval is 12 minutes.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

interval: Specifies the real-time accounting interval in the range of 0 to 71582.

second: Specifies the measurement unit as second. If you do not specify this keyword, the real-time accounting interval is measured in minutes.

Usage guidelines

When the real-time accounting interval on the device is not zero, the device sends online user accounting information to the RADIUS accounting server at the configured interval.

When the real-time accounting interval on the device is zero, the device sends online user accounting information to the RADIUS accounting server at the real-time accounting interval configured on the server. If the real-time accounting interval is not configured on the server, the device does not send online user accounting information.

A short interval helps improve accounting precision but requires many system resources.

Table 10 Recommended real-time accounting intervals

Number of users

Real-time accounting interval

1 to 99

3 minutes

100 to 499

6 minutes

500 to 999

12 minutes

1000 or more

15 minutes or longer

 

Examples

# In RADIUS scheme radius1, set the real-time accounting interval to 51 minutes.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] timer realtime-accounting 51

Related commands

retry realtime-accounting

timer response-timeout (RADIUS scheme view)

Use timer response-timeout to set the RADIUS server response timeout timer.

Use undo timer response-timeout to restore the default.

Syntax

timer response-timeout seconds

undo timer response-timeout

Default

The RADIUS server response timeout period is 3 seconds.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

seconds: Specifies the RADIUS server response timeout period, in the range of 1 to 10 seconds.

Usage guidelines

If a NAS receives no response from the RADIUS server in a period of time after sending a RADIUS request, it resends the request so that the user has more opportunity to obtain the RADIUS service. The NAS uses the RADIUS server response timeout timer to control the transmission interval.

If the client times out during the authentication process, the user is immediately logged off. To avoid user logoffs, the value multiplied by the following items cannot be larger than the client timeout period defined by the access module:

·          The maximum number of RADIUS packet transmission attempts.

·          The RADIUS server response timeout period.

·          The number of RADIUS authentication servers in the RADIUS scheme.

When the device sends a RADIUS request to a new RADIUS server, it checks the total amount of time it has taken to transmit the RADIUS packet. If the amount of time has reached 300 seconds, the device stops sending the RADIUS request to the next RADIUS server. As a best practice, consider the number of RADIUS servers when you configure the maximum number of packet transmission attempts and the RADIUS server response timeout period.

Examples

# In RADIUS scheme radius1, set the RADIUS server response timeout timer to 5 seconds.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] timer response-timeout 5

Related commands

·          display radius scheme

·          retry

user-name-format (RADIUS scheme view)

Use user-name-format to specify the format of usernames to be sent to the RADIUS servers of a RADIUS scheme.

Use undo user-name-format to restore the default.

Syntax

user-name-format { keep-original | with-domain | without-domain }

undo user-name-format

Default

The ISP domain name is included in the usernames sent to the RADIUS servers of a RADIUS scheme.

Views

RADIUS scheme view

Predefined user roles

network-admin

Parameters

keep-original: Sends the usernames to the RADIUS servers as the usernames are entered.

with-domain: Includes the ISP domain name in the usernames sent to the RADIUS servers.

without-domain: Excludes the ISP domain name from the usernames sent to the RADIUS servers.

Usage guidelines

A username is generally in the userid@isp-name format, of which the isp-name argument is used by the device to determine the ISP domain to which a user belongs. Some earlier RADIUS servers, however, cannot recognize a username containing an ISP domain name. Before sending a username including a domain name to such a RADIUS server, the device must remove the domain name. This command allows you to specify whether to include a domain name in a username sent to a RADIUS server.

If a RADIUS scheme defines that the usernames are sent without the ISP domain name, do not apply the scheme to more than one ISP domain. Otherwise, the RADIUS server will consider two users in different ISP domains but with the same userid as one user.

For 802.1X users using EAP authentication, the user-name-format command configured for a RADIUS scheme does not take effect. The device does not change the usernames from clients before forwarding them to the RADIUS server.

If the RADIUS scheme is used for roaming wireless users, specify the keep-original keyword. Otherwise, authentication of the wireless users might fail.

Examples

# In RADIUS scheme radius1, configure the device to remove the domain name from the usernames sent to the RADIUS servers.

<Sysname> system-view

[Sysname] radius scheme radius1

[Sysname-radius-radius1] user-name-format without-domain

Related commands

display radius scheme

HWTACACS commands

data-flow-format (HWTACACS scheme view)

Use data-flow-format to set the data flow and packet measurement units for traffic statistics.

Use undo data-flow-format to restore the default.

Syntax

data-flow-format { data { byte | giga-byte | kilo-byte | mega-byte } | packet { giga-packet | kilo-packet | mega-packet | one-packet } } *

undo data-flow-format { data | packet }

Default

Traffic is counted in bytes and packets.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

data: Specifies the unit for data flows.

byte: Specifies the unit as byte.

giga-byte: Specifies the unit as gigabyte.

kilo-byte: Specifies the unit as kilobyte.

mega-byte: Specifies the unit as megabyte.

packet: Specifies the unit for data packets.

giga-packet: Specifies the unit as giga-packet.

kilo-packet: Specifies the unit as kilo-packet.

mega-packet: Specifies the unit as mega-packet.

one-packet: Specifies the unit as one-packet.

Usage guidelines

The data flow and packet measurement units for traffic statistics must be the same as configured on the HWTACACS accounting servers. Otherwise, accounting results might be incorrect.

Examples

# In HWTACACS scheme hwt1, set the data flow and packet measurement units for traffic statistics to kilobyte and kilo-packet, respectively.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] data-flow-format data kilo-byte packet kilo-packet

Related commands

display hwtacacs scheme

display hwtacacs scheme

Use display hwtacacs scheme to display the configuration or statistics of HWTACACS schemes.

Syntax

display hwtacacs scheme [ hwtacacs-scheme-name [ statistics ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

hwtacacs-scheme-name: Specifies an HWTACACS scheme by its name, a case-insensitive string of 1 to 32 characters. If you do not specify an HWTACACS scheme, this command displays the configuration of all HWTACACS schemes.

statistics: Displays the HWTACACS service statistics. If you do not specify this keyword, the command displays the configuration of the specified HWTACACS scheme.

Examples

# Displays the configuration of all HWTACACS schemes.

<Sysname> display hwtacacs scheme

Total 1 TACACS schemes

 

------------------------------------------------------------------

HWTACACS Scheme Name  : hwtac

  Index : 0

  Primary Auth Server:

    IP  : 2.2.2.2         Port: 49     State: Active

    Single-connection: Enabled

  Primary Author Server:

    IP  : 2.2.2.2         Port: 49     State: Active

    Single-connection: Disabled

  Primary Acct Server:

    IP  : Not Configured  Port: 49     State: Block

    Single-connection: Disabled

 

  NAS IP Address                        : 2.2.2.3

  Server Quiet Period(minutes)          : 5

  Realtime Accounting Interval(minutes) : 12

  Response Timeout Interval(seconds)    : 5

  Username Format                       : with-domain

  Data flow unit                        : Byte

  Packet unit                           : One

------------------------------------------------------------------

Table 11 Command output

Field

Description

Index

Index number of the HWTACACS scheme.

Primary Auth Server

Primary HWTACACS authentication server.

Primary Author Server

Primary HWTACACS authorization server.

Primary Acct Server

Primary HWTACACS accounting server.

Secondary Auth Server

Secondary HWTACACS authentication server.

Secondary Author Server

Secondary HWTACACS authorization server.

Secondary Acct Server

Secondary HWTACACS accounting server.

IP

IP address of the HWTACACS server. If no server is configured, this field displays Not configured.

Port

Service port of the HWTACACS server. If no port configuration is performed, this field displays the default port number.

Single-connection

Single connection status:

·         Enabled—Establish only one TCP connection for all users to communicate with the server.

·         Disabled—Establish a TCP connection for each user to communicate with the server.

State

Status of the HWTACACS server: active or blocked.

NAS IP Address

Source IP address for outgoing HWTACACS packets.

Server Quiet Period(minutes)

Quiet period for the primary servers, in minutes.

Realtime Accounting Interval(minutes)

Real-time accounting interval, in minutes.

Response Timeout Interval(seconds)

HWTACACS server response timeout period, in seconds.

Username Format

Format for the usernames sent to the HWTACACS servers of the HWTACACS scheme:

·         with-domain—Includes the domain name.

·         without-domain—Excludes the domain name.

·         keep-original—Forwards a username as the username is entered.

Data flow unit

Measurement unit for data flows.

Packet unit

Measurement unit for packets.

 

Related commands

reset hwtacacs statistics

hwtacacs nas-ip

Use hwtacacs nas-ip to specify a source IP address for outgoing HWTACACS packets.

Use undo hwtacacs nas-ip to delete a source IP address for outgoing HWTACACS packets.

Syntax

hwtacacs nas-ip { ipv4-address | ipv6 ipv6-address }

undo hwtacacs nas-ip { ipv4-address | ipv6 ipv6-address }

Default

The source IP address of an HWTACACS packet sent to the server is the primary IP address of the outbound interface.

Views

System view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address, which must be an address of the device. The IP address cannot be 0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.

ipv6 ipv6-address: Specifies an IPv6 address, which must be a unicast address of the device and cannot be a loopback address or a link-local address.

Usage guidelines

The source IP address of HWTACACS packets that a NAS sends must match the IP address of the NAS that is configured on the HWTACACS server. An HWTACACS server identifies a NAS by IP address. Upon receiving an HWTACACS packet, an HWTACACS server checks whether the source IP address of the packet is the IP address of a managed NAS.

·          If the source IP address of the packet is the IP address of a managed NAS, the server processes the packet.

·          If the source IP address of the packet is not the IP address of a managed NAS, the server drops the packet.

As a best practice, specify a loopback interface address as the source IP address for outgoing HWTACACS packets to avoid HWTACACS packet loss caused by physical port errors.

If you use both the nas-ip command and hwtacacs nas-ip command, the following guidelines apply:

·          The setting configured by using the nas-ip command in HWTACACS scheme view applies only to the HWTACACS scheme.

·          The setting configured by using the hwtacacs nas-ip command in system view applies to all HWTACACS schemes.

·          The setting in HWTACACS scheme view takes precedence over the setting in system view.

You can specify a maximum of 16 source IP addresses, including:

·          Zero or one public-network source IPv4 address.

·          Zero or one public-network source IPv6 address.

·          Private-network source IP addresses.

Examples

# Specify IP address 129.10.10.1 as the source IP address for outgoing HWTACACS packets.

<Sysname> system-view

[Sysname] hwtacacs nas-ip 129.10.10.1

Related commands

nas-ip (HWTACACS scheme view)

hwtacacs scheme

Use hwtacacs scheme to create an HWTACACS scheme and enter its view, or enter the view of an existing HWTACACS scheme.

Use undo hwtacacs scheme to delete an HWTACACS scheme.

Syntax

hwtacacs scheme hwtacacs-scheme-name

undo hwtacacs scheme hwtacacs-scheme-name

Default

No HWTACACS schemes exist.

Views

System view

Predefined user roles

network-admin

Parameters

hwtacacs-scheme-name: Specifies the HWTACACS scheme name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

An HWTACACS scheme can be used by more than one ISP domain at the same time.

You can configure a maximum of 16 HWTACACS schemes.

Examples

# Create an HWTACACS scheme named hwt1 and enter HWTACACS scheme view.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1]

Related commands

display hwtacacs scheme

key (HWTACACS scheme view)

Use key to set the shared key for secure HWTACACS authentication, authorization, or accounting communication.

Use undo key to delete the shared key for secure HWTACACS authentication, authorization, or accounting communication.

Syntax

key { accounting | authentication | authorization } { cipher | simple } string

undo key { accounting | authentication | authorization }

Default

No shared key is configured for secure HWTACACS authentication, authorization, or accounting communication.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

accounting: Specifies the shared key for secure HWTACACS accounting communication.

authentication: Specifies the shared key for secure HWTACACS authentication communication.

authorization: Specifies the shared key for secure HWTACACS authorization communication.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

Usage guidelines

The shared keys configured on the device must match those configured on the HWTACACS servers.

Examples

# In HWTACACS scheme hwt1, set the shared key to 123456TESTauth&! in plaintext form for secure HWTACACS authentication communication.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] key authentication simple 123456TESTauth&!

# Set the shared key to 123456TESTautr&! in plaintext form for secure HWTACACS authorization communication.

[Sysname-hwtacacs-hwt1] key authorization simple 123456TESTautr&!

# Set the shared key to 123456TESTacct&! in plaintext form for secure HWTACACS accounting communication.

[Sysname-hwtacacs-hwt1] key accounting simple 123456TESTacct&!

Related commands

display hwtacacs scheme

nas-ip (HWTACACS scheme view)

Use nas-ip to specify a source IP address for outgoing HWTACACS packets.

Use undo nas-ip to delete the source IP address of the specified type for outgoing HWTACACS packets.

Syntax

nas-ip { ipv4-address | ipv6 ipv6-address }

undo nas-ip [ ipv6 ]

Default

The source IP address of an outgoing HWTACACS packet is that configured by using the hwtacacs nas-ip command in system view.

If the hwtacacs nas-ip command is not configured, the source IP address is the primary IP address of the outbound interface.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address, which must be an address of the device. The IP address cannot be 0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.

ipv6 ipv6-address: Specifies an IPv6 address, which must be a unicast address of the device and cannot be a loopback address or a link-local address.

Usage guidelines

The source IP address of HWTACACS packets that a NAS sends must match the IP address of the NAS that is configured on the HWTACACS server. An HWTACACS server identifies a NAS by IP address. Upon receiving an HWTACACS packet, an HWTACACS server checks whether the source IP address of the packet is the IP address of a managed NAS.

·          If the source IP address of the packet is the IP address of a managed NAS, the server processes the packet.

·          If the source IP address of the packet is not the IP address of a managed NAS, the server drops the packet.

As a best practice, specify a loopback interface address as the source IP address for outgoing HWTACACS packets to avoid HWTACACS packet loss caused by physical port errors.

If you use both the nas-ip command and hwtacacs nas-ip command, the following guidelines apply:

·          The setting configured by using the nas-ip command in HWTACACS scheme view applies only to the HWTACACS scheme.

·          The setting configured by using the hwtacacs nas-ip command in system view applies to all HWTACACS schemes.

·          The setting in HWTACACS scheme view takes precedence over the setting in system view.

You can specify only one source IPv4 address and one source IPv6 address for an HWTACACS scheme.

Examples

# In HWTACACS scheme hwt1, specify IP address 10.1.1.1 as the source address for outgoing HWTACACS packets.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] nas-ip 10.1.1.1

Related commands

hwtacacs nas-ip

primary accounting (HWTACACS scheme view)

Use primary accounting to specify the primary HWTACACS accounting server.

Use undo primary accounting to restore the default.

Syntax

primary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo primary accounting

Default

No primary HWTACACS accounting server is specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address of the primary HWTACACS accounting server.

ipv6 ipv6-address: Specifies an IPv6 address of the primary HWTACACS accounting server.

port-number: Specifies the service port number of the primary HWTACACS accounting server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the primary HWTACACS accounting server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the primary HWTACACS accounting server use the same TCP connection to exchange accounting packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges accounting packets with the primary accounting server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of the primary HWTACACS accounting server are the same as those configured on the server.

Two accounting servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an accounting server only when it is not used for user accounting. Removing an accounting server affects only accounting processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify the primary accounting server with IP address 10.163.155.12, TCP port number 49, and plaintext shared key 123456TESTacct&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] primary accounting 10.163.155.12 49 key simple 123456TESTacct&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          secondary accounting (HWTACACS scheme view)

primary authentication (HWTACACS scheme view)

Use primary authentication to specify the primary HWTACACS authentication server.

Use undo primary authentication to restore the default.

Syntax

primary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo primary authentication

Default

No primary HWTACACS authentication server is specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the primary HWTACACS authentication server.

ipv6 ipv6-address: Specifies the IPv6 address of the primary HWTACACS authentication server.

port-number: Specifies the service port number of the primary HWTACACS authentication server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the primary HWTACACS authentication server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the primary HWTACACS authentication server use the same TCP connection to exchange all authentication packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges authentication packets with the primary authentication server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of the primary HWTACACS authentication server are the same as those configured on the server.

Two authentication servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an authentication server only when it is not used for user authentication. Removing an authentication server affects only authentication processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify the primary authentication server with IP address 10.163.155.13, TCP port number 49, and plaintext shared key 123456TESTauth&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] primary authentication 10.163.155.13 49 key simple 123456TESTauth&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          secondary authentication (HWTACACS scheme view)

primary authorization

Use primary authorization to specify the primary HWTACACS authorization server.

Use undo primary authorization to restore the default.

Syntax

primary authorization { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo primary authorization

Default

No primary HWTACACS authorization server is specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the primary HWTACACS authorization server.

ipv6 ipv6-address: Specifies the IPv6 address of the primary HWTACACS authorization server.

port-number: Specifies the service port number of the primary HWTACACS authorization server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the primary HWTACACS authorization server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the primary HWTACACS authorization server use the same TCP connection to exchange all authorization packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges authorization packets with the primary authorization server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of the primary HWTACACS authorization server are the same as those configured on the server.

Two authorization servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an authorization server only when it is not used for user authorization. Removing an authorization server affects only authorization processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify the primary authorization server with IP address 10.163.155.13, TCP port number 49, and plaintext shared key 123456TESTautr&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] primary authorization 10.163.155.13 49 key simple 123456TESTautr&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          secondary authorization

reset hwtacacs statistics

Use reset hwtacacs statistics to clear HWTACACS statistics.

Syntax

reset hwtacacs statistics { accounting | all | authentication | authorization }

Views

User view

Predefined user roles

network-admin

Parameters

accounting: Clears the HWTACACS accounting statistics.

all: Clears all HWTACACS statistics.

authentication: Clears the HWTACACS authentication statistics.

authorization: Clears the HWTACACS authorization statistics.

Examples

# Clear all HWTACACS statistics.

<Sysname> reset hwtacacs statistics all

Related commands

display hwtacacs scheme

secondary accounting (HWTACACS scheme view)

Use secondary accounting to specify a secondary HWTACACS accounting server.

Use undo secondary accounting to remove a secondary HWTACACS accounting server.

Syntax

secondary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo secondary accounting [ { ipv4-address | ipv6 ipv6-address } [ port-number ] * ]

Default

No secondary HWTACACS accounting servers are specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the secondary HWTACACS accounting server.

ipv6 ipv6-address: Specifies the IPv6 address of the secondary HWTACACS accounting server.

port-number: Specifies the service port number of the secondary HWTACACS accounting server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the secondary HWTACACS accounting server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the secondary HWTACACS accounting server use the same TCP connection to exchange all accounting packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges accounting packets with the secondary accounting server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of the secondary HWTACACS accounting server are the same as those configured on the server.

An HWTACACS scheme supports a maximum of 16 secondary HWTACACS accounting servers. If the primary server fails, the device tries to communicate with a secondary server in active state. The device connects to the secondary servers in the order they are configured.

If you do not specify any parameters for the undo secondary accounting command, the command removes all secondary accounting servers.

Two accounting servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an accounting server only when it is not used for user accounting. Removing an accounting server affects only accounting processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify a secondary accounting server with IP address 10.163.155.12, TCP port number 49, and plaintext shared key 123456TESTacct&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] secondary accounting 10.163.155.12 49 key simple 123456TESTacct&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          primary accounting (HWTACACS scheme view)

secondary authentication (HWTACACS scheme view)

Use secondary authentication to specify a secondary HWTACACS authentication server.

Use undo secondary authentication to remove a secondary HWTACACS authentication server.

Syntax

secondary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo secondary authentication [ { ipv4-address | ipv6 ipv6-address } [ port-number ]* ]

Default

No secondary HWTACACS authentication servers are specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the secondary HWTACACS authentication server.

ipv6 ipv6-address: Specifies the IPv6 address of the secondary HWTACACS authentication server.

port-number: Specifies the service port number of the secondary HWTACACS authentication server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the secondary HWTACACS authentication server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the secondary HWTACACS authentication server use the same TCP connection to exchange all authentication packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges authentication packets with the secondary authentication server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of each secondary HWTACACS authentication server are the same as those configured on the corresponding server.

An HWTACACS scheme supports a maximum of 16 secondary HWTACACS authentication servers. If the primary server fails, the device tries to communicate with a secondary server in active state. The device connects to the secondary servers in the order they are configured.

If you do not specify any parameters for the undo secondary authentication command, the command removes all secondary authentication servers.

Two authentication servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an authentication server only when it is not used for user authentication. Removing an authentication server affects only authentication processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify a secondary authentication server with IP address 10.163.155.13, TCP port number 49, and plaintext shared key 123456TESTauth&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] secondary authentication 10.163.155.13 49 key simple 123456TESTauth&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          primary authentication (HWTACACS scheme view)

secondary authorization

Use secondary authorization to specify a secondary HWTACACS authorization server.

Use undo secondary authorization to remove a secondary HWTACACS authorization server.

Syntax

secondary authorization { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | single-connection ] *

undo secondary authorization [ { ipv4-address | ipv6 ipv6-address } [ port-number ]* ]

Default

No secondary HWTACACS authorization servers are specified.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the secondary HWTACACS authorization server.

ipv6 ipv6-address: Specifies the IPv6 address of the secondary HWTACACS authorization server.

port-number: Specifies the service port number of the secondary HWTACACS authorization server. The value range for the TCP port number is 1 to 65535. The default setting is 49.

key: Specifies the shared key for secure communication with the secondary HWTACACS authorization server.

cipher: Specifies the key in encrypted form.

simple: Specifies the key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 255 characters. Its encrypted form is a case-sensitive string of 1 to 373 characters.

single-connection: The device and the secondary HWTACACS authorization server use the same TCP connection to exchange all authorization packets for all users. If you do not specify this keyword, the device establishes a new TCP connection each time it exchanges authorization packets with the secondary authorization server for a user. If the HWTACACS server supports the single-connection method, H3C recommends that you specify this keyword to reduce TCP connections for improving system performance.

Usage guidelines

Make sure the port number and shared key settings of the secondary HWTACACS authorization server are the same as those configured on the server.

An HWTACACS scheme supports a maximum of 16 secondary HWTACACS authorization servers. If the primary server fails, the device tries to communicate with a secondary server in active state. The device connects to the secondary servers in the order they are configured.

If you do not specify any parameters for the undo secondary authorization command, the command removes all secondary authorization servers.

Two authorization servers specified for a scheme, primary or secondary, cannot have identical IP address and port number settings.

You can remove an authorization server only when it is not used for user authorization. Removing an authorization server affects only authorization processes that occur after the remove operation.

Examples

# In HWTACACS scheme hwt1, specify a secondary authorization server with IP address 10.163.155.13, TCP port number 49, and plaintext shared key 123456TESTautr&!.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] secondary authorization 10.163.155.13 49 key simple 123456TESTautr&!

Related commands

·          display hwtacacs scheme

·          key (HWTACACS scheme view)

·          primary authorization

timer quiet (HWTACACS scheme view)

Use timer quiet to set the quiet timer for the servers specified in an HWTACACS scheme.

Use undo timer quiet to restore the default.

Syntax

timer quiet minutes

undo timer quiet

Default

The server quiet period is 5 minutes.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

minutes: Specifies the server quiet period in minutes, in the range of 1 to 255.

Examples

# In HWTACACS scheme hwt1, set the server quiet timer to 10 minutes.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] timer quiet 10

Related commands

display hwtacacs scheme

timer realtime-accounting (HWTACACS scheme view)

Use timer realtime-accounting to set the real-time accounting interval.

Use undo timer realtime-accounting to restore the default.

Syntax

timer realtime-accounting minutes

undo timer realtime-accounting

Default

The real-time accounting interval is 12 minutes.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

minutes: Specifies the real-time accounting interval in minutes, in the range of 0 to 60. Setting this interval to 0 disables the device from sending online user accounting information to the HWTACACS accounting server.

Usage guidelines

For real-time accounting, a NAS must transmit the accounting information of online users to the HWTACACS accounting server periodically. This command is used to set the interval.

A short interval helps improve accounting precision but requires many system resources.

Table 12 Recommended real-time accounting intervals

Number of users

Real-time accounting interval

1 to 99

3 minutes

100 to 499

6 minutes

500 to 999

12 minutes

1000 or more

15 minutes or longer

 

Examples

# In HWTACACS scheme hwt1, set the real-time accounting interval to 51 minutes.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] timer realtime-accounting 51

Related commands

display hwtacacs scheme

timer response-timeout (HWTACACS scheme view)

Use timer response-timeout to set the HWTACACS server response timeout timer.

Use undo timer response-timeout to restore the default.

Syntax

timer response-timeout seconds

undo timer response-timeout

Default

The HWTACACS server response timeout time is 5 seconds.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

seconds: Specifies the HWTACACS server response timeout time, in the range of 1 to 300 seconds.

Usage guidelines

HWTACACS is based on TCP. When the server response timeout timer or the TCP timeout timer times out, the device is disconnected from the HWTACACS server.

The client timeout period of the associated access module cannot be shorter than the total response timeout timer of all HWTACACS authentication servers in the scheme. Any violation will result in user logoffs before the authentication process is complete.

Examples

# In HWTACACS scheme hwt1, set the HWTACACS server response timeout timer to 30 seconds.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] timer response-timeout 30

Related commands

display hwtacacs scheme

user-name-format (HWTACACS scheme view)

Use user-name-format to specify the format of usernames to be sent to the HWTACACS servers of an HWTACACS scheme.

Use undo user-name-format to restore the default.

Syntax

user-name-format { keep-original | with-domain | without-domain }

undo user-name-format

Default

The ISP domain name is included in the usernames sent to the HWTACACS servers of an HWTACACS scheme.

Views

HWTACACS scheme view

Predefined user roles

network-admin

Parameters

keep-original: Sends the usernames to the HWTACACS servers as the usernames are entered.

with-domain: Includes the ISP domain name in the usernames sent to the HWTACACS servers.

without-domain: Excludes the ISP domain name from the usernames sent to the HWTACACS servers.

Usage guidelines

A username is generally in the userid@isp-name format, of which the isp-name argument is used by the device to determine the ISP domain to which a user belongs. However, some HWTACACS servers cannot recognize a username containing an ISP domain name. Before sending a username including a domain name to such an HWTACACS server, the device must remove the domain name. This command allows you to specify whether to include a domain name in a username to be sent to an HWTACACS server.

If an HWTACACS scheme defines that the usernames are sent without the ISP domain name, do not apply the scheme to more than one ISP domain. Otherwise, the HWTACACS server will consider two users in different ISP domains but with the same userid as one user.

If the HWTACACS scheme is used for wireless users, specify the username format as keep-original. Otherwise, authentication of the wireless users might fail.

Examples

# In HWTACACS scheme hwt1, configure the device to remove the ISP domain name from the usernames sent to the HWTACACS servers.

<Sysname> system-view

[Sysname] hwtacacs scheme hwt1

[Sysname-hwtacacs-hwt1] user-name-format without-domain

Related commands

display hwtacacs scheme

LDAP commands

attribute-map

Use attribute-map to specify the LDAP attribute map in an LDAP scheme.

Use undo attribute-map to restore the default.

Syntax

attribute-map map-name

undo attribute-map

Default

An LDAP scheme does not use an LDAP attribute map.

Views

LDAP scheme view

Predefined user roles

network-admin

Parameters

map-name: Specifies an LDAP attribute map by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

When the LDAP scheme used for authorization contains an LDAP attribute map, the device converts server-assigned LDAP attributes to device-recognizable AAA attributes based on the mapping entries.

You can specify only one LDAP attribute map in an LDAP scheme. If you execute this command multiple times, the most recent configuration takes effect.

If you specify another attribute map or change the mapping entries, the new settings are effective only on the LDAP authorization that occurs after your operation.

Examples

# Specify LDAP attribute map map1 in LDAP scheme test.

<Sysname> system-view

[Sysname] ldap scheme test

[Sysname-ldap-test] attribute-map map1

Related commands

·          display ldap-scheme

·          ldap attribute-map

authentication-server

Use authentication-server to specify the LDAP authentication server for an LDAP scheme.

Use undo authentication-server to restore the default.

Syntax

authentication-server server-name

undo authentication-server

Default

No LDAP authentication server is specified for an LDAP scheme.

Views

LDAP scheme view

Predefined user roles

network-admin

Parameters

server-name: Specifies the name of an existing LDAP server, a case-insensitive string of 1 to 64 characters.

Usage guidelines

You can specify only one LDAP authentication server in an LDAP scheme. If you execute this command multiple times, the most recent configuration takes effect.

Examples

# In LDAP scheme ldap1, specify the LDAP authentication server as ccc.

<Sysname> system-view

[Sysname] ldap scheme ldap1

[Sysname-ldap-ldap1] authentication-server ccc

Related commands

·          display ldap scheme

·          ldap server

authorization-server

Use authorization-server to specify the LDAP authorization server for an LDAP scheme.

Use undo authorization-server to restore the default.

Syntax

authorization-server server-name

undo authorization-server

Default

No LDAP authorization server is specified for an LDAP scheme.

Views

LDAP scheme view

Predefined user roles

network-admin

Parameters

server-name: Specifies the name of an existing LDAP server, a case-insensitive string of 1 to 64 characters.

Usage guidelines

You can specify only one LDAP authorization server in an LDAP scheme. If you execute this command multiple times, the most recent configuration takes effect.

Examples

# In LDAP scheme ldap1, specify the LDAP authorization server as ccc.

<Sysname> system-view

[Sysname] ldap scheme ldap1

[Sysname-ldap-ldap1] authorization-server ccc

Related commands

·          display ldap scheme

·          ldap server

display ldap scheme

Use display ldap scheme to display LDAP scheme configuration.

Syntax

display ldap scheme [ ldap-scheme-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ldap-scheme-name: Specifies an LDAP scheme by its name, a case-insensitive string of 1 to 32 characters. If you do not specify an LDAP scheme, this command displays the configuration of all LDAP schemes.

Examples

# Display the configuration of all LDAP schemes.

<Sysname> display ldap scheme

Total 1 LDAP schemes

 

------------------------------------------------------------------

LDAP scheme name             : aaa

  Authentication server      : aaa

    IP                       : 1.1.1.1

    Port                     : 111

    LDAP protocol version    : LDAPv3

    Server timeout interval  : 10 seconds

    Login account DN         : Not configured

    Base DN                  : Not configured

    Search scope             : all-level

    User searching parameters:

      User object class      : Not configured

      Username attribute     : cn

      Username format        : with-domain

  Authorization server       : aaa

    IP                       : 1.1.1.1

    Port                     : 111

    LDAP protocol version    : LDAPv3

    Server timeout interval  : 10 seconds

    Login account DN         : Not configured

    Base DN                  : Not configured

    Search scope             : all-level

    User searching parameters:

      User object class      : Not configured

      Username attribute     : cn

      Username format        : with-domain

  Attribute map              : map1

 ------------------------------------------------------------------

Table 13 Command output

Field

Description

Authentication server

Name of the LDAP authentication server. If no server is configured, this field displays Not configured.

Authorization server

Name of the LDAP authorization server. If no server is configured, this field displays Not configured.

IP

IP address of the LDAP server. If no server is specified, this field displays Not configured.

Port

Port number of the server. If no port number is specified, this field displays the default port number.

LDAP protocol version

LDAP version, LDAPv2 or LDAPv3.

Server timeout interval

LDAP server timeout period, in seconds.

Login account DN

DN of the administrator.

Base DN

Base DN for user search.

Search scope

User DN search scope, including:

·         all-level—All subdirectories.

·         single-levelNext lower level of subdirectories under the base DN.

User searching parameters

User search parameters.

User object class

User object class for user DN search. If no user object class is configured, this field displays Not configured.

Username attribute

User account attribute for login.

Username format

Format for the usernames sent to the server.

Attribute map

LDAP attribute map used by the scheme. If no LDAP attribute map is used, this field displays Not configured.

 

ip

Use ip to configure the IP address of the LDAP server.

Use undo ip to restore the default.

Syntax

ip ip-address [ port port-number ]

undo ip

Default

An LDAP server does not have an IP address.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the IP address of the LDAP server.

port port-number: Specifies the TCP port number of the LDAP server. The value range for the port-number argument is 1 to 65535, and the default value is 389.

Usage guidelines

The LDAP service port configured on the device must be consistent with the service port of the LDAP server.

If you change the IP address and port number of the LDAP server, the change is effective only on the LDAP authentication that occurs after the change.

Examples

# Specify the IP address and port number of LDAP server ccc as 192.168.0.10 and 4300, respectively.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] ip 192.168.0.10 port 4300

Related commands

ldap server

ipv6

Use ipv6 to configure the IPv6 address of the LDAP server.

Use undo ipv6 to restore the default.

Syntax

ipv6 ipv6-address [ port port-number ]

undo ipv6

Default

An LDAP server does not have an IPv6 address.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

ipv6-address: Specifies the IPv6 address of the LDAP server.

port port-number: Specifies the TCP port number of the LDAP server. The value range for the port-number argument is 1 to 65535, and the default value is 389.

Usage guidelines

The LDAP service port configured on the device must be consistent with the service port of the LDAP server.

If you change the IP address and port number of the LDAP server, the change is effective only on the LDAP authentication that occurs after the change.

Examples

# Specify the IPv6 address and port number of LDAP server ccc as 1:2::3:4 and 4300, respectively.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] ipv6 1:2::3:4 port 4300

Related commands

ldap server

ldap attribute-map

Use ldap attribute-map to create an LDAP attribute map and enter its view, or enter the view of an existing LDAP attribute map.

Use undo ldap attribute-map to delete an LDAP attribute map.

Syntax

ldap attribute-map map-name

undo ldap attribute-map map-name

Default

No LDAP attribute maps exist.

Views

System view

Predefined user roles

network-admin

Parameters

map-name: Specifies the name of the LDAP attribute map, a case-insensitive string of 1 to 31 characters.

Usage guidelines

Execute this command multiple times to create multiple LDAP attribute maps. You can add multiple mapping entries to an LDAP attribute map. Each entry defines the mapping between an LDAP attribute and an AAA attribute.

Examples

# Create an LDAP attribute map named map1 and enter LDAP attribute map view.

<Sysname> system-view

[Sysname] ldap attribute-map map1

[Sysname-ldap-map-map1]

Related commands

·          attribute-map

·          ldap scheme

·          map

ldap scheme

Use ldap scheme to create an LDAP scheme and enter its view, or enter the view of an existing LDAP scheme.

Use undo ldap scheme to delete an LDAP scheme.

Syntax

ldap scheme ldap-scheme-name

undo ldap scheme ldap-scheme-name

Default

No LDAP schemes exist.

Views

System view

Predefined user roles

network-admin

Parameters

ldap-scheme-name: Specifies the LDAP scheme name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

An LDAP scheme can be used by more than one ISP domain at the same time.

You can configure a maximum of 16 LDAP schemes.

Examples

# Create an LDAP scheme named ldap1 and enter LDAP scheme view.

<Sysname> system-view

[Sysname] ldap scheme ldap1

[Sysname-ldap-ldap1]

Related commands

display ldap scheme

ldap server

Use ldap server to create an LDAP server and enter its view, or enter the view of an existing LDAP server.

Use undo ldap server to delete an LDAP server.

Syntax

ldap server server-name

undo ldap server server-name

Default

No LDAP servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

server-name: Specifies the LDAP server name, a case-insensitive string of 1 to 64 characters.

Examples

# Create an LDAP server named ccc and enter LDAP server view.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc]

Related commands

display ldap scheme

login-dn

Use login-dn to specify the administrator DN.

Use undo login-dn to restore the default.

Syntax

login-dn dn-string

undo login-dn

Default

No administrator DN is specified.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

dn-string: Specifies the administrator DN for binding with the server, a case-insensitive string of 1 to 255 characters.

Usage guidelines

The administrator DN specified on the device must be consistent with the administrator DN configured on the LDAP server.

If you change the administrator DN, the change is effective only on the LDAP authentication that occurs after the change.

Examples

# Specify the administrator DN as uid=test, ou=people, o=example, c=city for LDAP server ldap1.

<Sysname> system-view

[Sysname] ldap server ldap1

[Sysname-ldap-server-ldap1] login-dn uid=test,ou=people,o=example,c=city

Related commands

display ldap scheme

login-password

Use login-password to configure the administrator password for binding with the LDAP server during LDAP authentication.

Use undo login-password to restore the default.

Syntax

login-password { cipher | simple } string

undo login-password

Default

No administrator password is configured.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

cipher: Specifies a password in encrypted form.

simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password. Its plaintext form is a case-sensitive string of 1 to 128 characters. Its encrypted form is a case-sensitive string of 1 to 201 characters.

Usage guidelines

This command is effective only after the login-dn command is configured.

Examples

# Configure the administrator password as abcdefg in plaintext form for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] login-password simple abcdefg

Related commands

·          display ldap scheme

·          login-dn

map

Use map to configure a mapping entry in an LDAP attribute map.

Use undo map to delete the specified mapping entries from the LDAP attribute map.

Syntax

map ldap-attribute ldap-attribute-name [ prefix prefix-value delimiter delimiter-value ] aaa-attribute { user-group | user-profile }

undo map [ ldap-attribute ldap-attribute-name ]

Default

An LDAP attribute map does not contain mapping entries.

Views

LDAP attribute map view

Predefined user roles

network-admin

Parameters

ldap-attribute ldap-attribute-name: Specifies an LDAP attribute by its name. The ldap-attribute-name argument is a case-insensitive string of 1 to 63 characters.

prefix prefix-value delimiter delimiter-value: Specifies a partial value string of the LDAP attribute for attribute mapping. The prefix-value argument represents the position where the partial string starts. The prefix is a case-insensitive string of 1 to 7 characters, such as cn=. The delimiter-value argument represents the position where the partial string ends, such as a comma (,). If you do not specify the prefix prefix-value delimiter delimiter-value option, the mapping entry uses the entire value string of the LDAP attribute.

aaa-attribute: Specifies an AAA attribute.

user-group: Specifies the user group attribute.

user-profile: Specifies the user profile attribute.

Usage guidelines

Because the device ignores unrecognized LDAP attributes, configure the mapping entries to include important LDAP attributes that should not be ignored.

An LDAP attribute can be mapped only to one AAA attribute. Different LDAP attributes can be mapped to the same AAA attribute.

If you do not specify an LDAP attribute for the undo map command, the command deletes all mapping entries from the LDAP attribute map.

Examples

# In LDAP attribute map map1, map a partial value string of the LDAP attribute named memberof to AAA attribute named user-group.

<Sysname> system-view

[Sysname] ldap attribute-map map1

[Sysname-ldap-map-map1] map ldap-attribute memberof prefix cn= delimiter , aaa-attribute user-group

Related commands

·          ldap attribute-map

·          user-group

·          user-profile

protocol-version

Use protocol-version to specify the LDAP version.

Use undo protocol-version to restore the default.

Syntax

protocol-version { v2 | v3 }

undo protocol-version

Default

The LDAP version is LDAPv3.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

v2: Specifies the LDAP version LDAPv2.

v3: Specifies the LDAP version LDAPv3.

Usage guidelines

For successful LDAP authentication, the LDAP version used by the device must be consistent with the version used by the LDAP server.

If you change the LDAP version, the change is effective only on the LDAP authentication that occurs after the change.

A Microsoft LDAP server supports only LDAPv3.

Examples

# Specify the LDAP version as LDAPv2 for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] protocol-version v2

Related commands

display ldap scheme

search-base-dn

Use search-base-dn to specify the base DN for user search.

Use undo search-base-dn to restore the default.

Syntax

search-base-dn base-dn

undo search-base-dn

Default

No base DN is specified for user search.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

base-dn: Specifies the base DN for user search, a case-insensitive string of 1 to 255 characters.

Examples

# Specify the base DN for user search as dc=ldap,dc=com for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] search-base-dn dc=ldap,dc=com

Related commands

·          display ldap scheme

·          ldap server

search-scope

Use search-scope to specify the user search scope.

Use undo search-scope to restore the default.

Syntax

search-scope { all-level | single-level }

undo search-scope

Default

The user search scope is all-level.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

all-level: Specifies that the search goes through all subdirectories of the base DN.

single-level: Specifies that the search goes through only the next lower level of subdirectories under the base DN.

Examples

# Specify the search scope for the LDAP authentication as all subdirectories of the base DN for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] search-scope all-level

Related commands

·          display ldap scheme

·          ldap server

server-timeout

Use server-timeout to set the LDAP server timeout period, the maximum time that the device waits for an LDAP response.

Use undo server-timeout to restore the default.

Syntax

server-timeout time-interval

undo server-timeout

Default

The LDAP server timeout period is 10 seconds.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

time-interval: Specifies the LDAP server timeout period in the range of 5 to 20 seconds.

Usage guidelines

If you change the LDAP server timeout period, the change is effective only on the LDAP authentication that occurs after the change.

Examples

# Set the LDAP server timeout period to 15 seconds for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] server-timeout 15

Related commands

display ldap scheme

user-parameters

Use user-parameters to configure LDAP user attributes, including the username attribute, username format, and user-defined user object class.

Use undo user-parameters to restore the default of an LDAP user attribute.

Syntax

user-parameters { user-name-attribute { name-attribute | cn | uid } | user-name-format { with-domain | without-domain } | user-object-class object-class-name }

undo user-parameters { user-name-attribute | user-name-format | user-object-class }

Default

The LDAP username attribute is cn and the username format is without-domain. No user object class is specified and the default user object class of the LDAP server is used.

Views

LDAP server view

Predefined user roles

network-admin

Parameters

user-name-attribute { name-attribute | cn | uid }: Specifies the username attribute. The name-attribute argument represents an attribute value, a case-insensitive string of 1 to 64 characters. The cn keyword represents the user account attribute of common name, and the uid keyword represents the user account attribute of user ID.

user-name-format { with-domain | without-domain }: Specifies the format of the usernames to be sent to the server. The with-domain keyword indicates that the usernames contain the domain name, and the without-domain keyword indicates that the usernames do not contain the domain name.

user-object-class object-class-name: Specifies the user object class for user search. The object-class-name argument represents a class value, a case-insensitive string of 1 to 64 characters.

Usage guidelines

If the usernames on the LDAP server do not contain the domain name, specify the without-domain keyword. If the usernames contain the domain name, specify the with-domain keyword.

Examples

# Set the user object class to person for LDAP server ccc.

<Sysname> system-view

[Sysname] ldap server ccc

[Sysname-ldap-server-ccc] user-parameters user-object-class person

Related commands

·          display ldap scheme

·          login-dn

ITA policy commands

accounting-level

Use accounting-level to specify a traffic level for ITA accounting.

Use undo accounting-level to remove the ITA accounting configuration for a traffic level.

Syntax

accounting-level level { ipv4 | ipv6 }

undo accounting-level [ level ]

Default

No traffic levels are specified for ITA accounting.

Views

ITA policy view

Predefined user roles

network-admin

Parameters

level: Specifies a traffic level in the range of 1 to 8.

ipv4: Counts the traffic as IPv4 traffic.

ipv6: Counts the traffic as IPv6 traffic.

Usage guidelines

By defining different traffic levels based on the destination addresses of users' traffic, you can use ITA to separate the traffic accounting statistics of different levels for each user.

Execute this command multiple times to specify multiple traffic levels for ITA accounting.

If you do not specify a level for the undo accounting-level command, this command removes the ITA accounting configuration for all traffic levels in the ITA policy.

Examples

# In ITA policy ita1, specify traffic levels 2 and 5, and count the level-2 traffic as IPv4 traffic and the level-5 traffic as IPv6 traffic.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1] accounting-level 2 ipv4

[Sysname-ita-policy-ita1] accounting-level 5 ipv6

Related commands

ita policy

accounting-merge enable

Use accounting-merge enable to enable the accounting merge feature.

Use undo accounting-merge enable to disable the accounting merge feature.

Syntax

accounting-merge enable

undo accounting-merge enable

Default

The accounting merge feature is disabled.

Views

ITA policy view

Predefined user roles

network-admin

Usage guidelines

When accounting merge is enabled, the device merges accounting statistics for the ITA traffic of all levels in the ITA policy. It reports the traffic as the lowest level of the policy to the accounting server.

Examples

# Enable the accounting merge feature for ITA policy ita1.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1] accounting-merge enable

Related commands

ita policy

accounting-method

Use accounting-method to configure the accounting method for an ITA policy.

Use undo accounting-method to restore the default.

Syntax

accounting-method { none | radius-scheme radius-scheme-name [ none ] }

undo accounting-method

Default

The default accounting method of an ITA policy is none.

Views

ITA policy view

Predefined user roles

network-admin

Parameters

none: Does not perform accounting.

radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, a case-insensitive string of 1 to 32 characters.

Usage guidelines

Use this command to configure accounting methods for an ITA policy. ITA accounting is separated from accounting of other services.

You can specify one primary accounting method and one backup accounting method for an ITA policy.

When the primary method is invalid, the device uses the backup method. For example, the accounting-method radius-scheme radius-scheme-name none command specifies RADIUS accounting as the primary method and no accounting as the backup method. The device performs RADIUS accounting by default and does not perform accounting when the RADIUS server is invalid.

Examples

# Specify RADIUS accounting scheme radius1 for ITA policy ita1.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1] accounting radius-scheme radius1

Related commands

·          ita policy

·          radius scheme

ita policy

Use ita policy to create an ITA policy and enter its view, or enter the view of an existing ITA policy.

Use undo ita policy to delete an ITA policy.

Syntax

ita policy policy-name

undo ita policy policy-name

Default

No ITA policies exist.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies the ITA policy name, a case-insensitive string of 1 to 31 characters.

Examples

# Create an ITA policy named ita1 and enter ITA policy view.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1]

traffic-quota-out

Use traffic-quota-out to configure access control for users that have used up their ITA data quotas.

Use undo traffic-quota-out to restore the default.

Syntax

traffic-quota-out { offline | online }

undo traffic-quota-out

Default

Users cannot access the authorized IP subnets after their ITA data quotas are used up.

Views

ITA policy view

Predefined user roles

network-admin

Parameters

offline: Prohibits users from accessing the authorized IP subnets after their ITA data quotas are used up.

online: Permits users to access the authorized IP subnets after their ITA data quotas are used up.

Examples

# In ITA policy ita1, prohibit users from accessing the authorized IP subnets after their ITA data quotas are used up.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1] traffic-quota-out offline

Related commands

ita policy

traffic-separate

Use traffic-separate enable to exclude the amount of ITA traffic from the overall traffic statistics that are sent to the accounting server.

Use undo traffic-separate enable to include the amount of ITA traffic into the overall traffic statistics that are sent to the accounting server.

Syntax

traffic-separate enable

undo traffic-separate enable

Default

The amount of ITA traffic is included in the overall traffic statistics that are sent to the accounting server.

Views

ITA policy view

Predefined user roles

network-admin

Examples

# In ITA policy ita1, exclude the amount of ITA traffic from the overall traffic statistics that are sent to the accounting server.

<Sysname> system-view

[Sysname] ita policy ita1

[Sysname-ita-policy-ita1] traffic-separate enable

Related commands

ita policy


802.1X commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

display dot1x

Use display dot1x to display information about 802.1X.

Syntax

display dot1x [ sessions | statistics ] [ ap ap-name [ radio radio-id ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

sessions: Displays 802.1X session information.

statistics: Displays 802.1X statistics.

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify a radio, this command displays 802.1X information for all radios on the specified AP.

Usage guidelines

If you do not specify the sessions or statistics keyword, this command displays all information about 802.1X, including session information, statistics, and settings.

If you do not specify the ap ap-name [ radio radio-id ] option, this command displays all 802.1X information.

Examples

# Display all information about 802.1X.

<Sysname> display dot1x

Global 802.1X parameters:

   802.1X authentication  : Enabled

   CHAP authentication    : Enabled

   Max-tx period          : 30 s

   Handshake period       : 15 s

   Quiet timer            : Disabled

       Quiet period       : 60 s

   Supp timeout           : 30 s

   Server timeout         : 100 s

   Reauth period          : 3600 s

   Max auth requests      : 2

   EAD assistant function : Disabled

       URL                : http://www.dwsoft.com

       Free IP            : 6.6.6.0         255.255.255.0

       EAD timeout        : 30 min

   Domain delimiter       : @

 Online 802.1X wired users    : 1

 Online 802.1X wireless users : 1

 

   EAPOL packets: Tx 3, Rx 3

   Sent EAP Request/Identity packets : 1

        EAP Request/Challenge packets: 1

        EAP Success packets: 1

        EAP Failure packets: 0

   Received EAPOL Start packets : 1

            EAPOL LogOff packets: 1

            EAP Response/Identity packets : 1

            EAP Response/Challenge packets: 1

            Error packets: 0

   Online 802.1X users: 1

          MAC address         Auth state

          0001-0000-0000      Authenticated

AP name: AP1  Radio ID: 1  SSID: wlan_dot1x_ssid

   BSSID                      : 1111-1111-1111

   802.1X authentication      : Enabled

   Handshake                  : Enabled

   Handshake security         : Disabled

   Periodic reauth            : Disabled

   Mandatory auth domain      : Not configured

   Max online users           : 4096

 

   EAPOL packets: Tx 3, Rx 3

   Sent EAP Request/Identity packets : 1

        EAP Request/Challenge packets: 1

        EAP Success packets: 1

        EAP Failure packets: 0

   Received EAPOL Start packets : 1

        EAPOL LogOff packets: 1

        EAP Response/Identity packets : 1

        EAP Response/Challenge packets: 1

        Error packets: 0

   Online 802.1X users: 1

          MAC address         Auth state

          0001-0000-0002      Authenticated

Table 14 Command output

Field

Description

Global 802.1X parameters

Global 802.1X configuration.

802.1X authentication

Whether 802.1X is enabled globally.

CHAP authentication

Performs EAP termination and uses CHAP to communicate with the RADIUS server.

If EAP or PAP is enabled, this field is not available.

EAP authentication

Relays EAP packets and supports any of the EAP authentication methods to communicate with the RADIUS server.

If CHAP or PAP is enabled, this field is not available.

PAP authentication

Performs EAP termination and uses PAP to communicate with the RADIUS server.

If CHAP or EAP is enabled, this field is not available.

Max-tx period

Username request timeout timer in seconds.

Handshake period

Handshake timer in seconds.

Quiet timer

Status of the quiet timer, enabled or disabled.

Quiet period

Quiet timer in seconds.

Supp timeout

Client timeout timer in seconds.

Server timeout

Server timeout timer in seconds.

Reauth period

Periodic reauthentication timer in seconds.

Max auth requests

Maximum number of attempts for sending an authentication request to a client.

EAD assistant function

Whether EAD assistant is enabled.

URL

Redirect URL for unauthenticated users using a Web browser to access the network.

Free IP

Network segment accessible to unauthenticated users.

EAD timeout

EAD rule timer in minutes.

Domain delimiter

Domain delimiters supported by the device.

Online 802.1X wired users

Number of wired online 802.1X users, including users that have passed 802.1X authentication and users that are performing 802.1X authentication.

Online 802.1X wireless users

Number of wireless online 802.1X users, including users that have passed 802.1X authentication and users that are performing 802.1X authentication.

EAPOL packets

Number of sent (Tx) and received (Rx) EAPOL packets.

Sent EAP Request/Identity packets

Number of sent EAP-Request/Identity packets.

EAP Request/Challenge packets

Number of sent EAP-Request/MD5-Challenge packets.

EAP Success packets

Number of sent EAP-Success packets.

EAP Failure packets

Number of sent EAP-Failure packets.

Received EAPOL Start packets

Number of received EAPOL-Start packets.

EAPOL LogOff packets

Number of received EAPOL-LogOff packets.

EAP Response/Identity packets

Number of received EAP-Response/Identity packets.

EAP Response/Challenge packets

Number of received EAP-Response/MD5-Challenge packets.

Error packets

Number of received error packets.

Online 802.1X users

Number of online 802.1X users on the service template, including users that have passed 802.1X authentication and users that are performing 802.1X authentication.

MAC address

MAC addresses of the online 802.1X users.

Auth state

Authentication status of the online 802.1X users.

AP name

Name of the AP with which users are associated.

Radio ID

ID of the radio with which users are associated.

SSID

SSID with which users are associated.

BSSID

ID of the BSS with which users are associated.

 

display dot1x connection

Use display dot1x connection to display information about online 802.1X users.

Syntax

display dot1x connection [ ap ap-name [ radio radio-id ] | slot slot-number | user-mac mac-address | user-name name-string ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify a radio, this command displays information about online 802.1X users that are connected to all radios on the specified AP.

slot slot-number: Specifies an IRF member device by its member ID.

user-mac mac-address: Specifies an 802.1X user by MAC address. The mac-address argument represents the MAC address of the user, in the form of H-H-H.

user-name name-string: Specifies an 802.1X user by its name. The name-string argument represents the username, a case-sensitive string of 1 to 253 characters.

Usage guidelines

If you do not specify any parameters, this command displays information about all online 802.1X users.

Examples

# Display information about all online 802.1X users.

<Sysname> display dot1x connection

Total connections: 1

 

Slot ID: 1

User MAC address                : 0015-e9a6-7cfe

AP name                         : ap1

Radio ID                        : 1

SSID                            : wlan_dot1x_ssid

BSSID                           : 0015-e9a6-7cf0

User name                       : ias

Authentication domain           : 1

IPv4 address                    : 192.168.1.1

IPv6 address                    : 2000:0:0:0:1:2345:6789:abcd

Authentication method           : CHAP

Initial VLAN                    : 1

Authorization VLAN              : N/A

Authorization ACL number        : 3001

Authorization user profile      : N/A

Termination action              : Default

Session timeout period          : 2 sec

Online from                     : 2013/03/02 13:14:15

Online duration                 : 0 h 2 m 15 s

Table 15 Command output

Field

Description

Total connections

Number of online 802.1X users.

Slot ID

Member ID of the device.

User MAC address

MAC address of the user.

AP name

Name of the AP with which the user is associated.

Radio ID

ID of the radio with which the user is associated.

SSID

SSID with which the user is associated.

BSSID

ID of the BSS with which the user is associated.

Authentication domain

ISP domain used for 802.1X authentication.

IPv4 address

IPv4 address of the user.

If the device does not get the IPv4 address of the user, this field is not available.

IPv6 address

IPv6 address of the user.

If the device does not get the IPv6 address of the user, this field is not available.

Authentication method

EAP message handling method:

·         CHAP—Performs EAP termination and uses CHAP to communicate with the RADIUS server.

·         EAP—Relays EAP packets and supports any of the EAP authentication methods to communicate with the RADIUS server.

·         PAPPerforms EAP termination and uses PAP to communicate with the RADIUS server.

Initial VLAN

VLAN to which the user belongs before 802.1X authentication.

Authorization VLAN

VLAN authorized to the user.

Authorization ACL number

ACL authorized to the user.

Authorization user profile

User profile authorized to the user.

Termination action

Action attribute assigned by the server when the session timeout timer expires:

·         Default—Logs off the online authenticated 802.1X user. This attribute does not take effect when periodic online user reauthentication is enabled and the periodic reauthentication timer is shorter than the session timeout timer.

·         Radius-request—Reauthenticates the online user when the session timeout timer expires, regardless of whether the periodic online reauthentication feature is enabled or not.

If the device performs local authentication, this field displays N/A.

Session timeout period

Session timeout timer assigned by the server.

If the device performs local authentication, this field displays N/A.

Online from

Time from which the 802.1X user came online.

Online duration

Online duration of the 802.1X user.

 

dot1x authentication-method

Use dot1x authentication-method to specify an EAP message handling method.

Use undo dot1x authentication-method to restore the default.

Syntax

dot1x authentication-method { chap | eap | pap }

undo dot1x authentication-method

Default

The access device performs EAP termination and uses CHAP to communicate with the RADIUS server.

Views

System view

Predefined user roles

network-admin

Parameters

chap: Sets the access device to perform Extensible Authentication Protocol (EAP) termination and use the Challenge Handshake Authentication Protocol (CHAP) to communicate with the RADIUS server.

eap: Sets the access device to relay EAP packets, and supports any of the EAP authentication methods to communicate with the RADIUS server.

pap: Sets the access device to perform EAP termination and use the Password Authentication Protocol (PAP) to communicate with the RADIUS server.

Usage guidelines

The access device terminates or relays EAP packets.

·          In EAP termination mode—The access device re-encapsulates and sends the authentication data from the client in standard RADIUS packets to the RADIUS server. The device performs either CHAP or PAP authentication with the RADIUS server. In this mode the RADIUS server supports only MD5-Challenge EAP authentication, and the username and password EAP authentication initiated by an iNode client.

?  PAP transports usernames and passwords in plain text. The authentication method applies to scenarios that do not require high security. To use PAP, the client can be an iNode 802.1X client.

?  CHAP transports usernames in plain text and passwords in encrypted form over the network. CHAP is more secure than PAP.

·          In EAP relay mode—The access device relays EAP messages between the client and the RADIUS server. The EAP relay mode supports multiple EAP authentication methods, such as MD5-Challenge, EAP-TLS, and PEAP. To use this mode, make sure the RADIUS server meets the following requirements:

?  Supports the EAP-Message and Message-Authenticator attributes.

?  Uses the same EAP authentication method as the client.

If this mode is used, the user-name-format command configured in RADIUS scheme view does not take effect. For more information about the user-name-format command, see "RADIUS commands."

If RADIUS authentication is used, you must configure the access device to use the same authentication method (PAP, CHAP, or EAP) as the RADIUS server.

Examples

# Enable the access device to terminate EAP packets and perform PAP authentication with the RADIUS server.

<Sysname> system-view

[Sysname] dot1x authentication-method pap

Related commands

display dot1x

dot1x domain-delimiter

Use dot1x domain-delimiter to specify a set of domain name delimiters supported by the device.

Use undo dot1x domain-delimiter to restore the default.

Syntax

dot1x domain-delimiter string

undo dot1x domain-delimiter

Default

The device supports only the at sign (@) delimiter for 802.1X users.

Views

System view

Predefined user roles

network-admin

Parameters

string: Specifies a set of 1 to 16 domain name delimiters for 802.1X users. No space is required between delimiters. Available delimiters include the at sign (@), backslash (\), dot (.), and forward slash (/). If you want to use backslash (\) as the domain name delimiter, you must enter the escape character (\) along with the backslash (\) sign.

Usage guidelines

Any character in the configured set can be used as the domain name delimiter for 802.1X authentication users. Usernames that include domain names can use the format of username@domain-name, domain-name\username, username.domain-name, or username/domain-name.

The delimiter set you configured overrides the default setting. If the at sign (@) is not included in the delimiter set, the device does not support the 802.1X users who use this sign as the domain name delimiter.

If a username string contains multiple configured delimiters, the device takes the rightmost delimiter in the username string as the domain name delimiter. For example, if you configure the forward slash (/), dot (.), and backslash (\) as delimiters, the domain name delimiter for the username string 121.123/22\@abc is the backslash (\). The username is @abc and the domain name is 121.123/22.

Examples

# Specify the at sign (@) and forward slash (/) as domain name delimiters.

<Sysname> system-view

[Sysname] dot1x domain-delimiter @/

Related commands

display dot1x

dot1x ead-assistant enable

Use dot1x ead-assistant enable to enable the EAD assistant feature.

Use undo dot1x ead-assistant enable to disable the EAD assistant feature.

Syntax

dot1x ead-assistant enable

undo dot1x ead-assistant enable

Default

The EAD assistant feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

The EAD assistant feature enables the access device to redirect a user seeking to access the network to download and install EAD client. This feature eliminates the tedious job of the administrator to deploy EAD clients.

The feature is mutually exclusive with MAC authentication. For EAD assistant to take effect on a service template, you must first disable MAC authentication on the service template.

To make the EAD assistant feature take effect on a service template, you must enable 802.1X on the service template.

Examples

# Enable the EAD assistant feature.

<Sysname> system-view

[Sysname] dot1x ead-assistant enable

Related commands

·          display dot1x

·          dot1x ead-assistant free-ip

·          dot1x ead-assistant url

dot1x ead-assistant free-ip

Use dot1x ead-assistant free-ip to configure a free IP.

Use undo dot1x ead-assistant free-ip to remove the specified or all free IP addresses.

Syntax

dot1x ead-assistant free-ip ip-address { mask-address | mask-length }

undo dot1x ead-assistant free-ip { ip-address { mask-address | mask-length } | all }

Default

No free IP is configured. Users cannot access any segments before they pass 802.1X authentication.

Views

System view

Predefined user roles

network-admin

Parameters

ip-address: Specifies a freely accessible IP address segment, also called a free IP.

mask: Specifies an IP address mask.

mask-length: Specifies IP address mask length in the range of 1 to 32.

all: Removes all free IP addresses.

Usage guidelines

Execute this command multiple times to configure multiple free IPs.

With EAD assistant enabled on the device, unauthenticated 802.1X users can access the network resources in the free IP segments before they pass 802.1X authentication.

Examples

# Configure 192.168.1.1/16 as a free IP.

<Sysname> system-view

[Sysname] dot1x ead-assistant free-ip 192.168.1.1 255.255.0.0

Related commands

·          display dot1x

·          dot1x ead-assistant enable

·          dot1x ead-assistant url

dot1x ead-assistant url

Use dot1x ead-assistant url to configure a redirect URL.

Use undo dot1x ead-assistant url to restore the default.

Syntax

dot1x ead-assistant url url-string

undo dot1x ead-assistant url

Default

No redirect URL is configured.

Views

System view

Predefined user roles

network-admin

Parameters

url-string: Specifies the redirect URL, a case-insensitive string of 1 to 64 characters in the format http://string.

Usage guidelines

When an unauthenticated user uses a Web browser to access networks other than the free IP, the device redirects the user to the redirect URL.

The redirect URL must be on the free IP subnet.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure the redirect URL as http://test.com.

<Sysname> system-view

[Sysname] dot1x ead-assistant url http://test.com

Related commands

·          display dot1x

·          dot1x ead-assistant enable

·          dot1x ead-assistant free-ip

dot1x retry

Use dot1x retry to set the maximum number of attempts for sending an authentication request to a client.

Use undo dot1x retry to restore the default.

Syntax

dot1x retry retries

undo dot1x retry

Default

The maximum number of attempts is 2.

Views

System view

Predefined user roles

network-admin

Parameters

retries: Sets the maximum number of attempts for sending an authentication request to a client. The value range is 1 to 10.

Usage guidelines

The access device retransmits an authentication request to a client in any of the following situations:

·          The device does not receive any responses from the client within the username request timeout timer. The timer is set by using the dot1x timer tx-period tx-period-value command for the EAP-Request/Identity packet.

·          The device does not receive any responses from the client within the client timeout timer. The timer is set by using the dot1x timer supp-timeout supp-timeout-value command for the EAP-Request/MD5-Challenge packet.

The access device stops retransmitting the request, if it has made the maximum number of request transmission attempts but still received no response.

Examples

# Set the maximum number of attempts to 9 for sending an authentication request to a client.

<Sysname> system-view

[Sysname] dot1x retry 9

Related commands

·          display dot1x

·          dot1x timer

dot1x timer

Use dot1x timer to set 802.1X timers.

Use undo dot1x timer to restore the defaults.

Syntax

dot1x timer { ead-timeout ead-timeout-value | handshake-period handshake-period-value | quiet-period quiet-period-value | reauth-period reauth-period-value | server-timeout server-timeout-value | supp-timeout supp-timeout-value | tx-period tx-period-value }

undo dot1x timer { ead-timeout | handshake-period | quiet-period | reauth-period | server-timeout | supp-timeout | tx-period }

Default

The following 802.1X timers apply:

·          EAD rule timer: 30 minutes.

·          Handshake timer: 15 seconds.

·          Quiet timer: 60 seconds.

·          Periodic reauthentication timer: 3600 seconds.

·          Server timeout timer: 100 seconds.

·          Client timeout timer: 30 seconds.

·          Username request timeout timer: 30 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

ead-timeout ead-timeout-value: Sets the EAD rule timer in minutes. The value range for the ead-timeout-value argument is 1 to 1440.

handshake-period handshake-period-value: Sets the handshake timer in seconds. The value range for the handshake-period-value argument is 5 to 1024.

quiet-period quiet-period-value: Sets the quiet timer in seconds. The value range for the quiet-period-value argument is 10 to 120.

reauth-period reauth-period-value: Sets the periodic reauthentication timer in seconds. The value range for the reauth-period-value argument is 60 to 7200.

server-timeout server-timeout-value: Sets the server timeout timer in seconds. The value range for the server-timeout-value argument is 100 to 300.

supp-timeout supp-timeout-value: Sets the client timeout timer in seconds. The value range for the supp-timeout-value argument is 1 to 120.

tx-period tx-period-value: Sets the username request timeout timer in seconds. The value range for the tx-period-value argument is 1 to 120.

Usage guidelines

In most cases, the default settings are sufficient. You can edit the timers, depending on the network conditions.

·          In a low-speed network, increase the client timeout timer.

·          In a vulnerable network, set the quiet timer to a high value.

·          In a high-performance network with quick authentication response, set the quiet timer to a low value.

·          In a network with authentication servers of different performance, adjust the server timeout timer.

The periodic reauthentication timer does not take effect if the server has assigned a session timeout timer to the device.

The change to the periodic reauthentication timer applies to the users who have been online only after the old timer expires. Other timer changes take effect immediately on the device.

The network device uses the following 802.1X timers:

·          EAD rule timer (EAD timeout)Sets the lifetime of each EAD rule. When the timer expires or the user passes authentication, the rule is removed. If users fail to download the EAD client or fail to pass authentication within the timer, they must reconnect to the network to access the free IP.

·          Handshake timer (handshake-period)Sets the interval at which the access device sends client handshake requests to check the online status of a client that has passed authentication. If the device receives no response after sending the maximum number of handshake requests, it considers that the client has logged off.

·          Quiet timer (quiet-period)Starts when a client fails authentication. The access device must wait the time period before it can process the authentication attempts from the client.

·          Periodic reauthentication timer (reauth-period)Sets the interval at which the network device periodically reauthenticates online 802.1X users. To enable periodic online user reauthentication on a service template, use the dot1x re-authenticate command.

·          Server timeout timer (server-timeout)Starts when the access device sends a RADIUS Access-Request packet to the authentication server. If no response is received when this timer expires, the access device retransmits the request to the server.

·          Client timeout timer (supp-timeout)Starts when the access device sends an EAP-Request/MD5-Challenge packet to a client. If no response is received when this timer expires, the access device retransmits the request to the client.

·          Username request timeout timer (tx-period)Starts when the device sends an EAP-Request/Identity packet to a client in response to an authentication request. If the device receives no response before this timer expires, it retransmits the request. The timer also sets the interval at which the network device sends multicast EAP-Request/Identity packets to detect clients that cannot actively request authentication.

Examples

# Set the server timeout timer to 150 seconds.

<Sysname> system-view

[Sysname] dot1x timer server-timeout 150

Related commands

display dot1x

reset dot1x statistics

Use reset dot1x statistics to clear 802.1X statistics.

Syntax

reset dot1x statistics [ ap ap-name [ radio radio-id ] ]

Views

User view

Predefined user roles

network-admin

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify a radio, this command clears 802.1X statistics for all radios on the specified AP.

Usage guidelines

If you do not specify any parameters, this command clears all 802.1X statistics.

Examples

# Clear all 802.1X statistics.

<Sysname> reset dot1x statistics

Related commands

display dot1x


802.1X client commands

dot1x supplicant anonymous identify

Use dot1x supplicant anonymous identify to configure an 802.1X client anonymous identifier.

Use undo dot1x supplicant anonymous identify to restore the default.

Syntax

dot1x supplicant anonymous identify identifier

undo dot1x supplicant anonymous identify

Default

No 802.1X client anonymous identifier exists.

Views

AP provision view

Predefined user roles

network-admin

Parameters

identifier: Specifies an 802.1X client anonymous identifier, a case-sensitive string of 1 to 253 characters.

Usage guidelines

At the first authentication phase, packets sent to the authenticator are not encrypted. The use of an 802.1X client anonymous identifier prevents the 802.1X client username from being disclosed at the first phase. The 802.1X client-enabled device sends the anonymous identifier to the authenticator instead of the 802.1X client username. The 802.1X client username will be sent to the authenticator in encrypted packets at the second phase.

If no 802.1X client anonymous identifier is configured, the device sends the 802.1X client username at the first phase.

The configured 802.1X client anonymous identifier takes effect only if one of the following EAP authentication methods is used:

·          PEAP-MSCHAPv2.

·          PEAP-GTC.

·          TTLS-MSCHAPv2.

·          TTLS-GTC.

If the MD5-Challenge EAP authentication is used, the configured 802.1X client anonymous identifier does not take effect. The device still uses the 802.1X client username at the first phase.

Do not configure the 802.1X client anonymous identifier if the vendor-specific authentication server cannot identify anonymous identifiers.

Examples

# Configure the 802.1X client anonymous identifier as bbb for the AP ap1.

<Sysname> system-view

[Sysname] wlan ap ap1

[Sysname-wlan-ap-ap1] provision

[Sysname-wlan-ap-ap1-prvs] dot1x supplicant anonymous identify bbb

Related commands

·          dot1x supplicant enable

·          dot1x supplicant username

dot1x supplicant eap-method

Use dot1x supplicant eap-method to specify an 802.1X client EAP authentication method.

Use undo dot1x supplicant eap-method to restore the default.

Syntax

dot1x supplicant eap-method { md5 | peap-gtc | peap-mschapv2 | ttls-gtc | ttls-mschapv2 }

undo dot1x supplicant eap-method

Default

The MD5-Challenge authentication is used as the 802.1X client EAP authentication method.

Views

AP provision view

Predefined user roles

network-admin

Parameters

md5: Specifies the MD5-Challenge EAP authentication method.

peap-gtc: Specifies the PEAP-GTC EAP authentication method.

peap-mschapv2: Specifies the PEAP-MSCHAPv2 EAP authentication method.

ttls-gtc: Specifies the TTLS-GTC EAP authentication method.

ttls-mschapv2: Specifies the TTLS-MSCHAPv2 EAP authentication method.

Usage guidelines

Make sure the specified 802.1X client EAP authentication method is supported by the authentication server.

Examples

# Specify PEAP-GTC as the 802.1X client EAP authentication method for the AP ap1.

<Sysname> system-view

[Sysname] wlan ap ap1

[Sysname-wlan-ap-ap1] provision

[Sysname-wlan-ap-ap1-prvs] dot1x supplicant eap-method peap-gtc

Related commands

dot1x supplicant enable

dot1x supplicant enable

Use dot1x supplicant enable to enable the 802.1X client feature.

Use undo dot1x supplicant enable to disable the 802.1X client feature.

Syntax

dot1x supplicant enable

undo dot1x supplicant enable

Default

The 802.1X client feature is disabled.

Views

AP provision view

Predefined user roles

network-admin

Usage guidelines

Make sure you have configured 802.1X authentication on the authenticator before you use this command.

If the 802.1X client-enabled AP has online clients, disabling the 802.1X client feature will log off all the online clients.

Examples

# Enable the 802.1X client feature for the AP ap1.

<Sysname> system-view

[Sysname] wlan ap ap1

[Sysname-wlan-ap-ap1] provision

[Sysname-wlan-ap-ap1-prvs] dot1x supplicant enable

dot1x supplicant password

Use dot1x supplicant password to set the 802.1X client password.

Use undo dot1x supplicant password to restore the default.

Syntax

dot1x supplicant password { cipher | simple } password

undo dot1x supplicant password

Default

No 802.1X client password exists.

Views

AP provision view

Predefined user roles

network-admin

Parameters

cipher: Specifies a ciphertext password.

simple: Specifies a plaintext password.

password: Specifies the password string. A plaintext password is a case-sensitive string of 1 to 127 characters. A ciphertext password is a case-sensitive string of 1 to 201 characters.

Examples

# Set the 802.1X client password to 123456 in plain text for the AP ap1.

<Sysname> system-view

[Sysname] wlan ap ap1

[Sysname-wlan-ap-ap1] provision

[Sysname-wlan-ap-ap1-prvs] dot1x supplicant password simple 123456

Related commands

dot1x supplicant enable

dot1x supplicant username

Use dot1x supplicant username to configure an 802.1X client username.

Use undo dot1x supplicant username to restore the default.

Syntax

dot1x supplicant username username

undo dot1x supplicant username

Default

No 802.1X client username exists.

Views

AP provision view

Predefined user roles

network-admin

Parameters

username: Specifies the 802.1X client username, a case-sensitive string of 1 to 253 characters.

Usage guidelines

802.1X client usernames can contain domain names. The supported domain name delimiters include the at sign (@), backslash (\), dot (.), and forward slash (/). Usernames that include domain names can use the format of username@domain-name, domain-name\username, username.domain-name, or username/domain-name.

If you want to use backslash (\) as the domain name delimiter, you must enter the escape character (\) along with the backslash (\) sign.

If a username string contains multiple configured delimiters, the device takes the rightmost delimiter in the username string as the domain name delimiter. For more information about the domain name delimiters, see the dot1x domain-delimiter command.

Examples

# Configure the 802.1X client username as aaa for the AP ap1.

<Sysname> system-view

[Sysname] wlan ap ap1

[Sysname-wlan-ap-ap1] provision

[Sysname-wlan-ap-ap1-prvs] dot1x supplicant username aaa

Related commands

·          dot1x domain-delimiter

·          dot1x supplicant enable


MAC authentication commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

display mac-authentication

Use display mac-authentication to display MAC authentication settings and statistics. The output includes configuration information, MAC authentication statistics, and online user statistics.

Syntax

display mac-authentication [ ap ap-name [ radio radio-id ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify a radio, this command displays MAC authentication settings and statistics for all radios on the specified AP.

Usage guidelines

If you do not specify any parameters, this command displays all MAC authentication settings and statistics.

Examples

# Display all MAC authentication settings and statistics.

<Sysname> display mac-authentication

Global MAC authentication parameters:

   MAC authentication     : Enabled

   User name format       : MAC address in lowercase(xxxxxxxxxxxx)

           Username       : mac

           Password       : Not configured

   Offline detect period  : 300 s

   Quiet period           : 60 s

   Server timeout         : 100 s

   Authentication domain  : Not configured, use default domain

 Online MAC-auth wired users : 0

 Online MAC-auth wireless users : 1

 

 Silent MAC users:

          MAC address       VLAN ID  From port               Port index

 

AP name: AP1  Radio ID: 1  SSID: wlan_maca_ssid

   BSSID                      : 487a-daa0-74f0

   MAC authentication         : Enabled

   Authentication domain      : Not configured

   Max online users           : 4096

   Authentication attempts    : successful 1, failed 0

   Current online users       : 1

          MAC address       Auth state

          2477-032b-db8c    Authenticated

Table 16 Command output

Field

Description

MAC authentication

Whether MAC authentication is enabled globally.

User name format

User account type: MAC-based or shared.

·         If MAC-based accounts are used, this field displays the format settings for the username. For example, MAC address in lowercase(xxxxxxxxxxxx) indicates that the MAC address is in the hexadecimal notation without hyphens, and letters are in lower case.

·         If a shared account is used, this field displays Fixed account.

Username

Username for MAC authentication.

·         If MAC-based accounts are used, this field displays mac. The device uses the MAC address of each user as the username and password for MAC authentication.

·         If a shared account is used, this field displays the username of the shared account for MAC authentication users. By default, the username is mac.

Password

Password for MAC authentication.

·         If MAC-based accounts are used or if a shared account is used but no password is configured, this field displays Not configured.

·         If a shared account is used and a password is configured, this field displays a string of asterisks (******).

Offline detect period

Offline detect timer.

Quiet period

Quiet timer.

Server timeout

Server timeout timer.

Authentication domain

MAC authentication domain specified in system view.

If no authentication domain is specified in system view, this field displays Not configured, use default domain.

Online MAC-auth wired users

Number of wired online MAC authentication users, including users that have passed MAC authentication and users that are performing MAC authentication.

Online MAC-auth wireless users

Number of wireless online MAC authentication users, including users that have passed MAC authentication and users that are performing MAC authentication.

Silent MAC users

Information about silent MAC addresses.

MAC address

Silent MAC address.

VLAN ID

ID of the VLAN to which the silent MAC address belongs.

From port

Name of the port that marks the MAC address as a silent MAC address.

Port index

Index of the port that marks the MAC address as a silent MAC address.

AP name

Name of the AP with which users are associated.

Radio ID

ID of the radio with which users are associated.

SSID

SSID with which users are associated.

BSSID

ID of the BSS with which users are associated.

 

display mac-authentication connection

Use display mac-authentication connection to display information about online MAC authentication users.

Syntax

display mac-authentication connection [ ap ap-name [ radio radio-id ] | slot slot-number | user-mac mac-address | user-name user-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify this option, the command displays information about all online MAC authentication users that are connected to the specified AP.

slot slot-number: Specifies an IRF member device by its member ID.

user-mac mac-address: Specifies an online MAC authentication user by its MAC address. The mac-address argument represents the MAC address of the user, in the form of H-H-H.

user-name user-name: Specifies an online MAC authentication user by its username. The user name is a case-sensitive string of 1 to 55 characters, and it can include the domain name.

Usage guidelines

If you do not specify any parameters, this command displays information about all online MAC authentication users.

Examples

# Display information about all online MAC authentication users.

<Sysname> display mac-authentication connection

Total connections: 1

 

Slot ID: 1

User MAC address              : 0015-e9a6-7cfe

AP name                       : ap1

Radio ID                      : 1

SSID                          : wlan_dot1x_ssid

BSSID                         : 0015-e9a6-7cf0

User name                     : ias

Authentication domain         : 1

Initial VLAN                  : 1

Authorization VLAN            : 100

Authorization ACL number      : 3001

Authorization user profile    : N/A

Authorization URL             : N/A

Termination action            : Radius-request

Session timeout period        : 2 sec

Online from                   : 2016/06/02 13:14:15

Online duration               : 0h 2m 15s

Table 17 Command output

Field

Description

Total connections

Total number of online MAC authentication users.

Slot ID

Member ID of the device.

User MAC address

MAC address of the user.

AP name

Name of the AP with which the user is associated.

Radio ID

ID of the radio with which the user is associated.

SSID

SSID with which the user is associated.

BSSID

ID of the BSS with which the user is associated.

Authentication domain

MAC authentication domain to which the user belongs.

Initial VLAN

VLAN that holds the user before MAC authentication.

Authorization VLAN

VLAN authorized to the user.

Authorization ACL number

This field is not supported in the current software version.

ACL authorized to the user.

Authorization user profile

This field is not supported in the current software version.

User profile authorized to the user.

Authorization URL

This field is not supported in the current software version.

Redirect URL authorized to the user.

Termination action

Action attribute assigned by the server when the session timeout timer expires.

The following server-assigned action attributes are available:

·         Default—Logs off the online authenticated user when the session timeout timer expires.

·         Radius-request—Reauthenticates the online user when the session timeout timer expires.

If the device performs local authentication, this field displays N/A.

Session timeout period

Session timeout timer assigned by the server.

If the device performs local authentication, this field displays N/A.

Online from

Time from which the MAC authentication user came online.

Online duration

Online duration of the MAC authentication user.

 

mac-authentication domain

Use mac-authentication domain to specify a global or service template-specific authentication domain.

Use undo mac-authentication domain to restore the default.

Syntax

mac-authentication domain domain-name

undo mac-authentication domain

Default

No authentication domain is specified for MAC authentication users. The system default authentication domain is used. For more information about the default authentication domain, see the domain default enable command in "AAA commands."

Views

System view

Service template view

Predefined user roles

network-admin

Parameters

domain-name: Specifies the name of an ISP domain, a case-insensitive string of 1 to 255 characters.

Usage guidelines

A service template chooses an authentication domain for MAC authentication users in the following order:

1.        Authentication domain specified on the service template.

2.        Global authentication domain specified in system view.

3.        Default authentication domain.

Examples

# Specify domain domain1 as the global MAC authentication domain.

<Sysname> system-view

[Sysname] mac-authentication domain domain1

Related commands

·          display mac-authentication

·          domain default enable

mac-authentication timer server-timeout

Use mac-authentication timer server-timeout to set the server timeout timer for MAC authentication.

Use undo mac-authentication timer server-timeout to restore the default.

Syntax

mac-authentication timer server-timeout server-timeout-value

undo mac-authentication timer server-timeout

Default

The server timeout timer is 100 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

server-timeout-value: Sets the server timeout timer in the range of 100 to 300, in seconds.

Usage guidelines

The server timeout timer sets the interval that the device waits for a response from a RADIUS server before the device regards the RADIUS server unavailable. If the timer expires during MAC authentication, the user cannot access the network.

Examples

# Set the server timeout timer to 150 seconds.

<Sysname> system-view

[Sysname] mac-authentication timer server-timeout 150

Related commands

display mac-authentication

mac-authentication user-name-format

Use mac-authentication user-name-format to configure the type of user accounts for MAC authentication users.

Use undo mac-authentication user-name-format to restore the default.

Syntax

mac-authentication user-name-format { fixed [ account name ] [ password { cipher | simple } string ] | mac-address [ { with-hyphen [ six-section | three-section ] | without-hyphen } [ lowercase | uppercase ] ] }

undo mac-authentication user-name-format

Default

Each user's MAC address is used as the username and password for MAC authentication. A MAC address is in the hexadecimal notation without hyphens, and letters are in lower case.

Views

System view

Predefined user roles

network-admin

Parameters

fixed: Uses a shared account for all MAC authentication users.

account name: Specifies the username for the shared account. The name is a case-sensitive string of 1 to 55 characters, excluding the at sign (@). If you do not specify a username, the default name mac applies.

password: Specifies a password for the shared user account.

cipher: Specifies the password in encrypted form.

simple: Specifies the password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password. Its plaintext form is a case-sensitive string of 1 to 63 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

mac-address: Uses MAC-based user accounts for MAC authentication users. You can also specify the format of username and password by using the following keywords:

·          with-hyphen: Includes hyphens in the MAC address.

?  six-section: Hyphenates the MAC address into six groups of two hexadecimal digits, for example, xx-xx-xx-xx-xx-xx or XX-XX-XX-XX-XX-XX.

?  three-section: Hyphenates the MAC address into three groups of four hexadecimal digits, for example, xxxx-xxxx-xxxx or XXXX-XXXX-XXXX.

If you do not specify the six-section or three-section keyword, the MAC address is in six-section format.

·          without-hyphen: Excludes hyphens from the MAC address, for example, xxxxxxxxxxxx or XXXXXXXXXXXX.

·          lowercase: Specifies letters in lower case.

·          uppercase: Specifies letters in upper case.

Usage guidelines

If you specify the MAC-based user account, the device uses the MAC address of a user as the username and password for MAC authentication of the user. This user account type ensures high authentication security. However, you must create on the authentication server a user account for each user, using the MAC address of the user as both the username and password.

If you specify a shared user account, the device uses the specified username and password for MAC authentication of all users. Because all MAC authentication users use a single account for authentication, you only need to create one account on the authentication server. This user account type is suitable for trusted networks.

Examples

# Configure a shared account for MAC authentication users, set the username to abc and password to plaintext string of xyz.

<Sysname> system-view

[Sysname] mac-authentication user-name-format fixed account abc password simple xyz

# Use MAC-based user accounts for MAC authentication users. Each MAC address must be in the hexadecimal notation with hyphens, and letters are in upper case.

<Sysname> system-view

[Sysname] mac-authentication user-name-format mac-address with-hyphen uppercase

Related commands

display mac-authentication

reset mac-authentication statistics

Use reset mac-authentication statistics to clear MAC authentication statistics.

Syntax

reset mac-authentication statistics [ ap ap-name [ radio radio-id ] ]

Views

User view

Predefined user roles

network-admin

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), dots (.), left brackets ([), right brackets (]), forward slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio-id argument varies by device model. If you do not specify a radio, this command clears MAC authentication statistics for all radios on the specified AP.

Usage guidelines

If you do not specify any parameters, this command clears all MAC authentication statistics.

Examples

# Clear all MAC authentication statistics.

<Sysname> reset mac-authentication statistics

Related commands

display mac-authentication


Portal commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

aaa-fail nobinding enable

Use aaa-fail nobinding enable to enable AAA failure unbinding.

Use undo aaa-fail nobinding enable to restore the default.

Syntax

aaa-fail nobinding enable

undo aaa-fail nobinding enable

Default

AAA failure unbinding is disabled.

Views

MAC binding server view

Predefined user roles

network-admin

Usage guidelines

If a portal user fails AAA in MAC-trigger authentication, the user cannot trigger authentication before the MAC-trigger entry of the user ages out. After the MAC-trigger entry ages out, the user triggers MAC-trigger authentication when it accesses the network.

After this feature is enabled, the device sets the MAC-trigger entry state for a user to unbound immediately after the user fails AAA in MAC-trigger authentication. Before the user's MAC-trigger entry ages out, the user can trigger normal portal authentication.

Examples

# Enable AAA failure unbinding for MAC binding server mts.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] aaa-fail nobinding enable

Related commands

display portal mac-trigger-server

aging-time

Use aging-time to set the aging time for MAC-trigger entries.

Use undo aging-time to restore the default.

Syntax

aging-time seconds

undo aging-time

Default

The aging time for MAC-trigger entries is 300 seconds.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

seconds: Specifies the aging time for MAC-trigger entries. The value range is 60 to 7200 seconds.

Usage guidelines

With MAC-based quick portal authentication enabled, the device generates a MAC-trigger entry for a user when the device detects traffic from the user for the first time. The MAC-trigger entry records the following information:

·          MAC address of the user

·          Interface index

·          VLAN ID

·          Traffic statistics

·          Aging timer

When the aging time expires, the device deletes the MAC-trigger entry. The device re-creates a MAC-trigger entry for the user when it detects the user's traffic again.

Examples

# Set the aging time to 300 seconds for MAC-trigger entries.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] aging-time 300

Related commands

display portal mac-trigger-server

app-id

Use app-id to specify the APP ID for QQ authentication.

Use undo app-id to restore the default.

Syntax

app-id app-id

undo app-id

Default

An APP ID for QQ authentication exists.

Views

QQ authentication server view

Predefined user roles

network-admin

Parameters

app-id: Specifies the APP ID for QQ authentication.

Usage guidelines

This command is restricted to Hong Kong and Macao.

To use QQ authentication for portal users, you must go to the Tencent Open Platform (http://connect.qq.com/intro/login) to finish the following tasks:

1.        Register as a developer by using a valid QQ account.

2.        Apply the access to the platform for your website. The website is the webpage to which users are redirected after passing QQ authentication.

You will obtain the APP ID and APP key from the Tencent Open Platform after your application succeeds.

After a portal user passes QQ authentication, the QQ authentication server sends the authorization code of the user to the portal Web server. After the portal Web server receives the authorization code, it sends the authorization code of the user, the APP ID, and the APP key to the QQ authentication server for verification. If the information is verified as correct, the device determines that the user passes QQ authentication.

Examples

# Specify 101235509 as the APP ID for QQ authentication.

<Sysname> system-view

[Sysname] portal extend-auth-server qq

[Sysname-portal-extend-auth-server-qq] app-id 101235509

Related commands

display portal extend-auth-server

app-key

Use app-key to specify the APP key for QQ authentication.

Use undo app-key to restore the default.

Syntax

app-key { cipher | simple } app-key

undo app-key

Default

An APP key for QQ authentication exists.

Views

QQ authentication server view

Predefined user roles

network-admin

Parameters

cipher: Specifies the APP key in encrypted form.

simple: Specifies the APP key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

app-key: Specifies the APP key string. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 1 to 117 characters.

Usage guidelines

This command is restricted to Hong Kong and Macao.

To use QQ authentication for portal users, you must go to the Tencent Open Platform (http://connect.qq.com/intro/login) to finish the following tasks:

1.        Register as a developer by using a valid QQ account.

2.        Apply the access to the platform for your website. The website is the webpage to which users are redirected after passing QQ authentication.

You will obtain the APP ID and APP key from the Tencent Open Platform after your application succeeds.

After a portal user passes QQ authentication, the QQ authentication server sends the authorization code of the user to the portal Web server. After the portal Web server receives the authorization code, it sends the authorization code of the user, the APP ID, and the APP key to the QQ authentication server for verification. If the information is verified as correct, the device determines that the user passes QQ authentication.

Examples

# Specify 8a5428e6afdc3e2a2843087fe73f1507 in plaintext form as the APP key for QQ authentication.

<Sysname> system-view

[Sysname] portal extend-auth-server qq

[Sysname-portal-extend-auth-server-qq] app-key simple 8a5428e6afdc3e2a2843087fe73f1507

Related commands

display portal extend-auth-server

authentication-timeout

Use authentication-timeout to set the authentication timeout, which is the maximum amount of time the device waits for portal authentication to complete after receiving the MAC binding query response.

Use undo authentication-timeout to restore the default.

Syntax

authentication-timeout minutes

undo authentication-timeout

Default

The authentication timeout time is 3 minutes.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

minutes: Specifies the authentication timeout in the range of 1 to 15 minutes.

Usage guidelines

On receiving the MAC binding query response from the MAC binding server, the device starts the timeout timer for portal authentication.

If the user passes portal authentication before the timer expires, the device immediately deletes the MAC-trigger entry for the user. If the user does not pass portal authentication within the authentication timeout, the device deletes the MAC-trigger entry after the entry expires.

Examples

# Set the authentication timeout to 10 minutes.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] authentication-timeout 10

Related commands

display portal mac-trigger-server

auth-url

Use auth-url to specify the URL of the QQ authentication server.

Use undo auth-url to delete the URL of the QQ authentication server.

Syntax

auth-url url-string

undo auth-url

Default

The URL of QQ authentication server is https://graph.qq.com.

Views

QQ authentication server view

Predefined user roles

network-admin

Parameters

url-string: Specifies the URL of the QQ authentication server, a case-sensitive string of 1 to 256 characters. Make sure that you specify the actual URL of the QQ authentication server.

Usage guidelines

This command is restricted to Hong Kong and Macao.

Examples

# Specify http://oauth.qq.com as the URL of the QQ authentication server.

<Sysname> system-view

[Sysname] portal extend-auth-server qq

[Sysname-portal-extend-auth-server-qq] auth-url http://oauth.qq.com

Related commands

display portal extend-auth-server

binding-retry

Use binding-retry to set the maximum number of attempts and the interval for sending MAC binding queries to the MAC binding server.

Use undo binding-retry to restore the default.

Syntax

binding-retry { retries | interval interval } *

undo binding-retry

Default

The maximum number of query attempts is 3 and the query interval is 1 second.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

retries: Specifies the maximum number of MAC binding query attempts, in the range of 1 to 10.

interval interval: Specifies the query interval in the range of 1 to 60 seconds.

Usage guidelines

This command is restricted to Hong Kong and Macao.

If the device does not receive a response from the MAC binding server after the maximum number is reached, the device determines that the MAC binding server is unreachable. The device performs normal portal authentication for the user. The user needs to enter the username and password for authentication.

If you execute this command multiple times in the same MAC binding server view, the most recent configuration takes effect.

Examples

# Set the maximum number of MAC binding query attempts to 3 and the query interval to 60 seconds.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] binding-retry 3 interval 60

Related commands

display portal mac-trigger-server

captive-bypass enable

Use captive-bypass enable to enable the captive-bypass feature.

Use undo captive-bypass enable to disable the captive-bypass feature.

Syntax

captive-bypass [ android | ios [ optimize ] ] enable

undo captive-bypass [ android | ios [ optimize ] ] enable

Default

The captive-bypass feature is disabled. The device automatically pushes the portal authentication page to the iOS devices and some Android devices when they are connected to the network.

Views

Portal Web server view

Predefined user roles

network-admin

Parameters

android: Enables the captive-bypass feature for Android users.

ios: Enables the captive-bypass feature for iOS users.

optimize: Enables the optimized captive-bypass feature.

Usage guidelines

With this feature enabled, the device does not automatically push the portal authentication page to iOS devices and some Android devices when they are connected to the network. The device pushes the portal authentication page only when the user accesses the Internet by using a browser or other methods.

The optimized captive-bypass feature applies only to iOS mobile clients. The device automatically pushes the portal authentication page to iOS mobile devices when they are connected to the network. Users can perform authentication on the page or press the home button to return to the desktop without performing authentication, and the Wi-Fi connection is not terminated.

You can repeat this command to enable the captive-bypass feature for both Android and iOS users.

If you do not specify any parameters, this command enables the captive-bypass feature for both Android and iOS users.

Examples

# Enable the captive-bypass feature.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] captive-bypass enable

# Enable the optimized captive-bypass feature for iOS users.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] captive-bypass ios optimize enable

# Enable the captive-bypass feature for Android users.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] captive-bypass android enable

Related commands

·          display portal web-server

·          display portal captive-bypass statistics

default-logon-page

Use default-logon-page to specify the default authentication page file for the local portal Web server.

Use undo default-logon-page to restore the default.

Syntax

default-logon-page filename

undo default-logon-page

Default

No default authentication page file is specified for the local portal Web server.

Views

Local portal Web server view

Predefined user roles

network-admin

Parameters

filename: Specifies the default authentication page file by the file name (without the file storage directory). The file name is a case-sensitive string of 1 to 91 characters. Valid characters are letters, digits, dots (.) and underscores (_).

Usage guidelines

You must edit the default authentication pages, compress them to a .zip file, and then upload the file to the root directory of the storage medium of the device.

After you use the default-logon-page command to specify the file, the device decompresses the file to get the authentication pages. The device then sets them as the default authentication pages for local portal authentication.

For successful local portal authentication, you must specify the default portal authentication page file for the local portal Web server.

Examples

# Specify the file pagefile1.zip as the default authentication page file for local portal authentication.

<Sysname> system-view

[Sysname] portal local-web-server http

[Sysname-portal-local-websvr-http] default-logon-page pagefile1.zip

Related commands

portal local-web-server

display portal

Use display portal to display portal configuration and portal running state.

Syntax

display portal { ap ap-name [ radio radio-id ] | interface interface-type interface-number }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, underscores (_), left brackets ([), right brackets (]), slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio ID varies by device model. If you do not specify a radio, this command displays portal configuration and portal running state for all radios of the AP.

interface-type interface-number: Specifies an interface by its type and number.

Examples

# Display portal configuration and portal running state on AP ap1.

<Sysname> display portal ap ap1

 Portal information of ap1

 Radio ID: 1

 SSID: portal

     Authorization : Strict checking

     ACL           : Disable

     User profile  : Disable

 IPv4:

     Portal status: Enabled

     Portal authentication method: Direct

     Portal Web server: wbs(active)

     Secondary portal Web server: wbs sec

     Portal mac-trigger-server: mts

     Authentication domain: my-domain

     Extend-auth domain: def

     User-dhcp-only: Enabled

     Max portal users: 1024

     Bas-ip: 2.2.2.2

     Action for sever detection:

         Server type      Server name           Action

         Web server       wbs                   fail-permit

         Portal server    pts                   fail-permit

     Destination authentication subnet:

         IP address                             Mask

         2.2.2.2                                255.255.0.0

 IPv6:

     Portal status: Enabled

     Portal authentication method: Direct

     Portal Web server: wbsv6(active)

     Secondary portal Web server: Not configured

     Authentication domain: my-domain

     Extend-auth domain: Not configured

     User-dhcp-only: Disabled

     Max portal users: 512

     Bas-ipv6: 2000::1

     Action for sever detection:

         Server type      Server name           Action

         Web server       wbsv6                 fail-permit

         Portal server    ptsv6                 fail-permit

     Destination authentication subnet:

         IP address                             Prefix length

         3000::1                                64

# Display portal configuration and portal running state on VLAN-interface 30.

<Sysname> display portal interface Vlan-interface 30

 Portal information of Vlan-interface30

     NAS-ID profile: Not configured

     Authorization : Strict checking

     ACL           : Disable

     User profile  : Disable

 IPv4:

     Portal status: Enabled

     Portal authentication method: Direct

     Portal Web server: pt

     Secondary portal Web server: wbs sec(active)

     Authentication domain: test

     Pre-auth domain: Not configured

     User-dhcp-only: Disabled

     Pre-auth IP pool: Not configured

     Max portal users: Not configured

     Bas-ip: Not configured

     User detection: Not configured

     Portal temp-pass: Enabled       Period: 30s

     Action for server detection:

         Server type    Server name                        Action

         --             --                                 --

     Layer3 source network:

         IP address               Mask

     Destination authentication subnet:

         IP address               Mask

 IPv6:

     Portal status: Disabled

     Portal authentication method: Disabled

     Portal Web server: Not configured

     Secondary portal Web server: Not configured

     Authentication domain: Not configured

     Pre-auth domain: Not configured

     User-dhcp-only: Disabled

     Pre-auth IP pool: Not configured

     Max portal users: Not configured

     Bas-ipv6: Not configured

     User detection: Not configured

     Portal temp-pass: Disabled

     Action for server detection:

         Server type    Server name                        Action

         --             --                                 --

     Layer3 source network:

         IP address                                        Prefix length

     Destination authentication subnet:

         IP address                                        Prefix length

Table 18 Command output

Field

Description

 

Portal information of interface

Portal configuration on the interface.

 

Radio ID

ID of the radio.

 

SSID

Service set identifier.

 

NAS-ID profile

NAS-ID profile on the interface.

 

Authorization

Authorization information type:

·         ACL

·         User profile

 

Strict checking

Whether strict checking is enabled on portal authorization information.

 

IPv4

IPv4 portal configuration.

 

IPv6

IPv6 portal configuration.

 

Portal status

Portal authentication status on the interface:

·         Disabled—Portal authentication is disabled.

·         Enabled—Portal authentication is enabled.

·         AuthorizedThe portal authentication server or portal Web server is unreachable. The interface allows users to have network access without authentication.

 

Portal authentication method

Authentication mode enabled on the interface.

This field displays Direct if direct authentication is enabled.

 

Portal Web server

Name of the primary portal Web server specified on the interface.

This field displays the (active) flag next to the server name if the server is being used.

 

Secondary portal Web server

Name of the backup portal Web server specified on the interface.

This field displays the (active) flag next to the server name if the server is being used.

Portal mac-trigger-server

Name of the MAC binding server specified on the interface.

 

Authentication domain

Mandatory authentication domain on the interface.

 

Pre-auth domain

Preauthentication domain for portal users on the interface.

 

Extend-auth domain

Authentication domain configured for third-party authentication on an interface or service template.

User-dhcp-only

Status of the user-dhcp-only feature:

·         Enabled: Only users with IP addresses obtained through DHCP can perform portal authentication.

·         Disabled: Both users with IP addresses obtained through DHCP and users with static IP addresses can pass authentication to get online.

 

Pre-auth ip-pool

Name of the IP address pool specified for portal users before authentication.

 

Max portal users

Maximum number of portal users allowed on an interface.

 

Bas-ip

BAS-IP attribute of the portal packets sent to the portal authentication server.

 

Bas-ipv6

BAS-IPv6 attribute of the portal packets sent to the portal authentication server.

 

User detection

Configuration for online detection of portal users on the interface, including detection method (ARP, ICMP, ND, or ICMPv6), detection interval, maximum number of detection attempts, and user idle time.

 

Portal temp-pass

Status of the temporary pass feature:

·        Enabled—The temporary pass feature is enabled.

·        Disabled—The temporary pass feature is disabled.

·        Period—Temporary pass period during which a user can access the Internet temporarily. This field is displayed only if the temporary pass feature is enabled.

Action for server detection

Portal server detection configuration on the interface:

·         Server type—Type of the server. Portal server represents the portal authentication server, and Web server represents the portal Web server.

·         Server name—Name of the server.

·         Action—Action triggered by the result of server detection. This field displays fail-permit when the portal fail-permit feature is enabled.

 

Layer3 source subnet

Information of the portal authentication source subnet.

 

Destination authentication subnet

Information of the portal authentication destination subnet.

 

IP address

IP address of the portal authentication subnet.

 

Mask

Subnet mask of the portal authentication subnet.

 

Prefix length

Prefix length of the IPv6 portal authentication subnet address.

 

 

display portal auth-error-record

Use display portal auth-error-record to display portal authentication error records.

Syntax

display portal auth-error-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all portal authentication error records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

Examples

# Display all portal authentication error records.

<Sysname> display portal auth-error-record all

Total authentication error records: 2

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth error time        : 2016-03-04 16:49:07

Auth error reason      : The maximum number of users already reached.

 

User MAC               : 0016-ecb7-a235

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.10

AP                     : ap1

SSID                   : byod

Auth error time        : 2016-03-04 16:51:07

Auth error reason      : The maximum number of users already reached.

# Display portal authentication error records for the portal user whose IPv4 address is 192.168.0.188.

<Sysname> display portal auth-error-record ip 192.168.0.188

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth error time        : 2016-03-04 16:49:07

Auth error reason      : The maximum number of users already reached.

# Display portal authentication error records for the portal user whose IPv6 address is 2000::2.

<Sysname> display portal auth-error-record ipv6 2000::2

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 2000::2

AP                     : ap1

SSID                   : byod

Auth error time        : 2016-03-04 16:49:07

Auth error reason      : The maximum number of users already reached.

# Display portal authentication error records with the error time in the range of 2016/3/4 14:20 to 2016/3/4 14:23.

<Sysname> display portal auth-error-record start-time 2016/3/4 14:20 end-time 2016/3/4 14:23

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth error time        : 2016-03-04 14:22:25

Auth error reason      : The maximum number of users already reached.

Table 19 Command output

Field

Description

Total authentication error records

Total number of portal authentication error records.

User MAC

MAC address of the portal user.

Interface

Access interface of the portal user.

User IP address

IP address of the portal user.

AP

AP name.

SSID

Service set identifier.

Auth error time

Time when the portal user encountered an authentication error, in the format of YYYY-MM-DD hh:mm:ss.

Auth error reason

Reason for the authentication error:

·         The maximum number of users already reached.

·         Failed to obtain user physical information.

·         Failed to receive the packet because packet length is 0.

·         Packet source unknown. Server IP:X.X.X.X, VRF index:0.

·         Packet validity check failed because packet length and version don't match.

·         Packet type invalid.

·         Packet validity check failed due to invalid authenticator.

·         Memory insufficient.

·         Portal is disabled on the interface.

·         The maximum number of users on the interface already reached.

·         Failed to get the access token of the cloud user.

·         Failed to get the user information of the cloud user.

·         Failed to get the access token of the QQ user.

·         Failed to get the openID of the QQ user.

·         Failed to get the user information of the QQ user.

·         Email authentication failed.

 

Related commands

·          portal auth-error-record enable

·          reset auth-error-record

display portal auth-fail-record

Use display portal auth-fail-record to display portal authentication failure records.

Syntax

display portal auth-fail-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time | username username }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all portal authentication failure records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

username username: Specifies the username of a portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

Examples

# Display all portal authentication failure records.

<Sysname> display portal auth-fail-record all

Total authentication fail records: 2

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 16:49:07

Auth failure reason    : Authorization information does not exist.

 

User name              : coco

User MAC               : 0016-ecb7-a235

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.10

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 16:50:07

Auth failure reason    : Authorization information does not exist.

# Display portal authentication failure records for the portal user whose IPv4 address is 192.168.0.8.

<Sysname> display portal auth-fail-record ip 192.168.0.188

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 16:49:07

Auth failure reason    : Authorization information does not exist.

# Display portal authentication failure records for the portal user whose IPv6 address is 2000::2.

<Sysname> display portal auth-fail-record ipv6 2000::2

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 2000::2

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 16:49:07

Auth failure reason    : Authorization information does not exist.

# Display portal authentication failure records for the portal user whose username is chap1.

<Sysname> display portal auth-fail-record username chap1

User name              : chap1

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 16:49:07

Auth failure reason    : Authorization information does not exist.

# Display portal authentication failure records with the failure time in the range of 2016/3/4 14:20 to 2016/3/4 14:23.

<Sysname> display portal auth-fail-record start-time 2016/3/4 14:20 end-time 2016/3/4 14:23

User name              : chap1

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.188

AP                     : ap1

SSID                   : byod

Auth failure time      : 2016-03-04 14:22:25

Auth failure reason    : Authorization information does not exist.

Table 20 Command output

Field

Description

Total authentication fail records

Total number of portal authentication failure records.

User name

Username of the portal user.

User MAC

MAC address of the portal user.

Interface

Access interface of the portal user.

User IP address

IP address of the portal user.

AP

AP name.

SSID

Service set identifier.

Auth failure time

Time when the portal user failed authentication, in the format of YYYY/MM/DD hh:mm:ss.

Auth failure reason

Reason why the user failed portal authentication.

 

Related commands

·          portal auth-fail-record enable

·          reset portal auth-fail-record

display portal captive-bypass statistics

Use display portal captive-bypass statistics to display packet statistics for portal captive-bypass.

Syntax

display portal captive-bypass statistics [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays portal captive-bypass packet statistics for all cards.

Examples

# Display portal captive-bypass packets on slot 1.

<Sysname> display portal captive-bypass statistics slot 1

Slot 1:

User type  Packets

iOS     :  1

Android :  0

Table 21 Command output

Field

Description

User type

Type of users:

·         iOS.

·         Android.

Packets

Number of portal captive-bypass packets sent to the users.

 

Related commands

captive-bypass enable

display portal dns free-rule-host

Use display portal dns free-rule-host to display IP addresses corresponding to host names in destination-based portal-free rules.

Syntax

display portal dns free-rule-host [ host-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

host-name: Specifies a host name, a case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-), underscores (_), dots (.), and asterisks (*). The host name cannot be ip or ipv6. If you do not specify a host name, this command displays IP addresses corresponding to all host names in destination-based portal-free rules.

Examples

# Display IP addresses corresponding to host name www.baidu.com in a destination-based portal-free rule.

<Sysname> display portal dns free-rule-host www.baidu.com

 Host name                     IP

 www.baidu.com                 10.10.10.10

# Display IP addresses corresponding to host name *abc.com in a destination-based portal-free rule.

<Sysname> display portal dns free-rule-host *abc.com

 Host name                     IP

 *abc.com                      12.12.12.12

                               111.8.33.100

                               3.3.3.3

Table 22 Command output

Field

Description

Host name

Host name specified in a destination-based portal-free rule.

IP

IP addresses corresponding to the host name.

 

display portal extend-auth-server

Use display portal extend-auth-server to display information about third-party authentication servers.

Syntax

display portal extend-auth-server { all | qq | mail }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all third-party authentication servers.

qq: Specifies the QQ authentication server.

mail: Specifies the email authentication server.

Usage guidelines

This command is restricted to Hong Kong and Macao.

Examples

# Display information about all third-party authentication servers.

<Sysname> display portal extend-auth-server all

Portal extend-auth-server: qq

   Authentication URL : http://graph.qq.com

   APP ID            : 101235509

   APP key           : ******

   Redirect URL      : http://h3crd-lvzhou3.chinacloudapp.cn/portal/qqlogin.html

Portal extend-auth-server: mail

   Mail protocol      : POP3

   Mail domain name   : @qq.com

Table 23  Command output

Field

Description

Portal extend-auth-server

Type of the third-party authentication server.

Authentication URL

URL of the QQ authentication server.

APP ID

APP ID for QQ authentication.

APP key

APP key for QQ authentication.

Redirect URL

Redirection URL for QQ authentication success.

Mail protocol

Protocols of the email authentication service.

Mail domain name

Email domain name of the email authentication service.

 

Related commands

portal extend-auth-server

display portal local-binding mac-address

Use display portal local-binding mac-address to display information about local MAC-account binding entries.

Syntax

display portal local-binding mac-address { mac-address | all }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

mac-address: Specifies the MAC address of a portal user, in the format of H-H-H.

all: Specifies all local MAC-account binding entries.

Examples

# Display information about all local MAC-account binding entries.

<Sysname> display portal local-binding mac-address all

Total MAC addresses: 5

MAC address                Username             Aging(hh:mm:ss)

0015-e9a6-7cfe             wlan_user1           00:41:38

0000-e27c-6e80             wlan_user2           00:41:38

000f-e212-ff01             wlan_user3           00:41:38

001c-f08f-f804             wlan_user4           00:41:38

000f-e233-9000             wlan_user5           00:41:38

# Display information about the local MAC-account binding entry for the user with MAC address 0015-e9a6-7cfe.

<Sysname> display portal local-binding mac-address 0015-e9a6-7cfe

Total MAC addresses: 1

MAC address                Username            Aging(hh:mm:ss)

0015-e9a6-7cfe             wlan_user1          00:41:38

Table 24 Command output

Field

Description

MAC address

MAC address of a portal user.

Username

Username of a portal user.

Aging

Remaining lifetime of the local MAC-account binding entry.

 

Related commands

local-binding enable

display portal logout-record

Use display portal logout-record to display portal user offline records.

Syntax

display portal logout-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time | username username }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all portal user offline records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

username username: Specifies the username of a portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

Examples

# Display all portal user offline records.

<Sysname> display portal logout-record all

Total logout records: 2

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.8

AP                     : ap1

SSID                   : byod

User login time        : 2016-03-04 14:20:19

User logout time       : 2016-03-04 14:22:05

Logout reason          : Admin Reset

 

User name              : coco

User MAC               : 0016-ecb7-a235

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.10

AP                     : ap1

SSID                   : byod

User login time        : 2016-03-04 14:10:15

User offline time      : 2016-03-04 14:22:05

Offline reason         : Admin Reset

# Display offline records for the portal user whose IP address is 192.168.0.8.

<Sysname> display portal logout-record ip 192.168.0.8

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.8

AP                     : ap1

SSID                   : byod

User login time        : 2016-03-04 14:26:12

User logout time       : 2016-03-04 14:27:35

Logout reason          : Admin Reset

# Display offline records for the portal user whose username is chap1.

<Sysname> display portal logout-record username chap1

User name              : chap1

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.8

AP                     : ap1

SSID                   : byod

User login time        : 2016-03-04 17:20:19

User logout time       : 2016-03-04 17:22:05

Logout reason          : Admin Reset

# Display portal user offline records with the logout time in the range of 2016/3/4 14:20 to 2016/3/4 14:23.

<Sysname> display portal logout-record start-time 2016/3/4 14:20 end-time 2016/3/4 14:23

User name              : test@abc

User MAC               : 0016-ecb7-a879

Interface              : WLAN-BSS1/0/1

User IP address        : 192.168.0.8

AP                     : ap1

SSID                   : byod

User login time        : 2016-03-04 14:20:19

User logout time       : 2016-03-04 14:22:05

Logout reason          : Admin Reset

Table 25 Command output

Field

Description

Total logout records

Total number of portal user offline records.

User name

Username of the portal user.

User MAC

MAC address of the portal user.

Interface

Access interface of the portal user.

User IP address

IP address of the portal user.

AP

AP name.

SSID

Service set identifier.

User login time

Time when the portal user came online, in the format of YYYY-MM-DD hh:mm:ss.

User logout time

Time when the portal user went offline, in the format of YYYY-MM-DD hh:mm:ss.

Logout reason

Reason why the portal user went offline:

·         User Request.

·         Carrier Lost.

·         Service Lost.

·         Admin Reset.

·         NAS Request.

·         Idle Timeout.

·         Port Suspended.

·         Port Error.

·         Admin Reboot.

·         Session Timeout.

·         User Error.

·         Service Unavailable.

·         NAS Error.

·         Other Errors.

 

Related commands

·          portal logout-record enable

·          reset portal logout-record

display portal mac-trigger-server

Use display portal mac-trigger-server to display information about MAC binding servers.

Syntax

display portal mac-trigger-server { all | name server-name }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all MAC binding servers.

name server-name: Specifies a MAC binding server by its name, a case-sensitive string of 1 to 32 characters.

Examples

# Display information about all MAC binding servers.

<Sysname> display portal mac-trigger-server all

Portal mac-trigger server: ms1

  Version                    : 2.0

  Server type                : CMCC

  IP                         : 10.1.1.1

  Port                       : 100

  VPN instance               : vpn1

  Aging time                 : 120 seconds

  Free-traffic threshold     : 1000 bytes

  NAS-Port-Type              : 255

  Binding retry times        : 5

  Binding retry interval     : 2 seconds

  Authentication timeout     : 5 minutes

  Excluded attribute list    : 1

  Local-binding              : Disabled

  Local-binding aging time   : 12 hours

  AAA-fail nobinding         : Disabled

Portal mac-trigger server: mts

  Version                    : 1.0

  Server type                : IMC

  IP                         : 4.4.4.2

  Port                       : 50100

  VPN instance               : Not configured

  Aging time                 : 300 seconds

  Free-traffic threshold     : 0 bytes

  NAS-Port-Type              : Not configured

  Binding retry times        : 3

  Binding retry interval     : 1 seconds

  Authentication timeout     : 3 minutes

  Excluded attribute list    : 1

  Local-binding              : Disabled

  Local-binding aging-time   : 12 hours

  AAA-fail nobinding         : Disabled

# Display information about MAC binding server ms1.

<Sysname> display portal mac-trigger-server name ms1

Portal mac-trigger server: ms1

  Version                    : 2.0

  Server type                : CMCC

  IP                         : 10.1.1.1

  Port                       : 100

  VPN instance               : vpn1

  Aging time                 : 120 seconds

  Free-traffic threshold     : 1000 bytes

  NAS-Port-Type              : 255

  Binding retry times        : 5

  Binding retry interval     : 2 seconds

  Authentication timeout     : 5 minutes

  Excluded attribute list    : 1

  Local-binding              : Disabled

  Local-binding aging-time   : 12 hours

  AAA-fail nobinding         : Disabled

Table 26 Command output

Field

Description

Portal mac-trigger-server

Name of the MAC binding server.

Version

Version of the portal protocol:

·         1.0Version 1.

·         2.0Version 2.

·         3.0Version 3.

Server type

Type of the MAC binding server:

·         CMCCCMCC server.

·         IMCH3C IMC server or H3C CAMS server.

IP

IP address of the MAC binding server.

Port

UDP port number on which the MAC binding server listens for MAC binding query packets.

VPN instance

VPN where the MAC binding server resides.

Support for this field depends on the device model.

Aging time

Aging time in seconds. A MAC-trigger entry is aged out when the aging time expires.

Free-traffic threshold

Free-traffic threshold in bytes. If a user's traffic is below the threshold, the user can access the network without authentication.

NAS-Port-Type

NAS-Port-Type attribute value in RADIUS request packets sent to the RADIUS server.

Binding retry times

Maximum number of attempts for sending MAC binding queries to the MAC binding server.

Binding retry interval

Interval at which the device sends MAC binding queries to the MAC binding server.

Authentication timeout

Maximum amount of time that the device waits for portal authentication to complete after receiving the MAC binding query response.

Excluded attribute list

Numbers of attributes excluded from portal protocol packets.

Local-binding

Status of local MAC-trigger authentication:

·        Disabled.

·        Enabled.

Local-binding aging-time

Aging time for local MAC-account binding entries, in hours.

AAA-fail nobinding

Status of the AAA failure unbinding feature:

·        Disabled.

·        Enabled.

 

display portal packet statistics

Use display portal packet statistics to display packet statistics for portal authentication servers and MAC binding servers.

Syntax

display portal packet statistics [ extend-auth-server { cloud | mail | qq | wechat } | mac-trigger-server server-name | server server-name ] *

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

extend-auth-server: Specifies a third-party authentication server. This keyword is restricted to Hong Kong and Macao.

cloud: Specifies the lvzhou cloud authentication server. This keyword is restricted to Hong Kong and Macao.

mail: Specifies the email authentication server. This keyword is restricted to Hong Kong and Macao.

qq: Specifies the QQ authentication server. This keyword is restricted to Hong Kong and Macao.

wechat: Specifies the WeChat authentication server. This keyword is restricted to Hong Kong and Macao.

mac-trigger-server server-name: Specifies a MAC binding server by its name, a case-sensitive string of 1 to 32 characters.

server server-name: Specifies a portal authentication server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

If you do not specify any parameters, this command displays packet statistics for all third-party authentication servers, portal authentication servers, and MAC binding servers.

Examples

# Display packet statistics for portal authentication server pts.

<Sysname> display portal packet statistics server pts

 Portal server :  pts

 Invalid packets: 0

 Pkt-Type                            Total    Drops    Errors

 REQ_CHALLENGE                       3        0        0

 ACK_CHALLENGE                       3        0        0

 REQ_AUTH                            3        0        0

 ACK_AUTH                            3        0        0

 REQ_LOGOUT                          1        0        0

 ACK_LOGOUT                          1        0        0

 AFF_ACK_AUTH                        3        0        0

 NTF_LOGOUT                          1        0        0

 REQ_INFO                            6        0        0

 ACK_INFO                            6        0        0

 NTF_USERDISCOVER                    0        0        0

 NTF_USERIPCHANGE                    0        0        0

 AFF_NTF_USERIPCHAN                  0        0        0

 ACK_NTF_LOGOUT                      1        0        0

 NTF_HEARTBEAT                       0        0        0

 NTF_USER_HEARTBEAT                  2        0        0

 ACK_NTF_USER_HEARTBEAT              0        0        0

 NTF_CHALLENGE                       0        0        0

 NTF_USER_NOTIFY                     0        0        0

 AFF_NTF_USER_NOTIFY                 0        0        0

# Display packet statistics for MAC binding server newpt.

<Sysname> display portal packet statistics mac-trigger-server newpt

 MAC-trigger server: newpt

 Invalid packets: 0

 Pkt-Type                            Total    Drops    Errors

 REQ_MACBIND                         1        0        0

 ACK_MACBIND                         1        0        0

 NTF_MTUSER_LOGON                    1        0        0

 NTF_MTUSER_LOGOUT                   0        0        0

 REQ_MTUSER_OFFLINE                  0        0        0

# Display packet statistics for the lvzhou cloud authentication server.

<Sysname> display portal packet statistics extend-auth-server cloud

Extend-auth server:  cloud

 Update interval:  60s

  Pkt-Type               Success    Error      Timeout    Conn-failure

  REQ_ACCESSTOKEN        1          0          0          0

  REQ_USERINFO           1          0          0          0

  RESP_ACCESSTOKEN       1          0          0          0

  RESP_USERINFO          1          0          0          0

  POST_ONLINEDATA        0          0          0          0

  RESP_ONLINEDATA        0          0          0          0

  POST_OFFLINEUSER       1          0          0          0

  AUTHENTICATION         0          1          0          0

Table 27 Command output

Field

Description

Portal server

Name of the portal authentication server.

Invalid packets

Number of invalid packets.

Pkt-Type

Packet type.

Total

Total number of packets.

Drops

Number of dropped packets.

Errors

Number of erroneous packets.

REQ_CHALLENGE

Challenge request packet the portal authentication server sent to the access device.

ACK_CHALLENGE

Challenge acknowledgment packet the access device sent to the portal authentication server.

REQ_AUTH

Authentication request packet the portal authentication server sent to the access device.

ACK_AUTH

Authentication acknowledgment packet the access device sent to the portal authentication server.

REQ_LOGOUT

Logout request packet the portal authentication server sent to the access device.

ACK_LOGOUT

Logout acknowledgment packet the access device sent to the portal authentication server.

AFF_ACK_AUTH

Affirmation packet the portal authentication server sent to the access device after receiving an authentication acknowledgment packet.

NTF_LOGOUT

Forced logout notification packet the access device sent to the portal authentication server.

REQ_INFO

Information request packet.

ACK_INFO

Information acknowledgment packet.

NTF_USERDISCOVER

User discovery notification packet the portal authentication server sent to the access device.

NTF_USERIPCHANGE

User IP change notification packet the access device sent to the portal authentication server.

AFF_NTF_USERIPCHAN

User IP change success notification packet the portal authentication server sent to the access device.

ACK_NTF_LOGOUT

Forced logout acknowledgment packet the portal authentication server sent to the access device.

NTF_HEARTBEAT

Server heartbeat packet the portal authentication server periodically sent to the access device.

NTF_USER_HEARTBEAT

User synchronization packet the portal authentication server sent to the access device.

ACK_NTF_USER_HEARTBEAT

User synchronization acknowledgment packet the access device sent to the portal authentication server.

NTF_CHALLENGE

Challenge request packet the access device sent to the portal authentication server.

NTF_USER_NOTIFY

User information notification packet the access device sent to the portal authentication server.

AFF_NTF_USER_NOTIFY

NTF_USER_NOTIFY acknowledgment packet the portal authentication server sent to the access device.

MAC-trigger server

Name of the MAC binding server.

REQ_MACBIND

MAC binding request packet the access device sent to the MAC binding server.

ACK_MACBIND

MAC binding acknowledgment packet the MAC binding server sent to the access device.

NTF_MTUSER_LOGON

User logon notification packet the access device sent to the MAC binding server.

NTF_MTUSER_LOGOUT

User logout notification packet the access device sent to the MAC binding server.

REQ_MTUSER_OFFLINE

User offline request packet that the MAC binding server sent to the access device for forcible logout of a user.

Extend-auth server

Type of the third-party authentication server:

·         qq—QQ authentication server.

·         mail—Email authentication server.

·         wechat—WeChat authentication server.

·         cloud—Lvzhou cloud authentication server.

Update interval

Interval at which the device sends online user information to the lvzhou cloud server, in seconds.

This field is displayed if the third-party authentication server is the lvzhou cloud authentication server.

Success

Number of packets that have been successfully sent or received.

Timeout

Number of packets that timed out of establishing a connection to the third-party authentication server.

Conn-failure

Number of packets that failed to establish a connection to the third-party authentication server.

Deny

Number of packets denied access to the third-party authentication server.

This field is displayed if the third-party authentication server is the email authentication server.

REQ_ACCESSTOKEN

Access token request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is QQ, lvzhou cloud, or WeChat authentication server.

REQ_OPENID

Open ID request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the QQ authentication server.

REQ_USERINFO

User information request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the QQ, lvzhou cloud, or WeChat authentication server.

RESP_ACCESSTOKEN

Access token response packets the access device received from the third-party authentication server.

This field is displayed if the third-party authentication server is the QQ, lvzhou cloud, or WeChat authentication server.

RESP_OPNEID

Open ID response packets the access device received from the third-party authentication server.

This field is displayed if the third-party authentication server is the QQ authentication server.

RESP_USERINFO

User information response packets the access device received from the third-party authentication server.

This field is displayed if the third-party authentication server is the QQ, lvzhou cloud, or WeChat authentication server.

REQ_POP3

POP3 authentication request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the email authentication server.

REQ_IMAP

IMAP authentication request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the email authentication server.

POST_ONLINEDATA

Cloud user information request packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the lvzhou cloud authentication server.

RESP_ONLINEDATA

Cloud user information response packets the access device received from the third-party authentication server.

This field is displayed if the third-party authentication server is the lvzhou cloud authentication server.

POST_OFFLINEUSER

Cloud user offline packets the access device sent to the third-party authentication server.

This field is displayed if the third-party authentication server is the lvzhou cloud or WeChat authentication server.

AUTHENTICATION

Result of third-party authentication.

 

Related commands

reset portal packet statistics

display portal permit-rule statistics

Use display portal permit-rule statistics to display statistics for portal permit rules.

Syntax

display portal permit-rule statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

Portal permit rules refer to category 1 and category 2 portal filtering rules, which permit user packets to pass.

Examples

# Display statistics for portal permit rules.

<Sysname> display portal permit-rule statistics

Interface             Free rules           Fuzzy rules            User rules

WLAN-BSS1/0/1         2                      5                    10

WLAN-BSS2/0/1         2                      3                    6

Table 28 Command output

Field

Description

Interface

Interface on which portal permit rules are used.

Free rules

Number of permit rules generated based on configured portal-free rules, excluding permit rules generated based on fuzzy matches of destination-based portal-free rules.

Fuzzy rules

Number of permit rules generated based on fuzzy matches of destination-based portal-free rules.

User rules

Number of permit rules generated after portal users pass authentication.

 

display portal redirect statistics

Use display portal redirect statistics to display portal redirect packet statistics.

Syntax

display portal redirect statistics [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays portal redirect packet statistics for all member devices.

Examples

# Display portal redirect packet statistics on the specified slot.

<Sysname> display portal redirect statistics slot 1

Slot 1:

HttpReq: 3

HttpResp: 3

HttpsReq: 6

HttpsResp: 6

Table 29 Command output

Field

Description

HttpReq

Total number of HTTP redirect requests.

HttpResp

Total number of HTTP redirect responses.

HttpsReq

Total number of HTTPS redirect requests.

HttpsResp

Total number of HTTPS redirect responses.

 

Related commands

reset portal redirect statistics

display portal rule

Use display portal rule to display portal filtering rules.

Syntax

display portal rule { all | dynamic | static } { ap ap-name [ radio radio-id ] | interface interface-type interface-number [ slot slot-number ] }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Displays all portal filtering rules, including dynamic and static portal filtering rules.

dynamic: Displays dynamic portal filtering rules, which are generated after users pass portal authentication. These rules allow packets with specific source IP addresses to pass the interface.

static: Displays static portal filtering rules, which are generated after portal authentication is enabled. The interface filters packets by these rules when portal authentication is enabled.

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, underscores (_), left brackets ([), right brackets (]), slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio ID varies by device model. If you do not specify a radio, this command displays portal filtering rules for all radios of the AP.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays portal filtering rules for all member devices.

Examples

# Display all portal filtering rules on VLAN-interface 100.

<Sysname> display portal rule all interface vlan-interface 100

IPv4 portal rules on Vlan-interface100:

Rule 1

 Type                : Static

 Action              : Permit

 Protocol            : Any

 Status              : Active

 Source:

    IP             : 0.0.0.0

    Mask           : 0.0.0.0

    Port           : Any

    MAC            : 0000-0000-0000

    Interface      : Vlan-interface100

    VLAN           : 100

 Destination:

    IP             : 192.168.0.111

    Mask           : 255.255.255.255

    Port           : Any

 

Rule 2

 Type                : Dynamic

 Action              : Permit

 Status              : Active

 Source:

    IP             : 2.2.2.2

    MAC            : 000d-88f8-0eab

    Interface      : Vlan-interface100

    VLAN           : 100

 Author ACL:

    Number         : 3001

 

Rule 3

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    IP             : 0.0.0.0

    Mask           : 0.0.0.0

    Interface      : Vlan-interface100

    VLAN           : 100

    Protocol       : TCP

 Destination:

    IP             : 0.0.0.0

    Mask           : 0.0.0.0

    Port           : 80

 

Rule 4:

 Type                : Static

 Action              : Deny

 Status              : Active

 Source:

    IP             : 0.0.0.0

    Mask           : 0.0.0.0

    Interface      : Vlan-interface100

    VLAN           : Any

 Destination:

    IP             : 0.0.0.0

    Mask           : 0.0.0.0

 

IPv6 portal rules on Vlan-interface100:

Rule 1

 Type                : Static

 Action              : Permit

 Protocol            : Any

 Status              : Active

 Source:

    IP              : ::

    Prefix length   : 0

    Port            : Any

    MAC             : 0000-0000-0000

    Interface       : Vlan-interface100

    VLAN            : 100

 Destination:

    IP               : 3000::1

    Prefix length    : 64

    Port             : Any

 

Rule 2

 Type                : Dynamic

 Action              : Permit

 Status              : Active

 Source:

    IP              : 3000::1

    MAC             : 0015-e9a6-7cfe

    Interface       : Vlan-interface100

    VLAN            : 100

 Author ACL:

    Number          : 3001

 

Rule 3

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    IP              : ::

    Prefix length   : 0

    Interface       : Vlan-interface100

    VLAN            : 100

    Protocol        : TCP

 Destination:

    IP              : ::

    Prefix length   : 0

    Port            : 80

 

Rule 4:

 Type                : Static

 Action              : Deny

 Status              : Active

 Source:

    IP             : ::

    Prefix length  : 0

    Interface      : Vlan-interface100

    VLAN           : 100

 Destination:

    IP             : ::

    Prefix length  : 0

Author ACL:

    Number          : 3001

 

Rule 5:

 Type                : Static

 Action              : Match pre-auth ACL

 Status              : Active

 Source:

    Interface      : Vlan-interface100

Pre-auth ACL:

    Number          : 3002

# Display all portal filtering rules on AP ap1.

<Sysname> display portal rule all ap ap1

IPv4 portal rules on ap1:

Radio ID : 1

SSID     : portal

Rule 1

 Type                : Static

 Action              : Permit

 Protocol            : Any

 Status              : Active

 Source:

    IP        : 0.0.0.0

    Mask      : 0.0.0.0

    Port      : 23

    MAC       : 0000-0000-0000

    Interface : WLAN-BSS1/0/1

    VLAN      : any

 Destination:

    IP        : 192.168.0.111

    Mask      : 255.255.255.255

    Port      : Any

 

Rule 2

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    IP        : 0.0.0.0

    Mask      : 0.0.0.0

    Port      : Any

    MAC       : 0000-0000-0000

    Interface : WLAN-BSS1/0/1

    VLAN      : any

    Protocol  : TCP

 Destination:

    IP        : 0.0.0.0

    Mask      : 0.0.0.0

    Port      : 80

 

Rule 3

 Type                : Dynamic

 Action              : Permit

 Status              : Active

 Source:

    IP        : 2.2.2.2

    Mask      : 255.255.255.255

    MAC       : 000d-88f8-0eab

    Interface : WLAN-BSS1/0/1

    VLAN      : 2

 Destination:

    IP        : 0.0.0.0

    Mask      : 0.0.0.0

Table 30 Command output

Field

Description

Radio ID

ID of the radio.

SSID

Service set identifier.

Rule

Number of the portal filtering rule. IPv4 portal filtering rules and IPv6 portal filtering rules are numbered separately.

Type

Type of the portal filtering rule:

·         Static—Static portal filtering rule.

·         Dynamic—Dynamic portal filtering rule.

Action

Action triggered by the portal filtering rule:

·         Permit—The interface allows packets to pass.

·         RedirectThe interface redirects packets.

·         Deny—The interface forbids packets to pass.

·         Match pre-auth ACL—The interface matches packets against the authorized ACL rules in the preauthentication domain.

Protocol

Transport layer protocol permitted by the portal filtering rule:

·         Any—Permits any transport layer protocol.

·         TCP—Permits TCP.

·         UDP—Permits UDP.

Status

Status of the portal filtering rule:

·         Active—The portal rule is effective.

·         Unactuated—The portal rule is not activated.

Source

Source information of the portal filtering rule.

IP

Source IP address.

Mask

Subnet mask of the source IPv4 address.

Prefix length

Prefix length of the source IPv6 address.

Port

Source transport layer port number.

MAC

Source MAC address.

Interface

Interface on which the portal filtering rule is implemented.

VLAN

Source VLAN ID.

Protocol

Protocol type for the portal filtering rule.

Destination

Destination information of the portal filtering rule.

IP

Destination IP address.

Port

Destination transport layer port number.

Mask

Subnet mask of the destination IPv4 address.

Prefix length

Prefix length of the destination IPv6 address.

Author ACL

Authorized ACL assigned to authenticated portal users. This field is displayed only for a dynamic portal filtering rule.

Pre-auth ACL

Authorized ACL assigned to preauthentication portal users. This field is displayed only for the Match pre-auth ACL action.

Number

Number of the authorized ACL. This field displays None if the AAA server does not assign an ACL.

 

display portal safe-redirect statistics

Use display portal safe-redirect statistics to display portal safe-redirect packet statistics.

Syntax

display portal safe-redirect statistics [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays statistics for all member devices.

Examples

# Display portal safe-redirect packet statistics on the specified slot.

<Sysname> display portal safe-redirect statistics slot 1

Slot 1:

Redirect statistics:

  Success: 7

  Failure: 8

  Total  : 15

 

Method statistics:

  Get    : 11

  Post   : 1

  Others : 3

 

User agent statistics:

Safari: 3

Chrome: 2

 

Forbidden URL statistics:

www.qq.com: 4

 

Forbidden filename extension statistics:

.jpg: 0

Table 31 Command output

Field

Description

Success

Number of packets redirected successfully.

Failure

Number of packets failed redirection.

Total

Total number of packets.

Method statistics

Statistics of HTTP request methods.

Get

Number of packets with the GET request method.

Post

Number of packets with the POST request method.

Other

Number of packets with other request methods.

User agent statistics

Browser types (in HTTP User Agent) allowed by portal safe-redirect, and packet statistics for the browsers.

Forbidden URL statistics

URLs forbidden by portal safe-redirect, and packet statistics for the URLs.

Forbidden filename extension statistics

Filename extensions forbidden by portal safe-redirect, and packet statistics for the filename extensions.

 

Related commands

reset portal safe-redirect statistics

display portal server

Use display portal server to display information about portal authentication servers.

Syntax

display portal server [ server-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

server-name: Specifies a portal authentication server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

If you do not specify the server-name argument, this command displays information about all portal authentication servers.

Examples

# Display information about portal authentication server pts.

<Sysname> display portal server pts

Portal server: pts

  Type                  : IMC

  IP                    : 192.168.0.111

  VPN instance          : vpn1

  Port                  : 50100

  Server detection      : Timeout 60s  Action: log, trap

  User synchronization  : Timeout 200s

  Status                : Up

  Exclude-attribute     : Not configured

  Logout notification   : Retry 3 interval 5s

Table 32 Command output

Field

Description

Type

Portal authentication server type:

·         CMCC: CMCC server.

·         IMC: IMC server.

Portal server

Name of the portal authentication server.

IP

IP address of the portal authentication server.

VPN instance

Name of the VPN instance to which the portal authentication server belongs.

This field is not supported in the current software version.

Port

Listening port on the portal authentication server.

Server detection

Parameters for portal authentication server detection:

·         Detection timeout in seconds.

·         Actions (log and trap) triggered by the reachability status change of the portal authentication server.

User synchronization

User idle timeout in seconds for portal user synchronization.

Status

Reachability status of the portal authentication server:

·         N/A—Portal authentication server detection is disabled. Reachability status of the server is unknown.

·         Up—Portal authentication server detection is enabled. The server is reachable.

·         Down—Portal authentication server detection is enabled. The server is unreachable.

Exclude-attribute

Attributes that are not carried in portal protocol packets sent to the portal authentication server.

Logout-notification

Maximum number of times and the interval (in seconds) for retransmitting a logout notification packet.

 

Related commands

·          portal enable

·          portal server

·          server-detect (portal authentication server view)

·          user-sync

display portal user

Use display portal user to display information about portal users.

Syntax

display portal user { all | ap ap-name [ radio radio-id ] | auth-type { cloud | email | local | mac-trigger | normal | qq | wechat } | interface interface-type interface-number | ip ip-address | ipv6 ipv6-address | mac mac-address | pre-auth [ interface interface-type interface-number | ip ip-address | ipv6 ipv6-address ] | username username } [ brief | verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Displays information about all portal users.

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, underscores (_), left brackets ([), right brackets (]), slashes (/), and minus signs (-).

radio radio-id: Specifies a radio by its ID. The value range for the radio ID varies by device model. If you do not specify a radio, this command displays information about portal users for all radios of the AP.

auth-type: Specifies an authentication type.

cloud: Specifies the cloud authentication (a cloud portal authentication server performs portal authentication on portal users). This keyword is restricted to Hong Kong and Macao.

email: Specifies the email authentication. This keyword is restricted to Hong Kong and Macao.

local: Specifies the local authentication (a local portal authentication server performs portal authentication on portal users).

mac-trigger: Specifies the MAC-trigger authentication.

normal: Specifies the normal authentication (a remote portal authentication server performs portal authentication on portal users).

qq: Specifies QQ authentication. This keyword is restricted to Hong Kong and Macao.

wechat: Specifies WeChat authentication. This keyword is restricted to Hong Kong and Macao.

interface interface-type interface-number: Displays information about portal users on the specified interface.

ip ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

mac mac-address: Specifies the MAC address of a portal user, in the format of H-H-H.

username username: Specifies the username of a portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

pre-auth: Displays information about preauthentication portal users. A preauthentication user is a user who is authorized with the authorization attributes in a preauthentication domain before portal authentication. If you do not specify the pre-auth keyword, this command displays information about authenticated portal users.

brief: Displays brief information about portal users.

verbose: Displays detailed information about portal users.

Usage guidelines

If you specify neither the brief nor the verbose keyword, this command displays portal authentication-related information for all portal users.

Examples

# Display information about all portal users.

<Sysname> display portal user all

Total portal users: 1

Username: def

  AP name: ap1

  Radio ID: 1

  SSID: portal

  Portal server: pts

  State: Online

  VPN instance: vpn1

  MAC                IP                 VLAN   Interface

  000d-88f8-0eac     4.4.4.4            2     Bss1/2

  Authorization information:

    DHCP IP pool: N/A

    User profile: N/A

    Session group profile: N/A

    ACL number: 3000

# Display information about portal users that perform normal portal authentication.

<Sysname> display portal user auth-type normal

Total normal users: 1

Username: abc

  Portal server: pts

  State: Online

  VPN instance: N/A

  MAC                IP                 VLAN   Interface

  000d-88f8-0eab     2.2.2.2            2      WLAN-BSS1/0/1

  Authorization information:

    DHCP IP pool: N/A

    User profile: abc (active)

    Session group profile: cd (inactive)

    ACL number: N/A

# Display information about the portal user whose MAC address is 000d-88f8-0eab.

<Sysname> display portal user mac 000d-88f8-0eab

Username: abc

  Portal server: pts

  State: Online

  VPN instance: N/A

  MAC                IP                 VLAN   Interface

  000d-88f8-0eab     2.2.2.2            2      WLAN-BSS1/0/1

  Authorization information:

    DHCP IP pool: N/A

    User profile: abc (active)

    Session group profile: cd (inactive)

    ACL number: N/A

# Display information about the portal user whose username is abc.

<Sysname> display portal user username abc

Username: abc

  Portal server: pts

  State: Online

  VPN instance: N/A

  MAC                IP                 VLAN   Interface

  000d-88f8-0eab     2.2.2.2            2      WLAN-BSS1/0/1

  Authorization information:

    DHCP IP pool: N/A

    User profile: abc (active)

    Session group profile: cd (inactive)

    ACL number: N/A

Table 33 Command output

Field

Description

Total portal users

Total number of portal users.

Total normal users

Total number of portal users that perform normal authentication.

Total local users

Total number of portal users that perform local authentication.

Total email users

Total number of portal users that perform email authentication.

Total cloud users

Total number of portal users that perform cloud authentication.

Total QQ users

Total number of portal users that perform QQ authentication.

Total WeChat users

Total number of portal users that perform WeChat authentication.

Total MAC-trigger users

Total number of portal users whose authentication type is MAC-trigger authentication.

Username

Name of the user.

AP name

Name of the AP.

Radio ID

ID of the radio.

SSID

Service set identifier.

Portal server

Name of the portal authentication server.

State

Current state of the portal user:

·         Initialized—The user is initialized and ready for authentication.

·         Authenticating—The user is being authenticated.

·         Authorizing—The user is being authorized.

·         Online—The user is online.

VPN instance

Name of the VPN instance to which the portal user belongs. If the portal user is on a public network, this field displays N/A.

This field is not supported in the current software version.

MAC

MAC address of the portal user.

IP

IP address of the portal user.

VLAN

VLAN where the portal user resides.

Interface

Access interface of the portal user.

Authorization information

Authorization information for the portal user.

DHCP IP pool

Name of the authorized IP address pool. If no IP address pool is authorized for the portal user, this field displays N/A.

User profile

Authorized user profile:

·         N/A—The AAA server authorizes no user profile.

·         active—The AAA server has authorized the user profile successfully.

·         inactive—The AAA server failed to authorize the user profile or the user profile does not exist on the device.

ACL number

Authorized ACL:

·         N/A—The AAA server authorizes no ACL.

·         active—The AAA server has authorized the ACL successfully.

·         inactive—The AAA server failed to authorize the ACL or the ACL does not exist on the device.

 

# Display detailed information about the portal user with IP address with IP address 18.18.0.20.

<Sysname> display portal user ip 18.18.0.20 verbose

Basic:

AP name: ap1

  Radio ID: 1

  SSID: portal

  Current IP address: 18.18.0.20

  Original IP address: 18.18.0.20

  Username: chap1

  User ID: 0x10000001

  Access interface: WLAN_BSS1/0/1

  Service-VLAN/Customer-VLAN: 50/-

  MAC address: 7854-2e1c-c59e

  Authentication type: Normal

  Domain name: portal

  VPN instance: N/A

  Status: Online

  Portal server: pt

  Vendor: Apple

  Portal authentication method: Direct

AAA:

  Realtime accounting interval: 720s, retry times: 5

  Idle cut: N/A

  Session duration: 0 sec, remaining: 0 sec

  Remaining traffic: N/A

  Login time: 2014-12-25 10:47:53 UTC

  Online duration (hh:mm:ss): 1:53:7

  DHCP IP pool: N/A

ACL&Multicast:

  ACL number: N/A

  User profile: N/A

  Session group profile: N/A

  Max multicast addresses: 4

Flow statistic:

  Uplink packets/bytes: 6/412

  Downlink packets/bytes: 0/0

Table 34 Command output

Field

Description

AP name

Name of the AP.

Radio ID

Radio ID.

SSID

Service set identifier.

Current IP address

IP address of the portal user after passing authentication.

Original IP address

IP address of the portal user during authentication.

Username

Name of the portal user.

User ID

Portal user ID.

Access interface

Access interface of the portal user.

Service-VLAN/Customer-VLAN

Public VLAN/Private VLAN to which the portal user belongs. If no VLAN is configured for the portal user, this field displays -/-.

MAC address

MAC address of the portal user.

Authentication type

Type of portal authentication:

·         Normal—Normal authentication.

·         Local—Local authentication.

·         Email—Email authentication.

·         Cloud—Cloud authentication.

·         QQ—QQ authentication.

·         WeChat—WeChat authentication.

·         MAC-trigger—MAC-trigger authentication.

Domain

ISP domain name for portal authentication.

VPN instance

VPN to which the portal user belongs. If the portal user is on a public network, this field displays N/A.

This field is not supported in the current software version.

Status

Status of the portal user:

·         Authenticating—The user is being authenticated.

·         Authorizing—The user is being authorized.

·         Waiting SetRule—Deploying portal filtering rules to the user.

·         Online—The user is online.

·         Waiting Traffic—Waiting for traffic from the user.

·         Stop Accounting—Stopping accounting for the user.

·         Done—The user is offline.

Portal server

Name of the portal server.

Vendor

Vendor name of the endpoint.

Portal authentication method

Portal authentication method on the access interface.

This field displays Direct if direct authentication is enabled.

AAA

AAA information about the portal user.

Realtime accounting interval

Interval for sending real-time accounting updates, and the maximum number of accounting attempts. If the real-time accounting is not authorized, this field displays N/A.

Idle-cut

Idle timeout period and the minimum traffic threshold. If idle-cut is not authorized, this field displays N/A.

Session duration

Session duration and the remaining session time. If the session duration is not authorized, this field displays N/A.

Remaining traffic

Remaining traffic for the portal user. If the remaining traffic is not authorized, this field displays N/A.

Login time

Time when the user logged in. The field uses the device time format, for example, 2023-1-19  2:42:30 UTC.

ITA policy name

Name of the intelligent target accounting policy.

DHCP IP pool

Authorized DHCP IP address pool. If no DHCP IP address pool is authorized for the portal user, this field displays N/A.

ACL number

Authorized ACL:

·         N/A—The AAA server authorizes no ACL.

·         active—The AAA server has authorized the ACL successfully.

·         inactive—The AAA server failed to authorize the ACL or the ACL does not exist on the device.

User profile

Authorized user profile:

·         N/A—The AAA server authorizes no user profile.

·         active—The AAA server has authorized the user profile successfully.

·         inactive—The AAA server failed to authorize the user profile or the user profile does not exist on the device.

Session group profile

Authorized session group profile:

·         N/A—The AAA server authorizes no session group profile.

·         active—The AAA server has authorized the session group profile successfully.

·         inactive—The AAA server failed to authorize the session group profile or the session group profile does not exist on the device.

Max multicast addresses

Maximum number of multicast groups the portal user can join.

Multicast address list

Multicast group list the portal user can join. If no multicast group is authorized, this field displays N/A.

Flow statistic

Flow statistics for the portal user.

Uplink packets/bytes

Packet and byte statistics of the upstream traffic.

Downlink packets/bytes

Packet and byte statistics of the downstream traffic.

 

# Display brief information about all portal users.

<Sysname> display portal user all brief

IP address       MAC address       Online duration       Username

4.4.4.4          000d-88f8-0eac    1:53:7                def

Table 35 Command output

Field

Description

IP address

IP address of the portal user.

MAC address

MAC address of the portal user.

Online duration

Online duration of the portal user, in hh:ss:mm.

Username

Username of the portal user.

 

Related commands

portal enable

display portal user count

Use display portal user count to display the number of portal users.

Syntax

display portal user count

Views

Any view

Predefined user roles

network-admin

Examples

# Display the number of portal users.

<Sysname> display portal user count

Total number of users: 1

Related commands

·          portal enable

·          portal delete-user

display portal web-server

Use display portal web-server to display information about portal Web servers.

Syntax

display portal web-server [ server-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

server-name: Specifies a portal Web server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

If you do not specify the server-name argument, this command displays information about all portal Web servers.

Examples

# Display information about portal Web server wbs.

<Sysname> display portal web-server wbs

Portal Web server: wbs

    Type             : IMC

    URL              : http://www.test.com/portal

    URL parameters   : userurl=http://www.test.com/welcome

                       userip=source-address

    VPN instance     : Not configured

    Server detection : Interval: 120s  Attempts: 5  Action: log, trap

    IPv4 status      : Up

    IPv6 status      : N/A

    Captive-bypass   : Enabled

    If-match         : original-url:  http://2.2.2.2, redirect-url:  http://192.168.56.2

Table 36 Command output

Field

Description

Type

Portal Web server type:

·         CMCC—CMCC server.

·         IMC—IMC server.

Portal Web server

Name of the portal Web server.

URL

URL of the portal Web server.

URL parameters

URL parameters for the portal Web server.

VPN instance

Name of the VPN instance to which the portal Web server belongs.

This field is not supported in the current software version.

Server detection

Parameters for portal Web server detection:

·         Detection interval in seconds.

·         Maximum number of detection attempts.

·         Actions (log and trap) triggered by the reachability status change of the portal Web server.

IPv4/IPv6 status

Current state of the portal Web server:

·         N/A—Portal Web server detection is disabled. Reachability status of the server is unknown.

·         Up—Portal Web server detection is enabled. The server is reachable.

·         Down—Portal Web server detection is enabled. The server is unreachable.

Captive-bypass

Status of the captive-bypass feature:

·         Disabled—Captive-bypass is disabled.

·         Enabled—Captive-bypass is enabled.

·         Optimize Enabled—Optimized captive-bypass is enabled.

If-match

Match rules configured for URL redirection.

 

Related commands

·          portal enable

·          portal web-server

·          server-detect (portal Web server view)

display web-redirect rule

Use display web-redirect rule to display information about Web redirect rules.

Syntax

display web-redirect rule { ap ap-name [ radio radio-id ] | interface interface-type interface-number [ slot slot-number ] }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. The string can contain letters, digits, underscores (_), left brackets ([), right brackets (]), forward slashes (/), and hyphens (-).

radio radio-id: Specifies a radio by its ID. The value range for this argument varies by device model. If you do not specify this option, the command displays Web redirect rules for all radios of the AP.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays Web redirect rules for the master device.

Examples

# Display all Web redirect rules on VLAN-interface 100.

<Sysname> display web-redirect rule interface vlan-interface 100

IPv4 web-redirect rules on vlan-interface 100:

Rule 1:

 Type                : Dynamic

 Action              : Permit

 Status              : Active

 Source:

    IP             : 192.168.2.114

    VLAN           : Any

 

Rule 2:

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    VLAN           : Any

    Protocol       : TCP

 Destination:

    Port           : 80

 

IPv6 web-redirect rules on vlan-interface 100:

Rule 1:

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    VLAN           : Any

    Protocol       : TCP

 Destination:

    Port           : 80

# Display all Web redirect rules on AP ap1.

<Sysname> display web-redirect rule ap ap1

IPv4 web-redirect rules on ap1:

Radio ID: 1

SSID     : portal

Rule 1:

Type                : Dynamic

 Action              : Permit

 Status              : Active

 Source:

    IP             : 192.168.2.114

    VLAN           : Any

 

Rule 2:

 Type                : Static

 Action              : Redirect

 Status              : Active

 Source:

    VLAN           : Any

    Protocol       : TCP

 Destination:

    Port           : 80

Table 37 Command output

Field

Description

Radio ID

ID of the radio.

SSID

Service set identifier.

Rule

Number of the Web redirect rule.

Type

Type of the Web redirect rule:

·         Static—Static Web redirect rule, generated when the Web redirect feature takes effect.

·         Dynamic—Dynamic Web redirect rule, generated when a user visits a redirect webpage.

Action

Action in the Web redirect rule:

·         Permit—Allows packets to pass.

·         RedirectRedirects the packets.

Status

Status of the Web redirect rule:

·         Active—The Web redirect rule is effective.

·         Deactive—The Web redirect rule is not effective.

Source

Source information in the Web redirect rule.

IP

Source IP address.

Mask

Subnet mask of the source IPv4 address.

Prefix length

Prefix length of the source IPv6 address.

VLAN

Source VLAN. If not specified, this field displays Any.

Protocol

Transport layer protocol in the Web redirect rule:

·         Any—No transport layer protocol is limited.

·         TCP—Transmission Control Protocol.

Destination

Destination information in the Web redirect rule.

Port

Destination transport layer port number. The default port number is 80.

 

exclude-attribute (MAC binding server view)

Use exclude-attribute to exclude an attribute from portal protocol packets.

Use undo exclude-attribute to not exclude an attribute from portal protocol packets.

Syntax

exclude-attribute attribute-number

undo exclude-attribute attribute-number

Default

No attributes are excluded from portal protocol packets.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

attribute-number: Specifies an attribute by its number in the range of 1 to 255.

Usage guidelines

Support of the portal authentication server for portal protocol attributes varies by the server type. During MAC-trigger authentication, the device and the server cannot communicate if the device sends the portal authentication server a packet that contains an attribute unsupported by the server.

To address this issue, you can configure this command to exclude the unsupported attributes from portal protocol packets sent to the portal authentication server.

You can specify multiple excluded attributes.

Table 38 describes all attributes of the portal protocol.

Table 38 Portal attributes

Name

Number

Description

UserName

1

Name of the user to be authenticated.

PassWord

2

User password in plaintext form.

Challenge

3

Random challenge for CHAP authentication.

ChapPassWord

4

CHAP password encrypted by MD5.

TextInfo

5

The device uses this attribute to transparently transport prompt information of a RADIUS server or packet error information to the portal authentication server.

The attribute value can be any string excluding the end character '\0'. This attribute can exist in any packet from the device to the portal server. A packet can contain multiple TextInfo attributes. As a best practice, carry only one TextInfo attribute in a packet.

UpLinkFlux

6

Uplink (output) traffic of the user, an 8-byte unsigned integer, in KB.

DownLinkFlux

7

Downlink (input) traffic of the user, an 8-byte unsigned integer, in KB.

Port

8

Port information, a string excluding the end character '\0'.

IP-Config

9

The device uses this attribute in ACK_LOGOUT (Type=0x06) and NTF_LOGOUT (Type=0x08) packets to indicate that the current user IP address must be released. The portal server must notify the user to release the public IP address through DHCP. The device will reallocate a private IP address to the user.

BAS-IP

10

IP address of the access device.

Session-ID

11

Identification of a portal user. Generally, the value of this attribute is the MAC address of the portal user.

Delay-Time

12

Delay time for sending a packet. This attributes exists in NTF_LOGOUT (Type=0x08) packets.

User-List

13

List of IP addresses of an IPv4 portal user.

EAP-Message

14

An EAP attribute that needs to be transported transparently. This attribute is applicable to EAP TLS authentication. Multiple EAP-Message attributes can exist in a portal authentication packet.

User-Notify

15

Value of the hw_User_Notify attribute in a RADIUS accounting response. This attribute needs to be transported transparently.

BAS-IPv6

100

IPv6 address of the access device.

UserIPv6-List

101

List of IPv6 addresses of an IPv6 portal user.

 

Examples

# Exclude the BAS-IP attribute (number 10) from portal packets sent to MAC binding server 123.

<Sysname> system-view

[Sysname] portal mac-trigger-server 123

[Sysname-portal-mac-trigger-server-123] exclude-attribute 10

Related commands

display portal server

exclude-attribute (portal authentication server view)

Use exclude-attribute to exclude an attribute from portal protocol packets.

Use undo exclude-attribute to not exclude an attribute from portal protocol packets.

Syntax

exclude-attribute number { ack-auth | ack-logout | ntf-logout }

undo exclude-attribute number { ack-auth | ack-logout | ntf-logout }

Default

No attributes are excluded from portal protocol packets.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

number: Specifies an attribute by its number in the range of 1 to 255.

ack-auth: Excludes the attribute from ACK_AUTH packets.

ack-logout: Excludes the attribute from ACK_LOGOUT packets.

ntf-logout: Excludes the attribute from NTF_LOGOUT packets.

Usage guidelines

Support of the portal authentication server for portal protocol attributes varies by the server type. If the device sends the portal authentication server a packet that contains an attribute unsupported by the server, the device and the server cannot communicate.

To address this issue, you can configure this command to exclude the unsupported attributes from specific portal protocol packets sent to the portal authentication server.

You can specify multiple excluded attributes. For an excluded attribute, you can specify multiple types of portal protocol packets (ack-auth, ntf-logout, and ack-logout).

Table 38 describes all attributes of the portal protocol.

Examples

# Exclude the UpLinkFlux attribute (number 6) from portal ACK_AUTH packets.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] exclude-attribute 6 ack-auth

Related commands

display portal server

free-traffic threshold

Use free-traffic threshold to set the free-traffic threshold for portal users.

Use undo free-traffic threshold to restore the default.

Syntax

free-traffic threshold value

undo free-traffic threshold

Default

The free-traffic threshold is 0 bytes.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

value: Specifies the free-traffic threshold in the range of 0 to 10240000 bytes. If the free-traffic threshold is set to 0, the device immediately triggers MAC-based quick portal authentication for a user once the user's traffic is detected.

Usage guidelines

A user can access the network without authentication if the user's network traffic (sent and received) is below the free-traffic threshold. When the user's network traffic reaches the threshold, the device triggers MAC-based quick portal authentication for the user.

If the user passes portal authentication, the device clears the user traffic statistics. If the user fails authentication, the device does not trigger MAC-based quick authentication for the user before the MAC-trigger entry ages out. When the MAC-trigger entry ages out, the device clears the user traffic statistics.

After traffic statistics are cleared for a user, the device repeats the MAC-based portal authentication procedure for the user. For more information about the MAC-based portal authentication procedure, see Security Configuration Guide.

In wireless networks where APs are configured to forward client data traffic, APs report traffic statistics to the AC at a regular interval. The AC can determine whether a user's traffic exceed the free-traffic threshold only after receiving the traffic statistics report from the associated AP. To set the interval for APs to report traffic statistics to the AC, use the portal client-traffic-report interval command.

Examples

# Set the free-traffic threshold for portal users to 10240 bytes.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] free-traffic threshold 10240

Related commands

display portal mac-trigger-server

if-match

Use if-match to configure a match rule for URL redirection.

Use undo if-match to delete a URL redirection match rule.

Syntax

if-match { original-url url-string redirect-url url-string [ url-param-encryption { aes | des } key { cipher | simple } string ] | user-agent string redirect-url url-string }

undo if-match { original-url url-string | user-agent user-agent }

Default

No URL redirection match rules exists.

Views

Portal Web server view

Predefined user roles

network-admin

Parameters

original-url url-string: Specifies a URL string to match the URL in HTTP requests of a portal user. The specified URL must be a complete URL starting with http:// or https://, a case-sensitive string of 1 to 256 characters.

redirect-url url-string: Specifies the URL to which the user is redirected. The specified URL must be a complete URL starting with http:// or https://, a case-sensitive string of 1 to 256 characters.

url-param-encryption: Specifies an encryption algorithm to encrypt the parameters carried in the redirection URL. If you do not specify an encryption algorithm, the parameters carried in the redirection URL are not encrypted.

aes: Specifies the AES algorithm.

des: Specifies the DES algorithm.

key: Specifies a key for encryption.

cipher: Specifies a key in encrypted form.

simple: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the case-sensitive key string. The string length varies by the selected encryption method:

·          If des cipher is specified, the string length is 41 characters.

·          If des simple is specified, the string length is 8 characters.

·          If aes cipher is specified, the string length is 1 to 73 characters.

·          If aes simple is specified, the string length is 1 to 31 characters.

user-agent user-agent: Specifies a user agent string to match the HTTP User-Agent string in HTTP requests. The user agent string is a case-sensitive string of 1 to 255 characters. HTTP User-Agent string in HTTP requests includes information about hardware manufacturer, operating system, browser, and search engine.

Usage guidelines

A URL redirection match rule matches HTTP requests by user-requested URL or User-Agent information, and redirects the matching HTTP requests to the specified redirection URL.

For a user to successfully access a redirection URL, configure a portal-free rule to allow HTTP requests destined for the redirection URL to pass. For information about configuring portal-free rules, see the portal free-rule command.

For a portal Web server, you can configure the url command and the if-match command for URL redirection. The url command redirects all HTTP or HTTPS requests from unauthenticated users to the portal Web server for authentication. The if-match command allows for flexible URL redirection by redirecting specific HTTP or HTTPS requests to specific redirection URLs. If both commands are executed, the if-match command takes priority to perform URL redirection.

If you configure encryption for parameters in the redirection URL, you must add an encryption prompt field after the redirection URL address. For example, to redirect HTTP requests to URL 10.1.1.1 with encrypted URL parameters, specify the redirection URL as http://10.1.1.1?yyyy=. The value of yyyy depends on the portal Web server configuration. For more information, see the portal Web server configuration guide.

Examples

# Configure a match rule to redirect HTTP requests destined for the URL http://www.abc.com.cn to the URL http://192.168.0.1.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] if-match original-url http://www.abc.com.cn redirect-url http://192.168.0.1

# Configure a match rule to redirect HTTP requests that carry the user agent string 5.0(WindowsNT6.1)AppleWebKit/537.36(KHTML,likeGecko)Chrome/36.0.1985.125Safari/537.36 to the URL http://192.168.0.1.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] if-match user-agent 5.0(WindowsNT6.1)AppleWebKit/537.36(KHTML,likeGecko)Chrome/36.0.1985.125Safari/537.36 redirect-url http://192.168.0.1

Related commands

·          display portal web-server

·          portal free-rule

·          url

·          url-parameter

ip (MAC binding server view)

Use ip to specify the IP address of a MAC binding server.

Use undo ip to restore the default.

Syntax

ip ipv4-address [ key { cipher | simple } string ]

undo ip

Default

The IP address of the MAC binding server is not specified.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IP address of a MAC binding server.

key: Specifies a shared key to be used to authenticate packets between the device and the MAC binding server. If you do not specify a shared key, the device and MAC binding server do not authenticate the packets between them.

cipher: Specifies a shared key in encrypted form.

simple: Specifies a shared key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the shared key. Its plaintext form is a case-sensitive string of 1 to 64 characters. Its encrypted form is a case-sensitive string of 33 to 117 characters.

Usage guidelines

Portal packets exchanged between the device and MAC binding server carry an authenticator that is generated with the shared key. The receiver uses the authenticator to verify the correctness of the received portal packets.

If you execute this command multiple times in the same MAC binding server view, the most recent configuration takes effect.

Examples

# Specify the IP address of the MAC binding server as 192.168.0.111 and the plaintext key as portal.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] ip 192.168.0.111 key simple portal

Related commands

display portal mac-trigger-server

ip (portal authentication server view)

Use ip to specify the IP address of an IPv4 portal authentication server.

Use undo ip to delete the IP address of the IPv4 portal authentication server.

Syntax

ip ipv4-address [ key { cipher | simple } string ]

undo ip

Default

The IP address of the IPv4 portal authentication server is not specified.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IP address of the IPv4 portal authentication server.

key: Specifies a shared key for communication with the portal authentication server. Portal packets exchanged between the access device and the portal authentication server carry an authenticator that is generated with the shared key. The receiver uses the authenticator to check the correctness of the received portal packets.

cipher: Sets a ciphertext shared key.

simple: Sets a plaintext shared key.

string: Specifies the shared key. A plaintext shared key is a case-sensitive string of 1 to 64 characters. A ciphertext shared key is a case-sensitive string of 33 to 117 characters.

Usage guidelines

A portal authentication server has only one IP address. Therefore, in portal authentication server view, only one IP address exists. A newly configured IP address (IPv4 or IPv6) overrides the old address.

For security purposes, all keys, including keys specified in plain text, are saved in cipher text.

Examples

# Configure the IP address of the IPv4 portal authentication server pts as 192.168.0.111 and the plaintext key as portal.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] ip 192.168.0.111 key simple portal

Related commands

·          display portal server

·          portal server

ipv6

Use ipv6 to specify the IP address of an IPv6 portal authentication server.

Use undo ipv6 to delete the IP address of the IPv6 portal authentication server.

Syntax

ipv6 ipv6-address [ key { cipher | simple } string ]

undo ipv6

Default

The IP address of the IPv6 portal authentication server is not specified.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

ipv6-address: Specifies the IP address of the IPv6 portal authentication server.

key: Specifies a shared key for communication with the portal authentication server. Portal packets exchanged between the access device and the portal authentication server carry an authenticator that is generated with the shared key. The receiver uses the authenticator to check the correctness of the received portal packets.

cipher: Sets a ciphertext shared key.

simple: Sets a plaintext shared key.

string: Specifies the shared key. A plaintext shared key is a case-sensitive string of 1 to 64 characters. A ciphertext shared key is a case-sensitive string of 33 to 117 characters.

Usage guidelines

A portal authentication server has only one IP address. Therefore in portal authentication server view, only one IP address exists. A newly configured IP address (IPv4 or IPv6) overrides the old address.

For security purposes, all keys, including keys specified in plain text, are saved in cipher text.

Examples

# Configure the IP address of the IPv6 portal authentication server pts as 2000::1 and the plaintext key as portal.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] ipv6 2000::1 key simple portal

Related commands

·          display portal server

·          portal server

local-binding aging-time

Use local-binding aging-time to set the aging time for local MAC-account binding entries.

Use undo local-binding aging-time to restore the default.

Syntax

local-binding aging-time minutes

undo local-binding aging-time

Default

The aging time for local MAC-account binding entries is 720 minutes.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

minutes: Specifies the aging time for local MAC-account binding entries. The value range for this argument is 60 to 129600 minutes.

Usage guidelines

The local MAC-account binding entry of a portal user is deleted when the entry ages out. If the device detects traffic for the user next time, the device creates a local MAC-trigger entry for the user.

If you disable local MAC-trigger authentication, the device does not delete existing local MAC-account binding entries. These entries are automatically deleted when they age out.

Examples

# Set the aging time of local MAC-account binding entries to 240 minutes for MAC binding server mts.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] local-binding aging-time 240

Related commands

·          display portal mac-trigger-server

·          local-binding enable

local-binding enable

Use local-binding enable to enable local MAC-trigger authentication.

Use undo local-binding enable to disable local MAC-trigger authentication.

Syntax

local-binding enable

undo local-binding enable

Default

Local MAC-trigger authentication is disabled.

Views

MAC binding server view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to act as a local MAC binding server to provide local MAC-trigger authentication for local portal users.

After a user passes portal authentication for the first time, the access device (local MAC binding server) generates a local MAC binding entry for the user. The local MAC binding entry records the MAC address and authentication information (username and password) of the user. Then, the user can be automatically connected to the network without manual authentication for subsequent network access attempts.

Examples

# Enable local MAC-trigger authentication for MAC binding server mts.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] local-binding enable

Related commands

·          display portal mac-trigger-server

·          local-binding aging-time

logon-page bind

Use logon-page bind to bind an SSID, endpoint name, or endpoint type to an authentication page file.

Use undo logon-page bind to unbind the SSID, endpoint name, or endpoint type from the authentication page file.

Syntax

logon-page bind { device-type { computer | pad | phone } | device-name device-name | ssid ssid-name } * file file-name

undo logon-page bind { all | device-type { computer | pad | phone } | device-name device-name | ssid ssid-name } *

Default

No SSID, endpoint name, or endpoint type is bound to an authentication page file.

Views

Local portal Web server view

Predefined user roles

network-admin

Parameters

all: Specifies all SSIDs, endpoint names, and endpoint types.

device-type type-name: Specifies an endpoint type.

computer: Specifies the endpoint type as computer.

pad: Specifies the endpoint type as tablet.

phone: Specifies the endpoint type as mobile phone.

device-name device-name: Specifies an endpoint by its name, a case-sensitive string of 1 to 127 characters. The specified endpoint name must have been predefined on the device. Otherwise, the bound authentication page file does not take effect.

ssid ssidname: Specifies an SSID by its name, a case-insensitive string of 1 to 32 characters. An SSID string can contain letters, digits, and spaces, but the start and end characters cannot be spaces. An SSID string cannot be f, fi, fil, or file.

file filename: Specifies an authentication page file by the file name (without the file storage directory). A file name is a string of 1 to 91 characters, and can contain letters, digits, and underscores (_). You must edit the authentication pages, compress them to a .zip file, and then upload the file to the root directory of the storage medium of the device.

Usage guidelines

This command implements customized authentication page pushing for portal users. After you configure this command, the device pushes authentication pages to users according to the user SSID, endpoint name, or endpoint type.

When a Web user triggers local portal authentication, the device searches for a binding that matches the user's SSID, endpoint name, and endpoint type.

·          If the binding exists, the device pushes the bound authentication pages to the user.

·          If multiple matching binding entries are found, the device selects an entry in the following order:

a.    The entry that specifies the SSID, endpoint name, and endpoint type.

b.    The entry that specifies the SSID and endpoint name.

c.    The entry that specifies the SSID and endpoint type.

d.    The entry that specifies only the SSID.

e.    The entry that specifies the endpoint name and endpoint type.

f.     The entry that specifies only the endpoint name.

g.    The entry that specifies only the endpoint type.

·          If the binding does not exist, the device pushes the default authentication pages to the user. If the default authentication page file is not specified (by using the default-logon-page command), the user cannot perform local portal authentication.

When you configure this command, follow these restrictions and guidelines:

·          If the name or contents of the file in a binding entry are changed, you must reconfigure the binding.

·          To reconfigure or modify a binding, simply re-execute this command, without canceling the existing binding.

·          If you execute this command multiple times to bind an SSID, endpoint name, or endpoint type to different authentication page files, the most recent configuration takes effect.

·          You can configure multiple binding entries on the device.

Examples

# Create a local portal Web server and specify HTTP to exchange information with clients.

<Sysname> system-view

[Sysname] portal local-web-server http

# Bind SSID SSID1 to authentication page file file1.zip.

[Sysname-portal-local-websvr-http] logon-page ssid SSID1 file file1.zip

# Bind endpoint type phone to authentication page file file2.zip.

[Sysname-portal-local-websvr-http] logon-page device-type phone file file2.zip

Related commands

·          default-logon-page

·          portal local-web-server

logout-notify

Use logout-notify to set the maximum number of times and the interval for retransmitting a logout notification packet.

Use undo logout-notify to restore the default.

Syntax

logout-notify retry retries interval interval

undo logout-notify

Default

The device does not retransmit a logout notification packet.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

retry retries: Specifies the maximum number of retries, in the range of 1 to 5.

interval interval: Specifies the retry interval, in the range of 1 to 10 seconds.

Usage guidelines

A logout notification packet is a UDP packet that the device sends to the portal authentication server for forcibly logging out a portal user. To increase the delivery reliability, you can set the maximum number of times and the interval for retransmitting a logout notification packet.

After the device sends a logout notification packet for logging out a portal user, it waits for a response from the portal authentication server. If the device receives a response within the specified period of time (maximum number of retries × retry interval), it logs out and deletes the user immediately. If the device does not receive a response within the period of time, the device logs out and deletes the user when the period of time elapses.

Examples

# Set the maximum number of times for retransmitting a logout notification packet to 3 and the retry interval to 5 seconds.

<Sysname> system-view

[Sysname] portal server pt

[Sysname-portal-server-pt] logout-notify retry 3 interval 5

Related commands

display portal server

mail-domain-name

Use mail-domain-name to specify an email domain name for email authentication.

Use undo mail-address to restore the default.

Syntax

mail-domain-name string

undo mail-domain-name [ string ]

Default

No email domain names are specified for email authentication.

Views

Email authentication server view

Predefined user roles

network-admin

Parameters

string: Specifies an email domain name for email authentication, a case-sensitive string of 1 to 255 characters, in the format of @XXX.XXX.https://d.adroll.com/cm/index/out

Usage guidelines

After you configure this command, the device performs email authentication only on portal users that use the specified email domain names.

You can specify a maximum of 16 email domain names for email authentication.

Examples

# Specify @qq.com and @sina.com email domain names for email authentication.

<Sysname> system-view

[Sysname] portal extend-auth-server mail

[Sysname-portal-extend-auth-server-mail] mail-domain-name @qq.com

[Sysname-portal-extend-auth-server-mail] mail-domain-name @Sina.com

Related commands

display portal extend-auth-server

mail-protocol

Use mail-protocol to specify protocols for email authentication.

Use undo mail-protocol to restore the default.

Syntax

mail-protocol { imap | pop3 } *

undo mail-protocol

Default

No protocols are specified for email authentication.

Views

Email authentication server view

Predefined user roles

network-admin

Parameters

imap: Specifies the Internet Message Access Protocol (https://d.adroll.com/cm/index/outIMAP).

pop3: Specifies the Post Office Protocol 3 (POP3).

Usage guidelines

This command specifies email protocols that the device uses to interact with the email authentication server to perform authentication and authorization on portal users who uses email authentication.

Examples

# Specify the POP3 protocol for email authentication.

<Sysname> system-view

[Sysname] portal extend-auth-server mail

[Sysname-portal-extend-auth-server-mail] mail-protocol pop3

Related commands

display portal extend-auth-server

nas-port-type

Use nas-port-type to specify the NAS-Port-Type value carried in RADIUS requests sent to the RADIUS server.

Use undo nas-port-type to restore the default.

Syntax

nas-port-type value

undo nas-port-type

Default

The NAS-Port-Type value carried in RADIUS requests is 0.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

value: Specifies the NAS-Port-Type value in the range of 1 to 255.

Usage guidelines

Some MAC binding servers identify MAC-based quick portal authentication by a specific NAS-Port-Type value in received RADIUS requests. To communicate with such a MAC binding server, you must configure the device to use the NAS-Port-Type value required by the MAC binding server.

Examples

# Set the NAS-Port-Type value to 30 for RADIUS requests sent to MAC binding server mts.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] nas-port-type 30

Related commands

display portal mac-trigger-server

port (MAC binding server view)

Use port to set the UDP port number the MAC binding server uses to listen for MAC binding query packets.

Use undo port to restore the default.

Syntax

port port-number

undo port

Default

The MAC binding server listens for MAC binding query packets on UDP port 50100.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

port-number: Specifies the listening UDP port number in the range of 1 to 65534.

Usage guidelines

The specified port number must be the same as the query listening port number configured on the MAC binding server.

Examples

# Set the UDP port number to 1000 for MAC binding server pts to listen for MAC binding query packets.

<sysname> system-view

[sysname] portal mac-trigger-server mts

[sysname-portal-mac-trigger-server-mts] port 1000

Related commands

display portal mac-trigger-server

port (portal authentication server view)

Use port to set the destination UDP port number used by the device to send unsolicited portal packets to the portal authentication server.

Use undo port to restore the default.

Syntax

port port-number

undo port

Default

The access device uses 50100 as the destination UDP port number for unsolicited portal packets.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

port-number: Specifies a destination UDP port number the access device uses to send unsolicited portal packets to the portal authentication server. The value range for this argument is 1 to 65534.

Usage guidelines

The specified port must be the port that listens to portal packets on the portal authentication server.

Examples

# Set the destination UDP port number to 50000 for the device to send unsolicited portal packets to the portal authentication server pts.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] port 50000

Related commands

portal server

portal { bas-ip | bas-ipv6 }

Use portal { bas-ip | bas-ipv6 } to configure the BAS-IP or BAS-IPv6 attribute carried in the portal packets sent to a portal authentication server.

Use undo portal { bas-ip | bas-ipv6 } to delete the BAS-IP or BAS-IPv6 attribute setting.

Syntax

portal { bas-ip ipv4-address | bas-ipv6 ipv6-address }

undo portal { bas-ip | bas-ipv6 }

Default

The BAS-IP attribute of an IPv4 portal reply packet sent to the portal authentication server is the source IPv4 address of the packet. The BAS-IPv6 attribute of an IPv6 portal reply packet sent to the portal authentication server is the source IPv6 address of the packet.

The BAS-IP attribute of an IPv4 portal notification packet sent to the portal authentication server is the IPv4 address of the interface. The BAS-IPv6 attribute of an IPv6 portal notification packet sent to the portal authentication server is the IPv6 address of the interface.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

bas-ip ipv4-address: Specifies BAS-IP for portal packets sent by the interface. The ipv4-address argument must be the IPv4 address of the device, and cannot be an all-zero address, all-one address, class D address, class E address, or loopback address.

bas-ip6 ipv6-address: Specifies BAS-IPv6 for portal packets sent by the interface. The ipv6-address argument must be the IPv6 address of the device, and cannot be a multicast address, all-zero address, or link-local address.

Usage guidelines

If the device runs Portal 2.0, unsolicited portal packets (such as a logout notification packet) sent to the portal authentication server must carry the BAS-IP attribute. If the device runs Portal 3.0, unsolicited portal packets sent to the portal authentication server must carry the BAS-IP or BAS-IPv6 attribute.

After this command takes effect, the source IP address for unsolicited notification portal packets the device sends to the portal authentication server is the configured BAS-IP or BAS-IPv6. Otherwise the source IP address of the packets is the IP address of the interface.

You must configure the BAS-IP or BAS-IPv6 attribute on a portal authentication-enabled interface or service template if the following conditions are met:

·          The portal authentication server is an H3C IMC server.

·          The portal device IP address specified on the portal authentication server is not the IP address of the portal packet output interface.

Examples

# Configure the BAS-IP attribute of outgoing portal packets as 2.2.2.2 on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal bas-ip 2.2.2.2

# Configure the BAS-IP attribute of outgoing portal packets as 2.2.2.2 on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal bas-ip 2.2.2.2

Related commands

display portal

portal { ipv4-max-user | ipv6-max-user }

Use portal { ipv4-max-user | ipv6-max-user } to set the maximum number of portal users allowed on a VLAN interface or a service template.

Use undo portal { ipv4-max-user | ipv6-max-user } to restore the default.

Syntax

portal { ipv4-max-user | ipv6-max-user } max-number

undo portal { ipv4-max-user | ipv6-max-user }

Default

The maximum number of portal users on a VLAN interface or a service template is not limited.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

max-number: Specifies the maximum number of portal users allowed on a VLAN interface or a service template, in the range of 1 to 4294967295.

Usage guidelines

If the specified maximum number is smaller than the number of current online portal users on a VLAN interface or a service template, the limit can be set successfully and does not impact the online portal users. However, the device does not allow new portal users to log in from the interface or service template until the number drops down below the limit.

Make sure the maximum combined number of IPv4 and IPv6 portal users specified on all VLAN interfaces or service templates does not exceed the system-allowed maximum number. Otherwise, the exceeding portal users will not be able to log in to the device.

Examples

# Set the maximum number of IPv4 portal users to 100 on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal ipv4-max-user 100

# Set the maximum number of IPv4 portal users to 100 on service template service1.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal ipv4-max-user 100

Related commands

·          display portal user

·          portal max-user

portal apply mac-trigger-server

Use portal apply mac-trigger-server to specify a MAC binding server.

Use undo portal apply mac-trigger-server to restore the default.

Syntax

portal apply mac-trigger-server server-name

undo portal apply mac-trigger-server

Default

No MAC binding server is specified.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

server-name: Specifies a MAC binding server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

For MAC-based quick portal authentication to take effect, perform the following tasks:

·          Configure normal portal authentication.

·          Configure a MAC binding server.

·          Specify the MAC binding server on a portal enabled VLAN interface or service template.

Examples

# Specify MAC binding server mts on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] portal apply mac-trigger-server mts

Related commands

portal mac-trigger-server

portal apply web-server

Use portal [ ipv6 ] apply web-server to specify a portal Web server on a VLAN interface or a service template. The device redirects the HTTP or HTTPS requests sent by unauthenticated portal users to the portal Web server.

Use undo portal [ ipv6 ] apply web-server to delete the portal Web server specified on the VLAN interface or service template.

Syntax

portal [ ipv6 ] apply web-server server-name [ secondary ]

undo portal [ ipv6 ] apply web-server [ server-name ]

Default

No portal Web server is specified on a VLAN interface or a service template.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an IPv6 portal Web server. If the server is an IPv4 portal Web server, do not specify this keyword.

secondary: Specifies the backup portal Web server. If you do not specify this keyword, the specified server is the primary portal Web server.

server-name: Specifies a portal Web server to be specified on the interface by its name, a case-sensitive string of 1 to 32 characters. The name must already exist. If you do not specify a server name in the undo form of this command, all portal Web servers on the interface or service template are removed.

Usage guidelines

IPv4 and IPv6 portal authentication can both be enabled on a VLAN interface or on a service template. You can specify both a primary portal Web server and a backup portal Web server after enabling each type (IPv4 or IPv6) of portal authentication.

The device first uses the primary portal Web server for portal authentication. When the primary portal Web server is unreachable but the backup portal Web server is reachable, the device uses the backup portal Web server. When the primary portal Web server becomes reachable, the device switches back to the primary portal Web server for portal authentication.

To automatically switch between the primary portal Web server and the backup portal Web server, configure portal Web server detection on both servers.

Examples

# Specify portal Web server wbs as the primary portal Web server on VLAN-interface 100 for portal authentication.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal apply web-server wbs

# Specify portal Web server wbs as the backup portal Web server on service template service1 for portal authentication.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal apply web-server wbs secondary

Related commands

·          display portal

·          portal fail-permit server

·          portal web-server

·          server-detect (portal web-server view)

portal auth-error-record enable

Use portal auth-error-record enable to enable portal authentication error recording.

Use undo portal auth-error-record enable to disable portal authentication error recording.

Syntax

portal auth-error-record enable

undo portal auth-error-record enable

Default

Portal authentication error recording is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to save all portal authentication error records and to periodically send the records to the lvzhou cloud server or other servers.

Examples

# Enable portal authentication error recording.

<Sysname> system-view

[Sysname] portal auth-error-record enable

Related commands

display portal auth-error-record

portal auth-error-record export

Use portal auth-error-record export to export portal authentication error records to a path.

Syntax

portal auth-error-record export url url-string [ start-time start-date start-time end-time end-date end-time ]

Views

System view

Predefined user roles

network-admin

Parameters

url url-string: Specifies the URL to which portal authentication error records are exported. The URL is a case-insensitive string of 1 to 255 characters.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

Usage guidelines

The device supports FTP, TFTP, and HTTP file transfer methods. Table 39 describes the valid URL format for each method.

Table 39 URL formats

Protocol

URL format

Remarks

FTP

ftp://username[:password]@server-address[:port-number]/file-path

Example: ftp://a:1@1.1.1.1/authfail/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

TFTP

tftp://server-address[:port-number]/file-path

Example: tftp://1.1.1.1/ autherror/

N/A

HTTP

http://username[:password]@server-address[:port-number]/file-path

Example: http://1.1.1.1/autherror/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

 

If the server address is an IPv6 address, bracket the IPv6 address to distinguish the IPv6 address from the port number. For example, if the server address is 2001::1 and the port number is 21, the URL is ftp://test:test@[2001::1]:21/test/.

Examples

# Export all portal authentication error records to path tftp://1.1.1.1/record/autherror/.

<Sysname> system-view

[Sysname] portal auth-error-record export tftp://1.1.1.1/record/autherror/

# Export portal authentication error records in the time range from 2016/3/4 14:20 to 2016/3/4 15:00 to path tftp://1.1.1.1/record/autherror/.

<Sysname> system-view

[Sysname] portal auth-error-record export tftp://1.1.1.1/record/autherror/ start-time 2016/3/4 14:20 end-time 2016/3/4 15:00

Related commands

·          display portal auth-error-record

·          portal auth-error-record enable

·          reset portal auth-error-record

portal auth-error-record max

Use portal auth-error-record max to set the maximum number of portal authentication error records.

Use undo portal auth-error-record max to restore the default.

Syntax

portal auth-error-record max number

undo portal auth-error-record max

Default

The maximum number of portal authentication error records is 32000.

Views

System view

Predefined user roles

network-admin

Parameters

number: Specifies the maximum number of portal authentication error records, in the range of 1 to 4294967295.

Usage guidelines

When the maximum number of portal authentication error records is reached, the new record overwrites the oldest one.

Examples

# Set the maximum number of portal authentication error records to 50.

<Sysname> system-view

[Sysname] portal auth-error-record max 50

Related commands

display portal auth-error-record

portal auth-fail-record enable

Use portal auth-fail-record enable to enable portal authentication failure recording.

Use undo portal auth-fail-record enable to disable portal authentication failure recording.

Syntax

portal auth-fail-record enable

undo portal auth-fail-record enable

Default

Portal authentication failure recording is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to save portal authentication failure records and to periodically send the records to the lvzhou cloud server or other servers.

Examples

# Enable portal authentication failure recording.

<Sysname> system-view

[Sysname] portal auth-fail-record enable

Related commands

display portal auth-fail-record

portal auth-fail-record export

Use portal auth-fail-record export to export portal authentication failure records to a path.

Syntax

portal auth-fail-record export url url-string [ start-time start-date start-time end-time end-date end-time ]

Views

System view

Predefined user roles

network-admin

Parameters

url url-string: Specifies the URL to which portal authentication failure records are exported. The URL is a case-insensitive string of 1 to 255 characters.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

Usage guidelines

The device supports FTP, TFTP, and HTTP file transfer methods. Table 40 describes the valid URL format for each method.

Table 40 URL formats

Protocol

URL format

Remarks

FTP

ftp://username[:password]@server-address[:port-number]/file-path

Example: ftp://a:1@1.1.1.1/authfail/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

TFTP

tftp://server-address[:port-number]/file-path

Example: tftp://1.1.1.1/ autherror/

N/A

HTTP

http://username[:password]@server-address[:port-number]/file-path

Example: http://1.1.1.1/autherror/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

 

If the server address is an IPv6 address, bracket the IPv6 address to distinguish the IPv6 address from the port number. For example, if the server address is 2001::1 and the port number is 21, the URL is ftp://test:test@[2001::1]:21/test/.

Examples

# Export all portal authentication failure records to path tftp://1.1.1.1/record/authfail/.

<Sysname> system-view

[Sysname] portal auth-fail-record export url tftp://1.1.1.1/record/authfail/

# Export portal authentication failure records in the time range from 2016/3/4 14:20 to 2016/3/4 15:00 to path tftp://1.1.1.1/record/authfail/.

<Sysname> system-view

[Sysname] portal auth-fail-record export tftp://1.1.1.1/record/authfail/ start-time 2016/3/4 14:20 end-time 2016/3/4 15:00

Related commands

·          display portal auth-fail-record

·          portal auth-fail-record enable

·          reset portal auth-fail-record

portal auth-fail-record max

Use portal auth-fail-record max to set the maximum number of portal authentication failure records.

Use undo portal auth-fail-record max to restore the default.

Syntax

portal auth-fail-record max number

undo portal auth-fail-record max

Default

The maximum number of portal authentication failure records is 32000.

Views

System view

Predefined user roles

network-admin

Parameters

number: Specifies the maximum number of portal authentication failure records, in the range of 1 to 4294967295.

Usage guidelines

When the maximum number of portal authentication failure records is reached, the new record overwrites the oldest one.

Examples

# Set the maximum number of portal authentication failure records to 50.

<Sysname> system-view

[Sysname] portal auth-fail-record max 50

Related commands

display portal auth-fail-record

portal authorization strict-checking

Use portal authorization strict-checking to enable strict checking on portal authorization information.

Use undo portal authorization strict-checking to restore the default.

Syntax

portal authorization { acl | user-profile } strict-checking

undo portal authorization { acl | user-profile } strict-checking

Default

The strict checking mode is disabled. If an authorized ACL or user profile does not exist on the device or the ACL or user profile fails to be deployed, the user will not be logged out.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

acl: Enables strict checking on authorized ACLs.

user-profile: Enables strict checking on authorized user profiles.

Usage guidelines

You can enable strict checking on authorized ACLs, authorized user profiles, or both. If you enable both strict ACL checking and user profile checking, the user will be logged out if either checking fails.

An ACL/user profile checking fails when the authorized ACL/user profile does not exist on the device or the ACL/user profile fails to be deployed.

Examples

# Enable strict checking on authorized ACLs on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] portal authorization acl strict-checking

# Enable strict checking on authorized ACLs on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal authorization acl strict-checking

Related commands

display portal

portal captive-bypass optimize delay

Use portal captive-bypass optimize delay to set the captive-bypass detection timeout time.

Use undo portal captive-bypass optimize delay to restore the default.

Syntax

portal captive-bypass optimize delay seconds

undo portal captive-bypass optimize delay

Default

The captive-bypass detection timeout time is 6 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Specifies the captive-bypass detection timeout time, in the range of 6 to 60 seconds.

Usage guidelines

This command applies only to iOS mobile clients.

With optimized captive-bypass enabled, the device automatically pushes the portal authentication page to iOS mobile devices when they are connected to the network. Users can perform authentication on the page or press the home button to return to the desktop without performing authentication, and the Wi-Fi connection is not disabled.

Optimized captive-bypass might fail in some conditions. For example, when the network condition is poor, the device cannot receive a server detection packet from an iOS mobile device within the captive-bypass detection timeout time. Therefore, the Wi-Fi connection might be terminated on the iOS mobile device. To avoid such failure, you can set a longer captive-bypass detection timeout time when the network condition is poor.

Examples

# Set the captive-bypass detection timeout time to 20 seconds.

<Sysname> system-view

[Sysname] portal captive-bypass optimize delay 20

Related commands

captive-bypass enable

portal client-gateway interface

Use portal client-gateway interface to configure the gateway for portal clients to access the AC during authentication.

Use undo portal client-gateway interface to restore the default.

Syntax

portal client-gateway interface interface-type interface-number

undo portal client-gateway interface

Default

No gateway is specified for portal clients to access the AC during authentication.

Views

System view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies an interface by its type and number.

Usage guidelines

When the client traffic forwarding location is at APs, execute this command to specify the gateway for portal clients to access the AC during authentication.

Examples

# Configure VLAN-interface 100 as the gateway for portal clients to access the AC during authentication.

<Sysname> system-view

[Sysname] portal client-gateway interface vlan-interface 10

portal client-traffic-report interval

Use portal client-traffic-report interval to set the interval at which an AP reports traffic statistics to the AC.

Use undo portal client-traffic-report interval to restore the default.

Syntax

portal client-traffic-report interval interval

undo portal client-traffic-report interval

Default

An AP reports traffic statistics to the AC at an interval of 60 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Specifies the interval at which an AP reports traffic statistics to the AC, in the range of 1 to 3600 seconds.

Usage guidelines

Before you execute this command, make sure the client traffic forwarding location is at APs.

Examples

# Set the interval at which an AP reports traffic statistic to the AC to 120 seconds.

<Sysname> system-view

[Sysname] portal client-traffic-report interval 120

Related commands

client forwarding-location (WLAN Command Reference)

portal delete-user

Use portal delete-user to log out online portal users.

Syntax

portal delete-user { ipv4-address | all | auth-type { cloud | email | local | normal | qq | wechat } | interface interface-type interface-number | ipv6 ipv6-address | mac mac-address | username username }

Views

System view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IP address of an IPv4 online portal user.

all: Specifies IPv4 and IPv6 online portal users on all interfaces.

auth-type: Specifies online portal users by the authentication type.

cloud: Specifies the cloud authentication.

email: Specifies the email authentication.

local: Specifies the local authentication.

normal: Specifies the normal authentication.

qq: Specifies the QQ authentication.

wechat: Specifies the WeChat authentication.

interface interface-type interface-number: Specifies an interface by its type and number. If you specify this option, this command logs out all IPv4 and IPv6 online portal users on the interface.

ipv6 ipv6-address: Specifies the IP address of an IPv6 online portal user.

mac mac-address: Specifies the MAC address of an online portal user, in the format of H-H-H.

username username: Specifies the username of an online portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

Examples

# Log out the portal user whose IP address is 1.1.1.1.

<Sysname> system-view

[Sysname] portal delete-user 1.1.1.1

# Log out the portal user whose MAC address is 000d-88f8-0eab.

<Sysname> system-view

[Sysname] portal delete-user mac 000d-88f8-0eab

# Log out all portal users that come online through email authentication.

<Sysname> system-view

[Sysname] portal delete-user auth-type email

# Log out the portal user whose username is abc.

<Sysname> system-view

[Sysname] portal delete-user username abc

Related commands

display portal user

portal device-id

Use portal device-id to specify the device ID.

Use undo portal device-id to restore the default.

Syntax

portal device-id device-id

undo portal device-id

Default

No device ID is specified for the device.

Views

System view

Predefined user roles

network-admin

Parameters

device-id: Specifies a device ID for the device, a case-sensitive string of 1 to 63 characters.

Usage guidelines

The portal authentication server uses device IDs to identify the devices that send protocol packets to the portal server.

Make sure the configured device ID is different than any other access devices communicating with the same portal authentication server.

Examples

# Set the device ID of the device to 0002.0010.100.00.

<Sysname> system-view

[Sysname] portal device-id 0002.0010.100.00

portal domain

Use portal [ ipv6 ] domain to configure a portal authentication domain on a VLAN interface or a service template. All portal users accessing through the VLAN interface must use the authentication domain.

Use undo portal [ ipv6 ] domain to delete the configured portal authentication domain.

Syntax

portal [ ipv6 ] domain domain-name

undo portal [ ipv6 ] domain

Default

No portal authentication domain is configured on a VLAN interface or a service template.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an authentication domain for IPv6 portal users. Do not specify this keyword for IPv4 portal users.

domain-name: Specifies an ISP authentication domain by its name, a case-insensitive string of 1 to 255 characters.

Usage guidelines

You can specify both an IPv4 portal authentication domain and an IPv6 portal authentication domain on a VLAN interface or on a service template.

Do not specify the ipv6 keyword for IPv4 portal users.

Examples

# Configure the authentication domain for IPv4 portal users as my-domain on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal domain my-domain

# Configure the authentication domain for IPv4 portal users as my-domain on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal domain my-domain

Related commands

display portal

portal enable

Use portal [ ipv6 ] enable to enable portal authentication.

Use undo portal [ ipv6 ] enable to disable portal authentication.

Syntax

In VLAN interface view:

portal enable method direct

portal ipv6 enable method direct

undo portal [ ipv6 ] enable

In service template view:

portal [ ipv6 ] enable method direct

undo portal [ ipv6 ] enable

Default

Portal authentication is disabled.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Enables IPv6 portal authentication. If you do not specify this keyword, IPv4 portal authentication is enabled.

Usage guidelines

Make sure the device supports IPv6 ACL and IPv6 forwarding before you enable IPv6 portal authentication.

You can enable both IPv4 and IPv6 portal authentication on a VLAN interface or on a service template.

Do not enable portal authentication on both a VLAN interface and a service template.

Examples

# Enable IPv4 portal authentication on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal enable method direct

# Enable IPv4 portal authentication on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal enable method direct

Related commands

display portal

portal extend-auth domain

Use portal extend-auth domain to specify the authentication domain for third-party authentication.

Use undo portal extend-auth domain to remove the authentication domain for third-party authentication.

Syntax

portal extend-auth domain domain-name

undo portal extend-auth domain

Default

No authentication domain is specified for third-party authentication.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

domain-name: Specifies an ISP domain by its name, a case-insensitive string of 1 to 255 characters.

Usage guidelines

This command is restricted to Hong Kong and Macao.

The specified ISP domain takes effect only on IPv4 portal users that use third-party authentication.

Examples

# Specify authentication domain my-domain for third-party authentication on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal extend-auth domain my-domain

Related commands

display portal

portal extend-auth-server

Use portal extend-auth-server to create a third-party authentication server and enter its view, or enter the view of an existing third-party authentication server.

Use undo portal extend-auth-server to delete a third-party authentication server.

Syntax

portal extend-auth-server { qq | mail }

undo portal extend-auth-server { qq | mail }

Default

No third-party authentication servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

qq: Specifies the QQ authentication server.

mail: Specifies the email authentication server.

Usage guidelines

This command is restricted to Hong Kong and Macao.

The device supports using the QQ or email authentication server as a third-party portal authentication server for portal authentication. A portal user can use a QQ or email account instead of a portal account to perform portal authentication. If the user passes third-party authentication, the third-party server notifies the third-party authentication success of the user to the device. Then, the device interacts with the local portal Web server to complete the remaining process of portal authentication.

Examples

# Create a QQ authentication server and enter its view.

<Sysname> system-view

[Sysname] portal extend-auth-server qq

[Sysname-portal-extend-auth-server-qq]

# Create an email authentication server and enter its view.

<Sysname> system-view

[Sysname] portal extend-auth-server mail

[Sysname-portal-extend-auth-server-mail]

Related commands

display portal extend-auth-server

portal fail-permit server

Use portal [ ipv6 ] fail-permit server to enable the portal fail-permit feature for a portal authentication server.

Use undo portal [ ipv6] fail-permit server to disable the portal fail-permit feature for the portal authentication server.

Syntax

portal [ ipv6 ] fail-permit server server-name

undo portal [ ipv6] fail-permit server

Default

Portal fail-permit is disabled for the portal authentication server.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an IPv6 portal authentication server. If you do not specify this keyword, the specified authentication server is IPv4 portal authentication server.

server-name: Specifies a portal authentication server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

When portal fail-permit is enabled for a portal authentication server and portal Web servers on a VLAN interface, the interface disables portal authentication in either of the following conditions:

·          All portal Web servers are unreachable.

·          The specified portal authentication server is unreachable.

Portal authentication resumes on the VLAN interface when the specified portal authentication server and a minimum of one portal Web server becomes reachable. After portal authentication resumes, users who failed portal authentication and unauthenticated portal users need to pass authentication to access network resources. Portal users who have passed authentication can continue accessing network resources.

If you configure this command multiple times, the most recent configuration takes effect.

Examples

# Enable portal fail-permit for portal authentication server pts1 on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal fail-permit server pts1

Related commands

display portal

portal fail-permit web-server

Use portal [ ipv6 ] fail-permit web-server to enable the portal fail-permit feature for portal Web servers.

Use undo portal [ ipv6 ] fail-permit web-server to disable the portal fail-permit feature for portal Web servers.

Syntax

portal [ ipv6 ] fail-permit web-server

undo portal [ ipv6] fail-permit web-server

Default

Portal fail-permit is disabled for portal Web servers.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies IPv6 portal Web servers. If you do not specify this keyword, IPv4 portal Web servers are specified.

Usage guidelines

When portal fail-permit is enabled for a portal authentication server and portal Web servers, the VLAN interface or service template disables portal authentication in either of the following conditions:

·          All portal Web servers are unreachable.

·          The specified portal authentication server is unreachable.

Portal authentication resumes on the VLAN interface or service template when the specified portal authentication server and a minimum of one portal Web server becomes reachable. After portal authentication resumes, users who failed portal authentication and unauthenticated portal users need to pass authentication to access network resources. Portal users who have passed authentication can continue accessing network resources.

On the same VLAN interface or service template, the portal Web server is unreachable when both the primary and backup portal Web servers are unreachable.

Examples

# Enable portal fail-permit for the portal Web servers on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal fail-permit web-server

Related commands

display portal

portal free-all except destination

Use portal free-all except destination to configure an IPv4 portal authentication destination subnet on a VLAN interface.

Use undo portal free-all except destination to delete the IPv4 portal authentication destination subnets on the VLAN interface.

Syntax

portal free-all except destination ipv4-network-address { mask-length | mask }

undo portal free-all except destination [ ipv4-network-address ]

Default

No IPv4 portal authentication destination subnet is configured on a VLAN interface. Portal users must pass portal authentication to access any subnet.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

ipv4-network-address: Specifies an IPv4 portal authentication subnet address.

mask-length: Specifies the subnet mask length for the authentication subnet address, in the range of 0 to 32.

mask: Specifies the subnet mask in dotted decimal format.

Usage guidelines

Portal users on a VLAN interface are authenticated when accessing the specified authentication destination subnet (except IP addresses and subnets specified in portal-free rules). The users can access other subnets without portal authentication.

You can configure multiple authentication destination subnets.

If you do not specify the ipv4-network-address argument in the undo portal free-all except destination command, this commands deletes all IPv4 portal authentication destination subnets on the interface.

Examples

# Configure an IPv4 portal authentication destination subnet of 11.11.11.0/24 on VLAN-interface 2. Portal users need to pass authentication to access this subnet and can access other subnets without authentication.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname–Vlan-interface2] portal free-all except destination 11.11.11.0 24

Related commands

display portal

portal free-rule

Use portal free-rule to configure an IP-based portal-free rule.

Use undo portal free-rule to delete portal-free rules.

Syntax

portal free-rule rule-number { destination ip { ip-address { mask-length | mask } | any } [ tcp tcp-port-number | udp udp-port-number ] | source ip { ip-address { mask-length | mask } | any } [ tcp tcp-port-number | udp udp-port-number ] } * [ interface interface-type interface-number ]

portal free-rule rule-number { destination ipv6 { ipv6-address prefix-length | any } [ tcp tcp-port-number | udp udp-port-number ] | source ipv6 { ipv6-address prefix-length | any } [ tcp tcp-port-number | udp udp-port-number ] } * [ interface interface-type interface-number ]

undo portal free-rule { rule-number | all }

Default

No IP-based portal-free rule is configured.

Views

System view

Predefined user roles

network-admin

Parameters

rule-number: Specifies a portal-free rule number in the range of 1 to 4294967295.

destination: Specifies the destination information.

source: Specifies the source information.

ip ip-address: Specifies an IPv4 address for the portal-free rule.

{ mask-length | mask }: Specifies the subnet mask of the IPv4 address. The value range for the mask-length argument is 0 to 32. The mask argument is in dotted decimal format.

ipv6 ipv6-address: Specifies an IPv6 address for the portal-free rule.

prefix-length: Specifies the prefix length of the IPv6 address, in the range of 0 to 128.

ip any: Represents any IPv4 address.

ipv6 any: Represents any IPv6 address.

tcp tcp-port-number: Specifies a TCP port number for the portal-free rule, in the range of 0 to 65535.

udp udp-port-number: Specifies a UDP port number for the portal-free rule, in the range of 0 to 65535.

all: Specifies all portal-free rules.

interface interface-type interface-number: Specifies a VLAN interface on which the portal-free rule takes effect.

Usage guidelines

You can specify both the source and destination keyword for a portal-free rule. If you specify only one keyword, the other keyword does not act as a filtering criterion.

If you specify both a source port number and a destination port number for a portal-free rule, the two port numbers must belong to the same transport layer protocol.

If you do not specify a VLAN interface, the portal-free rule takes effect on all portal-enabled VLAN interfaces.

You cannot configure two portal-free rules with the same filtering criteria.

Examples

# Configure an IPv4-based portal-free rule: specify the rule number as 1, the source IP address as 10.10.10.1/24, the destination IP address as 20.20.20.1, the destination TCP port number as 23, and the interface as VLAN-interface 100.

<Sysname> system-view

[Sysname] portal free-rule 1 destination ip 20.20.20.1 32 tcp 23 source ip 10.10.10.1 24 interface vlan-interface 100

With this rule, users in subnet 10.10.10.1/24 do not need to pass portal authentication through GigabitEthernet 1/0/1 when they access services provided on TCP port 23 of host 20.20.20.1.

# Configure an IPv6-based portal-free rule: specify the rule number as 2, the source IP address as 2000::1/64, the destination IP address as 2001::1, the destination TCP port number as 23, and the interface as VLAN-interface 100.

<Sysname> system-view

[Sysname] portal free-rule 2 destination ipv6 2001::1 128 tcp 23 source ip 2000::1 64 interface vlan-interface 100

With this rule, users in subnet 2000::1/64 do not need to pass portal authentication through VLAN-interface 100 when they access services provided on TCP port 23 of host 2001::1.

Related commands

display portal rule

portal free-rule destination

Use portal free-rule destination to configure a destination-based portal-free rule.

Use undo portal free-rule to delete portal-free rules.

Syntax

portal free-rule rule-number destination host-name

undo portal free-rule { rule-number | all }

Default

No destination-based portal-free rule is configured.

Views

System view

Predefined user roles

network-admin

Parameters

rule-number: Specifies a portal-free rule number in the range of 1 to 4294967295.

destination: Specifies the destination host.

host-name: Specifies the destination host by its name, a case-insensitive string that can contain letters, digits, hyphens (-), underscores (_), dots (.), and asterisks (*).

all: Specifies all portal-free rules.

Usage guidelines

You can configure a hostname in one of the following ways:

·          For exact match—Specify a complete hostname. For example, if you configure the hostname as abc.com.cn in the portal-free rule, only packets that contain the hostname abc.com.cn match the rule. Packets that carry any other hostnames (such as dfabc.com.cn) do not match the rule.

·          For fuzzy match—Specify a hostname by placing the asterisk (*) wildcard character at the beginning or end of the hostname string. For example, if you configure the hostname as *abc.com.cn, abc*, or *abc*, packets that carry the hostname ending with abc.com.cn, starting with abc, or including abc match the rule.

The asterisk (*) wildcard character represents any characters. The device treats multiple consecutive asterisks as one.

The configured hostname cannot contain only asterisks (*).

You cannot configure two destination-based portal-free rules with the same destination information. Otherwise the system prompts you that the same rule already exists.

Examples

# Configure a destination-based portal-free rule numbered 4 to allow portal users whose HTTP/HTTPS requests carry hostname www.h3c.com to access network resources without portal authentication.

<Sysname> system-view

[Sysname] portal free-rule 4 destination www.h3c.com

Related commands

display portal rule

portal free-rule source

Use portal free-rule source to configure a source-based portal-free rule. The filtering criteria include source MAC address, source interface, and source VLAN.

Use undo portal free-rule to delete portal-free rules.

Syntax

portal free-rule rule-number source { ap ap-name | { interface interface-type interface-number | mac mac-address | vlan vlan-id } * }

undo portal free-rule { rule-number | all }

Default

No source-based portal-free rule is configured.

Views

System view

Predefined user roles

network-admin

Parameters

rule-number: Specifies a portal-free rule number in the range of 1 to 4294967295.

ap ap-name: Specifies an AP by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, underscores (_), left brackets ([), right brackets (]), slashes (/), and minus signs (-). This option is applicable only when portal authentication is enabled on a service template.

interface interface-type interface-number: Specifies a source interface by its type and number for the portal-free rule.

mac mac-address: Specifies a source MAC address for the portal-free rule, in the form of H-H-H.

vlan vlan-id: Specifies a source VLAN ID for the portal-free rule.

all: Specifies all portal-free rules.

Usage guidelines

If you specify both the source VLAN and the source Layer 2 interface, the interface must be in the VLAN.

If portal users have come online before source-based portal-free rules are configured, the device keeps accounting on traffic of the users even if they match these rules.

Examples

# Configure a source-based portal-free rule numbered 3 to allow the portal user whose source MAC address is 1-1-1 from VLAN 10 to access network resources without portal authentication.

<Sysname> system-view

[Sysname] portal free-rule 3 source mac 1-1-1 vlan 10

# Configure a source-based portal-free rule numbered 4 to allow portal users on AP 10 to access network resources without portal authentication.

<Sysname> system-view

[Sysname] portal free-rule 4 source ap ap10

Related commands

display portal rule

portal host-check enable

Use portal host-check enable to enable validity check on wireless portal clients.

Use undo portal host-check enable to disable validity check on wireless portal clients.

Syntax

portal host-check enable

undo portal host-check enable

Default

The device checks wireless portal client validity according to ARP entries only.

Views

System view

Predefined user roles

network-admin

Usage guidelines

In wireless networks where the AP forwards client traffic, the AC does not have ARP entries for clients. Therefore, the AC cannot check the validity of portal clients by using ARP entries. To ensure that valid users can perform portal authentication, you must enable wireless client validity check on the AC.

This feature enables the AC to validate a client by looking up the client information in the WLAN snooping table, DHCP snooping table, and ARP table. If the client information exists, the AC determines the client to be valid for portal authentication.

Examples

# Enable validity check on wireless portal clients.

<Sysname> system-view

[Sysname] portal host-check enable

portal ipv6 free-all except destination

Use portal ipv6 free-all except destination to configure an IPv6 portal authentication destination subnet.

Use undo portal ipv6 free-all except destination to delete IPv6 portal authentication destination subnets.

Syntax

portal ipv6 free-all except destination ipv6-network-address prefix-length

undo portal ipv6 free-all except destination [ ipv6-network-address ]

Default

No IPv6 portal authentication destination subnet is configured on a VLAN interface. Portal users must pass portal authentication to access any IPv6 subnet.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

ipv6-network-address: Specifies an IPv6 portal authentication destination subnet.

prefix-length: Specifies the prefix length of the IPv6 subnet, in the range of 0 to 128.

Usage guidelines

Portal users on a VLAN interface are authenticated when accessing the specified authentication destination subnet (except IP addresses and subnets specified in portal-free rules). The users can access other subnets without portal authentication.

You can configure multiple authentication destination subnets.

If you do not specify the ipv6-network-address argument in the undo portal ipv6 free-all except destination command, this command deletes all IPv6 portal authentication destination subnets on the interface.

Examples

# Configure an IPv6 portal authentication destination subnet of 1::2/16 on VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname–Vlan-interface2] portal ipv6 free-all except destination 1::2 16

Related commands

display portal

portal ipv6 user-detect

Use portal ipv6 user-detect to enable online detection of IPv6 portal users.

Use undo portal user-detect to disable online detection of IPv6 portal users.

Syntax

portal ipv6 user-detect type { icmpv6 | nd } [ retry retries ] [ interval interval ] [ idle time ]

undo portal ipv6 user-detect

Default

Online detection of IPv6 portal users is disabled.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

type: Specifies the detection type.

·          icmpv6—ICMPv6 detection.

·          nd—ND detection.

retry retries: Sets the maximum number of detection attempts, in the range of 1 to 10. The default value is 3.

interval interval: Sets a detection interval in the range of 1 to 1200 seconds. The default interval is 3 seconds.

idle time: Sets the user idle timeout in the range of 60 to 3600 seconds. The default is 180 seconds. When the timeout expires, online detection of portal users is started.

Usage guidelines

If the device receives no packets from a portal user within the idle time, the device detects the user's online status as follows:

·          ICMPv6 detection—Sends ICMPv6 requests to the user at configurable intervals to detect the user status.

?  If the device receives a reply within the maximum number of detection attempts, it considers that the user is online and stops sending detection packets. Then the device resets the idle timer and repeats the detection process when the timer expires.

?  If the device receives no reply after the maximum number of detection attempts, the device logs out the user.

·          ND detection—Sends ND requests to the user and detects the ND entry status of the user at configurable intervals.

?  If the ND entry of the user is refreshed within the maximum number of detection attempts, the device considers that the user is online and stops detecting the user's ND entry. Then the device resets the idle timer and repeats the detection process when the timer expires.

?  If the ND entry of the user is not refreshed after the maximum number of detection attempts, the device logs out the user.

If firewall policies on the access device filter out ICMPv6 packets, ICMPv6 detection might fail and result in the logout of portal users. Make sure the access device does not block ICMPv6 packets before you enable ICMPv6 detection on an interface.

Examples

# Enable online detection of IPv6 portal users on VLAN-interface 100. Configure the detection type as ND, the maximum number of detection attempts as 5, the detection interval as 10 seconds, and the user idle timeout as 300 seconds.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal ipv6 user-detect type nd retry 5 interval 10 idle 300

Related commands

display portal

portal local-web-server

Use portal local-web-server to create a local portal Web server and enter its view, or enter the view of an existing local portal Web server.

Use undo portal local-web-server to delete the local portal Web server.

Syntax

portal local-web-server { http | https [ ssl-server-policy policy-name ] [ tcp-port port-number ] }

undo portal local-web-server { http | https }

Default

No local portal Web servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

http: Configures the local portal Web server to use HTTP to exchange authentication information with clients.

https: Configures the local portal Web server to use HTTPS to exchange authentication information with clients.

ssl-server-policy policy-name: Specifies an existing SSL server policy for HTTPS. The policy name is a case-insensitive string of 1 to 31 characters. If you do not specify this option, HTTPS is associated with the SSL server policy that uses the self-signed certificate. That SSL server policy supports all cipher suites.

tcp-port port-number: Specifies the listening TCP port number for the HTTPS-based local portal Web service. The value range for the port-number argument is 1 to 65535. The default port number is 443.

Usage guidelines

After a local portal Web server is configured on the access device, the access device also acts as the portal Web server and the portal authentication server. No external portal Web server and portal authentication server are needed.

For a VLAN interface to use the local portal Web server, the URL of the portal Web server specified for the VLAN interface must meet the following requirements:

·          The IP address in the URL must be a local IP address on the device (except the IP address 127.0.0.1).

·          The URL must be ended with /portal/. For example: http://1.1.1.1/portal/.

You cannot delete an SSL server policy by using the undo ssl server-policy command when the policy is associated with HTTPS.

You cannot change the associated SSL server policy for HTTPS by executing this command repeatedly. To change the SSL server policy for HTTPS:

1.        Delete the local portal Web server by using the portal local-web-server https ssl-server-policy command.

2.        Re-create the local portal Web server and specify a new SSL server policy by using the portal local-web-server https ssl-server-policy command.

When you specify the listening TCP port number for the HTTPS-based local portal Web service, follow these restrictions and guidelines:

·          For HTTPS-based local portal Web service and other services that use HTTPS:

?  If they use the same SSL server policy, they can use the same TCP port number to listen to HTTPS.

?  If they use different SSL server policies, they cannot use the same TCP port number to listen to HTTPS.

·          Do not configure the HTTPS listening TCP port number as the port number used by a known protocol (except HTTPS) or other service.

·          Do not configure the same TCP port number for HTTP-based local portal Web service and HTTPS-based local portal Web service.

Examples

# Configure a local portal Web server. Use HTTP to exchange authentication information with clients.

<Sysname> system-view

[Sysname] portal local-web-server http

[Sysname-portal-local-websvr-http]

# Configure a local portal Web server. Use HTTPS to exchange authentication information with clients, and specify SSL server policy policy1 for HTTPS.

<Sysname> system-view

[Sysname] portal local-web-server https ssl-server-policy policy1

[Sysname-portal-local-websvr-https]

# Change the SSL server policy to policy2.

[Sysname] undo portal local-web-server https

[Sysname] portal local-web-server https ssl-server-policy policy2

[Sysname-portal-local-websvr-https]

# Create an HTTPS-based local portal Web service. In the service, the associated SSL server policy is policy1 and the listening port number is 442.

<Sysname> system-view

[Sysname] portal local-web-server https ssl-server-policy policy1 tcp-port 442

[Sysname-portal-local-websvr-https] quit

Related commands

·          default-logon-page

·          portal local-web-server

·          ssl server-policy

portal logout-record enable

Use portal logout-record enable to enable portal user offline recording.

Use undo portal logout-record enable to disable portal user offline recording.

Syntax

portal logout-record enable

undo portal logout-record enable

Default

Portal user offline recording is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to save all portal user offline records and to periodically send the records to the lvzhou cloud server or other servers.

Examples

# Enable portal user offline recording.

<Sysname> system-view

[Sysname] portal logout-record enable

Related commands

display portal logout-record

portal logout-record export

Use portal logout-record export to export portal user offline records to a path.

Syntax

portal logout-record export url url-string [ start-time start-date start-time end-time end-date end-time ]

Views

System view

Predefined user roles

network-admin

Parameters

url url-string: Specifies the URL to which portal user offline records are exported. The URL is a case-insensitive string of 1 to 255 characters.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

Usage guidelines

The device supports FTP, TFTP, and HTTP file transfer methods. Table 41 describes the valid URL format for each method.

Table 41 URL formats

Protocol

URL format

Remarks

FTP

ftp://username[:password]@server-address[:port-number]/file-path

Example: ftp://a:1@1.1.1.1/authfail/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

TFTP

tftp://server-address[:port-number]/file-path

Example: tftp://1.1.1.1/ autherror/

N/A

HTTP

http://username[:password]@server-address[:port-number]/file-path

Example: http://1.1.1.1/autherror/

The username and password must be the same as those on the server.

If the server authenticates only the username, no password is required.

 

If the server address is an IPv6 address, bracket the IPv6 address to distinguish the IPv6 address from the port number. For example, if the server address is 2001::1 and the port number is 21, the URL is ftp://test:test@[2001::1]:21/test/.

Examples

# Export all portal user offline records to path tftp://1.1.1.1/record/logout/.

<Sysname> system-view

[Sysname] portal logout-record export url tftp://1.1.1.1/record/logout/

# Export portal user offline records in the time rang of 2016/3/4 14:20 to 2016/3/4 15:00 to path tftp://1.1.1.1/record/logout/.

<Sysname> system-view

[Sysname] portal logout-record export tftp://1.1.1.1/record/logout/ start-time 2016/3/4 14:20 end-time 2016/3/4 15:00

Related commands

display portal logout-record

portal logout-record enable

reset portal logout-record

portal logout-record max

Use portal logout-record max to set the maximum number of portal user offline records.

Use undo portal logout-record max to restore the default.

Syntax

portal logout-record max number

undo portal logout-record max

Default

The maximum number of portal user offline records is 32000.

Views

System view

Predefined user roles

network-admin

Parameters

number: Specifies the maximum number of portal user offline records, in the range of 1 to 4294967295.

Usage guidelines

When the maximum number of portal user offline records is reached, the new record overwrites the oldest one.

Examples

# Set the maximum number of portal user offline records to 50.

<Sysname> system-view

[Sysname] portal logout-record max 50

Related commands

display portal logout-record

portal mac-trigger-server

Use portal mac-trigger-server to create a MAC binding server and enter its view, or enter the view of an existing MAC binding server.

Use undo portal mac-trigger-server to delete the MAC binding server.

Syntax

portal mac-trigger-server server-name

undo portal mac-trigger-server server-name

Default

No MAC binding servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

server-name: Specifies a MAC binding server name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

After you create a MAC binding server, you can configure MAC binding server parameters, such as the server's IP address and the free-traffic threshold.

Examples

# Create MAC binding server mts and enter its view.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts]

Related commands

·          display portal mac-trigger-server

·          portal apply mac-trigger-server

portal max-user

Use portal max-user to set the maximum number of total portal users allowed in the system.

Use undo portal max-user to restore the default.

Syntax

portal max-user max-number

undo portal max-user

Default

The total number of portal users allowed in the system is not limited.

Views

System view

Predefined user roles

network-admin

Parameters

max-number: Specifies the maximum number of total portal users in the system. The value range is 1 to 4294967295.

Usage guidelines

If you configure the maximum total number smaller than the number of current online portal users on the device, this command still takes effect. The online users are not affected by this command, but the system forbids new portal users to log in.

This command sets the maximum number of online IPv4 and IPv6 portal users in all.

Make sure the maximum combined number of IPv4 and IPv6 portal users specified on all interfaces or service templates does not exceed the system-allowed maximum number. Otherwise, the exceeding portal users will not be able to log in to the device.

Examples

# Set the maximum number of online portal users allowed in the system to 100.

<Sysname> system-view

[Sysname] portal max-user 100

Related commands

·          display portal user

·          portal { ipv4-max-user | ipv6-max-user }

portal nas-id profile

Use portal nas-id-profile to specify a NAS-ID profile for a VLAN interface.

Use undo portal nas-id-profile to restore the default.

Syntax

portal nas-id-profile profile-name

undo portal nas-id-profile

Default

No NAS-ID profile is specified for a VLAN interface.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

profile-name: Specifies the name of a NAS-ID profile, a case-insensitive string of 1 to 31 characters.

Usage guidelines

A NAS-ID profile defines the binding relationship between VLANs and NAS-IDs. To configure a NAS-ID profile, use the aaa nas-id profile command. For more information, see "AAA commands."

If a VLAN interface is specified with a NAS-ID profile, the VLAN interface prefers to use the bindings defined in the profile.

If no NAS-ID profile is specified for a VLAN interface or no matching binding is found in the specified profile, the device uses the device name as the interface NAS-ID.

Examples

# Specify the NAS-ID profile aaa for VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] portal nas-id-profile aaa

Related commands

aaa nas-id profile

portal nas-port-id format

Use portal nas-port-id format to specify the NAS-Port-Id attribute format.

Use undo portal nas-port-id format to restore the default.

Syntax

portal nas-port-id format { 1 | 2 | 3 | 4 }

undo portal nas-port-id format

Default

The format for the NAS-Port-Id attribute is format 2.

Views

System view

Predefined user roles

network-admin

Parameters

1: Uses format 1 for the NAS-Port-Id attribute.

2: Uses format 2 for the NAS-Port-Id attribute.

3: Uses format 3 for the NAS-Port-Id attribute.

4: Uses format 4 for the NAS-Port-Id attribute.

Usage guidelines

The NAS-Port-Id format supported by RADIUS servers varies by vendor. Use this command to specify the format of the NAS-Port-Id attribute in the RADIUS packets sent for portal users to the RADIUS server. The device then automatically constructs a value for the NAS-Port-Id attribute in the specified format to meet the RADIUS server requirements.

Format 1 contains three space-separated strings: interface-type port-location access-node-id. Spaces are not allowed within a string.

·          The interface-type string specifies the interface type of the NAS port. Available options include:

?  atm—ATM interface.

?  eth—Common Ethernet interface.

?  trunk—Ethernet trunk interface.

?  0—The interface type information will be reported by the access node to the BRAS.

·          The port-location string represents the location of the access line on the BRAS. Its format is NAS_slot/NAS_subslot/NAS_port:XPI.XCI.

 

Field

Description

NAS_slot

Slot number of the BRAS, in the range of 0 to 31.

NAS_subslot

Subslot number of the BRAS, in the range of 0 to 31.

NAS_Port

Port number of the BRAS, in the range of 0 to 63.

XPI.XCI

For ATM interfaces:

·         XPI is VPI in the range of 0 to 255.

·         XCI is VCI in the range of 0 to 65535.

For Ethernet interfaces or Ethernet trunk interfaces:

·         XPI is PVLAN in the range of 0 to 4095. This field is set to 4096 if there is no PVLAN.

·         XCI is CVLAN in the range of 0 to 4095. This field is set to 4096 if the user is not assigned to a VLAN as in the situation where the end user device is directly connected to a BRAS port.

 

For the access node to report its access line information to the BRAS, all fields will be set to 0s except for the XPI and XCI fields.

·          The access-node-id string specifies the attributes the of BRAS. Its format is AccessNodeIdentifier/ANI_rack/ANI_frame/ANI_slot/ANI_subslot/ANI_port:ANI_XPI.ANI_XCI, in which the :ANI_XPI.ANI_XCI portion is optional.

 

Field

Description

AccessNodeIdentifier

Identifier description of the access node, a string not longer than 50 characters without spaces.

ANI_rack

Rack number of the access node, in the range of 0 to 15.

ANI_frame

Frame number of the access node, in the range of 0 to 31.

ANI_slot

Slot number of the access node, in the range of 0 to 127.

ANI_subslot

Subslot number of the access node, in the range of 0 to 31.

ANI_port

Port number of the access node, in the range of 0 to 255.

ANI_XPI.ANI_XCI

Optional.

This field is mainly used to carry CPE-side service information, identifying the further service type requirement. For example, use this field to identify specific services in a multi-PVC scenario.

For ATM interfaces:

·         ANI_XPI is VPI in the range of 0 to 255

·         ANI_XCI is VCI in the range of 0 to 65535.

For Ethernet interfaces or Ethernet trunk interfaces:

·         ANI_XPI is PVLAN in the range of 0 to 4095. This field is set to 4096 if there is no PVLAN.

·         ANI_XCI is CVLAN in the range of 0 to 4095. This field is set to 4096 if the user is not assigned to a VLAN as in the situation where the end user device is directly connected to a BRAS port.

 

If the device does not have rack, frame, or subslot information, 0 is padded in the corresponding field.

For ATM interfaces, all fields in the access-node-id string are filled with 0s except for the ANI_XPI and ANI_XCI fields.

·          Examples of format 1:

 

NAS-Port-Id

Description

atm 31/31/7:255.65535 0/0/0/0/0/0

The subscriber interface is an ATM interface.

The slot number is 31, the BRAS subslot number is 31, the BRAS port number is 7, the VPI is 255, and the VCI is 65535.

eth 31/31/7:1234.2345 0/0/0/0/0/0

The subscriber interface is an Ethernet interface.

The slot number is 31, the subslot number is 31, the port number is 7, the PVLAN is 1234, and the CVLAN is 2345.

If there is no PVLAN, 1234 will be replaced with 4096.

eth 31/31/7:4096.2345 guangzhou001/1/31/63/31/127

The subscriber interface is an Ethernet interface.

The slot number is 31, the subslot number is 31, the port number is 7, and the VLAN ID is 2345.

The access node identifier of the DSLAM is guangzhou001, the rack number is 1, the frame number is 31, the slot number is 63, subslot number is 31, and the port number is 127.

0 0/0/0:4096.1234 guangzhou001/0/31/63/31/127

The 0 and 0/0/0 strings indicate that BRAS does not have access line information and will use the information received from the access node.

After receiving access line information from the access node, the BRAS transparently delivers the information or complements the BRAS access link information as configured. For example, the BRAS complements the access line information as eth 31/31/7:4096.1234 guangzhou001/0/31/63/31/127.

 

Format 2 is SlotID/00/IfNO/VlanID.

·          SlotIDThe number of the slot the user accesses, a string of 2 characters.

·          IFNOThe number of the interface the user accesses, a string of 3 characters.

·          VlanIDThe number of VLAN the user accesses, a string of 9 characters.

Format 3 is SlotID/00/IfNO/VlanID/DHCP option.

·          SlotIDThe number of the slot the user accesses, a string of 2 characters.

·          IFNOThe number of the interface the user accesses, a string of 3 characters.

·          VlanIDThe number of VLAN the user accesses, a string of 9 characters.

·          DHCP optionDHCP option 82 is appended for IPv4 users and DHCP option 18 is appended for IPv6 users.

Format 4 is slot=**;subslot=**;port=**;vlanid=**;vlanid2=**;.

·          For non-VLAN interfaces, the slot=**;subslot=**;port=**;vlanid=0; format is used.

·          For interfaces that terminate only the outermost VLAN tag, the slot=**;subslot=**;port=**;vlanid=**; format is used.

Examples

# Set the format of the NAS-Port-Id attribute to format 1.

<Sysname> system-view

[Sysname] portal nas-port-id format 1

portal nas-port-type

Use portal nas-port-type to specify the NAS-Port-Type value carried in RADIUS requests sent to the RADIUS server.

Use undo portal nas-port-type to restore the default.

Syntax

portal nas-port-type { ethernet | wireless }

undo portal nas-port-type

Default

The NAS-Port-Type value carried in RADIUS requests is the user's access interface type value obtained by the access device.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ethernet: Specifies the NAS-Port-Type attribute value as Ethernet (number 15).

wireless: Specifies the NAS-Port-Type attribute value as WLAN-IEEE 802.11 (number 19).

Usage guidelines

As the access device, the BAS might not be able to correctly obtain a user's interface type when multiple network devices exist between the BAS and the portal client. For example, the access interface type obtained by the BAS for a wireless portal user might be the type of the wired interface that authenticated the user. For the BAS to send correct user interface type to the RADIUS server, use this command to specify the correct NAS-Port-Type value.

Examples

# Specify the NAS-Port-Type value in RADIUS requests sent to RADIUS server as WLAN-IEEE 802.11 on VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] portal nas-port-type wireless

# Specify the NAS-Port-Type value in RADIUS requests sent to RADIUS server as WLAN-IEEE 802.11 on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal nas-port-type wireless

Related commands

display portal interface

portal oauth user-sync interval

Use portal oauth user-sync interval to set the user synchronization interval for portal authentication using OAuth.

Use undo portal oauth user-sync interval to restore the default.

Syntax

portal oauth user-sync interval interval

undo portal oauth user-sync interval

Default

The user synchronization interval is 60 seconds for portal authentication using OAuth.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Specifies the user synchronization interval, in seconds. The value for this argument can be 0 or in the range of 60 to 3600.

Usage guidelines

If portal authentication uses OAuth, the device periodically reports user information to the portal authentication server for user synchronization on the server. To disable user synchronization from the device to the portal authentication server, set the user synchronization interval to 0 seconds on the device.

Examples

# Set the user synchronization interval to 120 seconds for portal authentication using OAuth.

<Sysname> system-view

[Sysname] portal oauth user-sync interval 120

portal outbound-filter enable

Use portal [ ipv6 ] outbound-filter enable to enable outgoing packets filtering.

Use undo portal [ ipv6 ] outbound-filter enable to disable outgoing packets filtering.

Syntax

portal [ ipv6 ] outbound-filter enable

undo portal [ ipv6 ] outbound-filter enable

Default

Outgoing packets filtering is disabled. A portal-enabled interface can send any packets.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies outgoing IPv6 packets. If you do not specify this keyword, the command is for outgoing IPv4 packets.

Usage guidelines

When you enable this feature on a portal-enabled VLAN interface or service template, the device permits the interface or service template to send the following packets:

·          Packets whose destination IP addresses are IP addresses of authenticated portal users.

·          Packets that match portal-free rules.

Other outgoing packets on the VLAN interface or service template are dropped.

Examples

# Enable outgoing packets filtering on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 20

[Sysname–Vlan-interface20] portal outbound-filter enable

# Enable outgoing packets filtering on service template service1.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal outbound-filter enable

Related commands

portal enable

portal packet log enable

Use portal packet log enable to enable logging for portal protocol packets.

Use undo portal packet log enable to disable logging for portal protocol packets.

Syntax

portal packet log enable

undo portal packet log enable

Default

Portal protocol packet logging is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature logs information about portal protocol packets, including the username, IP address, authentication type, packet type, SSID, and AP MAC. For portal log messages to be sent correctly, you must also configure the information center on the device. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.

Examples

# Enable logging for portal protocol packets.

<Sysname> system-view

[Sysname] portal packet log enable

Related commands

portal redirect log enable

portal user log enable

portal pre-auth domain

Use portal [ ipv6 ] pre-auth domain to specify a preauthentication domain for portal users on a VLAN interface.

Use undo portal [ ipv6 ] pre-auth domain to restore the default.

Syntax

portal [ ipv6 ] pre-auth domain domain-name

undo portal [ ipv6 ] pre-auth domain

Default

No preauthentication domain is specified on a VLAN interface.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

ipv6: Specifies IPv6 portal users. Do not specify this keyword for IPv4 portal users.

domain-name: Specifies an existing ISP domain by its name, a case-insensitive string of 1 to 255 characters. The string cannot contain the following characters: slashes (/), backslashes (\), vertical bars (|), quotation marks ("), colons (:), asterisks (*), question marks (?), left angle brackets (<), right angle brackets (>), and at signs (@).

Usage guidelines

Make sure you specify an existing ISP domain as a preauthentication domain. If the specified ISP domain does not exist, the device might operate incorrectly.

You must delete a preauthentication domain (by using the undo portal [ ipv6 ] pre-auth domain command) and reconfigure it in the following situations:

·          You create the ISP domain after specifying it as the preauthentication domain.

·          You delete the specified ISP domain and then re-create it.

The preauthentication domain takes effect only on portal users with IP addresses assigned by DHCP or DHCPv6.

After you configure a preauthentication domain on a portal-enabled VLAN interface, the device authorizes users on the VLAN interface as follows:

1.        After an unauthenticated user obtains an IP address, the user is assigned with authorization attributes configured for the preauthentication domain.

The authorization attributes in a preauthentication domain include ACL, user profile, and CAR.

An unauthenticated user who is authorized with the authorization attributes in a preauthentication domain is called a preauthentication user.

2.        After the user passes portal authentication, the user is assigned with new authorization attributes from the AAA server.

3.        After the user goes offline, the user is reassigned with the authorization attributes in the preauthentication domain.

If you change the preauthentication domain on a VLAN interface, the VLAN interface uses the new preauthentication domain for both new and existing preauthentication users.

If authorization attributes in the preauthentication domain are modified, the modified attributes take effect only on new preauthentication users. Existing preauthentication users use the original authorization attributes.

If the ACL in the preauthentication domain does not exist or the ACL has no rules, the device does not control user access. Users can access any network resources without passing portal authentication.

Follow these guidelines when you configure a preauthentication ACL rule:

·          Do not specify a source address. If you specify a source address, users cannot trigger portal authentication.

·          Do not set the destination address to any. All packets will be permitted to pass and therefore users can access any resources before portal authentication.

Examples

# Create the preauthentication domain abc for VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] portal pre-auth domain abc

Related commands

display portal

portal pre-auth ip-pool

Use portal pre-auth ip-pool to specify a preauthentication IP address pool for portal users on a VLAN interface.

Use undo portal pre-auth ip-pool to restore the default.

Syntax

portal [ ipv6 ] pre-auth ip-pool pool-name

undo portal [ ipv6 ] pre-auth ip-pool

Default

No preauthentication IP address pool is specified for portal users on a VLAN interface.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

ipv6: Specifies IPv6 portal users. Do not specify this keyword for IPv4 portal users.

pool-name: Specifies an IP address pool by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

You must use this command to specify a preauthentication IP address pool on a portal-enabled interface in the following situation:

·          Portal users access the network through a subinterface of the portal-enabled interface.

·          The subinterface does not have an IP address.

·          Portal users need to obtain IP addresses through DHCP.

DHCP assigns an IP address from the specified IP address pool to a user. Then, the user can use this IP address to perform portal authentication.

Make sure the specified IP address pool exists and is correctly configured.

Examples

# Create the IPv4 address pool abc for VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal pre-auth ip-pool abc

Related commands

·          dhcp server ip-pool (Layer 3—IP Services Command Reference)

·          display portal

·          ipv6 dhcp pool (Layer 3—IP Services Command Reference)

portal redirect log enable

Use portal redirect log enable to enable logging for portal redirect.

Use undo portal redirect log enable to disable logging for portal redirect.

Syntax

portal redirect log enable

undo portal redirect log enable

Default

Portal redirect logging is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature logs information about portal redirect packets, including the user IP address, MAC address, SSID, BAS IP, and Web server IP address. For portal log messages to be sent correctly, you must also configure the information center on the device. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.

Examples

# Enable logging for portal redirect.

<Sysname> system-view

[Sysname] portal redirect log enable

Related commands

portal packet log enable

portal user log enable

portal refresh enable

Use portal refresh { arp | nd } enable to enable ARP or ND entry conversion for portal clients.

Use undo portal refresh { arp | nd } enable to disable ARP or ND entry conversion.

Syntax

portal refresh { arp | nd } enable

undo portal refresh { arp | nd } enable

Default

ARP or ND entry conversion is enabled for portal clients.

Views

System view

Predefined user roles

network-admin

Parameters

arp: Specifies the ARP entries.

nd: Specifies the ND entries.

Usage guidelines

When you enable this feature at a time:

·          ARP or ND entries for portal users who pass authentication after the time are converted to Rule ARP or ND entries. Rule ARP or ND entries will not be aged.

·          ARP or ND entries for portal users who pass authentication before the time will be aged when their respective aging timers expire.

When you disable this feature at a time:

·          ARP or ND entries for portal users who pass authentication after the time will be aged when their respective aging timers expire.

·          Rule ARP or ND entries created for portal users before the time are still Rule ARP or ND entries.

Examples

# Disable ARP entry conversion for portal clients.

<Sysname> system-view

[Sysname] undo portal refresh arp enable

portal roaming enable

Use portal roaming enable to enable portal roaming.

Use undo portal roaming enable to disable portal roaming.

Syntax

portal roaming enable

undo portal roaming enable

Default

Portal roaming is disabled. An online portal user cannot roam in its VLAN.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command applies only to portal users that log in from VLAN interfaces.

This command cannot be executed when online users or preauthentication portal users are present on the device.

If portal roaming is enabled, an online portal user can access network resources from any Layer 2 port in its local VLAN. If portal roaming is disabled, the portal user can access network resources only from the Layer 2 port on which it passes authentication.

Examples

# Enable portal roaming.

<Sysname> system-view

[Sysname] portal roaming enable

portal safe-redirect enable

Use portal safe-redirect enable to enable the portal safe-redirect feature.

Use undo portal safe-redirect enable to disable the portal safe-redirect feature.

Syntax

portal safe-redirect enable

undo portal safe-redirect enable

Default

The portal safe-redirect feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Portal redirects all HTTP requests except HTTP requests that match portal-free rules to the portal Web server, which might overload the server.

Portal safe-redirect filters HTTP requests by HTTP request method, browser type (in HTTP User Agent), and destination URL, and redirects only the permitted HTTP requests.

As a best practice to avoid server overload and improve security, enable portal safe-redirect on the device.

Examples

# Enable the portal safe-redirect feature.

<Sysname> system-view

[Sysname] portal safe-redirect enable

Related commands

portal safe-redirect forbidden-url

portal safe-redirect method

portal safe-redirect user-agent

portal safe-redirect forbidden-file

Use portal safe-redirect forbidden-file to configure a filename extension forbidden by portal safe-redirect. If the URL of an HTTP request includes the specified filename extension, the device does not redirect the HTTP request.

Use undo portal safe-redirect forbidden-file to delete a portal safe-redirect forbidden filename extension.

Syntax

portal safe-redirect forbidden-file filename-extension

undo portal safe-redirect forbidden-file filename-extension

Default

No forbidden filename extensions are configured. The device redirects HTTP requests regardless of the filename extension in the URL.

Views

System view

Predefined user roles

network-admin

Parameters

filename-extension: Specifies a filename extension forbidden by portal safe-redirect, a case sensitive string of 1 to 16 characters.

Usage guidelines

You can configure multiple portal safe-redirect forbidden filename extensions.

Before you execute this command, make sure the portal safe-redirect feature is enabled.

Examples

# Specify .jpg as a portal safe-redirect forbidden filename extension.

<Sysname> system-view

[Sysname] portal safe-redirect forbidden-file .jpg

Related commands

portal safe-redirect enable

portal safe-redirect forbidden-url

Use portal safe-redirect forbidden-url to configure a URL forbidden by portal safe-redirect.

Use undo portal safe-redirect forbidden-url to delete a portal safe-redirect forbidden URL.

Syntax

portal safe-redirect forbidden-url user-url-string

undo portal safe-redirect forbidden-url user-url-string

Default

No forbidden URLs are configured. The device can redirect HTTP requests with any URLs.

Views

System view

Predefined user roles

network-admin

Parameters

user-url-string: Specifies a URL forbidden by portal safe-redirect, a case sensitive string of 1 to 256 characters.

Usage guidelines

You can execute this command multiple times to configure multiple portal safe-redirect forbidden URLs. The device does not redirect HTTP requests destined for the specified URLs to the portal Web server.

Before you execute this command, make sure the portal safe-redirect feature is enabled.

Examples

# Specify http://www.abc.com as a portal safe-redirect forbidden URL.

<Sysname> system-view

[Sysname] portal safe-redirect forbidden-url  http://www.abc.com

Related commands

portal safe-redirect enable

portal safe-redirect method

Use portal safe-redirect method to specify HTTP request methods permitted by portal safe-redirect.

Use undo portal safe-redirect method to delete HTTP request methods permitted by portal safe-redirect.

Syntax

portal safe-redirect method { get | post }*

undo portal safe-redirect method { get | post }*

Default

After portal safe-redirect is enabled, the device redirects only HTTP requests with the GET method.

Views

System view

Predefined user roles

network-admin

Parameters

get: Specifies the GET request method.

post: Specifies the POST request method.

Usage guidelines

After you specify HTTP request methods for portal safe-redirect, the device redirects only the HTTP requests with the specified methods to the portal Web server.

Before you execute this command, make sure the portal safe-redirect feature is enabled.

If you configure this command multiple times, the most recent configuration takes effect.

Examples

# Specify the GET request method for portal safe-redirect.

<Sysname> system-view

[Sysname] portal safe-redirect method get

Related commands

portal safe-redirect enable

portal safe-redirect user-agent

Use portal safe-redirect user-agent to specify a browser type for portal safe-redirect.

Use undo portal safe-redirect user-agent to delete a browser type for portal safe-redirect.

Syntax

portal safe-redirect user-agent user-agent-string

undo portal safe-redirect user-agent user-agent-string

Default

After portal safe-redirect is enabled, the device redirects the HTTP packets matching any browser types in Table 42.

Views

System view

Predefined user roles

network-admin

Parameters

user-agent-string: Specifies a browser type in HTTP User Agent, a case-sensitive string of 1 to 255 characters. You can specify the browser types as shown in Table 42.

Table 42 Browser type and description

Browser type

Description

Safari

Apple browser

Chrome

Google browser

Firefox

Firefox browser

UC

UC browser

QQBrowser

QQ browser

LBBROWSER

Cheetah browser

TaoBrowser

Taobao browser

Maxthon

Maxthon browser

BIDUBrowser

Baidu browser

MSIE 10.0

Microsoft IE 10.0 browser

MSIE 9.0

Microsoft IE 9.0 browser

MSIE 8.0

Microsoft IE 8.0 browser

MSIE 7.0

Microsoft IE 7.0 browser

MSIE 6.0

Microsoft IE 6.0 browser

MetaSr

Sogou browser

 

Usage guidelines

You can execute this command for multiple times to specify multiple browser types. The device redirects an HTTP request only when its User-Agent string contains a specified browser type.

Before you execute this command, make sure the portal safe-redirect feature is enabled.

Examples

# Specify browser types Chrome and Safari for portal safe-redirect.

<Sysname> system-view

[Sysname] portal safe-redirect user-agent Chrome

[Sysname] portal safe-redirect user-agent Safari

Related commands

portal safe-redirect enable

portal server

Use portal server to create a portal authentication server and enter its view, or enter the view of an existing portal authentication server.

Use undo portal server to delete the specified portal authentication server.

Syntax

portal server server-name

undo portal server server-name

Default

No portal authentication servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

server-name: Specifies a portal authentication server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

In portal authentication server view, you can configure the following parameters and features for the portal authentication server:

·          IP address of the server.

·          Pre-shared key for communication between the access device and the server.

·          Destination UDP port number used by the device to send unsolicited portal packets to the portal authentication server.

·          Server detection feature.

You can configure multiple portal authentication servers for an access device.

Examples

# Create the portal authentication server pts and enter its view.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts]

Related commands

display portal server

portal temp-pass enable

Use portal temp-pass enable to enable portal temporary pass and set the temporary pass period.

Use undo portal temp-pass enable to disable portal temporary pass.

Syntax

portal temp-pass [ period period-value ] enable

undo portal temp-pass enable

Default

Portal temporary pass is disabled.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

period period-value: Specifies the temporary pass period. The value range for the period-value argument is 10 to 180 seconds, and the default is 30 seconds.

Usage guidelines

This command is restricted to Hong Kong and Macao.

Typically, a portal user cannot access the network before passing portal authentication. This feature allows a user to access the Internet temporarily if the user uses a WeChat account to perform portal authentication. During the temporary pass period, the user provides WeChat authentication information to the WeChat server for the server to interact with the access device to finish portal authentication.

Examples

# On service template service1, enable portal temporary pass and set the temporary pass period to 25 seconds.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal temp-pass period 25 enable

Related commands

display portal

portal user-detect

Use portal user-detect to enable online detection of IPv4 portal users.

Use undo portal user-detect to disable online detection of IPv4 portal users.

Syntax

portal user-detect type { arp | icmp } [ retry retries] [ interval interval ] [ idle time ]

undo portal user-detect

Default

Online detection of IPv4 portal users is disabled.

Views

VLAN interface view

Predefined user roles

network-admin

Parameters

type: Specifies the detection type.

·          arp—ARP detection.

·          icmp—ICMP detection.

retry retries: Sets the maximum number of detection attempts, in the range of 1 to 10. The default value is 3.

interval interval: Sets a detection interval in the range of 1 to 1200 seconds. The default interval is 3 seconds.

idle time: Sets a user idle timeout in the range of 60 to 3600 seconds. The default is 180 seconds. When the timeout expires, online detection of IPv4 portal users is started.

Usage guidelines

If the device receives no packets from a portal user within the configured idle time, the device detects the user's online status as follows:

·          ICMP detectionSends ICMP requests to the user at configurable intervals to detect the user status.

?  If the device receives a reply within the maximum number of detection attempts, it considers that the user is online and stops sending detection packets. Then the device resets the idle timer and repeats the detection process when the timer expires.

?  If the device receives no reply after the maximum number of detection attempts, the device logs out the user.

·          ARP detection—Sends ARP requests to the user and detects the ARP entry status of the user at configurable intervals.

?  If the ARP entry of the user is refreshed within the maximum number of detection attempts, the device considers that the user is online and stops detecting the user's ARP entry. Then the device resets the idle timer and repeats the detection process when the timer expires.

?  If the ARP entry of the user is not refreshed after the maximum number of detection attempts, the device logs out the user.

If firewall policies on the access device filter out ICMP packets, ICMP detection might fail and result in the logout of portal users. Make sure the access device does not block ICMP packets before you enable ICMP detection on an interface.

Examples

# Enable online detection of IPv4 portal users on VLAN-interface 100. Configure the detection type as ARP, the maximum number of detection attempts as 5, the detection interval as 10 seconds, and the user idle timeout as 300 seconds.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal user-detect type arp retry 5 interval 10 idle 300

Related commands

display portal

portal user-dhcp-only

Use portal user-dhcp-only to allow only portal clients with DHCP-assigned IP addresses to pass portal authentication.

Use undo portal user-dhcp-only to restore the default.

Syntax

portal [ ipv6 ] user-dhcp-only

undo portal [ ipv6 ] user-dhcp-only

Default

Both portal clients with DHCP-assigned IP addresses and portal clients with static IP addresses can pass portal authentication.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies IPv6 portal clients. Do not specify this keyword for IPv4 portal clients.

Usage guidelines

After this command is configured, portal clients with static IP addresses cannot pass portal authentication.

To ensure that IPv6 portal clients can pass portal authentication when this feature is configured, disable the temporary IPv6 address feature on terminal devices. Otherwise, IPv6 portal clients will use temporary IPv6 addresses to access the IPv6 network and will fail portal authentication.

Examples

# Configure VLAN-interface 100 to allow only portal clients with DHCP-assigned IP addresses to pass portal authentication.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] portal user-dhcp-only

# Configure service template service1 to allow only portal clients with DHCP-assigned IP addresses to pass portal authentication.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] portal user-dhcp-only

Related commands

display portal

portal user-logoff after-client-offline enable

Use portal user-logoff after-client-offline enable to automatically log out portal users after the wireless clients go offline.

Use undo portal user-logoff after-client-offline enable to restore the default.

Syntax

portal user-logoff after-client-offline enable

undo portal user-logoff after-client-offline enable

Default

Automatic logout is disabled for wireless portal users. Portal users will not be automatically logged out after the wireless clients are disconnected from the wireless network.

Views

System view

Predefined user roles

network-admin

Usage guidelines

After automatic logout is enabled for wireless portal users, the device will automatically log out a portal user after the user is disconnected from the wireless network.

Examples

# Enable automatic logging out of portal users after the wireless clients go offline.

<Sysname> system-view

[Sysname] portal user-logoff after-client-offline enable

portal user-logoff ssid-switch enable

Use portal user-logoff ssid-switch enable to enable the device to log out wireless portal users when they switch SSIDs.

Use undo portal user-logoff ssid-switch enable to disable the device from logging out wireless portal users when they switch SSIDs.

Syntax

portal user-logoff ssid-switch enable

undo portal user-logoff ssid-switch enable

Default

The device does not log out wireless portal users when they switch SSIDs and the users stay online.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command enables the device to log out portal users on the original service template when they switch SSIDs so that they can pass authentication on the new service template.

Examples

# Enable the device to log out wireless portal users when they switch SSIDs.

<Sysname> system-view

[Sysname] portal user-logoff ssid-switch enable

portal user log enable

Use portal user log enable to enable logging for portal user logins and logouts.

Use undo portal user log enable to disable logging for portal user logins and logouts.

Syntax

portal user log enable

undo portal user log enable

Default

Portal user login and logout logging is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature logs information about portal user login and logout events, including the username, IP address, user's MAC address, name of the access interface, VLAN, SSID, AP's MAC address, and reason for login failure. For portal log messages to be sent correctly, you must also configure the information center on the device. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.

Examples

# Enable logging for portal user logins and logouts.

<Sysname> system-view

[Sysname] portal user log enable

Related commands

portal packet log enable

portal redirect log enable

portal web-server

Use portal web-server to create a portal Web server and enter its view, or enter the view of an existing portal Web server.

Use undo portal web-server to delete the specified portal Web server.

Syntax

portal web-server server-name

undo portal web-server server-name

Default

No portal Web servers exist.

Views

System view

Predefined user roles

network-admin

Parameters

server-name: Specifies a portal Web server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

The portal Web server pushes portal authentication pages to portal users during authentication. The access device redirects HTTP requests of unauthenticated portal users to the portal Web server. In portal Web server view, you can configure the URL and URL parameters for the portal Web server and the portal Web server detection feature.

Examples

# Create portal Web server wbs and enter its view.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs]

Related commands

·          display portal web-server

·          portal apply web-server

redirect-url

Use redirect-url to specify the URL to which portal users are redirected after they pass QQ authentication.

Use undo redirect-url to restore the default.

Syntax

redirect-url url-string

undo redirect-url

Default

Portal users are redirected to URL http://lvzhou.h3c.com/portal/qqlogin.html after they pass QQ authentication.

Views

QQ authentication server view

Predefined user roles

network-admin

Parameters

url-string: Specifies the URL to which portal users are redirected after they pass QQ authentication. The URL is a case-sensitive string of 1 to 256 characters.

Usage guidelines

This command is restricted to Hong Kong and Macao.

After a portal user passes QQ authentication, the user is redirected to the specified webpage to complete portal authentication.

You must enable DNS proxy and specify the IP address of an interface on the device as the DNS server.

Examples

# Specify http://www.abc.com/portal/qqlogin.html as the redirection URL for QQ authentication success.

<Sysname> system-view

[Sysname] portal extend-auth-server qq

[Sysname-portal-extend-auth-server-qq] redirect-url http://www.abc.com/portal/qqlogin.html

Related commands

display portal extend-auth-server

reset portal auth-error-record

Use reset portal auth-error-record to clear portal authentication error records.

Syntax

reset portal auth-error-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time }

Views

User view

Predefined user roles

network-admin

Parameters

all: Specifies all portal authentication error records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

Examples

# Clear all portal authentication error records.

<Sysname> reset portal auth-error-record all

# Clear portal authentication error records for the portal user whose IPv4 address is 11.1.0.1.

<Sysname> reset portal auth-error-record ipv4 11.1.0.1

# Clear portal authentication error records for the portal user whose IPv6 address is 2000::2.

<Sysname> reset portal auth-error-record ipv6 2000::2

# Clear portal authentication error records with the error time in the range of 2016/3/4 14:20 to 2016/3/4 16:23.

<Sysname> reset portal auth-error-record start-time 2016/3/4 14:20 end-time 2016/3/4 16:23

Related commands

display portal auth-error-record

reset portal auth-fail-record

Use reset portal auth-fail-record to clear portal authentication failure records.

Syntax

reset portal auth-fail-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time | username username }

Views

User view

Predefined user roles

network-admin

Parameters

all: Specifies all portal authentication failure records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

username username: Specifies the username of a portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

Examples

# Clear all portal authentication failure records.

<Sysname> reset portal auth-fail-record all

# Clear portal authentication failure records for the portal user whose IPv4 address is 11.1.0.1.

<Sysname> reset portal auth-fail-record ipv4 11.1.0.1

# Clear portal authentication failure records for the portal user whose IPv6 address is 2000::2.

<Sysname> reset portal auth-fail-record ipv6 2000::2

# Clear portal authentication failure records for the portal user whose username is abc.

<Sysname> reset portal auth-fail-record username abc

# Clear portal authentication failure records with the failure time in the range of 2016/3/4 14:20 to 2016/3/4 16:23.

<Sysname> reset portal auth-fail-record start-time 2016/3/4 14:20 end-time 2016/3/4 16:23

Related commands

display portal auth-fail-record

reset portal captive-bypass statistics

Use reset portal captive-bypass statistics to clear portal captive-bypass packet statistics.

Syntax

reset portal captive-bypass statistics [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command clears portal captive-bypass packet statistics for all cards.

Examples

# Clear portal captive-bypass packet statistics on slot 1.

<Sysname> reset portal captive-bypass statistics slot 0

Related commands

display portal captive-bypass statistics

reset portal local-binding mac-address

Use reset portal local-binding mac-address to clear local MAC-account binding entries.

Syntax

reset portal local-binding mac-address { mac-address | all }

Views

User view

Predefined user roles

network-admin

Parameters

mac-address: Specifies the MAC address of a portal user, in the format of H-H-H.

all: Specifies all local MAC-account binding entries.

Examples

# Clear all local MAC-account binding entries.

<Sysname> reset portal local-binding mac-address all

Related commands

·          display portal local-binding mac-address

·          local-binding aging-time

reset portal logout-record

Use reset portal logout-record to clear portal user offline records.

Syntax

reset portal logout-record { all | ipv4 ipv4-address | ipv6 ipv6-address | start-time start-date start-time end-time end-date end-time | username username }

Views

User view

Predefined user roles

network-admin

Parameters

all: Specifies all portal user offline records.

ipv4 ipv4-address: Specifies the IPv4 address of a portal user.

ipv6 ipv6-address: Specifies the IPv6 address of a portal user.

start-time start-date start-time end-time end-date end-time: Specifies a time range. The start date and end date must be in the format of MM/DD/YYYY or YYYY/MM/DD. The value range for MM is 1 to 12. The value range for DD varies with the specified month. The value range for YYYY is 1970 to 2100. The start time and end time must be in the format of hh:mm. The value range for the start time and end time is 00:00 to 23:59.

username username: Specifies the username of a portal user, a case-sensitive string of 1 to 253 characters. The username cannot contain the domain name.

Examples

# Clear all portal user offline records.

<Sysname> reset portal logout-record all

# Clear offline records for the portal user whose IPv4 address is 11.1.0.1.

<Sysname> reset portal logout-record ipv4 11.1.0.1

# Clear offline records for the portal user whose IPv6 address is 2000::2.

<Sysname> reset portal logout-record ipv6 2000::2

# Clear offline records for the portal user whose username is abc.

<Sysname> reset portal logout-record username abc

# Clear portal user offline records with the logout time in the range of 2016/3/4 14:20 to 2016/3/4 16:23.

<Sysname> reset portal logout-record start-time 2016/3/4 14:20 end-time 2016/3/4 16:23

Related commands

display portal logout-record

reset portal packet statistics

Use reset portal packet statistics to clear packet statistics for portal authentication servers.

Syntax

reset portal packet statistics [ extend-auth-server { cloud | mail | qq | wechat } | mac-trigger-server server-name | server server-name ]

Views

User view

Predefined user roles

network-admin

Parameters

extend-auth-server server-name: Specify a third-party authentication server. This keyword is restricted to Hong Kong and Macao.

cloud: Specify the lvzhou cloud authentication server. This keyword is restricted to Hong Kong and Macao.

mail: Specify the email authentication server. This keyword is restricted to Hong Kong and Macao.

qq: Specify the QQ authentication server. This keyword is restricted to Hong Kong and Macao.

wechat: Specify the WeChat authentication server. This keyword is restricted to Hong Kong and Macao.

mac-trigger-server: Specify a MAC binding server by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a MAC binding server, this command clears packet statistics for the specified portal authentication server.

server server-name: Specifies a portal authentication server by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

If you do not specify any parameters, this command clears packet statistics for all third-party authentication server, MAC binding server, and portal authentication servers.

Examples

# Clear packet statistics for the portal authentication server pts.

<Sysname> reset portal packet statistics server pts

# Clear packet statistics for MAC binding server newps.

<Sysname> reset portal packet statistics mac-trigger-server newpt

# Clear packet statistics for the lvzhou cloud authentication server.

<Sysname> reset portal packet statistics extend-auth-server cloud

Related commands

display portal packet statistics

reset portal redirect statistics

Use reset portal redirect statistics to reset portal redirect packet statistics.

Syntax

reset portal redirect statistics [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears portal redirect packet statistics for all member devices.

Examples

# Clear redirect packet statistics on the specified slot.

<Sysname> reset portal redirect statistics slot 0

Related commands

display portal safe-redirect statistics

reset portal safe-redirect statistics

Use reset portal safe-redirect statistics to clear portal safe-redirect packet statistics.

Syntax

reset portal safe-redirect statistics [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears statistics for all member devices.

Examples

# Clear portal safe-redirect packet statistics on the specified slot.

<Sysname> reset portal safe-redirect statistics slot 0

Related commands

display portal safe-redirect statistics

server-detect (portal authentication server view)

Use server-detect to enable portal authentication server detection. After server detection is enabled for a portal authentication server, the device periodically detects portal packets from the server to identify its reachability status.

Use undo server-detect to disable portal authentication server detection.

Syntax

server-detect [ timeout timeout ] { log | trap } *

undo server-detect

Default

Portal authentication server detection is disabled.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

timeout timeout: Specifies the detection timeout in the range of 10 to 3600 seconds. The default is 60 seconds.

{ log | trap } *: Specifies the action to be taken after the device detects reachability status change of the portal authentication server. You can select one of the following options or both:

·          log—When reachability status of the portal authentication server changes, the device sends a log message. The log message contains the name, the original state, and the current state of the portal authentication server.

·          trap—When reachability status of the portal authentication server changes, the device sends a trap message to the NMS. The trap message contains the name and the current state of the portal authentication server.

Usage guidelines

The portal authentication server detection feature is effective only when the portal authentication server supports server heartbeat. Now only the IMC portal authentication server supports server heartbeat.

If the device receives portal packets from the portal authentication server before the detection timeout expires and verifies the correctness of the packets, the device considers the portal authentication server is reachable. Otherwise, the device considers the portal authentication server is unreachable.

The detection timeout configured on the device must be greater than the server heartbeat interval configured on the portal authentication server.

Examples

# Enable server detection for the portal authentication server pts:

·          Set the detection timeout to 600 seconds.

·          Configure the device to send a log message and a trap message if the server reachability status changes.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] server-detect timeout 600 log trap

Related commands

portal server

server-detect (portal Web server view)

Use server-detect to enable portal Web server detection.

Use undo server-detect to disable portal Web server detection.

Syntax

server-detect [ interval interval ] [ retry retries ] { log | trap } *

undo server-detect

Default

Portal Web server detection is disabled.

Views

Portal Web server view

Predefined user roles

network-admin

Parameters

interval interval: Specifies a detection interval in the range of 1 to 1200 seconds. The default is 5 seconds.

retry retries: Specifies the maximum number of consecutive detection failures, in the range of 1 to 10. The default is 3. If the number of consecutive failed detections reaches this threshold, the device considers the server as unreachable.

{ log | trap } *: Specifies the action to be taken after the device detects reachability status change of the portal Web server. You can select one of the following options or both:

·          log—When reachability status of the portal Web server changes, the device sends a log message. The log message contains the name, the original state, and the current state of the portal Web server.

·          trap—When reachability status of the portal Web server changes, the device sends a trap message to the NMS. The trap message contains the name and the current state of the portal Web server.

Usage guidelines

The access device performs server detection independently. No configuration on the portal Web server is required for the detection.

Examples

# Enable server detection for the portal Web server wbs:

·          Set the detection interval to 600 seconds.

·          Set the maximum number of consecutive detection failures to 2.

·          Configure the device to send a log message and a trap massage after server reachability status changes.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] server-detect interval 600 retry 2 log trap

Related commands

portal web-server

server-register

Use server-register to set the interval at which the device registers with a portal authentication server.

Use undo server-register to restore the default.

Syntax

server-register [ interval interval-value ]

undo server-register

Default

The device does not register with a portal authentication server.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

interval interval-value: Specifies the register interval in the range of 1 to 3600 seconds. The default interval is 600 seconds.

Usage guidelines

This feature is typically used in scenarios where a NAT device exists between a portal authentication server and an access device.

After this feature is enabled, the access device automatically sends register packets to the portal authentication server. The register packet contains the access device name. After the server receives the register packet, it records register information for the access device, including the device name and the IP address and port number after NAT. The register information is used for subsequent authentication information exchanges between the server and the access device. The access device updates its register information on the server by sending register packets at regular intervals.

Only CMCC portal authentication servers support this feature.

Examples

# Configure the device to register with the portal authentication server at an interval of 120 seconds.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] server-register interval 120

Related commands

server-type

server-type (MAC binding server view)

Use server-type to specify the type of a MAC binding server.

Use undo server-type to restore the default.

Syntax

server-type { cmcc | imc }

undo server-type

Default

The type of the MAC binding server is IMC.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

cmcc: Specifies the MAC binding server type as CMCC.

imc: Specifies the MAC binding server type as IMC.

Examples

# Specify the type of the MAC binding server as cmcc.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] server-type cmcc

server-type (portal server view/portal web-server view)

Use server-type to specify the type of a portal authentication server or portal Web server.

Use undo server-type to restore the default.

Syntax

server-type { cmcc | imc | oauth }

undo server-type

Default

The type of the portal authentication server and portal Web server is IMC.

Views

Portal authentication server view

Portal Web server view

Predefined user roles

network-admin

Parameters

cmcc: Specifies the portal server type as CMCC.

imc: Specifies the portal server type as IMC.

oauth: Specifies the portal server type as lvzhou cloud. This keyword is supported only in portal Web server view. This keyword is restricted to Hong Kong and Macao.

Usage guidelines

Specify the portal server type on the device with the server type the device actually uses.

Examples

# Specify the type of the portal authentication server as cmcc.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] server-type cmcc

# Specify the type of the portal Web server as cmcc.

<Sysname> system-view

[Sysname] web-server pts

[Sysname-portal-websvr-pts] server-type cmcc

Related commands

display portal server

tcp-port

Use tcp-port to configure a listening TCP port for the local portal Web server.

Use undo tcp-port to restore the default.

Syntax

tcp-port port-number

undo tcp-port

Default

The listening TCP port number for HTTP is 80 and that for HTTPS is the TCP port number set by using the portal local-web-server command. If not set by the portal local-web-server command, the HTTPS listening TCP port number is 443.

Views

Local portal Web server view

Predefined user roles

network-admin

Parameters

port-number: Specifies the listening TCP port number in the range of 1 to 65535.

Usage guidelines

To use the local portal Web server, make sure the port number in the portal Web server URL and the port number configured in this command are the same.

For successful local portal authentication, follow these guidelines:

·          Do not configure the listening TCP port number for a local portal Web server as the port number used by a known protocol. For example, do not specify port numbers 21 and 23, which are used by FTP and Telnet, respectively.

·          Do not configure the HTTP listening port number as the default HTTPS listening port number 443.

·          Do not configure the HTTPS listening port number as the default HTTP listening port number 80.

·          Do not configure the same listening port number for HTTP and HTTPS.

·          For the HTTPS-based local portal Web service and other services that use HTTPS:

?  If they use the same SSL server policy, they can use the same TCP port number to listen to HTTPS.

?  If they use different SSL server policies, they cannot use the same TCP port number to listen to HTTPS.

Examples

# Set the HTTP service listening port number to 2331 for the local portal Web server.

<Sysname> system-view

[Sysname] portal local-web-server http

[Sysname-portal-local-websvr-http] tcp-port 2331

Related commands

portal local-web-server

url

Use url to configure a URL for a portal Web server.

Use undo url to restore the default.

Syntax

url url-string

undo url

Default

No URL is specified for the portal Web server.

Views

Portal Web server view

Predefined user roles

network-admin

Parameters

url-string: Specifies a URL for the portal Web server, a case-sensitive string of 1 to 256 characters.

Usage guidelines

This command specifies a URL that can be accessed through standard HTTP or HTTPS. The URL should start with http:// or https://. If the URL you specify does not start with http:// or https://, the system considers the URL begins with http:// by default.

Examples

# Configure the URL for the portal Web server wbs as http://www.test.com/portal.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] url http://www.test.com/portal

Related commands

display portal web-server

url-parameter

Use url-parameter to configure the parameters carried in the URL of a portal Web server. The access device redirects a portal user by sending the URL with the parameters to the user.

Use undo url-parameter to delete the parameters carried in the URL of the portal Web server.

Syntax

url-parameter param-name { nas-id | nas-port-id | original-url | source-address | ssid | { ap-mac | source-mac } [ encryption { aes | des } key { cipher | simple } string ] | value expression | vlan }

undo url-parameter param-name

Default

No URL parameters are configured for a portal Web server.

Views

Portal Web server view

Predefined user roles

network-admin

Parameters

param-name: Specifies a URL parameter name, a case-sensitive string of 1 to 32 characters. Content of the parameter is determined by the following keyword you specify.

nas-id: Specifies the NAS-ID.

nas-port-id: Specifies the NAS-Port-Id.

original-url: Specifies the URL of the original webpage that a portal user visits.

source-address: Specifies the user IP address.

ssid: Specifies the SSID of the AP.

ap-mac: Specifies the MAC address of the AP.

source-mac: Specifies the user MAC address.

aes: Specifies AES to encrypt the specified URL parameter.

des: Specifies DES to encrypt the specified URL parameter.

cipher: Sets a ciphertext shared key.

simple: Sets a plaintext shared key.

string: Specifies the case-sensitive key string. The string length varies by the selected encryption method:

·          For a DES-encrypted ciphertext key, the string length is 41 characters.

·          For a DES-encrypted plaintext key, the string length is 8 characters.

·          For an AES-encrypted ciphertext key, the string length is 1 to 73 characters.

·          For an AES-encrypted plaintext key, the string length is 1 to 31 characters.

value expression: Specifies a custom case-sensitive string of 1 to 256 characters.

vlan: Specifies the user VLAN ID.

Usage guidelines

You can configure multiple URL parameters.

If you configure a URL parameter multiple times, the most recent configuration takes effect.

After you configure the URL parameters, the access device sends the portal Web server URL with these parameters to portal users. For example, assume that the URL of a portal Web server is http://www.test.com/portal, and you execute the url-parameter userip source-address and url-parameter userurl value http://www.abc.com/welcome commands. Then, the access device sends to the user whose IP address is 1.1.1.1 the URL http://www.test.com/portal?userip=1.1.1.1&userurl=http://www.abc.com/welcome.

When you configure the param-name argument in this command, you must use the URL parameter name supported by the actual portal server. Different portal server types support different URL parameter names.

For example, the IMC server supports parameter names userurl, userip, and usermac for the keywords original-url, source-address, and source-mac, respectively. To carry the user IP information in the portal Web server URL, you must configure the parameter name as userip and specify the source-address keyword.

If you specify the encryption algorithm for a parameter, the redirection URL carries the encrypted value for the parameter. Execute the url-parameter usermac source-mac encryption des key simple 12345678 command. Then the access device sends to the user with MAC address 1111-1111-1111 the URL http://www.test.com/portal?usermac=xxxxxxxxx&userip=1.1.1.1&userurl= http://www.test.com/welcome, where xxxxxxxxx represents the encrypted user MAC address.

Examples

# Configure URL parameters userip and userurl for portal Web server wbs. Configure the value of the userip parameter as source-address (the IP addresses of users) and that of the userurl parameter as http://www.abc.com/welcome.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] url-parameter userip source-address

[Sysname-portal-websvr-wbs] url-parameter userurl value http://www.abc.com/welcome

# Configure URL parameter usermac for portal Web server wbs. Configure the value of the usermac parameter as source-mac (the MAC addresses of users) and specify DES to encrypt the MAC addresses.

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] url-parameter usermac source-mac encryption des key simple 12345678

# Configure URL parameter uservlan for portal Web server wbs. Configure the value of the uservlan parameter as the vlan (the VLAN IDs of users.)

<Sysname> system-view

[Sysname] portal web-server wbs

[Sysname-portal-websvr-wbs] url-parameter uservlan vlan

Related commands

·          display portal web-server

·          url

user-sync

Use user-sync to enable portal user synchronization for a portal authentication server. After this feature is enabled, the device replies to and periodically detects the synchronization packets from the portal authentication server. In this way, information about online portal users on the device and on the portal authentication server remains consistent.

Use undo user-sync to disable portal user synchronization for a portal authentication server.

Syntax

user-sync timeout timeout

undo user-sync

Default

Portal user synchronization is disabled for a portal authentication server.

Views

Portal authentication server view

Predefined user roles

network-admin

Parameters

timeout timeout: Sets a detection timeout for synchronization packets, in the range of 60 to 18000 seconds. The default is 1200 seconds.

Usage guidelines

Portal user synchronization requires that the portal authentication server support the portal user heartbeat feature. Now, only the IMC portal authentication server supports portal user heartbeat. To implement portal user synchronization, you need to configure the user heartbeat feature on the portal authentication server. Make sure the user heartbeat interval configured on the portal authentication server is not greater than the synchronization detection timeout configured on the access device.

Deleting a portal authentication server on the device also deletes the user synchronization configuration for the server.

If you configure portal user synchronization multiple times for a portal authentication server, the most recent configuration takes effect.

For information of the users considered as nonexistent on the portal authentication server, the device deletes the information after the configured detection timeout expires.

If the user information from the portal authentication server does not exist on the device, the device encapsulates IP addresses of the users in user heartbeat reply packets to the server. The portal authentication server then deletes the users.

Examples

# Enable portal user synchronization for the portal authentication server pts and set the detection timeout to 600 seconds. If a use has not appeared in the synchronization packets sent by the portal authentication server for 600 seconds, the access device logs out the user.

<Sysname> system-view

[Sysname] portal server pts

[Sysname-portal-server-pts] user-sync timeout 600

Related commands

portal server

version

Use version to specify the version of the portal protocol.

Use undo version to restore the default.

Syntax

version version-number

undo version

Default

The version of the portal protocol is 1.

Views

MAC binding server view

Predefined user roles

network-admin

Parameters

version-number: Specifies the portal protocol version in the range of 1 to 3.

Usage guidelines

The specified portal protocol version must be the that required by the MAC binding server.

Examples

# Configure the device to use portal protocol version 2 to communicate with the MAC binding server mts.

<Sysname> system-view

[Sysname] portal mac-trigger-server mts

[Sysname-portal-mac-trigger-server-mts] version 2

Related commands

·          display portal mac-trigger-server

·          portal mac-trigger-server

web-redirect url

Use web-redirect url to enable the Web redirect feature.

Use undo web-redirect url to disable the Web redirect feature.

Syntax

web-redirect [ ipv6 ] url url-string [ interval interval ]

undo web-redirect [ ipv6 ]

Default

Web redirect is disabled.

Views

VLAN interface view

Service template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies the IPv6 Web redirect feature. Do not specify this keyword for the IPv4 Web redirect feature.

url url-string: Specifies the URL to which the user is redirected. The URL is required to be complete and begins with http:// or https://, a string of 1 to 256 characters.

interval interval: Specifies the time interval at which the user is redirected to the specified URL. It is in the range of 60 to 86400 seconds.

Usage guidelines

This feature redirects a user on a VLAN interface or a service template to the specified URL before the user can access an external network through a Web browser. After the specified interval, the user is redirected to the specified URL again.

On a service template, both Web redirect and portal authentication can be enabled and will take effect at the same time.

The Web redirect feature takes effect only on HTTP packets that use the default port number 80.

Examples

# Configure IPv4 Web redirect on VLAN-interface 100. Set the redirect URL to http://192.0.0.1 and the interval to 3600 seconds.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname–Vlan-interface100] web-redirect url http://192.0.0.1 interval 3600

# Configure IPv4 Web redirect on service template service1. Set the redirect URL to http://192.0.0.1 and the interval to 3600 seconds.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] web-redirect url http://192.0.0.1 interval 3600

Related commands

display web-redirect rule


User profile commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

display user-profile

Use display user-profile to display configuration and online user information for user profiles.

Syntax

display user-profile [ name profile-name ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

name profile-name: Specifies a user profile by its name, a case-sensitive string of 1 to 31 characters. Valid characters include English letters, digits, and underscores (_). The name must start with an English letter and must be unique. If you do not specify this option, the command displays configuration and online user information for all user profiles.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays user profile configuration and online user information for all member devices.

Examples

# (IRF-incapable devices.) Display configuration and online user information for user profile aaa.

<Sysname> display user-profile name aaa

  User-Profile: aaa

    Inbound:

      CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

      Policy: p1

    Outbound:

      CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

 

    User user_1:

      Authentication type: 802.1X

      Network attributes:

        Interface    : WLAN-BSS1/0/5

        MAC address  : 0000-1111-2222

      Failed action list:

        Inbound: Policy p1

        Inbound: CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

    User user_2:

      Authentication type: Portal

      Network attributes:

        Interface    : WLAN-BSS1/0/5

        IP address   : 172.16.187.16

        VPN          : N/A

        Service VLAN : 100

# Display configuration and online user information for all user profiles on IRF member device 1.

<Sysname> display user-profile slot 1

  User-Profile: aaa

    Inbound:

      CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

      Policy: p1

    Outbound:

      CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

 

    User user_1:

      Authentication type: 802.1X

      Network attributes:

        Interface    : WLAN-BSS1/0/5

        MAC address  : 0000-1111-2222

      Failed action list:

        Inbound: Policy p1

        Inbound: CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes)

    User user_2:

      Authentication type: Portal

      Network attributes:

        Interface    : WLAN-BSS1/0/5

        IP address   : 172.16.187.16

        VPN          : N/A

        Service VLAN : 100

  User-Profile: bbb

    Inbound:

      CIR 512 (kbps), CBS 1062 (Bytes), EBS 0 (Bytes)

      Policy: p3

 

    User user_4:

    Authentication type: Portal

    Network attributes:

      Interface    : WLAN-BSS1/0/5

      IP address   : 172.16.187.166

      VPN          : N/A

      Service VLAN : 100

Table 43 Command output

Field

Description

User-Profile

User profile name.

Inbound

Policy applied to incoming traffic.

Outbound

Policy applied to outgoing traffic.

CIR

Committed information rate, in kbps.

CBS

Committed burst size, in bytes.

EBS

Excess burst size, in bytes.

Policy

Policy name.

User user_1

Username of a user account with which a user profile is associated.

If no user is online, User - is displayed.

Authentication type

Authentication type:

·         802.1X—802.1X authentication.

·         Portal—Portal authentication.

·         PPP—PPP authentication.

·         MACA—MAC authentication.

Network attributes

Online user information.

Failed action list

Actions that failed to be applied to the user.

 

user-profile

Use user-profile to create a user profile and enter user profile view.

Use undo user-profile to delete a user profile.

Syntax

user-profile profile-name

undo user-profile profile-name

Default

No user profile exists.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a user profile by its name, a case-sensitive string of 1 to 31 characters. A user profile name can only contain English letters, digits, and underscores (_), and it must start with an English letter. The name must be unique.

Usage guidelines

You can use the command to enter the view of an existing user profile.

Examples

# Create user profile a123 and enter the view of a123.

<Sysname> system-view

[Sysname] user-profile a123

[Sysname-user-profile-a123]

 


Password control commands

display password-control

Use display password-control to display password control configuration.

Syntax

display password-control [ super ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

super: Displays the password control information for the super passwords. If you do not specify this keyword, the command displays the global password control configuration.

Examples

# Display the global password control configuration.

<Sysname> display password-control

 Global password control configurations:

 Password control:                     Disabled

 Password aging:                       Enabled (90 days)

 Password length:                      Enabled (10 characters)

 Password composition:                 Enabled (1 types, 1 characters per type)

 Password history:                     Enabled (max history records:4)

 Early notice on password expiration:  7 days

 Maximum login attempts:               3

 Action for exceeding login attempts:  Lock user for 1 minutes

 Minimum interval between two updates: 24 hours

 User account idle time:               90 days

 Logins with aged password:            3 times in 30 days

 Password complexity:                  Disabled (username checking)

                                       Disabled (repeated characters checking)

# Display the password control configuration for super passwords.

<Sysname> display password-control super

 Super password control configurations:

 Password aging:                       Enabled (90 days)

 Password length:                      Enabled (10 characters)

 Password composition:                 Enabled (1 types, 1 characters per type)

Table 44 Command output

Field

Description

Password control

Whether the password control feature is enabled.

Password aging

Whether password expiration is enabled and, if enabled, the expiration time.

Password length

Whether the minimum password length restriction feature is enabled and, if enabled, the setting.

Password composition

Whether the password composition restriction feature is enabled and, if enabled, the settings.

Password history

Whether the password history feature is enabled and, if enabled, the setting.

Early notice on password expiration

Number of days during which the user is notified of the pending password expiration.

Maximum login attempts

Allowed maximum number of consecutive failed login attempts for FTP and VTY users.

Action for exceeding login attempts

Action to be taken after a user fails to log in after the specified number of attempts.

Minimum interval between two updates

Minimum password update interval.

Logins with aged password

Number of times and maximum number of days a user can log in using an expired password.

Password complexity

Whether the following password complexity checking is enabled:

·         username checking—Checks whether a password contains the username or the reverse of the username.

·         repeated characters checking—Checks whether a password contains any character that appears consecutively three or more times.

 

display password-control blacklist

Use display password-control blacklist to display password control blacklist information.

Syntax

display password-control blacklist [ user-name user-name | ip ipv4-address | ipv6 ipv6-address ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

user-name user-name: Specifies a user by its username, a case-sensitive string of 1 to 55 characters.

ip ipv4-address: Specifies the IPv4 address of a user.

ipv6 ipv6-address: Specifies the IPv6 address of a user.

Usage guidelines

If you do not specify any parameters, this command displays information about all users in the password control blacklist.

The users' IP addresses and user accounts are added to the password control blacklist when the users fail authentication. You can use this command to view information about blacklisted FTP and virtual terminal line (VTY) users.

The password control blacklist will not blacklist Web users if they fail login authentication. Users accessing the system through the console interface are not blacklisted either, for the following reasons:

·          The system is unable to obtain the IP addresses of these users.

·          These users are privileged and, therefore, relatively secure to the system.

Examples

# Display password control blacklist information.

<Sysname> display password-control blacklist

 Blacklist items matched: 2.

 Username: test

    IP: 192.168.44.1        Login failures: 1      Lock flag: unlock

 Username: jj

    IP: 192.168.44.3        Login failures: 3      Lock flag: lock

Table 45 Command output

Field

Description

Blacklist items matched

Number of blacklisted users.

IP

IP address of the user.

Login failures

Number of login failures.

Lock flag

Whether the user account is locked for the user:

·         unlock—Not limited.

·         lock—Disabled temporarily or permanently, depending on the password-control login-attempt command.

 

password-control { aging | composition | history | length } enable

Use password-control { aging | composition | history | length } enable to enable the password expiration, composition restriction, history, or minimum length restriction feature.

Use undo password-control { aging | composition | history | length } enable to disable a password control feature.

Syntax

password-control { aging | composition | history | length } enable

undo password-control { aging | composition | history | length } enable

Default

The password control features (aging, composition, history, and length) are all enabled.

Views

System view

Predefined user roles

network-admin

Parameters

aging: Enables the password expiration feature.

composition: Enables the password composition restriction feature.

history: Enables the password history feature.

length: Enables the minimum password length restriction feature.

Usage guidelines

For a specific password control feature to take effect, make sure the global password control and the specific password control feature are both enabled. For example, if the global password control and the minimum length restriction feature are not enabled, the password-control length command does not take effect.

The system stops recording history passwords after you execute the undo password-control history enable command, but it does not delete the prior records.

If the global password control feature is enabled but the minimum password length restriction feature is disabled, the following rules apply:

·          A password must contain a minimum of four characters.

·          A minimum of four characters must be different.

Examples

# Enable the password control feature globally.

<Sysname> system-view

[Sysname] password-control enable

# Enable the password composition restriction feature.

[Sysname] password-control composition enable

# Enable the password expiration feature.

[Sysname] password-control aging enable

# Enable the minimum password length restriction feature.

[Sysname] password-control length enable

# Enable the password history feature.

[Sysname] password-control history enable

Related commands

display password-control

password-control enable

password-control aging

Use password-control aging to set the password expiration time.

Use undo password-control aging to restore the default.

Syntax

password-control aging aging-time

undo password-control aging

Default

A password expires after 90 days. The password expiration time for a user group equals the global setting. The password expiration time for a local user equals that of the user group to which the local user belongs.

Views

System view

User group view

Local user view

Predefined user roles

network-admin

Parameters

aging-time: Specifies the password expiration time in days, in the range of 1 to 365.

Usage guidelines

The expiration time depends on the view:

·          The time in system view has global significance and applies to all user groups.

·          The time in user group view applies to all local users in the user group.

·          The time in local user view applies only to the local user.

A password expiration time with a smaller application scope has higher priority. The system prefers to use the password expiration time in local user view for a local user.

·          If no password expiration time is configured for the local user, the system uses the password expiration time for the user group to which the local user belongs.

·          If no password expiration time is configured for the user group, the system uses the global password expiration time.

Examples

# Globally set the passwords to expire after 80 days.

<Sysname> system-view

[Sysname] password-control aging 80

# Set the passwords for user group test to expire after 90 days.

[Sysname] user-group test

[Sysname-ugroup-test] password-control aging 90

[Sysname-ugroup-test] quit

# Set the password for device management user abc to expire after 100 days.

[Sysname] local-user abc class manage

[Sysname-luser-manage-abc] password-control aging 100

Related commands

display local-user

display password-control

display user-group

password-control aging enable

password-control alert-before-expire

Use password-control alert-before-expire to set the number of days before a user's password expires during which the user is notified of the pending password expiration.

Use undo password-control alert-before-expire to restore the default.

Syntax

password-control alert-before-expire alert-time

undo password-control alert-before-expire

Default

The default is 7 days.

Views

System view

Predefined user roles

network-admin

Parameters

alert-time: Specifies the number of days before a user password expires during which the user is notified of the pending password expiration. The value range is 1 to 30.

Usage guidelines

This command is effective only for non-FTP users. FTP users can only have their passwords changed by the administrator.

Examples

# Configure the device to notify a user about pending password expiration 10 days before the user's password expires.

<Sysname> system-view

[Sysname] password-control alert-before-expire 10

Related commands

display password-control

password-control complexity

Use password-control complexity to configure the password complexity checking policy.

Use undo password-control complexity to remove a password complexity checking item.

Syntax

password-control complexity { same-character | user-name } check

undo password-control complexity { same-character | user-name } check

Default

The global password complexity checking policy is that both username checking and repeated character checking are disabled. The password complexity checking policy for a user group equals the global setting. The password complexity checking policy for a local user equals that of the user group to which the local user belongs.

Views

System view

User group view

Local user view

Predefined user roles

network-admin

Parameters

same-character: Refuses a password that contains a minimum of three consecutive identical characters. For example, the password aaabc is not complex enough.

user-name: Refuses a password that contains the username or the reverse of the username. For example, if the username is 123, a password such as abc123 or 321df is not complex enough.

Usage guidelines

The password complexity checking policy depends on the view:

·          The policy in system view has global significance and applies to all user groups.

·          The policy in user group view applies to all local users in the user group.

·          The policy in local user view applies only to the local user.

A password complexity checking policy with a smaller application scope has higher priority. The system prefers to use the password complexity checking policy in local user view for a local user.

·          If no policy is configured for the local user, the system uses the policy for the user group to which the local user belongs.

·          If no policy is configured for the user group, the system uses the global policy.

You can enable both username checking and repeated character checking.

After the password complexity checking is enabled, complexity-incompliant passwords will be refused.

Examples

# Configure the password complexity checking policy, refusing any password that contains the username or the reverse of the username.

<Sysname> system-view

[Sysname] password-control complexity user-name check

Related commands

display local-user

display password-control

display user-group

password-control composition

Use password-control composition to configure the password composition policy.

Use undo password-control composition to restore the default.

Syntax

password-control composition type-number type-number [ type-length type-length ]

undo password-control composition

Default

The password using the global composition policy must contain a minimum of one character type and a minimum of one character for each type.

The password composition policy for a user group is the same as the global policy. The password composition policy for a local user is the same as that of the user group to which the local user belongs.

Views

System view

User group view

Local user view

Predefined user roles

network-admin

Parameters

type-number type-number: Specifies the minimum number of character types that a password must contain. The value range for the type-number argument is 1 to 4. The following character types are available:

·          Uppercase letters A to Z.

·          Lowercase letters a to z.

·          Digits 0 to 9.

·          Special characters in Table 46.

Table 46 Special characters

Character name

Symbol

Character name

Symbol

Ampersand sign

&

Apostrophe

'

Asterisk

*

At sign

@

Back quote

`

Back slash

\

Blank space

N/A

Caret

^

Colon

:

Comma

,

Dollar sign

$

Dot

.

Equal sign

=

Exclamation point

!

Left angle bracket

Left brace

{

Left bracket

[

Left parenthesis

(

Minus sign

-

Percent sign

%

Plus sign

+

Pound sign

#

Quotation marks

"

Right angle bracket

Right brace

}

Right bracket

]

Right parenthesis

)

Semi-colon

;

Slash

/

Tilde

~

Underscore

_

Vertical bar

|

 

type-length type-length: Specifies the minimum number of characters that are from each type in the password. The value range for the type-length argument is 1 to 63.

Usage guidelines

The password composition policy depends on the view:

·          The policy in system view has global significance and applies to all user groups.

·          The policy in user group view applies to all local users in the user group.

·          The policy in local user view applies only to the local user.

A password composition policy with a smaller application scope has higher priority. The system prefers to use the password composition policy in local user view for a local user.

·          If no policy is configured for the local user, the system uses the policy for the user group to which the local user belongs.

·          If no policy is configured for the user group, the system uses the global policy.

The product of the minimum number of character types and minimum number of characters for each type must be smaller than the maximum length of passwords.

Examples

# Specify that all passwords must each contain a minimum of four character types and a minimum of five characters for each type.

<Sysname> system-view

[Sysname] password-control composition type-number 4 type-length 5

# Specify that passwords in user group test must contain a minimum of four character types and a minimum of five characters for each type.

[Sysname] user-group test

[Sysname-ugroup-test] password-control composition type-number 4 type-length 5

[Sysname-ugroup-test] quit

# Specify that the password of device management user abc must contain a minimum of four character types and a minimum of five characters for each type.

[Sysname] local-user abc class manage

[Sysname-luser-manage-abc] password-control composition type-number 4 type-length 5

Related commands

display local-user

display password-control

display user-group

password-control composition enable

password-control enable

Use password-control enable to enable the password control feature globally.

Use undo password-control enable to disable the password control feature globally.

Syntax

password-control enable

undo password-control enable

Default

The password control feature is disabled globally.

Views

System view

Predefined user roles

network-admin

Usage guidelines

A specific password control feature takes effect only after the global password control feature is enabled.

After the global password control feature is enabled, you cannot display the password and super password configurations for device management users by using the corresponding display commands. The configuration for network access user passwords can be displayed. The first password configured for device management users must contain a minimum of four different characters.

Examples

# Enable the password control feature globally.

<Sysname> system-view

[Sysname] password-control enable

Related commands

display password-control

password-control { aging | composition | history | length } enable

password-control expired-user-login

Use password-control expired-user-login to set the maximum number of days and maximum number of times that a user can log in after the password expires.

Use undo password-control expired-user-login to restore the defaults.

Syntax

password-control expired-user-login delay delay times times

undo password-control expired-user-login

Default

A user can log in three times within 30 days after the password expires.

Views

System view

Predefined user roles

network-admin

Parameters

delay delay: Specifies the maximum number of days during which a user can log in using an expired password. The value range for the delay argument is 1 to 90.

times times: Specifies the maximum number of times a user can log in after the password expires. The value range is 0 to 10. To deny users to log in after the password expires, set the value to 0.

Usage guidelines

This command is effective only on non-FTP login users. An FTP user cannot continue to log in after its password expires.

Examples

# Allow a user to log in five times within 60 days after the password expires.

<Sysname> system-view

[Sysname] password-control expired-user-login delay 60 times 5

Related commands

display password-control

password-control history

Use password-control history to set the maximum number of history password records for each user.

Use undo password-control history to restore the default.

Syntax

password-control history max-record-number

undo password-control history

Default

The maximum number of history password records for each user is 4.

Views

System view

Predefined user roles

network-admin

Parameters

max-record-number: Specifies the maximum number of history password records for each user. The value range is 2 to 15.

Usage guidelines

When the number of history password records reaches the maximum number, the subsequent history record overwrites the earliest one.

The system stops recording passwords after you execute the undo password-control history enable command, but it does not delete the prior records.

To delete the existing records, use one of the following methods:

·          Use the undo password-control enable command to disable the password control feature globally.

·          Use the reset password-control history-record command to clear the passwords manually.

Examples

# Set the maximum number of history password records for each user to 10.

<Sysname> system-view

[Sysname] password-control history 10

Related commands

display password-control

password-control history enable

reset password-control blacklist

password-control length

Use password-control length to set the minimum password length.

Use undo password-control length to restore the default.

Syntax

password-control length length

undo password-control length

Default

The global minimum password length is 10 characters.

The minimum password length for a user group equals the global setting. The minimum password length for a local user equals that of the user group to which the local user belongs.

Views

System view

User group view

Local user view

Predefined user roles

network-admin

Parameters

length: Specifies the minimum password length in characters. The value range for this argument is 4 to 32.

Usage guidelines

The minimum length setting depends on the view:

·          The setting in system view has global significance and applies to all user groups.

·          The setting in user group view applies to all local users in the user group.

·          The setting in local user view applies only to the local user.

A minimum password length with a smaller application scope has higher priority. The system prefers to use the minimum password length in local user view for a local user.

·          If no minimum password length is configured for the local user, the system uses the minimum password length for the user group to which the local user belongs.

·          If no minimum password length is configured for the user group, the system uses the global minimum password length.

Examples

# Set the global minimum password length to 16 characters.

<Sysname> system-view

[Sysname] password-control length 16

# Set the minimum password length to 16 characters for the user group test.

[Sysname] user-group test

[Sysname-ugroup-test] password-control length 16

[Sysname-ugroup-test] quit

# Set the minimum password length to 16 characters for the device management user abc.

[Sysname] local-user abc class manage

[Sysname-luser-manage-abc] password-control length 16

Related commands

display local-user

display password-control

display user-group

password-control length enable

password-control login idle-time

Use password-control login idle-time to set the maximum account idle time.

Use undo password-control login idle-time to restore the default.

Syntax

password-control login idle-time idle-time

undo password-control login idle-time

Default

The maximum account idle time is 90 days.

Views

System view

Predefined user roles

network-admin

Parameters

idle-time: Specifies the maximum account idle time in days. The value range is 0 to 365. 0 means no restriction for account idle time.

Usage guidelines

If a user account is idle for this period of time, the account becomes invalid and can no longer be used to log in to the device.

Examples

# Set the maximum account idle time to 30 days.

<Sysname> system-view

[Sysname] password-control login idle-time 30

Related commands

display password-control

password-control login-attempt

Use password-control login-attempt to configure the login attempt limit. The settings include the maximum number of consecutive login failures and the action to be taken when the maximum number is reached.

Use undo password-control login-attempt to restore the default.

Syntax

password-control login-attempt login-times [ exceed { lock | lock-time time | unlock } ]

undo password-control login-attempt

Default

The global login-attempt settings:

·          The maximum number of consecutive login failures is 3.

·          The locking period is 1 minute.

The login-attempt settings for a user group equal the global settings.

The login-attempt settings for a local user equal those for the user group to which the local user belongs.

Views

System view

User group view

Local user view

Predefined user roles

network-admin

Parameters

login-times: Specifies the maximum number of consecutive login failures. The value range is 2 to 10.

exceed: Specifies an action to be taken for the user who fails to log in after making the maximum number of attempts.

·          lock: Disables the user account permanently.

·          lock-time time: Disables the user account for a period of time. The user can uses this user account when the timer expires. The value range for the time argument is 1 to 360 minutes.

·          unlock: Allows the user account to continue using this account to perform login attempts.

Usage guidelines

The login-attempt policy depends on the view:

·          The policy in system view has global significance and applies to all user groups.

·          The policy in user group view applies to all local users in the user group.

·          The policy in local user view applies only to the local user.

A login-attempt policy with a smaller application scope has higher priority. The system prefers to use the login-attempt policy in local user view for a local user.

·          If no policy is configured for the local user, the system uses the policy for the user group to which the local user belongs.

·          If no policy is configured for the user group, the system uses the global policy.

If an FTP or VTY user fails to log in, the system adds the user account and the user's IP address to the password control blacklist. When the maximum number of consecutive login failures is reached, the login attempt limit feature is triggered.

Whether a blacklisted user and user account are locked depends on the locking setting:

·          If a user account is permanently locked for a user, the user cannot use this account unless this account is removed from the password control blacklist. To remove the user account, use the reset password-control blacklist command.

·          To use a temporarily locked user account, the user can perform either of the following tasks:

?  Wait until the locking timer expires.

?  Remove the user account from the password control blacklist.

·          If the user account and the user are blacklisted but not locked, the user can continue using this account to log in. The account and the user's IP address are removed from the password control blacklist when the user uses the account to successfully log in to the device.

 

 

NOTE:

This account is locked only for this user. Other users can still use this account, and the blacklisted user can use other user accounts.

 

The password-control login-attempt command takes effect immediately after being executed, and can affect the users already in the password control blacklist.

Examples

# Allow a maximum of four consecutive login failures on a user account, and disable the user account if the limit is reached.

<Sysname> system-view

[Sysname] password-control login-attempt 4 exceed lock

# Use the user account test to log in to the device, and enter incorrect password for four times.

# Display the password control blacklist. The output shows that the user account is on the blacklist, and its status is lock.

[Sysname] display password-control blacklist

 

 Username: test

    IP: 192.168.44.1        Login failures: 4      Lock flag: lock

 

 Blacklist items matched: 1.

# Verify that the user at 192.168.44.1 cannot use this user account to log in.

# Allow a maximum of two consecutive login failures on a user account, and disable the account for 3 minutes if the limit is reached.

<Sysname> system-view

[Sysname] password-control login-attempt 2 exceed lock-time 3

# Use the user account test to log in to the device, and enter incorrect password for two attempts.

# Display the password control blacklist. The output shows that the user account is on the blacklist and its status is lock.

[Sysname] display password-control blacklist

 

 Username: test

    IP: 192.168.44.1        Login failures: 2      Lock flag: lock

 

 Blacklist items matched: 1.

# Verify that after 3 minutes, the user account is removed from the password control blacklist and the user at 192.168.44.1 can use this account.

Related commands

display local-user

display password-control

display password-control blacklist

display user-group

reset password-control blacklist

password-control super aging

Use password-control super aging to set the expiration time for super passwords.

Use undo password-control super aging to restore the default.

Syntax

password-control super aging aging-time

undo password-control super aging

Default

A super password expires after 90 days.

Views

System view

Predefined user roles

network-admin

Parameters

aging-time: Specifies the super password expiration time in days, in the range of 1 to 365.

Examples

# Set the super passwords to expire after 10 days.

<Sysname> system-view

[Sysname] password-control super aging 10

Related commands

display password-control

password-control aging

password-control super composition

Use password-control super composition to configure the composition policy for super passwords.

Use undo password-control super composition to restore the default.

Syntax

password-control super composition type-number type-number [ type-length type-length ]

undo password-control super composition

Default

A super password must contain a minimum of one character type and a minimum of one character for each type.

Views

System view

Predefined user roles

network-admin

Parameters

type-number type-number: Specifies the minimum number of character types that a super password must contain. The value range for the type-number argument is 1 to 4.

type-length type-length: Specifies the minimum number of characters that are from each character type. The value range for the type-length argument is 1 to 63.

Usage guidelines

The product of the minimum number of character types and minimum number of characters for each type must be smaller than the maximum length of the super password.

Examples

# Specify that a super password must contain a minimum of four character types and a minimum of five characters for each type.

<Sysname> system-view

[Sysname] password-control super composition type-number 4 type-length 5

Related commands

display password-control

password-control composition

password-control super length

Use password-control super length to set the minimum length for super passwords.

Use undo password-control super length to restore the default.

Syntax

password-control super length length

undo password-control super length

Default

The minimum super password length is 10 characters.

Views

System view

Predefined user roles

network-admin

Parameters

length: Specifies the minimum length of super passwords in characters. The value range for this argument is 4 to 63.

Examples

# Set the minimum length of super passwords to 16 characters.

<Sysname> system-view

[Sysname] password-control super length 16

Related commands

display password-control

password-control length

password-control update-interval

Use password-control update-interval to set the minimum password update interval, which is the minimum interval at which users can change their passwords.

Use undo password-control update-interval to restore the default.

Syntax

password-control update-interval interval

undo password-control update-interval

Default

The minimum password update interval is 24 hours.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Specifies the minimum password update interval in hours, in the range of 0 to 168. 0 means no requirements for password update interval.

Usage guidelines

The set minimum interval is not effective on a user who is prompted to change the password at the first login or after the password expires.

Examples

# Set the minimum password update interval to 36 hours.

<Sysname> system-view

[Sysname] password-control update-interval 36

Related commands

display password-control

reset password-control blacklist

Use reset password-control blacklist to remove blacklisted users.

Syntax

reset password-control blacklist [ user-name user-name ]

Views

User view

Predefined user roles

network-admin

Parameters

user-name user-name: Specifies the username of a user account to be removed from the password control blacklist. The username is a case-sensitive string of 1 to 55 characters.

Usage guidelines

You can use this command to remove a user account that is blacklisted due to excessive login failures. Then the blacklisted user can use this user account to log in.

Examples

# Remove the user account named test from the password control blacklist.

<Sysname> reset password-control blacklist user-name test

Are you sure to delete the specified user in blacklist? [Y/N]:

Related commands

display password-control blacklist

reset password-control history-record

Use reset password-control history-record to delete history password records.

Syntax

reset password-control history-record [ super [ role role name ] | user-name user-name ]

Views

User view

Predefined user roles

network-admin

Parameters

super: Deletes the history records of the specified super password or all super passwords.

role role name: Specifies a user role name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, the command deletes the history records of all super passwords.

user-name user-name: Specifies the username of the user whose password records are to be deleted. The user-name argument is a case-sensitive string of 1 to 55 characters.

Usage guidelines

If you do not specify any parameters, this command deletes the history password records of all local users.

Examples

# Clear the history password records of all local users.

<Sysname> reset password-control history-record

Are you sure to delete all local user's history records? [Y/N]:y

Related commands

password-control history


Public key management commands

display public-key local public

Use display public-key local public to display local public keys.

Syntax

display public-key local { dsa | ecdsa | rsa } public [ name key-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

dsa: Specifies the DSA key pair type.

ecdsa: Specifies the ECDSA key pair type.

rsa: Specifies the RSA key pair type.

name key-name: Specifies a local key pair by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this command displays the public keys of all local key pairs of the specified type.

Usage guidelines

You can copy and distribute the public key of a local key pair to peer devices.

Examples

# Display all local RSA public keys.

<Sysname> display public-key local rsa public

 

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

Key name: hostkey (default)

Key type: RSA

Time when key pair created: 15:40:48 2011/05/12

Key code:

   30819F300D06092A864886F70D010101050003818D0030818902818100DAA4AAFEFE04C2C9

   667269BB8226E26331E30F41A8FF922C7338208097E84332610632B49F75DABF6D871B80CE

   C1BA2B75020077C74745C933E2F390DC0B39D35B88283D700A163BB309B19F8F87216A44AB

   FBF6A3D64DEB33E5CEBF2BCF26296778A26A84F4F4C5DBF8B656ACFA62CD96863474899BC1

   2DA4C04EF5AE0835090203010001

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

Key name: serverkey (default)

Key type: RSA

Time when key pair created: 15:40:48 2011/05/12

Key code:

   307C300D06092A864886F70D0101010500036B003068026100CAB4CACCA16442AD5F453442

   762F03897E0D494FEDE69224F5C051A441D290976733A278C9F0C0F5A198E66143EAB54A64

   DB608269CAE844B1E7CC64AD7E808972E7CF887F3B657F056E7930FC84FBF1AD83A01CC47E

   9D85C13413996ECD093B0203010001

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

Key name: rsa1

Key type: RSA

Time when key pair created: 15:42:26 2011/05/12

Key code:

   30819F300D06092A864886F70D010101050003818D0030818902818100DEBC46F217DDF11D

   426E7095AA45CD6BF1F87343D952569AC223A01365E0D8C91D49D347C143C5D8FAADA896AA

   1A827E580F2502F1926F52197230E1DE391A64015C43DD79DC4E9E171BAEA1DEB4C71DAED7

   9A6EDFD460D8945D27D39B7C9822D56AEA5B7C2CCFF1B6BC524AD498C3B87D4BD6EB36AF03

   92D8C6D940890BF4290203010001

# Display all local DSA public keys.

<Sysname> display public-key local dsa public

 

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

Key name: dsakey (default)

Key type: DSA

Time when key pair created: 15:41:37 2011/05/12

Key code:

   308201B73082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD

   96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E

   DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D

   DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038

   7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1

   4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD

   35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123

   91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1

   585DA7F42519718CC9B09EEF0381840002818041912CE34D12BCD2157E7AB1C2F03B3EF395

   100F3DB4A9E2FDFE860C1BD663D676438F7DA40A9406D61CA9079AF13E330489F1C76785DE

   52DA649AC8BC04B6D39CD7C52CD0A14F75F7491A91D31D6AC22340B5981B27A915CDEC4F09

   887E541EC1E5302D500F68E7AC29A084463C60F9EE266985A502FC92193E1CF4D265C4BA

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

Key name: dsa1

Key type: DSA

Time when key pair created: 15:35:42 2011/05/12

Key code:

   308201B83082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD

   96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E

   DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D

   DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038

   7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1

   4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD

   35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123

   91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1

   585DA7F42519718CC9B09EEF0381850002818100A1E456C8DA2AD1BB83B1BDF2A1A6B5A6E8

   3642B460402445DA7E4036715F468F76655E114D460B7112F57143EE020AEF4A5BFAD07B74

   0FBCB1C64DA8A2BCE619283421445EEC77D3CF0D11866E9656AD6511F4926F8376967B0AB7

   15F9FB7B514BC1174155DD6E073B1FCB3A2749E6C5FEA81003E16729497D0EAD9105E3E76A

# Display all local ECDSA public keys.

<Sysname> display public-key local ecdsa public

 

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

Key name: ecdsakey (default)

Key type: ECDSA

Time when key pair created: 15:42:04 2011/05/12

Key code:

   3049301306072A8648CE3D020106082A8648CE3D03010103320004C10CF7CE42193F7FC2AF

   68F5DC877835A43009DB6135558A7FB8316C361B0690B4FD84A14C0779C76DD6145BF9362B

   1D

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

Key name: ecdsa1

Key type: ECDSA

Time when key pair created: 15:43:33 2011/05/12

Key code:

   3049301306072A8648CE3D020106082A8648CE3D03010103320004A1FB84D92315B8DB72D1

   AE672C7CFA5135D5F5B02377F2F092F182EC83B5819795BC94CCBD3EBA7D4F0F2B2EB20C58

   4D

# Display the public key of the local RSA key pair rsa1.

<Sysname> display public-key local rsa public name rsa1

 

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

Key name: rsa1

Key type: RSA

Time when key pair created: 15:42:26 2011/05/12

Key code:

   30819F300D06092A864886F70D010101050003818D0030818902818100DEBC46F217DDF11D

   426E7095AA45CD6BF1F87343D952569AC223A01365E0D8C91D49D347C143C5D8FAADA896AA

   1A827E580F2502F1926F52197230E1DE391A64015C43DD79DC4E9E171BAEA1DEB4C71DAED7

   9A6EDFD460D8945D27D39B7C9822D56AEA5B7C2CCFF1B6BC524AD498C3B87D4BD6EB36AF03

   92D8C6D940890BF4290203010001

# Display the public key of the local DSA key pair dsa1.

<Sysname> display public-key local dsa public name dsa1

 

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

Key name: dsa1

Key type: DSA

Time when key pair created: 15:35:42 2011/05/12

Key code:

   308201B83082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD

   96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E

   DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D

   DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038

   7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1

   4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD

   35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123

   91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1

   585DA7F42519718CC9B09EEF0381850002818100A1E456C8DA2AD1BB83B1BDF2A1A6B5A6E8

   3642B460402445DA7E4036715F468F76655E114D460B7112F57143EE020AEF4A5BFAD07B74

   0FBCB1C64DA8A2BCE619283421445EEC77D3CF0D11866E9656AD6511F4926F8376967B0AB7

   15F9FB7B514BC1174155DD6E073B1FCB3A2749E6C5FEA81003E16729497D0EAD9105E3E76A

# Display the public key of the local ECDSA key pair ecdsa1.

<Sysname> display public-key local ecdsa public name ecdsa1

 

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

Key name: ecdsa1

Key type: ECDSA

Time when key pair created: 15:43:33 2011/05/12

Key code:

   3049301306072A8648CE3D020106082A8648CE3D03010103320004A1FB84D92315B8DB72D1

   AE672C7CFA5135D5F5B02377F2F092F182EC83B5819795BC94CCBD3EBA7D4F0F2B2EB20C58

   4D

Table 47 Command output

Field

Description

Key name

Name of the local key pair.

If you did not specify a name when creating the key pair, the default name is used followed by the word default in brackets.

The following is the default key pair name for each key algorithm:

·         hostkey—Default RSA host key pair name.

·         serverkey—Default RSA server key pair name.

·         dsakey—Default DSA host key pair name.

·         ecdsakey—Default ECDSA host key pair name.

Key type

Options include:

·         RSA.

·         DSA.

·         ECDSA.

Time when key pair created

Date and time when the local key pair was created.

Key code

Public key string.

 

Related commands

public-key local create

display public-key peer

Use display public-key peer to display information about peer host public keys.

Syntax

display public-key peer [ brief | name publickey-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

brief: Displays brief information about all peer host public keys. The brief information includes only the key type, key modulus, and key name.

name publickey-name: Displays detailed information about a peer host public key, including its key code. The publickey-name argument specifies a peer host public by its name, a case-sensitive string of 1 to 64 characters.

Usage guidelines

If you do not specify any keywords, this command displays detailed information about all peer host public keys configured on the local device.

You can use the public-key peer command or the public-key peer import sshkey command to configure a peer host public key on the local device.

Examples

# Display detailed information about the peer host public key idrsa.

<Sysname> display public-key peer name idrsa

 

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

Key name: idrsa

Key type: RSA

Key modulus: 1024

Key code:

   30819F300D06092A864886F70D010101050003818D0030818902818100C5971581A78B5388

   B3C9063EC6B53D395A6704D9752B6F9B7B1F734EEB5DD509F0B050662C46FFB8D27F797E37

   918F6270C5793F1FC63638970A0E4D51A3CEF7CFF6E92BFAFD73F530E0BDE27056E81F2525

   6D0883836FD8E68031B2C272FE2EA75C87734A7B8F85B8EBEB3BD51CC26916AF3B3FDC32C3

   42C142D41BB4884FEB0203010001

Table 48 Command output

Field

Description

Key name

Name of the peer host public key.

Key type

Key type: RSA, DSA or ECDSA.

Key modulus

Key modulus length in bits.

Key code

Public key string.

 

# Display brief information about all peer host public keys.

<Sysname> display public-key peer brief

Type  Modulus  Name

---------------------------

RSA   1024    idrsa

DSA   1024    10.1.1.1

Table 49 Command output

Field

Description

Type

Key type: RSA, DSA or ECDSA.

Modulus

Key modulus length in bits.

Name

Name of the peer host public key.

 

Related commands

·          public-key peer

·          public-key peer import sshkey

peer-public-key end

Use peer-public-key end to exit public key view to system view and save the configured peer host public key.

Syntax

peer-public-key end

Views

Public key view

Predefined user roles

network-admin

Usage guidelines

After you type the peer host public key on the local device, use this command to exit public key view and to save the peer host public key.

The system verifies the public key before saving it. If the key is not in the correct format, the system discards the key and displays an error message. If the key is valid, for example, the key was displayed by the display public-key local public command, the system saves the key.

Examples

# Exit public key view and save the configured peer host public key.

<Sysname> system-view

[Sysname] public-key peer key1

Enter public key view. Return to system view with "peer-public-key end" command.

[Sysname-pkey-public-key-key1]30819F300D06092A864886F70D010101050003818D0030818902818100C0EC8014F82515F6335A0A

[Sysname-pkey-public-key-key1]EF8F999C01EC94E5760A079BD73E4F4D97F3500EDB308C29481B77E719D1643135877E13B1C531B4

[Sysname-pkey-public-key-key1]FF1877A5E2E7B1FA4710DB0744F66F6600EEFE166F1B854E2371D5B952ADF6B80EB5F52698FCF3D6

[Sysname-pkey-public-key-key1]1F0C2EAAD9813ECB16C5C7DC09812D4EE3E9A0B074276FFD4AF2050BD4A9B1DDE675AC30CB020301

[Sysname-pkey-public-key-key1]0001

[Sysname-pkey-public-key-key1] peer-public-key end

[Sysname]

Related commands

·          display public-key local public

·          display public-key peer

·          public-key peer

public-key local create

Use public-key local create to create local key pairs.

Syntax

public-key local create { dsa | ecdsa [ secp192r1 | secp256r1 | secp384r1 ] | rsa } [ name key-name ]

Default

No local key pairs exist.

Views

System view

Predefined user roles

network-admin

Parameters

dsa: Specifies the DSA key pair type.

ecdsa: Specifies the ECDSA key pair type.

·          secp192r1: Uses the secp192r1 curve to create a 192-bit ECDSA key pair. The secp192r1 curve is used by default.

·          secp256r1: Uses the secp256r1 curve to create a 256-bit ECDSA key pair.

·          secp384r1: Uses the secp384r1 curve to create a 384-bit ECDSA key pair.

rsa: Specifies the RSA key pair type.

name key-name: Assigns a name to the key pair. The key-name argument is a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not assign a name to the key pair, the key pair takes the default name.

Table 50 Default local key pair names

Type

Default name

RSA

·         Host key pair: hostkey

·         Server key pair: serverkey

DSA

dsakey

ECDSA

ecdsakey

 

Usage guidelines

The key algorithm must be the same as required by the security application.

When you create an RSA or DSA key pair, enter an appropriate key modulus length at the prompt. The longer the key modulus length, the higher the security, and the longer the key generation time.

When you create an ECDSA key pair, choose the appropriate elliptic curve. The elliptic curve determines the ECDSA key length. The longer the key length, the higher the security, and the longer the key generation time.

See Table 51 for more information about key modulus lengths and key lengths.

If you do not assign the key pair a name, the system assigns the default name to the key pair and marks the key pair as default. You can also assign the default name to another key pair, but the system does not mark the key pair as default. The name of a key pair must be unique among all manually named key pairs that use the same key algorithm. If a name conflict occurs, the system asks whether you want to overwrite the existing key pair.

The key pairs are automatically saved and can survive system reboots.

Table 51 A comparison of different types of asymmetric key algorithms

Type

Number of key pairs

Modulus/key length

RSA

·         One host key pair, if you specify a key pair name.

·         One server key pair and one host key pair, if you do not specify a key pair name.
Both key pairs use their default names.

NOTE:

Only SSH 1.5 uses the RSA server key pair.

RSA key modulus length: 512 to 2048 bits, 1024 bits by default.

To ensure security, use a minimum of 768 bits.

DSA

One host key pair.

DSA key modulus length: 512 to 2048 bits, 1024 bits by default.

To ensure security, use a minimum of 768 bits.

ECDSA

One host key pair.

ECDSA key length: 192, 256, or 384 bits.

 

Examples

# Create local RSA key pairs with default names.

<Sysname> system-view

[Sysname] public-key local create rsa

The range of public key modulus is (512 ~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

...++++++

.++++++

..++++++++

....++++++++

Create the key pair successfully.

# Create a local DSA key pair with the default name.

<Sysname> system-view

[Sysname] public-key local create dsa

The range of public key modulus is (512 ~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

.++++++++++++++++++++++++++++++++++++++++++++++++++*

........+......+.....+......................................+..+................

.......+..........+..............+.............+...+.....+...............+..+...

...+.................+..........+...+....+.......+.....+............+.........+.

........................+........+..........+..............+.....+...+..........

..............+.........+..........+...........+........+....+..................

.....+++++++++++++++++++++++++++++++++++++++++++++++++++*

Create the key pair successfully.

# Create a local ECDSA key pair with the default name.

<Sysname> system-view

[Sysname] public-key local create ecdsa

Generating Keys...

Create the key pair successfully.

# Create a local RSA key pair with the name rsa1.

<Sysname> system-view

[Sysname] public-key local create rsa name rsa1

The range of public key modulus is (512 ~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

...++++++

...............................++++++

Create the key pair successfully.

# Create a local DSA key pair with the name dsa1.

<Sysname> system-view

[Sysname] public-key local create dsa name dsa1

The range of public key modulus is (512 ~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

.++++++++++++++++++++++++++++++++++++++++++++++++++*

........+......+.....+......................................+..+................

.......+..........+..............+.............+...+.....+...............+..+...

...+.................+..........+...+....+.......+.....+............+.........+.

........................+........+..........+..............+.....+...+..........

..............+.........+..........+...........+........+....+..................

.....+++++++++++++++++++++++++++++++++++++++++++++++++++*

Create the key pair successfully.

# Create a local ECDSA key pair with the name ecdsa1.

<Sysname> system-view

[Sysname] public-key local create ecdsa name ecdsa1

Generating Keys...

Create the key pair successfully.

Related commands

·          display public-key local public

·          public-key local destroy

public-key local destroy

Use public-key local destroy to destroy local key pairs.

Syntax

public-key local destroy { dsa | ecdsa | rsa } [ name key-name ]

Views

System view

Predefined user roles

network-admin

Parameters

dsa: Specifies the DSA key pair type.

ecdsa: Specifies the ECDSA key pair type.

rsa: Specifies the RSA key pair type.

name key-name: Specifies a local key pair by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this command destroys all key pairs of the specified type.

Usage guidelines

To avoid key compromise, destroy the local key pair and generate a new pair after any of the following conditions occurs:

·          An intrusion event has occurred.

·          The storage media of the device is replaced.

·          The local certificate has expired. For more information about local certificates, see Security Configuration Guide.

Examples

# Destroy the local RSA key pairs with the default names.

<Sysname> system-view

[Sysname] public-key local destroy rsa

Confirm to destroy the key pair? [Y/N]:y

# Destroy the local DSA key pair with the default name.

<Sysname> system-view

[Sysname] public-key local destroy dsa

Confirm to destroy the key pair? [Y/N] :y

# Destroy the local ECDSA key pair with the default name.

<Sysname> system-view

[Sysname] public-key local destroy ecdsa

Confirm to destroy the key pair? [Y/N]:y

# Destroy the local RSA key pair rsa1.

<Sysname> system-view

[Sysname] public-key local destroy rsa name rsa1

Confirm to destroy the key pair? [Y/N]:y

# Destroy the local DSA key pair dsa1.

<Sysname> system-view

[Sysname] public-key local destroy dsa name dsa1

Confirm to destroy the key pair? [Y/N] :y

# Destroy the local ECDSA key pair ecdsa1.

<Sysname> system-view

[Sysname] public-key local destroy ecdsa name ecdsa1

Confirm to destroy the key pair? [Y/N]:y

Related commands

public-key local create

public-key local export dsa

Use public-key local export dsa to export a local DSA host public key.

Syntax

public-key local export dsa [ name key-name ] { openssh | ssh2 } [ filename ]

Views

System view

Predefined user roles

network-admin

Parameters

name key-name: Specifies a local DSA key pair by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this command exports the host public key of the local DSA key pair with the default name.

openssh: Exports the host public key in OpenSSH format.

ssh2: Exports the host public key in SSH2.0 format.

filename: Specifies the name of the file for saving the DSA host public key. The file name is a case-insensitive string of 1 to 128 characters excluding ./ and ../. The name cannot be all dots (.), hostkey, serverkey, dsakey, or ecdsakey, and cannot start with a slash (/). For more information about file names, see Fundamentals Configuration Guide. If you do not specify a file name, this command displays the key on the monitor screen.

Usage guidelines

You can use this command to export a local DSA host public key before distributing it to a peer device.

To distribute a local DSA host public key to a peer device:

1.        Save the exported local host public key to a file by using one of the following methods:

?  Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } command to export the local host public key, and then copy and paste the key to a file.

?  Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } filename command to export the key to a file. You cannot export the key to the folder pkey or its subfolders.

2.        Transfer a copy of the file to the peer device, for example, by using FTP or TFTP in binary mode.

3.        On the peer device, use the public-key peer import sshkey command to import the host public key from the file.

SSH2.0 and OpenSSH are different public key formats. Choose the correct format that is supported on the device where you import the host public key.

Examples

# Export the host public key of the local DSA key pair with the default name in OpenSSH format to a file named key.pub.

<Sysname> system-view

[Sysname] public-key local export dsa openssh key.pub

# Display the host public key of the local DSA key pair with the default name in SSH2.0 format.

<Sysname> system-view

[Sysname] public-key local export dsa ssh2

---- BEGIN SSH2 PUBLIC KEY ----

Comment: "dsa-key-2011/05/12"

AAAAB3NzaC1kc3MAAACBANdXJixFhMRMIR8YvZbl8GHE8KQj9/5ra4WzTO9yzhSg06UiL+CM7OZb5sJlhUiJ3B7b0T7IsnTan3W6Jsy5h3I2Anh+kiuoRCHyLDyJy5sG/WD+AZQd3Xf+axKJPadu68HRKNl/BnjXcitTQchQbzWCFLFqL6xLNolQOHgRx9ozAAAAFQDHcyGMc37I7pk7Ty3tMPSO2s6RXwAAAIEAgiaQCeFOxHS68pMuadOx8YUXrZWUGEzN/OrpbsTV75MTPoS0cJPFKyDNNdAkkrOVnsZJliW8T6UILiLFs3ThbdABMs5xsCAhcJGscXthI5HHbB+y6IMXwb2BcdQey4PiEMA8ybMugQVhwhYhxz1tqsAo9LFYXaf0JRlxjMmwnu8AAACAQZEs400SvNIVfnqxwvA7PvOVEA89tKni/f6GDBvWY9Z2Q499pAqUBtYcqQea8T4zBInxx2eF3lLaZJrIvAS205zXxSzQoU9190kakdMdasIjQLWYGyepFc3sTwmIflQeweUwLVAPaOesKaCERjxg+e4maYWlAvySGT4c9NJlxLo=

---- END SSH2 PUBLIC KEY ----

# Display the host public key of the local DSA key pair with the default name in OpenSSH format.

<Sysname> system-view

[Sysname] public-key local export dsa openssh

ssh-dss AAAAB3NzaC1kc3MAAACBANdXJixFhMRMIR8YvZbl8GHE8KQj9/5ra4WzTO9yzhSg06UiL+CM7OZb5sJlhUiJ3B7b0T7IsnTan3W6Jsy5h3I2Anh+kiuoRCHyLDyJy5sG/WD+AZQd3Xf+axKJPadu68HRKNl/BnjXcitTQchQbzWCFLFqL6xLNolQOHgRx9ozAAAAFQDHcyGMc37I7pk7Ty3tMPSO2s6RXwAAAIEAgiaQCeFOxHS68pMuadOx8YUXrZWUGEzN/OrpbsTV75MTPoS0cJPFKyDNNdAkkrOVnsZJliW8T6UILiLFs3ThbdABMs5xsCAhcJGscXthI5HHbB+y6IMXwb2BcdQey4PiEMA8ybMugQVhwhYhxz1tqsAo9LFYXaf0JRlxjMmwnu8AAACAQZEs400SvNIVfnqxwvA7PvOVEA89tKni/f6GDBvWY9Z2Q499pAqUBtYcqQea8T4zBInxx2eF3lLaZJrIvAS205zXxSzQoU9190kakdMdasIjQLWYGyepFc3sTwmIflQeweUwLVAPaOesKaCERjxg+e4maYWlAvySGT4c9NJlxLo= dsa-key

# Export the host public key of the local DSA key pair dsa1 in OpenSSH format to the file dsa1.pub.

<Sysname> system-view

[Sysname] public-key local export dsa name dsa1 openssh dsa1.pub

# Display the host public key of the local DSA key pair dsa1 in SSH2.0 format.

<Sysname> system-view

[Sysname] public-key local export dsa name dsa1 ssh2

---- BEGIN SSH2 PUBLIC KEY ----

Comment: "dsa-key-2011/05/12"

AAAAB3NzaC1kc3MAAACBANdXJixFhMRMIR8YvZbl8GHE8KQj9/5ra4WzTO9yzhSg06UiL+CM7OZb5sJlhUiJ3B7b0T7IsnTan3W6Jsy5h3I2Anh+kiuoRCHyLDyJy5sG/WD+AZQd3Xf+axKJPadu68HRKNl/BnjXcitTQchQbzWCFLFqL6xLNolQOHgRx9ozAAAAFQDHcyGMc37I7pk7Ty3tMPSO2s6RXwAAAIEAgiaQCeFOxHS68pMuadOx8YUXrZWUGEzN/OrpbsTV75MTPoS0cJPFKyDNNdAkkrOVnsZJliW8T6UILiLFs3ThbdABMs5xsCAhcJGscXthI5HHbB+y6IMXwb2BcdQey4PiEMA8ybMugQVhwhYhxz1tqsAo9LFYXaf0JRlxjMmwnu8AAACBAKHkVsjaKtG7g7G98qGmtaboNkK0YEAkRdp+QDZxX0aPdmVeEU1GC3ES9XFD7gIK70pb+tB7dA+8scZNqKK85hkoNCFEXux3088NEYZullatZRH0km+DdpZ7CrcV+ft7UUvBF0FV3W4HOx/LOidJ5sX+qBAD4WcpSX0OrZEF4+dq

---- END SSH2 PUBLIC KEY ----

# Display the host public key of the local DSA key pair dsa1 in OpenSSH format.

<Sysname> system-view

[Sysname] public-key local export dsa name dsa1 openssh

ssh-dss AAAAB3NzaC1kc3MAAACBANdXJixFhMRMIR8YvZbl8GHE8KQj9/5ra4WzTO9yzhSg06UiL+CM7OZb5sJlhUiJ3B7b0T7IsnTan3W6Jsy5h3I2Anh+kiuoRCHyLDyJy5sG/WD+AZQd3Xf+axKJPadu68HRKNl/BnjXcitTQchQbzWCFLFqL6xLNolQOHgRx9ozAAAAFQDHcyGMc37I7pk7Ty3tMPSO2s6RXwAAAIEAgiaQCeFOxHS68pMuadOx8YUXrZWUGEzN/OrpbsTV75MTPoS0cJPFKyDNNdAkkrOVnsZJliW8T6UILiLFs3ThbdABMs5xsCAhcJGscXthI5HHbB+y6IMXwb2BcdQey4PiEMA8ybMugQVhwhYhxz1tqsAo9LFYXaf0JRlxjMmwnu8AAACBAKHkVsjaKtG7g7G98qGmtaboNkK0YEAkRdp+QDZxX0aPdmVeEU1GC3ES9XFD7gIK70pb+tB7dA+8scZNqKK85hkoNCFEXux3088NEYZullatZRH0km+DdpZ7CrcV+ft7UUvBF0FV3W4HOx/LOidJ5sX+qBAD4WcpSX0OrZEF4+dq dsa-key

Related commands

·          public-key local create

·          public-key peer import sshkey

public-key local export ecdsa

Use public-key local export ecdsa to export a local ECDSA host public key.

Syntax

public-key local export ecdsa [ name key-name ] { openssh | ssh2 } [ filename ]

Views

System view

Predefined user roles

network-admin

Parameters

name key-name: Specifies a local ECDSA key pair by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this command exports the host public key of the local ECDSA key pair with the default name.

openssh: Exports the host public key in OpenSSH format.

ssh2: Exports the host public key in SSH2.0 format.

filename: Specifies the name of the file for saving the local host public key. The file name is a case-insensitive string of 1 to 128 characters excluding ./ and ../. The name cannot be dots (.), hostkey, serverkey, dsakey, or ecdsakey, and cannot start with a slash (/). For more information about file names, see Fundamentals Configuration Guide. If you do not specify a file name, this command displays the key on the monitor screen.

Usage guidelines

You can use this command to export a local ECDSA host public key before distributing it to a peer device.

To distribute a local ECDSA host public key to a peer device:

1.        Save the exported ECDSA host public key to a file by using one of the following methods:

?  Use the public-key local export ecdsa [ name key-name ] { openssh | ssh2 } command to export the local host public key, and then copy and paste it to a file.

?  Use the public-key local export ecdsa [ name key-name ] { openssh | ssh2 } filename command to export the host public key to a file. You cannot export the key to the folder pkey or its subfolders.

2.        Transfer a copy of the file to the peer device, for example, by using FTP or TFTP in binary mode.

3.        On the peer device, use the public-key peer import sshkey command to import the host public key from the file.

SSH2.0 and OpenSSH are different public key formats. Choose the correct format that is supported by the device where you import the host public key.

Only the ECDSA host public key generated by using the secp256r1 curve can be exported.

Examples

# Export the host public key of the local ECDSA key pair with the default name in OpenSSH format to the file named key.pub.

<Sysname> system-view

[Sysname] public-key local export ecdsa openssh key.pub

# Display the host public key of the local ECDSA key pair with the default name in SSH2.0 format.

<Sysname> system-view

[Sysname] public-key local export ecdsa ssh2

---- BEGIN SSH2 PUBLIC KEY ----

Comment: "ecdsa-sha2-nistp256-2014/07/06"

AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBREw5tkARpbV+sYArt/xcW+UJEAevx7OckTtTLPBiLP5bWkSdKbvo+3oHRuIyZqmNTIcxuBjuBap+pHc919C58=

---- END SSH2 PUBLIC KEY ----

# Display the host public key of the local ECDSA key pair with the default name in OpenSSH format.

<Sysname> system-view

[Sysname] public-key local export ecdsa openssh

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBREw5tkARpbV+sYArt/xcW+UJEAevx7OckTtTLPBiLP5bWkSdKbvo+3oHRuIyZqmNTIcxuBjuBap+pHc919C58=

 ecdsa-key

Related commands

·          public-key local create

·          public-key peer import sshkey

public-key local export rsa

Use public-key local export rsa to export a local RSA host public key.

Syntax

public-key local export rsa [ name key-name ] { openssh | ssh1 | ssh2 } [ filename ]

Views

System view

Predefined user roles

network-admin

Parameters

name key-name: Specifies a local RSA key pair by its name, a case-insensitive string of 1 to 64 characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this command exports the host public key of the local RSA key pair with the default name.

openssh: Exports the host public key in OpenSSH format.

ssh1: Exports the host public key in SSH1.5 format.

ssh2: Exports the host public key in SSH2.0 format.

filename: Specifies the name of the file for saving the RSA host public key. The file name is a case-insensitive string of 1 to 128 characters excluding ./ and ../. The name cannot be all dots (.), hostkey, serverkey, dsakey, or ecdsakey, and cannot start with a slash (/). For more information about file names, see Fundamentals Configuration Guide. If you do not specify a file name, this command displays the key on the monitor screen.

Usage guidelines

You can use this command to export a local RSA host public key before distributing it to a peer device.

To distribute a local RSA host public key to a peer device:

1.        Save the exported local host public key to a file by using one of the following methods:

?  Use the public-key local export rsa [ name key-name ] { openssh | ssh2 } command to export the key, and then copy and paste it to a file.

?  Use the public-key local export rsa [ name key-name ] { openssh | ssh2 } filename command to export key to a file. You cannot export the key to the folder pkey or its subfolders.

2.        Transfer a copy of the file to the peer device, for example, by using FTP or TFTP in binary mode.

3.        On the peer device, use the public-key peer import sshkey command to import the host public key from the file.

SSH1.5, SSH2.0, and OpenSSH are different public key formats. Choose the correct public key format that is supported on the device where you import the host public key.

Examples

# Export the host public key of the local RSA key pair with the default name in OpenSSH format to the file key.pub.

<Sysname> system-view

[Sysname] public-key local export rsa openssh key.pub

# Display the host public key of the local RSA key pair with the default name in SSH2.0 format.

<Sysname> system-view

[Sysname] public-key local export rsa ssh2

---- BEGIN SSH2 PUBLIC KEY ----

Comment: "rsa-key-2011/05/12"

AAAAB3NzaC1yc2EAAAADAQABAAAAgQDapKr+/gTCyWZyabuCJuJjMeMPQaj/kixzOCCAl+hDMmEGMrSfddq/bYcbgM7Buit1AgB3x0dFyTPi85DcCznTW4goPXAKFjuzCbGfj4chakSr+/aj1k3rM+XOvyvPJilneKJqhPT0xdv4tlas+mLNloY0dImbwS2kwE71rgg1CQ==

---- END SSH2 PUBLIC KEY ----

# Display the host public key of the local RSA key pair with the default name in OpenSSH format.

<Sysname> system-view

[Sysname] public-key local export rsa openssh

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDapKr+/gTCyWZyabuCJuJjMeMPQaj/kixzOCCAl+hDMmEGMrSfddq/bYcbgM7Buit1AgB3x0dFyTPi85DcCznTW4goPXAKFjuzCbGfj4chakSr+/aj1k3rM+XOvyvPJilneKJqhPT0xdv4tlas+mLNloY0dImbwS2kwE71rgg1CQ== rsa-key

# Export the host public key of the local RSA key pair rsa1 in OpenSSH format to the file rsa1.pub.

<Sysname> system-view

[Sysname] public-key local export rsa name rsa1 openssh rsa1.pub

# Display the host public key of the local RSA key pair rsa1 in SSH2.0 format.

<Sysname> system-view

[Sysname] public-key local export rsa name rsa1 ssh2

---- BEGIN SSH2 PUBLIC KEY ----

Comment: "rsa-key-2011/05/12"

AAAAB3NzaC1yc2EAAAADAQABAAAAgQDevEbyF93xHUJucJWqRc1r8fhzQ9lSVprCI6ATZeDYyR1J00fBQ8XY+q2olqoagn5YDyUC8ZJvUhlyMOHeORpkAVxD3XncTp4XG66h3rTHHa7Xmm7f1GDYlF0n05t8mCLVaupbfCzP8ba8UkrUmMO4fUvW6zavA5LYxtlAiQv0KQ==

---- END SSH2 PUBLIC KEY ----

# Display the host public key of the local RSA key pair rsa1 in OpenSSH format.

<Sysname> system-view

[Sysname] public-key local export rsa name rsa1 openssh

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDevEbyF93xHUJucJWqRc1r8fhzQ9lSVprCI6ATZeDYyR1J00fBQ8XY+q2olqoagn5YDyUC8ZJvUhlyMOHeORpkAVxD3XncTp4XG66h3rTHHa7Xmm7f1GDYlF0n05t8mCLVaupbfCzP8ba8UkrUmMO4fUvW6zavA5LYxtlAiQv0KQ== rsa-key

Related commands

·          public-key local create

·          public-key peer import sshkey

public-key peer

Use public-key peer to assign a name to a peer host public key and enter public key view, or enter the view of an existing peer host public key.

Use undo public-key peer to delete a peer host public key.

Syntax

public-key peer keyname

undo public-key peer keyname

Default

No peer host public keys exist.

Views

System view

Predefined user roles

network-admin

Parameters

keyname: Specifies a key name, a case-sensitive string of 1 to 64 characters.

Usage guidelines

After you execute this command to enter the public key view, type the public key. Spaces and carriage returns are allowed, but are not saved.

To configure a peer host public key on the local device, first obtain the peer public key in hexadecimal notation, and then perform the following tasks on the local device:

1.        Execute the public-key peer command to enter public key view.

2.        Type the public key.

3.        Execute the peer-public-key end command to save the public key and return to system view.

The public key you type in the public key view must be in a correct format. If the peer device is an H3C device, use the display public-key local public command to display and record its public key.

Examples

# Assign the name key1 to the peer host public key and enter public key view.

<Sysname> system-view

[Sysname] public-key peer key1

[Sysname-pkey-public-key-key1]

Related commands

·          display public-key local public

·          display public-key peer

·          peer-public-key end

public-key peer import sshkey

Use public-key peer import sshkey to import a peer host public key from a public key file.

Use undo public-key peer to remove a peer host public key.

Syntax

public-key peer keyname import sshkey filename

undo public-key peer keyname

Default

No peer host public keys exist.

Views

System view

Predefined user roles

network-admin

Parameters

keyname: Specifies a name for a peer host public key, a case-sensitive string of 1 to 64 characters.

filename: Specifies a public key file by its name, a case-insensitive string of 1 to 128 characters excluding ./ and ../. The name cannot be all dots (.), hostkey, serverkey, dsakey, or ecdsakey, and cannot start with a slash (/). For more information about file names, see Fundamentals Configuration Guide.

Usage guidelines

Before you use this command, get a copy of the public key file from the peer device through FTP or TFTP in binary mode.

After you configure this command, the system automatically transforms the host public key to the PKCS format, and saves the key.

The device supports importing public keys in the format of SSH1.5, SSH2.0, and OpenSSH.

Examples

# Import the peer host public key key2 from the public key file key.pub.

<Sysname> system-view

[Sysname] public-key peer key2 import sshkey key.pub

Related commands

·          display public-key peer

·          public-key local export dsa

·          public-key local export ecdsa

·          public-key local export rsa


PKI commands

attribute

Use attribute to configure a rule to filter certificates based on an attribute in the certificate issuer name, subject name, or alternative subject name field.

Use undo attribute to remove an attribute rule.

Syntax

attribute id { alt-subject-name { fqdn | ip } | { issuer-name | subject-name } { dn | fqdn | ip } } { ctn | equ | nctn | nequ } attribute-value

undo attribute id

Default

No attribute rules exist.

Views

Certificate attribute group view

Predefined user roles

network-admin

Parameters

id: Specifies a rule ID in the range of 1 to 16.

alt-subject-name: Specifies the alternative subject name.

fqdn: Specifies an FQDN of the PKI entity.

ip: Specifies an IP address of the PKI entity.

dn: Specifies the DN of the PKI entity.

issuer-name: Specifies the issuer name.

subject-name: Specifies the subject name.

ctn: Specifies the contain operation.

equ: Specifies the equal operation.

nctn: Specifies the not-contain operation.

nequ: Specifies the not-equal operation.

attribute-value: Sets an attribute value, a case-insensitive string of 1 to 128 characters.

Usage guidelines

The issuer name, subject name, and alternative subject name field can contain the following attributes in a certificate:

·          Each subject name and the issuer name can contain a single DN, multiple FQDNs, and multiple IP addresses.

·          The alternative subject name can contain multiple FQDNs and IP addresses but zero DNs.

An attribute rule is a combination of an attribute-value pair with an operation keyword, as listed in Table 52.

Table 52 Combinations of attribute-value pairs and operation keywords

Operation

DN

FQDN/IP

ctn

The DN contains the specified attribute value.

Any FQDN or IP address contains the specified attribute value.

nctn

The DN does not contain the specified attribute value.

None of the FQDNs or IP addresses contain the specified attribute value.

equ

The DN is the same as the specified attribute value.

Any FQDN or IP address is the same as the specified attribute value.

nequ

The DN is not the same as the specified attribute value.

None of the FQDNs or IP addresses are the same as the specified attribute value.

 

A certificate matches an attribute rule only if it contains an attribute that matches the criterion defined in the rule. For example, an attribute rule defines a criterion that the DN of the subject name contains the abc string. All certificates that have the DN in the subject name containing the abc string match the rule.

A certificate matches an attribute group if it matches all attribute rules in the group.

Examples

# Create a certificate attribute group and enter its view.

<Sysname> system-view

[Sysname] pki certificate attribute-group mygroup

# Specify an attribute rule to match certificates that contain the abc string in the subject DN.

[Sysname-pki-cert-attribute-group-mygroup] attribute 1 subject-name dn ctn abc

# Specify an attribute rule to match certificates that do not contain FQDN abc in the issuer name field.

[Sysname-pki-cert-attribute-group-mygroup] attribute 2 issuer-name fqdn nequ abc

# Specify an attribute rule to match certificates that do not contain IP address 10.0.0.1 in the alternative subject name field.

[Sysname-pki-cert-attribute-group-mygroup] attribute 3 alt-subject-name ip nequ 10.0.0.1

Related commands

·          display pki certificate attribute-group

·          rule

ca identifier

Use ca identifier to specify the trusted CA.

Use undo ca identifier to restore the default.

Syntax

ca identifier name

undo ca identifier

Default

No trusted CA is specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

name: Specifies the trusted CA by its name, a case-sensitive string of 1 to 63 characters.

Usage guidelines

To obtain a CA certificate, you must specify the trusted CA name. The trusted CA name uniquely identifies the CA to be used if multiple CAs exist on the same CA server. The CA server's URL is specified by using the certificate request url command.

When you use this command, make sure the specified CA name is consistent with the name of the CA that owns the CA certificate to be obtained.

Examples

# Specify the name of the trusted CA as new-ca.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] ca identifier new-ca

certificate request entity

Use certificate request entity to specify the PKI entity for certificate request.

Use undo certificate request entity to restore the default.

Syntax

certificate request entity entity-name

undo certificate request entity

Default

No PKI entity is specified for certificate request.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

entity-name: Specifies a PKI entity by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

A PKI entity describes the identity attributes of an entity for certificate request, including the following information:

·          Common name.

·          Organization.

·          Unit in the organization.

·          Locality.

·          State and country where the entity resides.

·          FQDN.

·          IP address.

You can specify only one PKI entity for a PKI domain. If you configure this command for a PKI domain multiple times, the most recent configuration takes effect.

Examples

# Specify PKI entity en1 for certificate request in PKI domain aaa.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request entity en1

Related commands

pki entity

certificate request from

Use certificate request from to specify the type of certificate request reception authority.

Use undo certificate request from to restore the default.

Syntax

certificate request from { ca | ra }

undo certificate request from

Default

The type of certificate request reception authority is not specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

ca: Specifies the CA to accept certificate requests.

ra: Specifies the RA to accept certificate requests.

Usage guidelines

The CA server determines whether CA or RA accepts certificate requests. This authority setting must be consistent with the setting on the CA server.

Examples

# Specify the RA to accept certificate requests.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request from ra

certificate request mode

Use certificate request mode to set the certificate request mode.

Use undo certificate request mode to restore the default.

Syntax

certificate request mode { auto [ password { cipher | simple } string | renew-before-expire days [ reuse-public-key ] [ automatic-append common-name ] ] * | manual }

undo certificate request mode

Default

The certificate request mode is manual.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

auto: Specifies the auto certificate request mode.

password: Specifies a password for certificate revocation as required by the CA policy.

cipher: Specifies a password in encrypted form.

simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password. Its plaintext form is a case-sensitive string of 1 to 31 characters. Its encrypted form is a case-sensitive string of 1 to 73 characters.

renew-before-expire days: Configures the system to automatically request a new certificate the specified number of days before the current certificate expires. The value range for the days argument is 0 to 365. Value 0 indicates that the request for a new certificate is made when the old certificate expires, which might cause service interruptions.

reuse-public-key: Reuses the key pair in the old certificate for the new certificate. If you do not specify this keyword, the system generates a new key pair for the new certificate. The old key pair is replaced with the new one when the new certificate is received from the CA.

automatic-append common-name: Automatically appends random data to the common name of the PKI entity for the new certificate. If you do not specify this keyword, the common name of the PKI entity will be unchanged in the new certificate.

manual: Specifies the manual certificate request mode.

Usage guidelines

A certificate request can be submitted to a CA in offline or online mode. In online mode, a certificate request can be automatically or manually submitted:

·          Auto request mode—A PKI entity automatically obtains the CA certificate and submits a certificate request to the CA when both of the following conditions exist:

?  An associated application (IKE, for example) performs identity authentication.

?  No certificate is available for the application on the device.

·          Manual request mode—You must manually obtain the CA certificate and submit certificate requests.

To avoid service interruptions caused by certificate expiration, specify the renew-before-expire days option to enable certificate auto-renewal in auto certificate request mode. Certificate auto-renewal allows the system to automatically request a new certificate the specified number of days before the old certificate expires. The old certificate is replaced immediately when the new certificate is received.

Some CAs require a new PKI entity common name for certificate auto-renewal to work. Specify the automatic-append common-name keyword to ensure successful certificate auto-renewal.

Examples

# Set the certificate request mode to auto.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request mode auto

# Set the certificate request mode to auto, and set the certificate revocation password in plain text to 123456.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request mode auto password simple 123456

# Set the certificate request mode to auto, and set the certificate revocation password in plain text to 123456. Configure the system to automatically request a new certificate by using a new key pair 60 days before the old certificate expires.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request mode auto password simple 123456 renew-before-expire 60

Related commands

pki request-certificate

certificate request polling

Use certificate request polling to set the polling interval and the maximum number of attempts to query certificate request status.

Use undo certificate request polling to restore the defaults.

Syntax

certificate request polling { count count | interval interval }

undo certificate request polling { count | interval }

Default

The polling interval is 20 minutes, and the maximum number of attempts is 50.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

count count: Specifies the maximum number of attempts to query certificate request status. The value range is 1 to 100.

interval interval: Specifies a polling interval in minutes. The value range is 5 to 168..

Usage guidelines

After a PKI entity submits a certificate request, it might take the CA server a while to issue the certificate if the CA administrator manually approves the certificate request. During this period, the PKI entity periodically queries the CA server for the certificate request status. The periodic query operation stops until the PKI entity obtains the certificate or the maximum number of query attempts is reached. If the maximum number of query attempts is reached, the certificate request fails.

If the CA server automatically approves a certificate request, the PKI entity can obtain the certificate immediately after it submits a certificate request. In this case, the PKI entity does not send queries to the CA server.

Examples

# Set the polling interval to 15 minutes, and the maximum number of query attempts to 40.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request polling interval 15

[Sysname-pki-domain-aaa] certificate request polling count 40

Related commands

display pki certificate request-status

certificate request url

Use certificate request url to specify the URL of the certificate request reception authority (CA or RA) to which the device should send SCEP certificate requests.

Use undo certificate request url to restore the default.

Syntax

certificate request url url-string

undo certificate request url

Default

The URL of the certificate request reception authority is not specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

url-string: Specifies the URL of the certificate request reception authority, a case-sensitive string of 1 to 511 characters. The URL length is restricted by the CLI string limitation or the url-string parameter, whichever is smaller.

Usage guidelines

The URL is in the format http://server_location/ca_script_location, where:

·          The server_location argument is the IPv4 address, IPv6 address, or domain name of the certificate request reception authority (CA or RA) server.

·          The cgi_script_location argument is the path of the application script on the server.

Examples

# Set the certificate request URL to http://169.254.0.1/certsrv/mscep/mscep.dll.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] certificate request url http://169.254.0.1/certsrv/mscep/mscep.dll

common-name

Use common-name to set the common name for a PKI entity.

Use undo common-name to restore the default.

Syntax

common-name common-name-sting

undo common-name

Default

No common name is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

common-name-sting: Specifies a common name, a case-sensitive string of 1 to 63 characters. No comma can be included. You can set the username of the PKI entity as the common name.

Examples

# Set the common name to test for the PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] common-name test

country

Use country to set the country code of a PKI entity.

Use undo country to remove the configuration.

Syntax

country country-code-string

undo country

Default

No country code is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

country-code-string: Specifies a country code, a case-sensitive string of two characters. For example, CN is the country code for China.

Examples

# Set the country code to CN for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] country CN

crl check

Use crl check enable to enable CRL checking.

Use undo crl check enable to disable CRL checking.

Syntax

crl check enable

undo crl check enable

Default

CRL checking is enabled.

Views

PKI domain view

Predefined user roles

network-admin

Usage guidelines

A CRL is a list of revoked certificates signed and published by a CA. Revoked certificates should no longer be trusted.

CRL checking is designed to check whether a certificate has been revoked.

Examples

# Disable CRL checking.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] undo crl check enable

Related commands

·          pki import

·          pki retrieve-certificate

·          pki validate-certificate

crl url

Use crl url to specify the URL of the CRL repository.

Use undo crl url to restore the default.

Syntax

crl url url-string

undo crl url

Default

The URL of the CRL repository is not specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

url-string: Specifies the URL of the CRL repository, a case-sensitive string of 1 to 511 characters. The URL format is ldap://server_location or http://server_location, where server_location can be an IP address or a domain name. The URL length is restricted by the CLI string limitation or the url-string parameter, whichever is smaller.

Usage guidelines

To use CRL checking, a CRL must be obtained from a CRL repository.

The device selects a CRL repository in the following order:

1.        CRL repository specified in the PKI domain by using this command.

2.        CRL repository in the certificate that is being verified.

3.        CRL repository in the CA certificate or CRL repository in the upper-level CA certificate if the CA certificate is the certificate being verified.

After the previous selection process, if the CRL repository is not found, the device obtains the CRL through SCEP. In this scenario, the CA certificate and the local certificates must have been obtained.

If an LDAP URL is specified, the device must connect to the LDAP server to obtain the CRL. If the LDAP server's host name is not included in the URL, the device can get the complete URL information based on the LDAP server address specified in the PKI domain.

Examples

# Set the URL of the CRL repository to http://169.254.0.30.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] crl url http://169.254.0.30

Related commands

·          ldap-server

·          pki retrieve-crl

display pki certificate access-control-policy

Use display pki certificate access-control-policy to display information about certificate-based access control policies.

Syntax

display pki certificate access-control-policy [ policy-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies a certificate-based access control policy by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

If you do not specify a policy name, this command displays information about all certificate-based access control policies.

Examples

# Display information about the certificate-based access control policy mypolicy.

<Sysname> display pki certificate access-control-policy mypolicy

 Access control policy name: mypolicy

     Rule 1  deny    mygroup1

     Rule 2  permit  mygroup2

# Display information about all certificate-based access control policies.

<Sysname> display pki certificate access-control-policy

 Total PKI certificate access control policies: 2

 Access control policy name: mypolicy1

     Rule 1  deny    mygroup1

     Rule 2  permit  mygroup2

 Access control policy name: mypolicy2

     Rule 1  deny    mygroup3

     Rule 2  permit  mygroup4

Table 53 Command output

Field

Description

Total PKI certificate access control policies

Total number of certificate-based access control policies.

permit

Permit certificates that match the attribute group in the access control rule.

deny

Deny certificates that match the attribute group in the access control rule.

 

Related commands

·          pki certificate access-control-policy

·          rule

display pki certificate attribute-group

Use display pki certificate attribute-group to display information about certificate attribute groups.

Syntax

display pki certificate attribute-group [ group-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

group-name: Specifies a certificate attribute group by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

If you do not specify a certificate attribute group, this command displays information about all certificate attribute groups.

Examples

# Display information about the certificate attribute group mygroup.

<Sysname> display pki certificate attribute-group mygroup

 Attribute group name: mygroup

      Attribute  1 subject-name     dn    ctn   abc

      Attribute  2 issuer-name      fqdn  nctn  app

# Display information about all certificate attribute groups.

<Sysname> display pki certificate attribute-group

 Total PKI certificate attribute groups: 2.

 Attribute group name: mygroup1

      Attribute  1 subject-name     dn    ctn   abc

      Attribute  2 issuer-name      fqdn  nctn  app

Attribute group name: mygroup2

      Attribute  1 subject-name     dn    ctn   def

      Attribute  2 issuer-name      fqdn  nctn  fqd

Table 54 Command output

Field

Description

Total PKI certificate attribute groups

Total number of certificate attribute groups.

ctn

Contain operation.

nctn

Not-contain operation.

equ

Equal operation.

nequ

Not-equal operation.

Attribute  1 subject-name     dn    ctn   abc

Attribute rule contents:

·         alt-subject-name—Alternative subject name.

·         issuer-name—Certificate issuer name.

·         subject-name—Certificate subject name.

·         fqdn—FQDN of the PKI entity.

·         ip—IP address of the PKI entity.

·         dn—DN of the PKI entity.

·         ctn—Indicates the contain operation.

·         equ—Indicates the equal operation.

·         nctn—Indicates the not-contain operation.

·         nequ—Indicates the not-equal operation.

 

Related commands

·          attribute

·          pki certificate attribute-group

display pki certificate domain

Use display pki certificate domain to display information about certificates.

Syntax

display pki certificate domain domain-name { ca | local | peer [ serial serial-num ] }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 55.

Table 55 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

ca: Specifies the CA certificate.

local: Specifies the local certificates.

peer: Specifies the peer certificates.

serial serial-num: Specifies the serial number of a peer certificate.

Usage guidelines

If you specify the CA keyword, this command displays information about all CA certificates in the domain. If the domain has RA certificates, the RA certificates are also displayed.

If you specify the local keyword, this command displays information about all local certificates in the domain.

If you specify the peer keyword without a serial number, this command displays brief information about all peer certificates. If you specify a serial number, this command display detailed information about the specified peer certificate.

Examples

# Display information about the CA certificate in the PKI domain aaa.

<Sysname> display pki certificate domain aaa ca

Certificate:

    Data:

        Version: 1 (0x0)

        Serial Number:

            5c:72:dc:c4:a5:43:cd:f9:32:b9:c1:90:8f:dd:50:f6

        Signature Algorithm: sha1WithRSAEncryption

        Issuer: C=cn, O=docm, OU=rnd, CN=rootca

        Validity

            Not Before: Jan  6 02:51:41 2011 GMT

            Not After : Dec  7 03:12:05 2013 GMT

        Subject: C=cn, O=ccc, OU=ppp, CN=rootca

        Subject Public Key Info:

            Public Key Algorithm: rsaEncryption

                Public-Key: (1024 bit)

                Modulus:

                    00:c4:fd:97:2c:51:36:df:4c:ea:e8:c8:70:66:f0:

                    28:98:ec:5a:ee:d7:35:af:86:c4:49:76:6e:dd:40:

                    4a:9e:8d:c0:cb:d9:10:9b:61:eb:0c:e0:22:ce:f6:

                    57:7c:bb:bb:1b:1d:b6:81:ad:90:77:3d:25:21:e6:

                    7e:11:0a:d8:1d:3c:8e:a4:17:1e:8c:38:da:97:f6:

                    6d:be:09:e3:5f:21:c5:a0:6f:27:4b:e3:fb:9f:cd:

                    c1:91:18:ff:16:ee:d8:cf:8c:e3:4c:a3:1b:08:5d:

                    84:7e:11:32:5f:1a:f8:35:25:c0:7e:10:bd:aa:0f:

                    52:db:7b:cd:5d:2b:66:5a:fb

                Exponent: 65537 (0x10001)

    Signature Algorithm: sha1WithRSAEncryption

        6d:b1:4e:d7:ef:bb:1d:67:53:67:d0:8f:7c:96:1d:2a:03:98:

        3b:48:41:08:a4:8f:a9:c1:98:e3:ac:7d:05:54:7c:34:d5:ee:

        09:5a:11:e3:c8:7a:ab:3b:27:d7:62:a7:bb:bc:7e:12:5e:9e:

        4c:1c:4a:9f:d7:89:ca:20:46:de:c5:b3:ce:36:ca:5e:6e:dc:

        e7:c6:fe:3f:c5:38:dd:d5:a3:36:ad:f4:3d:e6:32:7f:48:df:

        07:f0:a2:32:89:86:72:22:cd:ed:e5:0f:95:df:9c:75:71:e7:

        fe:34:c5:a0:64:1c:f0:5c:e4:8f:d3:00:bd:fa:90:b6:64:d8:

        88:a6

# Display information about local certificates in the PKI domain aaa.

<Sysname> display pki certificate domain aaa local

Certificate:

    Data:

        Version: 3 (0x2)

        Serial Number:

            bc:05:70:1f:0e:da:0d:10:16:1e

        Signature Algorithm: sha256WithRSAEncryption

        Issuer: C=CN, O=sec, OU=software, CN=ipsec

        Validity

            Not Before: Jan  7 20:05:44 2011 GMT

            Not After : Jan  7 20:05:44 2012 GMT

        Subject: O=OpenCA Labs, OU=Users, CN=fips fips-sec

        Subject Public Key Info:

            Public Key Algorithm: rsaEncryption

                Public-Key: (1024 bit)

                Modulus:

                    00:b2:38:ad:8c:7d:78:38:37:88:ce:cc:97:17:39:

                    52:e1:99:b3:de:73:8b:ad:a8:04:f9:a1:f9:0d:67:

                    d8:95:e2:26:a4:0b:c2:8c:63:32:5d:38:3e:fd:b7:

                    4a:83:69:0e:3e:24:e4:ab:91:6c:56:51:88:93:9e:

                    12:a4:30:ad:ae:72:57:a7:ba:fb:bc:ac:20:8a:21:

                    46:ea:e8:93:55:f3:41:49:e9:9d:cc:ec:76:13:fd:

                    a5:8d:cb:5b:45:08:b7:d1:c5:b5:58:89:47:ce:12:

                    bd:5c:ce:b6:17:2f:e0:fc:c0:3e:b7:c4:99:31:5b:

                    8a:f0:ea:02:fd:2d:44:7a:67

                Exponent: 65537 (0x10001)

        X509v3 extensions:

            X509v3 Basic Constraints:

                CA:FALSE

            Netscape Cert Type:

                SSL Client, S/MIME

            X509v3 Key Usage:

                Digital Signature, Non Repudiation, Key Encipherment

            X509v3 Extended Key Usage:

                TLS Web Client Authentication, E-mail Protection, Microsoft Smartcardlogin

            Netscape Comment:

                User Certificate of OpenCA Labs

            X509v3 Subject Key Identifier:

                91:95:51:DD:BF:4F:55:FA:E4:C4:D0:10:C2:A1:C2:99:AF:A5:CB:30

            X509v3 Authority Key Identifier:

                keyid:DF:D2:C9:1A:06:1F:BC:61:54:39:FE:12:C4:22:64:EB:57:3B:11:9F

 

            X509v3 Subject Alternative Name:

                email:fips@ccc.com

            X509v3 Issuer Alternative Name:

                email:pki@openca.org

            Authority Information Access:

                CA Issuers - URI:http://titan/pki/pub/cacert/cacert.crt

                OCSP - URI:http://titan:2560/

                1.3.6.1.5.5.7.48.12 - URI:http://titan:830/

 

            X509v3 CRL Distribution Points:

 

                Full Name:

                  URI:http://titan/pki/pub/crl/cacrl.crl

 

    Signature Algorithm: sha256WithRSAEncryption

        94:ef:56:70:48:66:be:8f:9d:bb:77:0f:c9:f4:65:77:e3:bd:

        ea:9a:b8:24:ae:a1:38:2d:f4:ab:e8:0e:93:c2:30:33:c8:ef:

        f5:e9:eb:9d:37:04:6f:99:bd:b2:c0:e9:eb:b1:19:7e:e3:cb:

        95:cd:6c:b8:47:e2:cf:18:8d:99:f4:11:74:b1:1b:86:92:98:

        af:a2:34:f7:1b:15:ee:ea:91:ed:51:17:d0:76:ec:22:4c:56:

        da:d6:d1:3c:f2:43:31:4f:1d:20:c8:c2:c3:4d:e5:92:29:ee:

        43:c6:d7:72:92:e8:13:87:38:9a:9c:cd:54:38:b2:ad:ba:aa:

        f9:a4:68:b5:2a:df:9a:31:2f:42:80:0c:0c:d9:6d:b3:ab:0f:

        dd:a0:2c:c0:aa:16:81:aa:d9:33:ca:01:75:94:92:44:05:1a:

        65:41:fa:1e:41:b5:8a:cc:2b:09:6e:67:70:c4:ed:b4:bc:28:

        04:50:a6:33:65:6d:49:3c:fc:a8:93:88:53:94:4c:af:23:64:

        cb:af:e3:02:d1:b6:59:5f:95:52:6d:00:00:a0:cb:75:cf:b4:

        50:c5:50:00:65:f4:7d:69:cc:2d:68:a4:13:5c:ef:75:aa:8f:

        3f:ca:fa:eb:4d:d5:5d:27:db:46:c7:f4:7d:3a:b2:fb:a7:c9:

        de:18:9d:c1

# Display brief information about all peer certificates in the PKI domain aaa.

<Sysname> display pki certificate domain aaa peer

Total peer certificates: 1

 

Serial Number: 9a0337eb2156ba1f5476e4d754a5a9f7

Subject  Name: CN=sldsslserver

# Display detailed information about a peer certificate in the PKI domain aaa.

<Sysname> display pki certificate domain aaa peer serial 9a0337eb2156ba1f5476e4d754a5a9f7

 

Certificate:

    Data:

        Version: 3 (0x2)

        Serial Number:

            9a:03:37:eb:21:56:ba:1f:54:76:e4:d7:54:a5:a9:f7

        Signature Algorithm: sha1WithRSAEncryption

        Issuer: C=cn, O=ccc, OU=sec, CN=ssl

        Validity

            Not Before: Oct 15 01:23:06 2010 GMT

            Not After : Jul 26 06:30:54 2012 GMT

        Subject: CN=sldsslserver

        Subject Public Key Info:

            Public Key Algorithm: rsaEncryption

                Public-Key: (1024 bit)

                Modulus:

                    00:c2:cf:37:76:93:29:5e:cd:0e:77:48:3a:4d:0f:

                    a6:28:a4:60:f8:31:56:28:7f:81:e3:17:47:78:98:

                    68:03:5b:72:f4:57:d3:bf:c5:30:32:0d:58:72:67:

                    04:06:61:08:3b:e9:ac:53:b9:e7:69:68:1a:23:f2:

                    97:4c:26:14:c2:b5:d9:34:8b:ee:c1:ef:af:1a:f4:

                    39:da:c5:ae:ab:56:95:b5:be:0e:c3:46:35:c1:52:

                    29:9c:b7:46:f2:27:80:2d:a4:65:9a:81:78:53:d4:

                    ca:d3:f5:f3:92:54:85:b3:ab:55:a5:03:96:2b:19:

                    8b:a3:4d:b2:17:08:8d:dd:81

                Exponent: 65537 (0x10001)

        X509v3 extensions:

            X509v3 Authority Key Identifier:

                keyid:9A:83:29:13:29:D9:62:83:CB:41:D4:75:2E:52:A1:66:38:3C:90:11

 

            X509v3 Key Usage: critical

                Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement

            Netscape Cert Type:

                SSL Server

            X509v3 Subject Alternative Name:

                DNS:docm.com

            X509v3 Subject Key Identifier:

                3C:76:95:9B:DD:C2:7F:5F:98:83:B7:C7:A0:F8:99:1E:4B:D7:2F:26

            X509v3 CRL Distribution Points:

 

                Full Name:

                  URI:http://s03130.ccc.sec.com:447/ssl.crl

 

    Signature Algorithm: sha1WithRSAEncryption

        61:2d:79:c7:49:16:e3:be:25:bb:8b:70:37:31:32:e5:d3:e3:

        31:2c:2d:c1:f9:bf:50:ad:35:4b:c1:90:8c:65:79:b6:5f:59:

        36:24:c7:14:63:44:17:1e:e4:cf:10:69:fc:93:e9:70:53:3c:

        85:aa:40:7e:b5:47:75:0f:f0:b2:da:b4:a5:50:dd:06:4a:d5:

        17:a5:ca:20:19:2c:e9:78:02:bd:19:77:da:07:1a:42:df:72:

        ad:07:7d:e5:16:d6:75:eb:6e:06:58:ee:76:31:63:db:96:a2:

        ad:83:b6:bb:ba:4b:79:59:9d:59:6c:77:59:5b:d9:07:33:a8:

        f0:a5

Related commands

·          pki domain

·          pki retrieve-certificate

display pki certificate renew-status

Use display pki certificate renew-status to display the certificate renewal status for a PKI domain.

Syntax

display pki certificate renew-status [ domain domain-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 56. If you do not specify a domain name, this command displays the certificate renewal status for all PKI domains.

Table 56 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Examples

# Display the certificate renewal status for all PKI domains.

<Sysname> display pki certificate renew-status

Domain Name: domain1

Renew Time : 03:12:05 2016-06-13

Renew public key:

  Key type: RSA

  Time when key pair created: 15:40:48 2015/05/12

  Key code:

    30819F300D06092A864886F70D010101050003818D0030818902818100DAA4AAFEFE04C2C9

    667269BB8226E26331E30F41A8FF922C7338208097E84332610632B49F75DABF6D871B80CE

    C1BA2B75020077C74745C933E2F390DC0B39D35B88283D700A163BB309B19F8F87216A44AB

    FBF6A3D64DEB33E5CEBF2BCF26296778A26A84F4F4C5DBF8B656ACFA62CD96863474899BC1

    2DA4C04EF5AE0835090203010001

The command output indicates that the reuse-public-key keyword was not configured for PKI domain domain1 and a new key pair was created for the new certificate.

# Display the certificate renewal status for PKI domain domain1.

<Sysname> display pki certificate renew-status domain domain1

Domain Name: domain1

Renew Time : 03:12:05 2016-06-13

Renew public key:

  Key type: RSA

  Time when  key pair created: 15:40:48 2016-06-13

  Key code:

    30819F300D06092A864886F70D010101050003818D0030818902818100DAA4AAFEFE04C2C9

    667269BB8226E26331E30F41A8FF922C7338208097E84332610632B49F75DABF6D871B80CE

    C1BA2B75020077C74745C933E2F390DC0B39D35B88283D700A163BB309B19F8F87216A44AB

    FBF6A3D64DEB33E5CEBF2BCF26296778A26A84F4F4C5DBF8B656ACFA62CD96863474899BC1

    2DA4C04EF5AE0835090203010001

Table 57 Command output

Field

Description

Renew Time

Time when a new certificate will be requested.

Renew public key

Information about the new key pair created for the certificate.

The renew public key information is displayed only if the certificate renewal process is slow or has failed.

Key type

Key pair type, which can be RSA, DSA, or ECDSA.

Time when key pair created

Time when the key pair was created.

Key code

Public key data.

 

Related commands

certificate request mode

pki domain

display pki certificate request-status

Use display pki certificate request-status to display certificate request status.

Syntax

display pki certificate request-status [ domain domain-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 58.

Table 58 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Usage guidelines

If you do not specify a PKI domain, this command displays the status of all certificate requests.

Examples

# Display certificate request status for the PKI domain aaa.

<Sysname> display pki certificate request-status domain aaa

Certificate Request Transaction 1

    Domain name: aaa

    Status: Pending

    Key usage: General

    Remain polling attempts: 10

    Next polling attempt after : 1191 seconds

# Display certificate request statuses for all PKI domains.

<Sysname> display pki certificate request-status

Certificate Request Transaction 1

    Domain name: domain1

    Status: Pending

    Key usage: General

    Remain polling attempts: 10

    Next polling attempt after : 1191 seconds

Certificate Request Transaction 2

    Domain name: domain2

    Status: Pending

    Key usage: Signature

    Remain polling attempts: 10

    Next polling attempt after : 188 seconds

Table 59 Command output

Field

Description

Certificate Request Transaction number

Certificate request transaction number, starting from 1.

Status

Certificate request status, including only the pending status.

Key usage

Certificate purposes:

·         GeneralSignature and encryption.

·         Signature—Signature only.

·         Encryption—Encryption only.

Remain polling attempts

Remaining number of attempts to query certificate request status.

Next polling attempt after

Remaining seconds before the next request status polling.

 

Related commands

·          certificate request polling

·          pki domain

·          pki retrieve-certificate

display pki crl domain

Use display pki crl domain to display information about the locally saved CRLs.

Syntax

display pki crl domain domain-name

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 60.

Table 60 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Usage guidelines

Use this command to check whether a certificate has been revoked.

Examples

# Display information about the CRL saved at the local for PKI domain aaa.

<Sysname> display pki crl domain aaa

Certificate Revocation List (CRL):

        Version 2 (0x1)

        Signature Algorithm: sha1WithRSAEncryption

        Issuer: /C=cn/O=docm/OU=sec/CN=therootca

        Last Update: Apr 28 01:42:13 2011 GMT

        Next Update: NONE

        CRL extensions:

            X509v3 CRL Number:

                6

            X509v3 Authority Key Identifier:

                keyid:49:25:DB:07:3A:C4:8A:C2:B5:A0:64:A5:F1:54:93:69:14:51:11:EF

 

Revoked Certificates:

    Serial Number: CDE626BF7A44A727B25F9CD81475C004

        Revocation Date: Apr 28 01:37:52 2011 GMT

        CRL entry extensions:

            Invalidity Date:

                Apr 28 01:37:49 2011 GMT

    Serial Number: FCADFA81E1F56F43D3F2D3EF7EB56DE5

        Revocation Date: Apr 28 01:33:28 2011 GMT

        CRL entry extensions:

            Invalidity Date:

                Apr 28 01:33:09 2011 GMT

    Signature Algorithm: sha1WithRSAEncryption

        57:ac:00:3e:1e:e2:5f:59:62:04:05:9b:c7:61:58:2a:df:a4:

        5c:e5:c0:14:af:c8:e7:de:cf:2a:0a:31:7d:32:da:be:cd:6a:

        36:b5:83:e8:95:06:bd:b4:c0:36:fe:91:7c:77:d9:00:0f:9e:

        99:03:65:9e:0c:9c:16:22:ef:4a:40:ec:59:40:60:53:4a:fc:

        8e:47:57:23:e0:75:0a:a4:1c:0e:2f:3d:e0:b2:87:4d:61:8a:

        4a:cb:cb:37:af:51:bd:53:78:76:a1:16:3d:0b:89:01:91:61:

        52:d0:6f:5c:09:59:15:be:b8:68:65:0c:5d:1b:a1:f8:42:04:

        ba:aa

Table 61 Command output

Field

Description

Version

CRL version number.

Signature Algorithm

Signature algorithm used by the CA to sign the CRL.

Issuer

Name of the CA that issued the CRL.

Last Update

Most recent CRL update time.

Next Update

Next CRL update time.

X509v3 Authority Key Identifier

X509v3 ID of the CA that issues the CRL.

keyid

Key ID.

This field identifies the key pair used to sign the CRL.

Signature Algorithm:

Signature algorithm and signature data.

 

Related commands

pki retrieve-crl

fqdn

Use fqdn to set the FQDN of an entity.

Use undo fqdn to restore the default.

Syntax

fqdn fqdn-name-string

undo fqdn

Default

No FQDN is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

fqdn-name-string: Specifies an FQDN, a case-sensitive string of 1 to 255 characters in the format hostname@domainname.

Usage guidelines

An FQDN uniquely identifies a PKI entity on a network.

Examples

# Set the FQDN to pki.domain-name.com for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] fqdn abc@pki.domain.com

ip

Use ip to assign an IP address to a PKI entity.

Use undo ip to restore the default.

Syntax

ip { ip-address | interface interface-type interface-number }

undo ip

Default

No IP address is assigned to the PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

ip-address: Specifies an IP address.

interface interface-type interface-number: Specifies an interface by its type and number. The primary IPv4 address of the interface will be used as the IP address of the PKI entity.

Usage guidelines

Use this command to assign an IP address to a PKI entity or specify an interface whose primary IP address will be used as the IP address for the PKI entity. If you specify an interface, make sure the interface has an IP address before the PKI entity requests a certificate.

Examples

# Assign IP address 192.168.0.2 to PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] ip 192.168.0.2

ldap-server

Use ldap-server to specify an LDAP server for a PKI domain.

Use undo ldap-server to restore the default.

Syntax

ldap-server host hostname [ port port-number ]

undo ldap-server

Default

No LDAP server is specified for a domain.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

host hostname: Specifies an LDAP server by its IPv4 address, IPv6 address, or domain name. The domain name is a case-sensitive string of 1 to 255 characters.

port port-number: Specifies the port number of the LDAP server. The value range is 1 to 65535, and the default is 389.

Usage guidelines

You must specify an LDAP server for a PKI domain in the following situations:

·          An LDAP URL is specified in the PKI domain (by using the crl url command).

·          The specified LDAP URL does not contain the IP address or host name of the LDAP server.

You can specify only one LDAP server for a PKI domain. If you configure this command multiple times, the most recent configuration takes effect.

Examples

# Specify LDAP server 10.0.0.1 for PKI domain aaa.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] ldap-server host 10.0.0.1

# Specify LDAP server 10.0.0.11 and set the port number to 333.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] ldap-server host 10.0.0.11 port 333

Related commands

·          pki retrieve-certificate

·          pki retrieve-crl

locality

Use locality to set the locality of a PKI entity.

Use undo locality to restore the default.

Syntax

locality locality-name

undo locality

Default

No locality is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

locality-name: Specifies a locality, a case-sensitive string of 1 to 63 characters. No comma can be included. You can set a city name as the locality.

Examples

# Set the locality to pukras for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] locality pukras

organization

Use organization to set an organization name for a PKI entity.

Use undo organization to restore the default.

Syntax

organization org-name

undo organization

Default

No organization name is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

org-name: Specifies an organization name, a case-sensitive string of 1 to 63 characters. No comma can be included.

Examples

# Set the organization name to abc for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] organization abc

organization-unit

Use organization-unit to set an organization unit name for a PKI entity.

Use undo organization-unit to restore the default.

Syntax

organization-unit org-unit-name

undo organization-unit

Default

No organization unit name is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

org-unit-name: Specifies an organization unit name, a case-sensitive string of 1 to 63 characters. No comma can be included.

Examples

# Set the organization unit name to rdtest for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] organization-unit rdtest

pki abort-certificate-request

Use pki abort-certificate-request to abort the certificate request for a PKI domain.

Syntax

pki abort-certificate-request domain domain-name

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 62.

Table 62 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Usage guidelines

You can abort a certificate request and change some parameters, such as common name, country code, or FQDN, in the certificate request before the CA issues the certificate. Use the display pki certificate request-status command to display the certificate request status.

Examples

# Abort the certificate request for the PKI domain 1.

<Sysname> system-view

[Sysname] pki abort-certificate- request domain 1

The certificate request is in process.

Confirm to abort it? [Y/N]:y

Related commands

·          display pki certificate request-status

·          pki request-certificate domain

pki certificate access-control-policy

Use pki certificate access-control-policy to create a certificate-based access control policy and enter its view.

Use undo pki certificate access-control-policy to remove a certificate-based access control policy.

Syntax

pki certificate access-control-policy policy-name

undo pki certificate access-control-policy policy-name

Default

No certificate-based access control policies exist.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies a policy name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

Certificate-based access control policies allow you to authorize access to a device (for example, an HTTPS server) based on the attributes of an authenticated client's certificate.

A certificate-based access control policy is a set of access control rules (permit or deny statements), each associated with a certificate attribute group. A certificate attribute group contains multiple attribute rules, each defining a matching criterion for an attribute in the certificate issuer name, subject name, or alternative subject name field.

If a certificate matches all attribute rules in a certificate attribute group associated with an access control rule, the system determines that the certificate matches the access control rule. In this scenario, the match process stops, and the system performs the access control action defined in the access control rule.

Examples

# Create a certificate-based access control policy named mypolicy and enter its view.

<Sysname> system-view

[Sysname] pki certificate access-control-policy mypolicy

[Sysname-pki-cert-acp-mypolicy]

Related commands

·          display pki certificate access-control-policy

·          rule

pki certificate attribute-group

Use pki certificate attribute-group to create a certificate attribute group and enter its view.

Use undo pki certificate attribute-group to remove a certificate attribute group.

Syntax

pki certificate attribute-group group-name

undo pki certificate attribute-group group-name

Default

No certificate attribute groups exist.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies a group name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

A certificate attribute group is a set of attribute rules configured by using the attribute command. Each attribute rule defines a matching criterion for an attribute in the issuer name, subject name, or alternative subject name field of certificates.

A certificate attribute group must be associated with an access control rule (a permit or deny statement configured by using the rule command). If a certificate attribute group does not have any attribute rules, the system determines that the all certificates match the associated access control rule.

Examples

# Create a certificate attribute group named mygroup and enter its view.

<Sysname> system-view

[Sysname] pki certificate attribute-group mygroup

[Sysname-pki-cert-attribute-group-mygroup]

Related commands

·          attribute

·          display pki certificate attribute-group

·          rule

pki delete-certificate

Use pki delete-certificate to remove certificates from a PKI domain.

Syntax

pki delete-certificate domain domain-name { ca | local | peer [ serial serial-num ] }

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 63.

Table 63 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

ca: Specifies the CA certificate.

local: Specifies the local certificates.

peer: Specifies the peer certificates.

serial serial-num: Specifies a peer certificate by its serial number, a case-insensitive string of 1 to 127 characters. If you do not specify a serial number, this command removes all peer certificates in the PKI domain.

Usage guidelines

When you remove the CA certificate in a PKI domain, the system also removes the local certificates, peer certificates, and the CRL in the PKI domain.

Examples

# Remove the CA certificate in PKI domain aaa.

<Sysname> system-view

[Sysname] pki delete-certificate domain aaa ca

Local certificates, peer certificates and CRL will also be deleted while deleting the CA certificate.

Confirm to delete the CA certificate? [Y/N]:y

[Sysname]

# Remove the local certificates in PKI domain aaa.

<Sysname> system-view

[Sysname] pki delete-certificate domain aaa local

[Sysname]

# Remove all peer certificates in PKI domain aaa.

<Sysname> system-view

[Sysname] pki delete-certificate domain aaa peer

[Sysname]

# Display information about all peer certificates in PKI domain aaa, and remove a peer certificate with the specified serial number.

<Sysname> system-view

[Sysname] display pki certificate domain aaa peer

Total peer certificates: 1

 

Serial Number: 9a0337eb2156ba1f5476e4d754a5a9f7

Subject  Name: CN=abc

[Sysname] pki delete-certificate domain aaa peer serial 9a0337eb2156ba1f5476e4d754a5a9f7

Related commands

display pki certificate

pki domain

Use pki domain to create a PKI domain and enter its view.

Use undo pki domain to remove a PKI domain.

Syntax

pki domain domain-name

undo pki domain domain-name

Default

No PKI domain exists.

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 64.

Table 64 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Usage guidelines

When you remove a PKI domain, the certificates and the CRL in the domain are also removed.

Examples

# Create a PKI domain named aaa and enter its view.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa]

pki entity

Use pki entity to create a PKI entity and enter its view.

Use undo pki entity to remove a PKI entity.

Syntax

pki entity entity-name

undo pki entity entity-name

Default

No PKI entities exist.

Views

System view

Predefined user roles

network-admin

Parameters

entity-name: Specifies a name for a PKI entity, a case-insensitive string of 1 to 31 characters.

Usage guidelines

A PKI entity includes the identity information that can be used by a CA to identify a certificate applicant. You can configure multiple attributes for a PKI entity, such as common name, organization, organization unit, locality, state, country, FQDN, and IP address. The information will be included as subject contents in the certificate issued by the CA.

Examples

# Create a PKI entity named en and enter its view.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en]

Related commands

pki domain

pki export

Use pki export to export the CA certificate and the local certificates in a PKI domain to local files or a terminal.

Syntax

pki export domain domain-name der { all | ca | local } filename filename

pki export domain domain-name p12 { all | local } passphrase p12-key filename filename

pki export domain domain-name pem { { all | local } [ { 3des-cbc | aes-128-cbc | aes-192-cbc | aes-256-cbc | des-cbc } pem-key ] | ca } [ filename filename ]

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 65.

Table 65 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

der: Specifies the certificate file format as DER, which includes PKCS#7.

p12: Specifies the certificate file format as PKCS#12.

pem: Specifies the certificate file format as PEM.

all: Specifies both CA and local certificates. The RA certificate is excluded.

ca: Specifies the CA certificate.

local: Specifies the local certificates or the local certificates and their private keys.

passphrase p12-key: Specifies a password for encrypting the private key of a local PKCS12 certificate.

3des-cbc: Specifies 3DES_CBC for encrypting the private key of a local certificate.

aes-128-cbc: Specifies 128-bit AES_CBC for encrypting the private key of a local certificate.

aes-192-cbc: Specifies 192-bit AES_CBC for encrypting the private key of a local certificate.

aes-256-cbc: Specifies 256-bit AES_CBC for encrypting the private key of a local certificate.

des-cbc: Specifies DES_CBC for encrypting the private key of a local certificate.

pem-key: Specifies a password for encrypting the private key of a local certificate in PEM format.

filename filename: Specifies a file name for storing a certificate. The file name is a case-insensitive string. If you do not specify a file name for the certificates in PEM format, this command displays the certificates on the terminal.

Usage guidelines

When you export the CA certificate, the following conditions might exist:

·          If the PKI domain has only one CA certificate, this command exports the CA certificate to a file or displays it on the terminal.

·          If the PKI domain has a CA certificate chain, this command exports the certificate chain to a file or displays it on the terminal.

When you export the local certificates, the local file names might not be the same as specified in the command. The file names depend on the usage of the key pairs in the certificates. In the following description, the filename is the specified file name in the command.

·          If the key pair of the local certificate is for signing, the local file name is filename-sign.

·          If the key pair of the local certificate is for encryption, the local file name is filename-encr.

·          If the key pair of the local certificate is for general use (RSA, ECDSA, or DSA), the local file name is filename.

If the PKI domain has two local certificates, one of the following results occurs:

·          If you specify a file name, the local certificates are exported to two different files.

·          If you do not specify a file name, the local certificates are displayed on the terminal, separated by the system prompts.

When you export all certificates, the following conditions might exist:

·          If the PKI domain has only the CA certificate or local certificates, the result is the same as when you export the CA certificate or local certificates separately.

·          If the PKI domain has both the CA certificate and the local certificates, you get the following results:

?  If you specify a file name, each local certificate with its associated CA certificate chain is exported to a separate file.

?  If you do not specify a file name, all local certificates and the CA certificate or the CA certificate chain are displayed on the terminal, separated by system prompts.

When you export all certificates in PKCS12 format, the PKI domain must have a local certificate. Otherwise, the export operation fails.

When you export the local certificates or all certificates in PEM format, you must specify the cryptographic algorithm and the challenge password for the private key. Otherwise, this command does not export the private keys of the local certificates. If you specify the cryptographic algorithm and the password, and the local certificates have their private keys, this command can export the local certificates with their private keys. If the local certificates do not have their private keys, the export operation fails.

When you export the local certificates, if the key pair in the PKI domain is changed and no longer matches the key in the local certificates, the export operation fails.

When you export the local certificates or all certificates, if the PKI domain has two local certificates, failure of exporting one local certificate does not affect export of the other.

The specified file name can contain an absolute path. If the specified path does not exist, the export operation fails.

Examples

# Export the CA certificate in the PKI domain to a file named cert-ca.der in DER format.

<Sysname> system-view

[Sysname] pki export domain domain1 der ca filename cert-ca.der

# Export the local certificates in the PKI domain to a file named cert-lo.der in DER format.

<Sysname> system-view

[Sysname] pki export domain domain1 der local filename cert-lo.der

# Export all certificates in the PKI domain to a file named cert-all.p7b in DER format.

<Sysname> system-view

[Sysname] pki export domain domain1 der all filename cert-all.p7b

# Export the CA certificate in the PKI domain to a file named cacert in PEM format.

<Sysname> system-view

[Sysname] pki export domain domain1 pem ca filename cacert

# Export the local certificates and their private keys in the PKI domain to a file named local.pem in PEM format. For the private keys, the cryptographic algorithm is DES_CBC and the password is 111.

<Sysname> system-view

[Sysname] pki export domain domain1 pem local des-cbc 111 filename local.pem

# Export the all certificates in the PKI domain to a file named all.pem in PEM format. No cryptographic algorithm or password is specified, and the private keys are not exported.

<Sysname> system-view

[Sysname] pki export domain domain1 pem all filename all.pem

# Display the local certificates and their private keys in the PKI domain on the terminal in PEM format. For the private keys, the cryptographic algorithm is DES_CBC and the password is 111.

<Sysname> system-view

[Sysname] pki export domain domain1 pem local des-cbc 111

 

%The signature usage local certificate:

Bag Attributes

    friendlyName:

    localKeyID: 99 0B C2 3B 8B D1 E4 33 42 2B 31 C3 37 C0 1D DF 0D 79 09 1D

subject=/C=CN/O=OpenCA Labs/OU=Users/CN=chktest chktest

issuer=/C=CN/O=OpenCA Labs/OU=software/CN=abcd

-----BEGIN CERTIFICATE-----

MIIEqjCCA5KgAwIBAgILAOhID4rI04kBfYgwDQYJKoZIhvcNAQELBQAwRTELMAkG

A1UEBhMCQ04xFDASBgNVBAoMC09wZW5DQSBMYWJzMREwDwYDVQQLDAhzb2Z0d2Fy

ZTENMAsGA1UEAwwEYWJjZDAeFw0xMTA0MjYxMzMxMjlaFw0xMjA0MjUxMzMxMjla

ME0xCzAJBgNVBAYTAkNOMRQwEgYDVQQKDAtPcGVuQ0EgTGFiczEOMAwGA1UECwwF

VXNlcnMxGDAWBgNVBAMMD2Noa3Rlc3QgY2hrdGVzdDCBnzANBgkqhkiG9w0BAQEF

AAOBjQAwgYkCgYEA54rUZ0Ux2kApceE4ATpQ437CU6ovuHS5eJKZyky8fhMoTHhE

jE2KfBQIzOZSgo2mdgpkccjr9Ek6IUC03ed1lPn0IG/YaAl4Tjgkiv+w1NrlSvAy

cnPaSUko2QbO9sg3ycye1zqpbbqj775ulGpcXyXYD9OY63/Cp5+DRQ92zGsCAwEA

AaOCAhUwggIRMAkGA1UdEwQCMAAwUAYDVR0gBEkwRzAGBgQqAwMEMAYGBCoDAwUw

NQYEKgMDBjAtMCsGCCsGAQUFBwIBFh9odHRwczovL3RpdGFuL3BraS9wdWIvY3Bz

L2Jhc2ljMBEGCWCGSAGG+EIBAQQEAwIFoDALBgNVHQ8EBAMCBsAwKQYDVR0lBCIw

IAYIKwYBBQUHAwIGCCsGAQUFBwMEBgorBgEEAYI3FAICMC4GCWCGSAGG+EIBDQQh

Fh9Vc2VyIENlcnRpZmljYXRlIG9mIE9wZW5DQSBMYWJzMB0GA1UdDgQWBBTPw8FY

ut7Xr2Ct/23zU/ybgU9dQjAfBgNVHSMEGDAWgBQzEQ58yIC54wxodp6JzZvn/gx0

CDAaBgNVHREEEzARgQ9jaGt0ZXN0QGgzYy5jb20wGQYDVR0SBBIwEIEOcGtpQG9w

ZW5jYS5vcmcwgYEGCCsGAQUFBwEBBHUwczAyBggrBgEFBQcwAoYmaHR0cDovL3Rp

dGFuL3BraS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwHgYIKwYBBQUHMAGGEmh0dHA6

Ly90aXRhbjoyNTYwLzAdBggrBgEFBQcwDIYRaHR0cDovL3RpdGFuOjgzMC8wPAYD

VR0fBDUwMzAxoC+gLYYraHR0cDovLzE5Mi4xNjguNDAuMTI4L3BraS9wdWIvY3Js

L2NhY3JsLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAGcMeSpBJiuRmsJW0iZK5nygB

tgD8c0b+n4v/F36sJjY1fRFSr4gPLIxZhPWhTrqsCd+QMELRCDNHDxvt3/1NEG12

X6BVjLcKXKH/EQe0fnwK+7PegAJ15P56xDeACHz2oysvNQ0Ot6hGylMqaZ8pKUKv

UDS8c+HgIBrhmxvXztI08N1imYHq27Wy9j6NpSS60mMFmI5whzCWfTSHzqlT2DNd

no0id18SZidApfCZL8zoMWEFI163JZSarv+H5Kbb063dxXfbsqX9Noxggh0gD8dK

7X7/rTJuuhTWVof5gxSUJp+aCCdvSKg0lvJY+tJeXoaznrINVw3SuXJ+Ax8GEw==

-----END CERTIFICATE-----

Bag Attributes

    friendlyName:

    localKeyID: 99 0B C2 3B 8B D1 E4 33 42 2B 31 C3 37 C0 1D DF 0D 79 09 1D

Key Attributes: <No Attributes>

-----BEGIN ENCRYPTED PRIVATE KEY-----

MIICwzA9BgkqhkiG9w0BBQ0wMDAbBgkqhkiG9w0BBQwwDgQIAbfcE+KoYYoCAggA

MBEGBSsOAwIHBAjB+UsJM07JRQSCAoABqtASbjGTQbdxL3n4wNHmyWLxbvL9v27C

Uu6MjYJDCipVzxHU0rExgn+6cQsK5uK99FPBmy4q9/nnyrooTX8BVlXAjenvgyii

WQLwnIg1IuM8j2aPkQ3wbae1+0RACjSLy1u/PCl5sp6CDxI0b9xz6cxIGxKvUOCc

/gxdgk97XZSW/0qnOSZkhgeqBZuxq6Va8iRyho7RCStVxQaeiAZpq/WoZbcS5CKI

/WXEBQd4AX2UxN0Ld/On7Wc6KFToixROTxWTtf8SEsKGPDfrEKq3fSTW1xokB8nM

bkRtU+fUiY27V/mr1RHO6+yEr+/wGGClBy5YDoD4I9xPkGUkmqx+kfYbMo4yxkSi

JdL+X3uEjHnQ/rvnPSKBEU/URwXHxMX9CdCTSqh/SajnrGuB/E4JhOEnS/H9dIM+

DN6iz1IwPFklbcK9KMGwV1bosymXmuEbYCYmSmhZb5FnR/RIyE804Jz9ifin3g0Q

ZrykfG7LHL7Ga4nh0hpEeEDiHGEMcQU+g0EtfpOLTI8cMJf7kdNWDnI0AYCvBAAM

3CY3BElDVjJq3ioyHSJca8C+3lzcueuAF+lO7Y4Zluq3dqWeuJjE+/1BZJbMmaQA

X6NmXKNzmtTPcMtojf+n3+uju0le0d0QYXQz/wPsV+9IYRYasjzoXE5dhZ5sIPOd

u9x9hhp5Ns23bwyNP135qTNjx9i/CZMKvLKywm3Yg+Bgg8Df4bBrFrsH1U0ifmmp

ir2+OuhlC+GbHOxWNeBCa8iAq91k6FGFJ0OLA2oIvhCnh45tM7BjjKTHk+RZdMiA

0TKSWuOyihrwxdUEWh999GKUpkwDHLZJFd21z/kWspqThodEx8ea

-----END ENCRYPTED PRIVATE KEY-----

# Display all certificates in the PKI domain in PEM format. For the private keys, the cryptographic algorithm is DES_CBC and the password is 111.

<Sysname> system-view

[Sysname] pki export domain domain1 pem all des-cbc 111

 

 %The signature usage local certificate:

Bag Attributes

    friendlyName:

    localKeyID: 99 0B C2 3B 8B D1 E4 33 42 2B 31 C3 37 C0 1D DF 0D 79 09 1D

subject=/C=CN/O=OpenCA Labs/OU=Users/CN=chktest chktest

issuer=/C=CN/O=OpenCA Labs/OU=software/CN=abcd

-----BEGIN CERTIFICATE-----

MIIEqjCCA5KgAwIBAgILAOhID4rI04kBfYgwDQYJKoZIhvcNAQELBQAwRTELMAkG

A1UEBhMCQ04xFDASBgNVBAoMC09wZW5DQSBMYWJzMREwDwYDVQQLDAhzb2Z0d2Fy

ZTENMAsGA1UEAwwEYWJjZDAeFw0xMTA0MjYxMzMxMjlaFw0xMjA0MjUxMzMxMjla

ME0xCzAJBgNVBAYTAkNOMRQwEgYDVQQKDAtPcGVuQ0EgTGFiczEOMAwGA1UECwwF

VXNlcnMxGDAWBgNVBAMMD2Noa3Rlc3QgY2hrdGVzdDCBnzANBgkqhkiG9w0BAQEF

AAOBjQAwgYkCgYEA54rUZ0Ux2kApceE4ATpQ437CU6ovuHS5eJKZyky8fhMoTHhE

jE2KfBQIzOZSgo2mdgpkccjr9Ek6IUC03ed1lPn0IG/YaAl4Tjgkiv+w1NrlSvAy

cnPaSUko2QbO9sg3ycye1zqpbbqj775ulGpcXyXYD9OY63/Cp5+DRQ92zGsCAwEA

AaOCAhUwggIRMAkGA1UdEwQCMAAwUAYDVR0gBEkwRzAGBgQqAwMEMAYGBCoDAwUw

NQYEKgMDBjAtMCsGCCsGAQUFBwIBFh9odHRwczovL3RpdGFuL3BraS9wdWIvY3Bz

L2Jhc2ljMBEGCWCGSAGG+EIBAQQEAwIFoDALBgNVHQ8EBAMCBsAwKQYDVR0lBCIw

IAYIKwYBBQUHAwIGCCsGAQUFBwMEBgorBgEEAYI3FAICMC4GCWCGSAGG+EIBDQQh

Fh9Vc2VyIENlcnRpZmljYXRlIG9mIE9wZW5DQSBMYWJzMB0GA1UdDgQWBBTPw8FY

ut7Xr2Ct/23zU/ybgU9dQjAfBgNVHSMEGDAWgBQzEQ58yIC54wxodp6JzZvn/gx0

CDAaBgNVHREEEzARgQ9jaGt0ZXN0QGgzYy5jb20wGQYDVR0SBBIwEIEOcGtpQG9w

ZW5jYS5vcmcwgYEGCCsGAQUFBwEBBHUwczAyBggrBgEFBQcwAoYmaHR0cDovL3Rp

dGFuL3BraS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwHgYIKwYBBQUHMAGGEmh0dHA6

Ly90aXRhbjoyNTYwLzAdBggrBgEFBQcwDIYRaHR0cDovL3RpdGFuOjgzMC8wPAYD

VR0fBDUwMzAxoC+gLYYraHR0cDovLzE5Mi4xNjguNDAuMTI4L3BraS9wdWIvY3Js

L2NhY3JsLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAGcMeSpBJiuRmsJW0iZK5nygB

tgD8c0b+n4v/F36sJjY1fRFSr4gPLIxZhPWhTrqsCd+QMELRCDNHDxvt3/1NEG12

X6BVjLcKXKH/EQe0fnwK+7PegAJ15P56xDeACHz2oysvNQ0Ot6hGylMqaZ8pKUKv

UDS8c+HgIBrhmxvXztI08N1imYHq27Wy9j6NpSS60mMFmI5whzCWfTSHzqlT2DNd

no0id18SZidApfCZL8zoMWEFI163JZSarv+H5Kbb063dxXfbsqX9Noxggh0gD8dK

7X7/rTJuuhTWVof5gxSUJp+aCCdvSKg0lvJY+tJeXoaznrINVw3SuXJ+Ax8GEw==

-----END CERTIFICATE-----

Bag Attributes: <No Attributes>

subject=/C=CN/O=OpenCA Labs/OU=software/CN=abcd

issuer=/C=CN/O=OpenCA Labs/OU=software/CN=abcd

-----BEGIN CERTIFICATE-----

MIIEYTCCA0mgAwIBAgIBFzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDTjEU

MBIGA1UECgwLT3BlbkNBIExhYnMxETAPBgNVBAsMCHNvZnR3YXJlMQ0wCwYDVQQD

DARhYmNkMB4XDTExMDQxODExNDQ0N1oXDTEzMDQxNzExNDQ0N1owRTELMAkGA1UE

BhMCQ04xFDASBgNVBAoMC09wZW5DQSBMYWJzMREwDwYDVQQLDAhzb2Z0d2FyZTEN

MAsGA1UEAwwEYWJjZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1g

vomMF8S4u6q51bOwjKFUBwxyvOy4D897LmOSedaCyDt6Lvp+PBEHfwWBYBpsHhk7

kmnSNhX5dZ6NxunHaARZ2VlcctsYKyvAQapuaThy1tuOcphAB+jQQL9dPoqdk0xp

jvmPDlW+k832Konn9U4dIivS0n+/KMGh0g5UyzHGqUUOo7s9qFuQf5EjQon40TZg

BwUnFYRlvGe7bSQpXjwi8LTyxHPy+dDVjO5CP+rXx5IiToFy1YGWewkyn/WeswDf

Yx7ZludNus5vKWTihgx2Qalgb+sqUMwI/WUET7ghO2dRxPUdUbgIYF0saTndKPYd

4oBgl6M0SMsHhe9nF5UCAwEAAaOCAVowggFWMA8GA1UdEwEB/wQFMAMBAf8wCwYD

VR0PBAQDAgEGMB0GA1UdDgQWBBQzEQ58yIC54wxodp6JzZvn/gx0CDAfBgNVHSME

GDAWgBQzEQ58yIC54wxodp6JzZvn/gx0CDAZBgNVHREEEjAQgQ5wa2lAb3BlbmNh

Lm9yZzAZBgNVHRIEEjAQgQ5wa2lAb3BlbmNhLm9yZzCBgQYIKwYBBQUHAQEEdTBz

MDIGCCsGAQUFBzAChiZodHRwOi8mdcGl0YW4vcGtpL3B1Yi9jYWNlcnQvY2FjZXJ0

LmNydDAeBggrBgEFBQcwAYYSaHR0cDovL3RpdGFuOjI1NjAvMB0GCCsGAQUFBzAM

hhFodHRwOi8mdcGl0YW46ODMwLzA8BgNVHR8ENTAzMDGgL6AthitodHRwOi8vMTky

LjE2OC40MC4xMjgvcGtpL3B1Yi9jcmwvY2FjcmwuY3JsMA0GCSqGSIb3DQEBCwUA

A4IBAQC0q0SSmvQNfa5ELtRKYF62C/Y8QTLbk6lZDTZuIzN15SGKQcbNM970ffCD

Lk1zosyEVE7PLnii3bZ5khcGO3byyXfluAqRyOGVJcudaw7uIQqgv0AJQ+zaQSHi

d4kQf5QWgYkQ55/C5puOmcMRgCbMpR2lYkqXLDjTIAZIHRZ/sTp6c+ie2bFxi/YT

3xYbO0wDMuGOKJJpsyKTKcbG9NdfbDyFgzEYAobyYqAUB3C0/bMfBduwhQWKSoYE

6vZsPGAEisCmAl3dIp49jPgVkixoShraYF1jLsWzJGlzem8QvWYzOqKEDwq3SV0Z

cXK8gzDBcsobcUMkwIYPAmd1kAPX

-----END CERTIFICATE-----

Bag Attributes

    friendlyName:

    localKeyID: 99 0B C2 3B 8B D1 E4 33 42 2B 31 C3 37 C0 1D DF 0D 79 09 1D

Key Attributes: <No Attributes>

-----BEGIN ENCRYPTED PRIVATE KEY-----

MIICwzA9BgkqhkiG9w0BBQ0wMDAbBgkqhkiG9w0BBQwwDgQIcUSKSW9GVmICAggA

MBEGBSsOAwIHBAi5QZM+lSYWPASCAoBKDYulE5f2BXL9ZhI9zWAJpx2cShz/9PsW

5Qm106D+xSj1eAzkx/m4Xb4xRU8oOAuzu1DlWfSHKXoaa0OoRSiOEX1eg0eo/2vv

CHCvKHfTJr4gVSSa7i4I+aQ6AItrI6q99WlkN/e/IE5U1UE4ZhcsIiFJG+IvG7S8

f9liWQ2CImy/hjgFCD9nqSLN8wUzP7O2SdLVlUb5z4FR6VISZdgTFE8j7ko2HtUs

HVSg0nm114EwPtPMMbHefcuQ6b82y1M+dWfVxBN9K03lN4tZNfPWwLSRrPvjUzBG

dKtjf3/IFdV7/tUMy9JJSpt4iFt1h7SZPcOoGp1ZW+YUR30I7YnFE+9Yp/46KWT8

bk7j0STRnZX/xMy/9E52uHkLdW1ET3TXralLMYt/4jg4M0jUvoi3GS2Kbo+czsUn

gKgqwYnxVfRSvt8d6GBYrpF2tMFS9LEyngPKXExd+m4mAryuT5PhdFTkb1B190Lp

UIBjk3IXnr7AdrhvyLkH0UuQE95emXBD/K0HlD73cMrtmogL8F4yS5B2hpIr/v5/

eW35+1QMnJ9FtHFnVsLx9wl9lX8iNfsoBhg6FQ/hNSioN7rNBe7wwIRzxPVfEhO8

5ajQxWlidRn5RkzfUo6HuAcq02QTpSXI6wf2bzsVmr5sk+fRaELD/cwL6VjtXO6x

ZBLJcUyAwvScrOtTEK7Q5n0I34gQd4qcF0D1x9yQ4sqvTeU/7Jkm6XCPV05/5uiF

RLCfFAwaJMBdIQ6jDQHnpWT67uNDwdEzaPmuTVMme5Woc5zsqE5DY3hWu4oqFdDz

kPLnbX74IZ0gOLki9eIJkVswnF5HkBCKS50ejlW6TgbMNZ+JPk2w

-----END ENCRYPTED PRIVATE KEY-----

# Display the CA certificate in the PKI domain in PEM format.

<Sysname> system-view

[Sysname]pki export domain domain1 pem ca

-----BEGIN CERTIFICATE-----

MIIB+TCCAWICEQDMbgjRKygg3vpGFVY6pa3ZMA0GCSqGSIb3DQEBBQUAMD0xCzAJ

BgNVBAYTAmNuMQwwCgYDVQQKEwNoM2MxETAPBgNVBAsTCGgzYy10ZXN0MQ0wCwYD

VQQDEwQ4MDQzMB4XDTExMDMyMjA0NDQyNFoXDTE0MDMyMzA0MzUyNFowPTELMAkG

A1UEBhMCY24xDDAKBgNVBAoTA2gzYzERMA8GA1UECxMIaDNjLXRlc3QxDTALBgNV

BAMTBDgwNDMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOvDAYQhyc++G7h5

eNDzJs22OQjCn/4JqnNKIdKz1BbaJT8/+IueSn9JIsg64Ex2WBeCd/tcmnSW57ag

dCvNIUYXXVOGca2iaSOElqCF4CQfV9zLrBtA7giHD49T+JbxLrrJLmdIQMJ+vYdC

sCxIp3YMAiuCahVLZeXklooqwqIXAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAElm7

W2Lp9Xk4nZVIpVV76CkNe8/C+Id00GCRUUVQFSMvo7Pded76bmYX2KzJSz+DlMqy

TdVrgG9Fp6XTFO80aKJGe6NapsfhJHKS+Q7mL0XpXeMONgK+e3dX7rsDxsY7hF+j

0gwsHrjV7kWvwJvDlhzGW6xbpr4DRmdcao19Cr6o=

-----END CERTIFICATE-----

# Export the CA certificate in the PKI domain to a file named cacert in PEM format.

<Sysname> system-view

[Sysname] pki export domain domain1 pem ca filename cacert

# Display the CA certificate or the CA certificate chain in the PKI domain on the terminal.

<Sysname> system-view

[Sysname]pki export domain domain1 pem ca

-----BEGIN CERTIFICATE-----

MIIB7jCCAVcCEQCdSVShJFEMifVG8zRRoSsWMA0GCSqGSIb3DQEBBQUAMDcxCzAJ

BgNVBAYTAmNuMQwwCgYDVQQKEwNoM2MxDDAKBgNVBAsTA2gzYzEMMAoGA1UEAxMD

YWNhMB4XDTExMDEwNjAyNTc0NFoXDTEzMTIwMTAzMTMyMFowODELMAkGA1UEBhMC

Y24xDDAKBgNVBAoTA2gzYzEMMAoGA1UECxMDaDNjMQ0wCwYDVQQDEwRhYWNhMIGf

MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcuJsWhAJXEDmowGb5z7VDVms54TKi

xnaNJCWvBOrU64ftvpVB7xQekbkjgAS9FjDyXlLQ8IyIsYIp5ebJr8P+n9i9Pl7j

lBx5mi4XeIldyv2OjfNx5oSQ+gWY9/m1R8uv13RS05r3rxPg+7EvKBjmiy0Giddw

vu3Y3WrjBPp6GQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAJrQddzVQEiy4AcgtzUL

ltkmlmWoz87+jUsgFB+H+xeyiZE4sancf2UwH8kXWqZ5AuReFCCBC2fkvvQvUGnV

cso7JXAhfw8sUFok9eHz2R+GSoEk5BZFzZ8eCmNyGq9ln6mJsO1hAqMpsCW6G2zh

5mus7FTHhywXpJ22/fnHg61m

-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----

MIIB8DCCAVkCEQD2PBUx/rvslNw9uTrZB3DlMA0GCSqGSIb3DQEBBQUAMDoxCzAJ

BgNVBAYTAmNuMQwwCgYDVQQKEwNoM2MxDDAKBgNVBAsTA2gzYzEPMA0GA1UEAxMG

cm9mdcGNhMB4XDTExMDEwNjAyNTY1OFoXDTEzMTIwNDAzMTMxMFowNzELMAkGA1UE

BhMCY24xDDAKBgNVBAoTA2gzYzEMMAoGA1UECxMDaDNjMQwwCgYDVQQDEwNhY2Ew

gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOeklR7DpeEV72N1OLz+dydIDTx0

zVZDdPxF1gQYWSfIBwwFKJEyQ/4y8VIfDIm0EGTM4dsOX/QFwudhl/Czkio3dWLh

Q1y5XCJy68vQKrB82WZ2mah5Nuekus3LSZZBoZKTAOY5MCCMFcULM858dtSq15Sh

xF7tKSeAT7ARlJxTAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADJQCo6m0RNup0ewa

ItX4XK/tYcJXAQWMA0IuwaWpr+ofqVVgYBPwVpYglhJDOuIZxKdR2pfQOA4f35wM

Vz6kAujLATsEA1GW9ACUWa5PHwVgJk9BDEXhKSJ2e7odmrg/iROhJjc1NMV3pvIs

CuFiCLxRQcMGhCNHlOn4wuydssc=

-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----

MIIB8jCCAVsCEFxy3MSlQ835MrnBkI/dUPYwDQYJKoZIhvcNAQEFBQAwOjELMAkG

A1UEBhMCY24xDDAKBgNVBAoTA2gzYzEMMAoGA1UECxMDaDNjMQ8wDQYDVQQDEwZy

b290Y2EwHhcNMTEwMTA2MDI1MTQxWhcNMTMxMjA3MDMxMjA1WjA6MQswCQYDVQQG

EwJjbjEMMAoGA1UEChMDaDNjMQwwCgYDVQQLEwNoM2MxDzANBgNVBAMTBnJvb3Rj

YTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxP2XLFE230zq6MhwZvAomOxa

7tc1r4bESXZu3UBKno3Ay9kQm2HrDOAizvZXfLu7Gx22ga2Qdz0lIeZ+EQrYHTyO

pBcejDjal/ZtvgnjXyHFoG8nS+P7n83BkRj/Fu7Yz4zjTKMbCF2EfhEyXxr4NSXA

fhC9qg9S23vNXStmWvsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBtsU7X77sdZ1Nn

0I98lh0qA5g7SEEIpI+pwZjjrH0FVHw01e4JWhHjyHqrOyfXYqe7vH4SXp5MHEqf

14nKIEbexbPONspebtznxv4/xTjd1aM2rfQ95jJ/SN8H8KIyiYZyIs3t5Q+V35x1

cef+NMWgZBzwXOSP0wC9+pC2ZNiIpg==

-----END CERTIFICATE-----

# Export the local certificates and their private keys in the PKI domain to a file named cert-lo.der in PKCS12 format. The password for the private keys is 123.

<Sysname> system-view

[Sysname] pki export domain domain1 p12 local passphrase 123 filename cert-lo.der

# Export all certificates in the PKI domain to a file named cert-all.p7b in PKCS12 format.

<Sysname> system-view

[Sysname] pki export domain domain1 p12 all passphrase 123 filename cert-all.p7b

Related commands

pki domain

pki import

Use pki import to import the CA certificate, local certificates, or peer certificates for a PKI domain.

Syntax

pki import domain domain-name { der { ca | local | peer } filename filename | p12 local filename filename | pem { ca | local | peer } [ filename filename ] }

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 66.

Table 66 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

der: Specifies the DER certificate file format, including PKCS#7.

p12: Specifies the PKCS#12 certificate file format.

pem: Specifies the PEM certificate file format.

ca: Specifies the CA certificate.

local: Specifies the local certificates.

peer: Specifies the peer certificates.

filename filename: Specifies a certificate file name, a case-insensitive string. For a certificate in PEM format, you can also choose to copy and paste the certificate contents on the terminal instead of importing from a file.

Usage guidelines

Use this command to import a certificate in the following situations:

·          The CRL repository is not specified or the CA server does not support SCEP.

·          The certificate is packed with the server generated key pair in a single file. Only certificate files in PKCS12 or PEM format might contain key pairs.

Before you import the certificates, complete the following tasks:

·          Use FTP or TFTP to upload the certificate files to the storage media of the device. If FTP or TFTP is not available, you can import the certificates by copying and pasting the certificate contents through the terminal. In this case, make sure the certificate is in PEM format because only certificates in PEM format can be imported by this means.

·          For the local certificates or peer certificates to be imported, the correct CA certificate chain must exist. The CA certificate chain can be stored on the device, or carried in the local certificates or peer certificates. If the PKI domain, the local certificates, or the peer certificates do not have the CA certificate chain, you must import the CA certificate first. To import a local or peer certificate, a CA certificate chain must exist in the PKI domain, or be carried in the local or peer certificate. If not, obtain it first.

When you import the local certificates or peer certificates:

·          If the local certificates or peer certificates to be imported contain the CA certificate chain, you can import the CA certificate and the local certificates or peer certificates at the same time. If the certificate of the CA that issues the local certificates or peer certificates already exists in a PKI domain, the system displays a prompt to ask you whether to overwrite the existing CA certificate.

·          If the local certificates or peer certificates to be imported do not contain the CA certificate chain, but the certificate of the CA that issues the local certificate or peer certificate already exists in a PKI domain, you can directly import the local certificates or peer certificates.

When you import the CA certificate:

·          If the CA certificate to be imported is the CA root certificate or contains the certificate chain with the root certificate, you can import the CA certificate.

·          If the CA certificate to be imported contains a certificate chain without the root certificate, but can form a complete certificate chain with the CA certificate on the device, you can import the CA certificate. Otherwise, you cannot import it.

Contact the CA server administrator to get the correct information in the following scenarios:

·          If the certificate file to be imported contains the root certificate, but the root certificate and its fingerprint are not specified on the device, the system asks you to confirm the fingerprint.

·          If the local certificate to be imported contains a key pair, the system asks you to enter the challenge password used for encrypting the private key.

When you import a local certificate file that contains a key pair, you can choose to update the domain with the key pair. Depending on the purpose of the key pair, the following conditions apply:

·          If the purpose of the key pair is general, the device uses the key pair to replace the local key pair that is found in this order: general-purpose key pair, signature key pair, and encryption key pair.

·          If the purpose of the key pair is signature, the device uses the key pair to replace the local key pair that is found in this order: general-purpose key pair and signature key pair.

·          If the purpose of the key pair is encryption, the device searches the domain for an encryption key pair.

If a matching key pair is found, the device asks whether you want to overwrite the existing key pair on the device. If no match is found, the device asks you to enter a key pair name (defaulting to the PKI domain name). Then, it generates the key pair according to the key algorithm and the purpose defined in the certificate file.

The import operation automatically updates or generates the correct key pair. When you perform the import operation, be sure to save the configuration file to avoid data loss.

Examples

# Import the CA certificate file rootca_pem.cer in PEM format to the PKI domain aaa. The certificate file contains the root certificate.

<Sysname> system-view

[Sysname] pki import domain aaa pem ca filename rootca_pem.cer

The trusted CA's finger print is:

    MD5  fingerprint:FFFF 3EFF FFFF 37FF FFFF 137B FFFF 7535

    SHA1 fingerprint:FFFF FF7F FF2B FFFF 7618 FF4C FFFF 0A7D FFFF FF69

Is the finger print correct?(Y/N):y

[Sysname]

# Import the CA certificate file aca_pem.cer in PEM format to the PKI domain bbb. The certificate file does not contain the root certificate.

<Sysname> system-view

[Sysname] pki import domain bbb pem ca filename aca_pem.cer

[Sysname]

# Import the local certificate file local-ca.p12 in PKCS12 format to the PKI domain bbb. The certificate file contains a key pair.

<Sysname> system-view

[Sysname] pki import domain bbb p12 local filename local-ca.p12

Please input challenge password:

******

[Sysname]

# Import the local certificate in PEM format to the PKI domain bbb by copying and pasting the contents of the certificate. The certificate contains the key pair and the CA certificate chain.

<Sysname> system-view

[Sysname] pki import domain bbb pem local

Enter PEM-formatted certificate.

End with a Ctrl+c on a line by itself.

Bag Attributes

localKeyID: 01 00 00 00

friendlyName: {F7619D96-3AC2-40D4-B6F3-4EAB73DEED73}

Microsoft CSP Name: Microsoft Enhanced Cryptographic Provider v1.0

Key Attributes

X509v3 Key Usage: 10

-----BEGIN RSA PRIVATE KEY-----

Proc-Type: 4,ENCRYPTED

DEK-Info: DES-EDE3-CBC,8DCE37F0A61A4B8C

 

k9C3KHY5S3EtnF5iQymvHYYrVFy5ZdjSasU5y4XFubjdcvmpFHQteMjD0GKX6+xO

kuKbvpyCnWsPVg56sL/PDRyrRmqLmtUV3bpyQsFXgnc7p+Snj3CG2Ciow9XApybW

Ec1TDCD75yuQckpVQdhguTvoPQXf9zHmiGu5jLkySp2k7ec/Mc97Ef+qqpfnHpQp

GDmMqnFpp59ZzB21OGlbGzlPcsjoT+EGpZg6B1KrPiCyFim95L9dWVwX9sk+U1s2

+8wqac8jETwwM0UZ1NGJ50JJz1QYIzMbcrw+S5WlPxACTIz1cldlBlb1kpc+7mcX

4W+MxFzsL88IJ99T72eu4iUNsy26g0BZMAcc1sJA3A4w9RNhfs9hSG43S3hAh5li

JPp720LfYBlkQHn/MgMCZASWDJ5G0eSXQt9QymHAth4BiT9v7zetnQqf4q8plfd/

Xqd9zEFlBPpoJFtJqXwxHUCKgw6kJeC4CxHvi9ZCJU/upg9IpiguFPoaDOPia+Pm

GbRqSyy55clVde5GOccGN1DZ94DW7AypazgLpBbrkIYAdjFPRmq+zMOdyqsGMTNj

jnheI5l784pNOAKuGi0i/uXmRRcfoMh6qAnK6YZGS7rOLC9CfPmy8fgY+/Sl9d9x

Q00ruO1psxzh9c2YfuaiXFIx0auKl6o5+ZZYn7Rg/xy2Y0awVP+dO925GoAcHO40

cCl6jA/HsGAU9HkpwKHL35lmBDRLEzQeBFcaGwSm1JvRfE4tkJM7+Uz2QHJOfP10

0VLqMgxMlpk3TvBWgzHGJDe7TdzFCDPMPhod8pi4P8gGXmQd01PbyQ==

-----END RSA PRIVATE KEY-----

Bag Attributes

localKeyID: 01 00 00 00

subject=/CN=sldsslserver

issuer=/C=cn/O=ccc/OU=sec/CN=ssl

-----BEGIN CERTIFICATE-----

MIICjzCCAfigAwIBAgIRAJoDN+shVrofVHbk11SlqfcwDQYJKoZIhvcNAQEFBQAw

NzELMAkGA1UEBhMCY24xDDAKBgNVBAoTA2gzYzEMMAoGA1UECxMDc2VjMQwwCgYD

VQQDEwNzc2wwHhcNMTAxMDE1MDEyMzA2WhcNMTIwNzI2MDYzMDU0WjAXMRUwEwYD

VQQDEwxzbGRzc2xzZXJ2ZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMLP

N3aTKV7NDndIOk0PpiikYPgxVih/geMXR3iYaANbcvRX07/FMDINWHJnBAZhCDvp

rFO552loGiPyl0wmFMK12TSL7sHvrxr0OdrFrqtWlbW+DsNGNcFSKZy3RvIngC2k

ZZqBeFPUytP185JUhbOrVaUDlisZi6NNshcIjd2BAgMBAAGjgbowgbcwHwYDVR0j

BBgwFoAUmoMpEynZYoPLQdR1LlKhZjg8kBEwDgYDVR0PAQH/BAQDAgP4MBEGCWCG

SAGG+EIBAQQEAwIGQDASBgNVHREECzAJggdoM2MuY29tMB0GA1UdDgQWBBQ8dpWb

3cJ/X5iDt8eg+JkeS9cvJjA+BgNVHR8ENzA1MDOgMaAvhi1odHRwOi8vczAzMTMw

LmgzYy5odWF3ZWktM2NvbS5jb206NDQ3L3NzbC5jcmwwDQYJKoZIhvcNAQEFBQAD

gYEAYS15x0kW474lu4twNzEy5dPjMSwtwfm/UK01S8GQjGV5tl9ZNiTHFGNEFx7k

zxBp/JPpcFM8hapAfrVHdQ/wstq0pVDdBkrVF6XKIBks6XgCvRl32gcaQt9yrQd9

5RbWdetuBljudjFj25airYO2u7pLeVmdWWx3WVvZBzOo8KU=

-----END CERTIFICATE-----

Bag Attributes: <Empty Attributes>

subject=/C=cn/O=ccc/OU=sec/CN=ssl

issuer=/C=cn/O=ccc/OU=sec/CN=ssl

-----BEGIN CERTIFICATE-----

MIIB7DCCAVUCEG+jJTPxxiE67pl2ff0SnOMwDQYJKoZIhvcNAQEFBQAwNzELMAkG

A1UEBhMCY24xDDAKBgNVBAoTA2gzYzEMMAoGA1UECxMDc2VjMQwwCgYDVQQDEwNz

c2wwHhcNMDkwNzMxMDY0ODQ2WhcNMTIwNzI5MDYyODU4WjA3MQswCQYDVQQGEwJj

bjEMMAoGA1UEChMDaDNjMQwwCgYDVQQLEwNzZWMxDDAKBgNVBAMTA3NzbDCBnzAN

BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAt8QSMetQ70GONiFh7iJkvGQ8nC15zCF1

cqC/RcJhE/88LkKyQcu9j+Tz8Bk9Qj2UPaZdrk8fOrgtBsa7lZ+UO3j3l30q84l+

HjWq8yxVLRQahU3gqJze6pGR2l0s76u6GRyCX/zizGrHKqYlNnxK44NyRZx2klQ2

tKQAfpXCPIkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBWsaMgRbBMtYNrrYCMjY6g

c7PBjvajVOKNUMxaDalePmXfKCxl91+PKM7+i8I/zLcoQO+sHbva26a2/C4sNvoJ

2QZs6GtAOahP6CDqXC5VuNBU6eTKNKjL+mf6uuDeMxrlDNha0iymdrXXVIp5cuIu

fl7xgArs8Ks6aXDXM1o4DQ==

-----END CERTIFICATE-----

 

 

Please input the password:********

Local certificate already exist, confirm to overwrite it? [Y/N]:y

The PKI domain already has a CA certificate. If it is overwritten, local certificates, peer certificates and CRL of this domain will also be deleted.

Overwrite it? [Y/N]:y

The system is going to save the key pair. You must specify a key pair name, which is a case-insensitive string of 1 to 64 characters. Valid characters include a to z, A to Z, 0 to 9, and hyphens (-).

Please enter the key pair name [default name: bbb]:

 

The key pair already exists.

Please enter the key pair name:

import-key

Related commands

·          display pki certificate

·          public-key dsa

·          public-key ecdsa

·          public-key rsa

pki request-certificate

Use pki request-certificate to submit a local certificate request or generate a certificate request in PKCS#10 format.

Syntax

pki request-certificate domain domain-name [ password password ] [ pkcs10 [ filename filename ] ]

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 67.

Table 67 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

password password: Sets the password for certificate revocation, a case-sensitive string of 1 to 31 characters. The password is contained in the certificate request and must be provided if the certificate is revoked.

pkcs10: Displays BASE64-encoded PKCS#10 certificate request information, which can be used to request a certificate by an out-of-band means, like phone, disk, or email.

filename filename: Specifies a local file for saving the certificate request in PKCS#10 format. The filename argument is case-insensitive.

Usage guidelines

If SCEP fails, you can perform one of the following tasks:

·          Use the pkcs10 keyword to print the BASE64-encoded request information.

·          Use the pkcs10 filename filename option to save the request information to a local file and send the file to the CA by an out-of-band means. The specified file name can contain an absolute path. If the specified path does exist, the request information cannot be saved.

This command is not saved in the configuration file.

Examples

# Display information about the certificate request in the PKCS#10 format.

<Sysname> system-view

[Sysname] pki request-certificate domain aaa pkcs10

 

*** Request for general certificate ***

-----BEGIN NEW CERTIFICATE REQUEST-----

MIIBTDCBtgIBADANMQswCQYDVQQDEwJqajCBnzANBgkqhkiG9w0BAQEFAAOBjQAw

gYkCgYEAw5Drj8ofs9THA4ezkDcQPBy8pvH1kumampPsJmx8sGG52NFtbrDTnTT5

ALx3LJijB3d/ndKpcHT/DfbJVDCn5gdw32tBZyCkEwMHZN3ol2z7Nmdcu5TED6iN8

4m+hfp1QWoV6lty3o9pxAXuQl8peUDcfN6WV3LBXYyl1WCtkLkECAwEAAaAAMA0G

CSqGSIb3DQEBBAUAA4GBAA8E7BaIdmT6NVCZgv/I/1tqZH3TS4e4H9Qo5NiCKiEw

R8owVmA0XVtGMbyqBNcDTG0f5NbHrXZQT5+MbFJOnm5K/mn1ro5TJKMTKV46PlCZ

JUjsugaY02GBY0BVcylpC9iIXLuXNIqjh1MBIqVsa1lQOHS7YMvnop6hXAQlkM4c

-----END NEW CERTIFICATE REQUEST-----

# Request the local certificates.

[Sysname] pki request-certificate domain openca

Start to request the general certificate ...

Request certificate of domain openca successfully

Related commands

display pki certificate

pki retrieve-certificate

Use pki retrieve-certificate to obtain a certificate from the certificate distribution server.

Syntax

pki retrieve-certificate domain domain-name { ca | local | peer entity-name }

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 68.

Table 68 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

ca: Specifies the CA certificate.

local: Specifies the local certificates.

peer entity-name: Specifies a peer entity by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

In online mode:

·          You can obtain the CA certificate through the SCEP protocol. If a CA certificate already exists locally, do not obtain the CA certificate again. To obtain a new one, use the pki delete-certificate command to remove the CA certificate and local certificates, and then obtain the CA certificate again.

·          You can obtain local certificates or peer certificates through the LDAP protocol. If a PKI domain already has local certificates or peer certificates, you can still perform the obtain operation and the obtained local certificates or peer certificates overwrite the existing ones. If RSA is used, a PKI domain can have two local certificates, one for signing and the other for encryption. Certificates for different purposes do not overwrite each other.

The obtained CA certificate, local certificates, and peer certificates are automatically verified before they are saved locally. If the verification fails, they are not saved.

This command is not saved in the configuration file.

Examples

# Obtain the CA certificate from the certificate distribution server. (This operation requires the user to confirm the fingerprint of the CA root certificate.)

<Sysname> system-view

[Sysname] pki retrieve-certificate domain aaa ca

The trusted CA's finger print is:

    MD5  fingerprint:5C41 E657 A0D6 ECB4 6BD6 1823 7473 AABC

    SHA1 fingerprint:1616 E7A5 D89A 2A99 9419 1C12 D696 8228 87BC C266

Is the finger print correct?(Y/N):y

# Obtain the local certificates from the certificate distribution server.

<Sysname> system-view

[Sysname] pki retrieve-certificate domain aaa local

# Obtain the certificate of the peer entity en1 from the certificate distribution server.

<Sysname> system-view

[Sysname] pki retrieve-certificate domain aaa peer en1

Related commands

·          display pki certificate

·          pki delete-certificate

pki retrieve-crl

Use pki retrieve-crl to obtain CRLs and save them locally.

Syntax

pki retrieve-crl domain domain-name

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 69.

Table 69 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

Usage guidelines

CRLs are used to verify the validity of the local certificates and the peer certificates in a PKI domain. To obtain CRLs, a PKI domain must have the correct CA certificate.

The URL of the CRL repository is specified by using the crl url command.

The device can obtain CRLs from the CRL repository through the HTTP, LDAP, or SCEP protocol. Which protocol is used depends on the configuration of the CRL repository in the PKI domain:

·          If the specified URL of the CRL repository is in HTTP format, the device obtains CRLs through the HTTP protocol.

·          If the specified URL of the CRL repository is in LDAP format, the device obtains CRLs through the LDAP protocol. If the specified URL does not have a host name, for example, ldap:///CN=8088,OU=test,U=rd,C=cn, you must specify the LDAP server's URL for the PKI domain by using the ldap server command. The device can obtain the complete URL of the LDAP repository by combining the URLs of the LDAP server and of the CRL repository.

·          If the PKI domain is not configured with the CRL repository, the device looks up the local certificates and then the CA certificate for the CRL repository. If a CRL repository is found, the device obtains CRLs from the point. Otherwise, the device obtains CRLs through the SCEP protocol.

Examples

# Obtain CRLs from the CRL repository.

<Sysname> system-view

[Sysname] pki retrieve-crl domain aaa

Related commands

·          crl url

·          ldap server

pki storage

Use pki storage to specify the storage path for the certificates or CRLs.

Use undo pki storage to restore the default.

Syntax

pki storage { certificates | crls } dir-path

undo pki storage { certificates | crls }

Default

Certificates and CRLs are stored in the PKI directory on the storage media of the device. The PKI directory is automatically created when a certificate is successfully requested, obtained, or imported for the first time.

Views

System view

Predefined user roles

network-admin

Parameters

certificates: Specifies a storage path for the certificates.

crls: Specifies a storage path for the CRLs.

dir-path: Specifies a storage path, a case-sensitive string, which cannot start with a slash (/) or contains two dots plus a slash (../). The dir-path argument specifies an absolute path or a relative path, and the path must exist.

Usage guidelines

The specified storage path is a path on the active MPU rather than on other MPUs.

If the path to be specified does not exist, use the mkdir command to create the path before using this command. After you change the storage path for certificates or CRLs, the certificate files (with the .cer or .p12 extension) and CRL files (with the .crl extension) in the original path are moved to the new path.

Examples

# Specifies flash:/pki-new as the storage path for the certificates.

<Sysname> system-view

[Sysname] pki storage certificates flash:/pki-new

# Specifies pki-new as the storage path for the CRLs.

<Sysname> system-view

[Sysname] pki storage crls pki-new

pki validate-certificate

Use pki validate-certificate to verify the validity of certificates.

Syntax

pki validate-certificate domain domain-name { ca | local }

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters. The domain name cannot contain the special characters listed in Table 70.

Table 70 Special characters

Character name

Symbol

Character name

Symbol

Tilde

~

Dot

.

Asterisk

*

Left angle bracket

Backslash

\

Right angle bracket

Vertical bar

|

Quotation marks

"

Colon

:

Apostrophe

'

 

ca: Specifies the CA certificate.

local: Specifies the local certificates.

Usage guidelines

Generally, certificates are automatically verified when you request, obtain, or import them, or when an application uses PKI.

You can also use this command to manually verify a certificate in the following aspects:

·          Whether the certificate is issued by a trusted CA.

·          Whether the certificate expires.

·          Whether the certificate is revoked if CRL checking is enabled.

When CRL checking is enabled:

·          To verify the local certificates, if the PKI domain has no CRLs, the device looks up the locally save CRLs. If a correct CRL is found, the device loads the CRL to the PKI domain. Otherwise, the device obtains the correct CRL from the CA server and saves it locally.

·          To verify the CA certificate, CRL checking is performed for the CA certificate chain from the current CA to the root CA.

Examples

# Verify the validity of the CA certificate in PKI domain aaa.

<Sysname> system-view

[Sysname] pki validate-certificate domain aaa ca

Verifying certificates......

        Serial Number:

            f6:3c:15:31:fe:bb:ec:94:dc:3d:b9:3a:d9:07:70:e5

        Issuer:

            C=cn

            O=ccc

            OU=ppp

            CN=rootca

        Subject:

            C=cn

            O=abc

            OU=test

            CN=aca

 

Verify result: OK

Verifying certificates......

        Serial Number:

            5c:72:dc:c4:a5:43:cd:f9:32:b9:c1:90:8f:dd:50:f6

        Issuer:

            C=cn

            O=ccc

            OU=ppp

            CN=rootca

        Subject:

            C=cn

            O=ccc

            OU=ppp

            CN=rootca

 

Verify result: OK

# Verify the local certificates in PKI domain aaa.

<Sysname> system-view

[Sysname] pki validate-certificate domain aaa local

Verifying certificates......

        Serial Number:

            bc:05:70:1f:0e:da:0d:10:16:1e

        Issuer:

            C=CN

            O=sec

            OU=software

            CN=bca

        Subject:

            O=OpenCA Labs

            OU=Users

            CN=fips fips-sec

 

Verify result: OK

Related commands

·          crl check

·          pki domain

public-key dsa

Use public-key dsa to specify a DSA key pair for certificate request.

Use undo public-key to restore the default.

Syntax

public-key dsa name key-name [ length key-length ]

undo public-key

Default

No key pair is specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

name key-name: Specifies a key pair by its name, a case-insensitive string of 1 to 64 characters. The key pair name can contain only letters, digits, and hyphens (-).

length key-length: Specifies the key length, in bits. The value range is 512 to 2048, and the default is 1024. A longer key means higher security but more public key calculation time.

Usage guidelines

You can specify a nonexistent key pair in this command. A key pair can be obtained in any of the following ways:

·          Use the public-key local create command to generate a key pair.

·          An application, like IKE using digital signature authentication, triggers the device to generate a key pair.

·          Use the pki import command to import a certificate containing a key pair.

A PKI domain can have key pairs using only one type of cryptographic algorithm (DSA, ECDSA, or RSA).

·          If DSA or ECDSA is used, a PKI domain can have only one key pair.

·          If RSA is used, a PKI domain can have two key pairs: one is the signing key pair, and the other is the encryption key pair.

·          In a PKI domain, key pairs for different purposes (RSA signing and RSA encryption) do not overwrite each other.

·          For DSA or ECDSA, the most recent configuration takes effect.

The length key-length option takes effect only if you specify a nonexistent key pair. The device will automatically create the key pair by using the specified name and length before submitting a certificate request. The length key-length option is ignored if the specified key pair already exists or is already contained in an imported certificate.

Examples

# Specify the DSA key pair abc with the key length of 2048 bits for certificate request.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] public-key dsa name abc length 2048

Related commands

·          pki import

·          public-key local create (see Security Command Reference)

public-key ecdsa

Use public-key ecdsa to specify an ECDSA key pair for certificate request.

Use undo public-key to restore the default.

Syntax

public-key ecdsa name key-name [ secp192r1 | secp256r1 | secp384r1 ]

undo public-key

Default

No key pair is specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

name key-name: Specifies a key pair by its name, a case-insensitive string of 1 to 64 characters. The key pair name can contain only letters, digits, and hyphens (-).

secp192r1: Uses the secp192r1 curve to generate the key pair. The secp192r1 curve is used by default.

secp256r1: Uses the secp256r1 curve to generate the key pair.

Secp384r1: Uses the secp384r1 curve to generate the key pair.

Usage guidelines

You can specify a nonexistent key pair in this command. A key pair can be obtained in any of the following ways:

·          Use the public-key local create command to generate a key pair.

·          An application, like IKE using digital signature authentication, triggers the device to generate a key pair.

·          Use the pki import command to import a certificate containing a key pair.

A PKI domain can have key pairs using only one type of cryptographic algorithm (DSA, ECDSA, or RSA).

·          If DSA or ECDSA is used, a PKI domain can have only one key pair.

·          If RSA is used, a PKI domain can have two key pairs: one is the signing key pair, and the other is the encryption key pair.

·          In a PKI domain, key pairs for different purposes (RSA signing and RSA encryption) do not overwrite each other.

·          For DSA or ECDSA, the most recent configuration takes effect.

The specified elliptic curve takes effect only if you specify a nonexistent key pair. The device will automatically create the key pair by using the specified name and curve before submitting a certificate request. The curve parameter is ignored if the specified key pair already exists or is already contained in an imported certificate.

Examples

# Specify the ECDSA key pair abc generated by using the secp384r1 curve for certificate request in PKI domain aaa.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] public-key ecdsa name abc secp384r1

Related commands

·          pki import

·          public-key local create (see Security Command Reference)

public-key rsa

Use public-key rsa to specify an RSA key pair for certificate request.

Use undo public-key to restore the default.

Syntax

public-key rsa { { encryption name encryption-key-name [ length key-length ] | signature name signature-key-name [ length key-length ] } * | general name key-name [ length key-length ] }

undo public-key

Default

No key pair is specified.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

encryption: Specifies a key pair for encryption.

name encryption-key-name: Specifies a key pair name, a case-insensitive string of 1 to 64 characters. The key pair name can contain only letters, digits, and hyphens (-).

signature: Specifies a key pair for signing.

name signature-key-name: Specifies a key pair name, a case-insensitive string of 1 to 64 characters. The key pair name can contain only letters, digits, and hyphens (-).

general: Specifies a key pair for both signing and encryption.

name key-name: Specifies a key pair name, a case-insensitive string of 1 to 64 characters. The key pair name can contain only letters, digits, and hyphens (-).

length key-length: Specifies the key length, in bits. The value range is 512 to 2048, and the default is 1024. A longer key means higher security but more public key calculation time.

Usage guidelines

You can specify a nonexistent key pair in this command. You can get a key pair in any of the following ways:

·          Use the public-key local create command to generate a key pair.

·          An application, like IKE using digital signature authentication, triggers the device to generate a key pair.

·          Use the pki import command to import a certificate containing a key pair.

A PKI domain can have key pairs using only one type of cryptographic algorithm (DSA, ECDSA, or RSA).

·          If DSA or ECDSA is used, a PKI domain can have only one key pair.

·          If RSA is used, a PKI domain can have two key pairs: one is the signing key pair, and the other is the encryption one.

·          In a PKI domain, key pairs for different purposes (RSA signing and RSA encryption) do not overwrite each other.

·          For DSA or ECDSA, the most recent configuration takes effect.

If you specify a signing key pair and an encryption key pair separately, their key length can be different.

The length key-length option takes effect only if you specify a nonexistent key pair. The device will automatically create the key pair by using the specified name and length before submitting a certificate request. The length key-length option is ignored if the specified key pair already exists or is already contained in an imported certificate.

Examples

# Specify a general purpose RSA key pair named abc with a key length of 2048 bits for certificate request.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] public-key rsa general name abc length 2048

# Specify the RSA encryption key pair rsa1 with the key length 2048 bits. Specify the RSA signing key pair sig1 with the key length 2048 bits for certificate request.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] public-key rsa encryption name rsa1 length 2048

[Sysname-pki-domain-aaa] public-key rsa signature name sig1 length 2048

Related commands

·          pki import

·          public-key local create (see Security Command Reference)

root-certificate fingerprint

Use root-certificate fingerprint to set the fingerprint for verifying the validity of the root CA certificate.

Use undo root-certificate fingerprint to restore the default.

Syntax

root-certificate fingerprint { md5 | sha1 } string

undo root-certificate fingerprint

Default

No fingerprint is set.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

md5: Sets an MD5 fingerprint.

sha1: Sets a SHA1 fingerprint.

string: Sets the fingerprint information in hexadecimal notation. If you specify the MD5 keyword, the fingerprint is a string of 32 characters. If you specify the SHA1 keyword, the fingerprint is a string of 40 characters.

Usage guidelines

If you set the certificate request mode to auto for a PKI domain that does not have a CA certificate, you must configure the fingerprint for CA certificate verification. When an application, like IKE, triggers the device to request local certificates, the device automatically performs the following operations:

1.        Obtains the CA certificate from the CA server.

2.        Verifies the fingerprint contained in the CA certificate with the one configured in the PKI domain.

If the PKI domain is not configured with a fingerprint or if the configured fingerprint does not match the fingerprint contained in the CA certificate, the device rejects the CA certificate and the local certificate request fails.

You can choose whether to set the fingerprint of the root CA certificate when performing the following tasks:

·          Import the CA certificate by using the pki import command.

·          Obtain the CA certificate by using the pki retrieve command.

If you specify the fingerprint in the PKI domain, the device automatically verifies the fingerprint of the CA certificate to be imported or obtained against that configured in the domain. If the two fingerprints do not match, the device rejects the CA certificate. If no fingerprint is specified in the domain, the device asks you to manually verify the fingerprint of the CA certificate.

Examples

# Specify an MD5 fingerprint for verifying the validity of the root CA certificate.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] root-certificate fingerprint md5 12EF53FA355CD23E12EF53FA355CD23E

# Specify an SHA1 fingerprint for verifying the validity of root CA certificate.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] root-certificate fingerprint sha1 D1526110AAD7527FB093ED7FC037B0B3CDDDAD93

Related commands

·          certificate request mode

·          pki import

·          pki retrieve-certificate

rule

Use rule to create an access control rule (or statement).

Use undo rule to remove an access control rule (or statement).

Syntax

rule [ id ] { deny | permit } group-name

undo rule id

Default

No statement exists.

Views

PKI certificate-based access control policy view

Predefined user roles

network-admin

Parameters

id: Assigns an ID to the access control rule, in the range of 1 to 16. The default setting is the smallest unused ID in this range.

deny: Denies the certificates that match the associated attribute group.

permit: Permits the certificates that match the associated attribute group.

group-name: Specifies a certificate attribute group by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

When you create an access control rule, you can associate it with a nonexistent certificate attribute group.

The system determines that a certificate matches an access control rule when either of the following conditions exists:

·          The associated certificate attribute group does not exist.

·          The associated certificate attribute group does not contain any attribute rules.

·          The certificate matches all attribute rules in the associated certificated attribute group.

You can create multiple access control rules for an access control policy. A certificate matches the rules one by one, starting with the rule with the smallest ID. When a match is found, the match process stops, and the system performs the access control action defined in the access control rule.

Examples

# Create rule 1 to permit all certificates that match certificate attribute group mygroup.

<Sysname> system-view

[Sysname] pki certificate access-control-policy mypolicy

[Sysname-pki-cert-acp-mypolicy] rule 1 permit mygroup

Related commands

·          attribute

·          display pki certificate access-control-policy

·          pki certificate attribute-group

source

Use source to specify the source IP address for PKI protocol packets.

Use undo source to restore the default.

Syntax

source { ip | ipv6 } { ip-address | interface interface-type interface-number }

undo source

Default

The source IP address of PKI protocol packets is the IP address of their outgoing interface.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies a source IPv4 address.

ipv6 ip-address: Specifies a source IPv6 address

interface interface-type interface-number: Specifies an interface by its type and number. The interface's primary IP address will be used as the source IP address for PKI protocol packets.

Usage guidelines

Use this command to specify the source IP address for PKI protocol packets. You can also specify a source interface if the IP address is dynamically obtained.

Make sure there is a route between the source IP address and the CA server.

You can specify only one source IP address in a PKI domain. If you configure this command multiple times, the most recent configuration takes effect.

Examples

# Set the source IP address to 111.1.1.8 for PKI protocol packets.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] source ip 111.1.1.8

# Set the source IPv6 address to 1::8 for PKI protocol packets.

<Sysname> system-view

[Sysname] pki domain 1

[Sysname-pki-domain-1] source ipv6 1::8

# Set the source IP address to the IPv4 address of VLAN-interface 100 for PKI protocol packets.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] source ip interface vlan-interface 100

# Set the source IP address to the IPv6 address of VLAN-interface 100 for PKI protocol packets.

<Sysname> system-view

[Sysname] pki domain 1

[Sysname-pki-domain-1] source ipv6 interface vlan-interface 100

state

Use state to set the state or province name for a PKI entity.

Use undo state to restore the default.

Syntax

state state-name

undo state

Default

No state name or province name is set for a PKI entity.

Views

PKI entity view

Predefined user roles

network-admin

Parameters

state-name: Specifies a state or province by its name, a case-sensitive string of 1 to 63 characters. No comma can be included.

Examples

# Set the state name to countryA for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] state countryA

subject-dn

Use subject-dn to configure the DN for a PKI entity.

Use undo subject-dn to restore the default.

Syntax

subject-dn dn-string

undo subject-dn

Default

No DN is configured for a PKI entity.

Views

PKI entity view

Default command level

network-admin

Parameters

dn-string: Specifies the DN for the PKI entity, a case-insensitive string of 1 to 255 characters.

Usage guidelines

The subject DN string is a sequence of attribute=value pairs separated by commas. Each attribute can be specified multiple times with different values. Supported DN attributes are:

·          CN—Common-name.

·          C—Country code.

·          L—Locality.

·          O—Organization.

·          OU—Organization unit.

·          ST—State or province.

After this command is configured, the following commands do not take effect:

·          common-name

·          country

·          locality

·          organization

·          organization-unit

·          state

If you configure this command multiple times, the most recent configuration takes effect.

Examples

# Configure the DN for PKI entity en.

<Sysname> system-view

[Sysname] pki entity en

[Sysname-pki-entity-en] subject-dn CN=test,C=CN,O=abc,OU=rdtest,OU=rstest,ST=countryA,L=pukras

Related commands

common-name

country

locality

organization

organization-unit

state

usage

Use usage to specify the extensions for certificates.

Use undo usage to remove certificate extensions.

Syntax

usage { ike | ssl-client | ssl-server } *

undo usage [ ike | ssl-client | ssl-server ] *

Default

No extensions are specified. A certificate can be used for all applications, including IKE, SSL clients, and SSL servers.

Views

PKI domain view

Predefined user roles

network-admin

Parameters

ike: Specifies the IKE certificate extension so IKE peers can use the certificates.

ssl-client: Specifies the SSL client certificate extension so the SSL client ends can use the certificates.

ssl-server: Specifies the SSL server certificate extension so the SSL server ends can use the certificates.

Usage guidelines

If you do not specify any keywords for the undo usage command, this command removes all certificate extensions.

The extension options contained in a certificate depends on the CA policy, and might be different from those specified in the PKI domain.

Examples

# Specify the IKE certificate extension.

<Sysname> system-view

[Sysname] pki domain aaa

[Sysname-pki-domain-aaa] usage ike


IPsec commands

The following matrix shows the feature and hardware compatibility:

 

Hardware series

Model

IPsec compatibility

WX1800H series

WX1804H

Yes

WX1810H

Yes

WX1820H

Yes

WX1840H

No

WX3800H series

WX3820H

WX3840H

No

WX5800H series

WX5860H

No

 

ah authentication-algorithm

Use ah authentication-algorithm to specify authentication algorithms for the AH protocol.

Use undo ah authentication-algorithm to remove all specified authentication algorithms for the AH protocols.

Syntax

ah authentication-algorithm { aes-xcbc-mac | md5 | sha1 | sha256 | sha384 | sha512 } *

undo ah authentication-algorithm

Default

AH does not use an authentication algorithm.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

aes-xcbc-mac: Uses the HMAC-AES-XCBC-MAC algorithm, which uses a 128-bit key.

md5: Uses the HMAC-MD5 algorithm, which uses a 128-bit key.

sha1: Uses the HMAC-SHA1 algorithm, which uses a 160-bit key.

sha256: Uses the HMAC-SHA256 algorithm, which uses a 256-bit key.

sha384: Uses the HMAC-SHA384 algorithm, which uses a 384-bit key.

sha512: Uses the HMAC-SHA512 algorithm, which uses a 512-bit key.

Usage guidelines

You can specify multiple AH authentication algorithms for one IPsec transform set, and the algorithm specified earlier has a higher priority.

For a manual or IKEv1-based IPsec policy, the first specified AH authentication algorithm takes effect. To make sure an IPsec tunnel can be established successfully, the IPsec transform sets specified at both ends of the tunnel must have the same first AH authentication algorithm.

Examples

# Create an IPsec transform set, and specify the AH authentication algorithm for the transform set as HMAC-SHA1.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] ah authentication-algorithm sha1

description

Use description to configure description for an IPsec policy or IPsec policy template.

Use undo description to restore the default.

Syntax

description text

undo description

Default

No description is defined.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

text: Specifies the description content, a case-sensitive string of 1 to 80 characters.

Usage guidelines

If the system has multiple IPsec policies or IPsec policy templates, you can use this command to configure different descriptions for them to distinguish them.

Examples

# Configure description for IPsec policy 1 as CenterToA.

<Sysname> system-view

[Sysname] ipsec policy policy1 1 isakmp

[Sysname-ipsec-policy-isakmp-policy1-1] description CenterToA

display ipsec { ipv6-policy | policy }

Use display ipsec { ipv6-policy | policy } to display information about IPsec policies.

Syntax

display ipsec { ipv6-policy | policy } [ policy-name [ seq-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ipv6-policy: Displays information about IPv6 IPsec policies.

policy: Displays information about IPv4 IPsec policies.

policy-name: Specifies an IPsec policy by its name, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies an IPsec policy entry by its sequence number in the range of 1 to 65535.

Usage guidelines

If you do not specify any parameters, this command displays information about all IPsec policies.

If you specify an IPsec policy name and a sequence number, this command displays information about the specified IPsec policy entry. If you specify an IPsec policy name without any sequence number, this command displays information about all IPsec policy entries with the specified name.

Examples

# Display information about all IPv4 IPsec policies.

<Sysname> display ipsec policy

-------------------------------------------

IPsec Policy: mypolicy

-------------------------------------------

 

  -----------------------------

  Sequence number: 1

  Mode: Manual

  -----------------------------

  The policy configuration is incomplete:

           ACL not specified

           Incomplete transform-set configuration

  Description: This is my first IPv4 manual policy

  Security data flow:

  Remote address: 2.5.2.1

  Transform set: transform

 

  Inbound AH setting:

    AH SPI: 1200 (0x000004b0)

    AH string-key: ******

    AH authentication hex key:

 

  Inbound ESP setting:

    ESP SPI: 1400 (0x00000578)

    ESP string-key:

    ESP encryption hex key:

    ESP authentication hex key:

 

  Outbound AH setting:

    AH SPI: 1300 (0x00000514)

    AH string-key: ******

    AH authentication hex key:

 

  Outbound ESP setting:

    ESP SPI: 1500 (0x000005dc)

    ESP string-key: ******

    ESP encryption hex key:

    ESP authentication hex key:

 

  -----------------------------

  Sequence number: 2

  Mode: ISAKMP

  -----------------------------

  The policy configuration is incomplete:

           Remote-address not set

           ACL not specified

           Transform-set not set

  Description: This is my first IPv4 Isakmp policy

  Traffic Flow Confidentiality: Enabled

  Security data flow:

  Selector mode: standard

  Local address:

  Remote address:

  Transform set:

  IKE profile:

  IKEv2 profile:

  SA duration(time based):

  SA duration(traffic based):

  SA idle time:

-------------------------------------------

IPsec Policy: mycompletepolicy

Interface: LoopBack2

-------------------------------------------

 

  -----------------------------

  Sequence number: 1

  Mode: Manual

  -----------------------------

  Description: This is my complete policy

  Security data flow: 3100

  Remote address: 2.2.2.2

  Transform set: completetransform

 

  Inbound AH setting:

    AH SPI: 5000 (0x00001388)

    AH string-key: ******

    AH authentication hex key:

 

  Inbound ESP setting:

    ESP SPI: 7000 (0x00001b58)

    ESP string-key: ******

    ESP encryption hex key:

    ESP authentication hex key:

 

  Outbound AH setting:

    AH SPI: 6000 (0x00001770)

    AH string-key: ******

    AH authentication hex key:

 

  Outbound ESP setting:

    ESP SPI: 8000 (0x00001f40)

    ESP string-key: ******

    ESP encryption hex key:

    ESP authentication hex key:

 

  -----------------------------

  Sequence number: 2

  Mode: ISAKMP

  -----------------------------

  Description: This is my complete policy

  Traffic Flow Confidentiality: Enabled

  Security data flow: 3200

  Selector mode: standard

  Local address:

  Remote address: 5.3.6.9

  Transform set:  completetransform

  IKE profile:

  IKEv2 profile:

  SA duration(time based):

  SA duration(traffic based):

  SA idle time:

# Display information about all IPv6 IPsec policies.

<Sysname> display ipsec ipv6-policy

-------------------------------------------

IPsec Policy: mypolicy

-------------------------------------------

 

  -----------------------------

  Sequence number: 1

  Mode: Manual

  -----------------------------

  Description: This is my first IPv6 policy

  Security data flow: 3600

  Remote address: 1000::2

  Transform set: mytransform

 

  Inbound AH setting:

    AH SPI: 1235 (0x000004d3)

    AH string-key: ******

    AH authentication hex key:

 

  Inbound ESP setting:

    ESP SPI: 1236 (0x000004d4)

    ESP string-key: ******

    ESP encryption hex key:

    ESP authentication hex key:

 

  Outbound AH setting:

    AH SPI: 1237 (0x000004d5)

    AH string-key: ******

    AH authentication hex key:

 

  Outbound ESP setting:

    ESP SPI: 1238 (0x000004d6)

    ESP string-key: ******

    ESP encryption hex key:

    ESP authentication hex key:

Table 71 Command output

Field

Description

IPsec Policy

IPsec policy name.

Interface

Interface applied with the IPsec policy.

Sequence number

Sequence number of the IPsec policy entry.

Mode

Negotiation mode of the IPsec policy:

·         Manual—Manual mode.

·         ISAKMP—IKE negotiation mode.

·         Template—IPsec policy template mode.

The policy configuration is incomplete

IPsec policy configuration incomplete. Possible causes include:

·         The ACL is not configured.

·         The IPsec transform set is not configured.

·         The ACL does not have any permit statements.

·         The IPsec transform set configuration is not complete.

·         The peer IP address of the IPsec tunnel is not specified.

·         The SPI and key of the IPsec SA do not match the IPsec policy.

Description

Description of the IPsec policy.

Traffic Flow Confidentiality

Whether Traffic Flow Confidentiality (TFC) padding is enabled.

Security data flow

ACL used by the IPsec policy.

Selector mode

Data flow protection mode of the IPsec policy:

·         standard

·         aggregation

·         per-host

Local address

Local end IP address of the IPsec tunnel (available only for the IPsec policy using IKE negotiation).

Remote address

Remote end IP address or host name of the IPsec tunnel.

Transform set

Transform set used by the IPsec policy.

IKE profile

IKE profile used by the IPsec policy.

IKEv2 profile

IKEv2 profile used by the IPsec policy.

SA duration(time based)

Time-based IPsec SA lifetime, in seconds.

SA duration(traffic based)

Traffic-based IPsec SA lifetime, in kilobytes.

SA idle time

Idle timeout of the IPsec SA, in seconds.

AH string-key

AH string key (****** is displayed if the key is configured).

AH authentication hex key

AH authentication hex key (****** is displayed if the key is configured).

ESP string-key

ESP string key (****** is displayed if the key is configured).

ESP encryption hex key

ESP encryption hex key (****** is displayed if the key is configured).

ESP authentication hex key

ESP authentication hex key (****** is displayed if the key is configured).

 

Related commands

ipsec { ipv6-policy | policy }

display ipsec { ipv6-policy-template | policy-template }

Use display ipsec { ipv6-policy-template | policy-template } to display information about IPsec policy templates.

Syntax

display ipsec { ipv6-policy-template | policy-template } [ template-name [ seq-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ipv6-policy-template: Displays information about IPv6 IPsec policy templates.

policy-template: Displays information about IPv4 IPsec policy templates.

template-name: Specifies an IPsec policy template by its name, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies an IPsec policy template entry by its sequence number in the range of 1 to 65535.

Usage guidelines

·          If you do not specify any parameters, this command displays information about all IPsec policy templates.

·          If you specify an IPsec policy template name and a sequence number, this command displays information about the specified IPsec policy template entry. If you specify an IPsec policy template name without any sequence number, this command displays information about all IPsec policy template entries with the specified name.

Examples

# Display information about all IPv4 IPsec policy templates.

<Sysname> display ipsec policy-template

-----------------------------------------------

IPsec Policy Template: template

-----------------------------------------------

 

  ---------------------------------

  Sequence number: 1

  ---------------------------------

Description: This is policy template

Traffic Flow Confidentiality: Disabled

Security data flow :

Selector mode: standard

Local address:

IKE profile:

IKEv2 profile:

Remote address: 162.105.10.2

Transform set:  testprop

IPsec SA local duration(time based): 3600 seconds

IPsec SA local duration(traffic based): 1843200 kilobytes

SA idle time:

# Display information about all IPv6 IPsec policy templates.

<Sysname> display ipsec ipv6-policy-template

-----------------------------------------------

IPsec Policy Template: template6

-----------------------------------------------

 

  ---------------------------------

  Sequence number: 1

  ---------------------------------

Description: This is policy template

Traffic Flow Confidentiality: Disabled

Security data flow :

Selector mode: standard

Local address:

IKE profile:

IKEv2 profile:

Remote address: 200::1/64

Transform set: testprop

IPsec SA local duration(time based): 3600 seconds

IPsec SA local duration(traffic based): 1843200 kilobytes

SA idle time:

Table 72 Command output

Field

Description

IPsec Policy Template

IPsec policy template name.

Sequence number

Sequence number of the IPsec policy template entry.

Description

Description of the IPsec policy template.

Traffic Flow Confidentiality

Whether Traffic Flow Confidentiality (TFC) padding is enabled.

Security data flow

ACL used by the IPsec policy template.

Selector mode

Data flow protection mode of the IPsec policy template:

·         standard

·         aggregation

·         per-host

Local address

Local end IP address of the IPsec tunnel.

IKE profile

IKE profile used by the IPsec policy template.

IKEv2 profile

IKEv2 profile used by the IPsec policy template.

Remote address

Remote end IP address of the IPsec tunnel.

Transform set

Transform set used by the IPsec policy template.

IPsec SA local duration(time based)

Time-based IPsec SA lifetime, in seconds.

IPsec SA local duration(traffic based)

Traffic-based IPsec SA lifetime, in kilobytes.

SA idle time

Idle timeout of the IPsec SA, in seconds.

 

Related commands

ipsec { ipv6-policy | policy } isakmp template

display ipsec sa

Use display ipsec sa to display information about IPsec SAs.

Syntax

display ipsec sa [ brief | count | interface interface-type interface-number | { ipv6-policy | policy } policy-name [ seq-number ] | remote [ ipv6 ] ip-address ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

brief: Displays brief information about all IPsec SAs.

count: Displays the number of IPsec SAs.

interface interface-type interface-number: Specifies an interface by its type and number.

ipv6-policy: Displays detailed information about IPsec SAs created by using a specified IPv6 IPsec policy.

policy: Displays detailed information about IPsec SAs created by using a specified IPv4 IPsec policy.

policy-name: Specifies an IPsec policy by its name, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies an IPsec policy by its sequence number. The value range is 1 to 65535.

remote ip-address: Specifies an IPsec SA by its remote end IP address.

ipv6: Specifies an IPsec SA by its remote end IPv6 address. If this keyword is not specified, the specified remote end IP address is an IPv4 address.

Usage guidelines

If you do not specify any parameters, this command displays information about all IPsec SAs.

Examples

# Display brief information about IPsec SAs.

<Sysname> display ipsec sa brief

-----------------------------------------------------------------------

Interface/Global             Dst Address      SPI         Protocol  Status

-----------------------------------------------------------------------

Vlan-interface100            10.1.1.1         400         ESP       Active

Vlan-interface100            255.255.255.255  4294967295  ESP       Active

Vlan-interface100            100::1/64        500         AH        Active

Global                       --               600         ESP       Active

Table 73 Command output

Field

Description

Interface/Global

Interface where the IPsec SA belongs to.

Dst Address

Remote end IP address of the IPsec tunnel.

SPI

IPsec SA SPI.

Protocol

Security protocol used by IPsec.

Status

Status of the IPsec SA: Active or Standby.

In a VSRP scenario, this field displays either Active or Standby.

In standalone mode, this field always displays Active.

 

# Display the number of IPsec SAs.

<Sysname> display ipsec sa count

Total IPsec SAs count: 4

# Display information about all IPsec SAs.

<Sysname> display ipsec sa

-------------------------------

Interface: Vlan-interface100

-------------------------------

 

  -----------------------------

  IPsec policy: r2

  Sequence number: 1

  Mode: ISAKMP

  Flow table status: Active

  -----------------------------

    Tunnel id: 3

    Encapsulation mode: tunnel

    Perfect Forward Secrecy:

Inside VRF: vp1

    Extended Sequence Number enable: Y

Traffic Flow Confidentiality enable: N

    Path MTU: 1443

    Tunnel:

        local  address: 2.2.2.2

        remote address: 1.1.1.2

    Flow:

    sour addr: 192.168.2.0/255.255.255.0  port: 0  protocol: ip

    dest addr: 192.168.1.0/255.255.255.0  port: 0  protocol: ip

 

    [Inbound ESP SAs]

      SPI: 3564837569 (0xd47b1ac1)

      Connection ID: 1

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 4294967295/604800

      SA remaining duration (kilobytes/sec): 1843200/2686

      Max received sequence-number: 5

      Anti-replay check enable: Y

      Anti-replay window size: 32

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 801701189 (0x2fc8fd45)

      Connection ID: 2

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 4294967295/604800

      SA remaining duration (kilobytes/sec): 1843200/2686

      Max sent sequence-number: 6

      UDP encapsulation used for NAT traversal: N

      Status: Active

-------------------------------

Global IPsec SA

-------------------------------

 

  -----------------------------

  IPsec profile: profile

  Mode: Manual

  -----------------------------

    Encapsulation mode: transport

    [Inbound AH SAs]

      SPI: 1234563 (0x0012d683)

      Connection ID: 9

      Transform set: AH-SHA1

      No duration limit for this SA

    [Outbound AH SAs]

      SPI: 1234563 (0x002d683)

      Connection ID: 10

      Transform set: AH-SHA1

      No duration limit for this SA

Table 74 Command output

Field

Description

Interface

Interface where the IPsec SA belongs.

IPsec policy

Name of the used IPsec policy.

IPsec profile

Name of the used IPsec profile.

This field is not supported in the current software version.

Sequence number

Sequence number of the IPsec policy entry.

Mode

Negotiation mode used by the IPsec policy:

·         Manual

·         ISAKMP

·         Template

Flow table status

Status of the flow entries deployed by IPsec: Active or Inactive.

Tunnel id

IPsec tunnel ID.

Encapsulation mode

Encapsulation mode, transport or tunnel.

Perfect Forward Secrecy

Perfect Forward Secrecy (PFS) used by the IPsec policy for negotiation:

·         768-bit Diffie-Hellman group (dh-group1)

·         1024-bit Diffie-Hellman group (dh-group2)

·         1536-bit Diffie-Hellman group (dh-group5)

·         2048-bit Diffie-Hellman group (dh-group14)

·         2048-bit and 256_bit subgroup Diffie-Hellman group (dh-group24)

·         256-bit ECP Diffie-Hellman group (dh-group19)

·         384-bit ECP Diffie-Hellman group (dh-group20)

Extended Sequence Number enable

Whether Extended Sequence Number (ESN) is enabled.

Traffic Flow Confidentiality enable

Whether Traffic Flow Confidentiality (TFC) padding is enabled.

Inside VRF

VPN instance to which the protected data flow belongs.

The device does not support this field in the current software version.

Path MTU

Path MTU of the IPsec SA.

Tunnel

Local and remote addresses of the IPsec tunnel.

local address

Local end IP address of the IPsec tunnel.

remote address

Remote end IP address of the IPsec tunnel.

Flow

Information about the data flow protected by the IPsec tunnel.

sour addr

Source IP address of the data flow.

dest addr

Destination IP address of the data flow.

port

Port number.

protocol

Protocol type:

·         ip—IPv4.

·         ipv6—IPv6.

SPI

SPI of the IPsec SA.

Connection ID

Identifier of the IPsec SA.

Transform set

Security protocol and algorithms used by the IPsec transform set.

SA duration (kilobytes/sec)

IPsec SA lifetime, in kilobytes or seconds.

SA remaining duration (kilobytes/sec)

Remaining IPsec SA lifetime, in kilobytes or seconds.

Max received sequence-number

Max sequence number in the received packets.

Max sent sequence-number

Max sequence number in the sent packets.

Anti-replay check enable

Whether any-replay checking is enabled.

UDP encapsulation used for NAT traversal

Whether NAT traversal is used by the IPsec SA.

Status

Status of the IPsec SA: Active or Standby.

In a VSRP scenario, this field displays either Active or Standby.

In standalone mode, this field always displays Active.

No duration limit for this SA

The manual IPsec SAs do not have lifetime.

 

Related commands

·          ipsec sa global-duration

·          reset ipsec sa

display ipsec statistics

Use display ipsec statistics to display IPsec packet statistics.

Syntax

display ipsec statistics [ tunnel-id tunnel-id ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

tunnel-id tunnel-id: Specifies an IPsec tunnel by its ID. The value range for the tunnel-id argument is 0 to 4294967295. You can use the display ipsec tunnel brief command to view the IDs of established IPsec tunnels.

Usage guidelines

If you do not specify any parameters, this command displays statistics for all IPsec packets.

Examples

# Display statistics for all IPsec packets.

<Sysname> display ipsec statistics

  IPsec packet statistics:

    Received/sent packets: 47/64

    Received/sent bytes: 3948/5208

    Dropped packets (received/sent): 0/45

 

    Dropped packets statistics

      No available SA: 0

      Wrong SA: 0

      Invalid length: 0

      Authentication failure: 0

      Encapsulation failure: 0

      Decapsulation failure: 0

      Replayed packets: 0

      ACL check failure: 45

      MTU check failure: 0

      Loopback limit exceeded: 0

      Crypto speed limit exceeded: 0

# Display statistics for the packets of IPsec tunnel 1.

<Sysname> display ipsec statistics tunnel-id 1

  IPsec packet statistics:

    Received/sent packets: 5124/8231

    Received/sent bytes: 52348/64356

    Dropped packets (received/sent): 0/0

 

    Dropped packets statistics

      No available SA: 0

      Wrong SA: 0

      Invalid length: 0

      Authentication failure: 0

      Encapsulation failure: 0

      Decapsulation failure: 0

      Replayed packets: 0

      ACL check failure: 0

      MTU check failure: 0

      Loopback limit exceeded: 0

      Crypto speed limit exceeded: 0

Table 75 Command output

Field

Description

Received/sent packets

Number of received/sent IPsec-protected packets.

Received/sent bytes

Number of bytes of received/sent IPsec-protected packets.

Dropped packets (received/sent)

Number of dropped IPsec-protected packets (received/sent).

No available SA

Number of packets dropped due to lack of available IPsec SA.

Wrong SA

Number of packets dropped due to wrong IPsec SA.

Invalid length

Number of packets dropped due to invalid packet length.

Authentication failure

Number of packets dropped due to authentication failure.

Encapsulation failure

Number of packets dropped due to encapsulation failure.

Decapsulation failure

Number of packets dropped due to decapsulation failure.

Replayed packets

Number of dropped replayed packets.

ACL check failure

Number of packets dropped due to ACL check failure.

MTU check failure

Number of packets dropped due to MTU check failure.

Loopback limit exceeded

Number of packets dropped due to loopback limit exceeded.

Crypto speed limit exceeded

Number of packets dropped due to crypto speed limit exceeded.

 

Related commands

reset ipsec statistics

display ipsec transform-set

Use display ipsec transform-set to display information about IPsec transform sets.

Syntax

display ipsec transform-set [ transform-set-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

transform-set-name: Specifies an IPsec transform set by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

If you do not specify an IPsec transform set, this command displays information about all IPsec transform sets.

Examples

# Display information about all IPsec transform sets.

<Sysname> display ipsec transform-set

IPsec transform set: mytransform

  State: incomplete

  Encapsulation mode: tunnel

  ESN: Enabled

  PFS:

  Transform: ESP

 

IPsec transform set: completeTransform

  State: complete

  Encapsulation mode: transport

  ESN: Enabled

  PFS:

  Transform: AH-ESP

  AH protocol:

    Integrity: SHA1

  ESP protocol:

    Integrity: SHA1

    Encryption: AES-CBC-128

Table 76 Command output

Field

Description

IPsec transform set

Name of the IPsec transform set.

State

Whether the IPsec transform set is complete.

Encapsulation mode

Encapsulation mode used by the IPsec transform set: transport or tunnel.

ESN

Whether Extended Sequence Number (ESN) is enabled.

PFS

Perfect Forward Secrecy (PFS) used by the IPsec policy for negotiation:

·         768-bit Diffie-Hellman group (dh-group1)

·         1024-bit Diffie-Hellman group (dh-group2)

·         1536-bit Diffie-Hellman group (dh-group5)

·         2048-bit Diffie-Hellman group (dh-group14)

·         2048-bit and 256_bit subgroup Diffie-Hellman group (dh-group24)

·         256-bit ECP Diffie-Hellman group (dh-group19)

·         384-bit ECP Diffie-Hellman group (dh-group20)

Transform

Security protocols used by the IPsec transform set: AH, ESP, or both. If both protocols are configured, IPsec uses ESP before AH.

AH protocol

AH settings.

ESP protocol

ESP settings.

Integrity

Authentication algorithm used by the security protocol.

Encryption

Encryption algorithm used by the security protocol.

 

Related commands

ipsec transform-set

display ipsec tunnel

Use display ipsec tunnel to display information about IPsec tunnels.

Syntax

display ipsec tunnel { brief | count | tunnel-id tunnel-id }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

brief: Displays brief information about IPsec tunnels.

count: Displays the number of IPsec tunnels.

tunnel-id tunnel-id: Specifies an IPsec tunnel by its ID. The value range for the tunnel-id argument is 0 to 4294967295.

Usage guidelines

IPsec is a Layer 3 VPN technology that transmits data in a secure channel established between two endpoints (such as two security gateways). Such a secure channel is usually called an IPsec tunnel.

Examples

# Display brief information about all IPsec tunnels.

<Sysname> display ipsec tunnel brief

----------------------------------------------------------------------------

Tunn-id   Src Address     Dst Address     Inbound SPI   Outbound SPI  Status

----------------------------------------------------------------------------

0         --              --              1000          2000          Active

                                          3000          4000

1         1.2.3.1         2.2.2.2         5000          6000          Active

                                          7000          8000

Table 77 Command output

Field

Description

Src Address

Source IP address of the IPsec tunnel.

Dst Address

Destination IP address of the IPsec tunnel.

Inbound SPI

Valid SPI in the inbound direction of the IPsec tunnel.

If the tunnel uses two security protocols, two SPIs in the inbound direction are displayed in two lines.

Outbound SPI

Valid SPI in the outbound direction of the IPsec tunnel.

If the tunnel uses two security protocols, two SPIs in the outbound direction are displayed in two lines.

Status

Status of the IPsec SA: Active or Standby.

In a VSRP scenario, this field displays either Active or Standby.

In standalone mode, this field always displays Active.

 

# Display the number of IPsec tunnels.

<Sysname> display ipsec tunnel count

Total IPsec Tunnel Count: 2

# Display information about all IPsec tunnels.

<Sysname> display ipsec tunnel

Tunnel ID: 0

Status: active

Perfect forward secrecy:

SA's SPI:

    outbound:  2000        (0x000007d0)   [AH]

    inbound:   1000        (0x000003e8)   [AH]

    outbound:  4000        (0x00000fa0)   [ESP]

    inbound:   3000        (0x00000bb8)   [ESP]

Tunnel:

    local  address:

    remote address:

Flow:

 

Tunnel ID: 1

Status: Active

Perfect forward secrecy:

SA's SPI:

    outbound:  6000        (0x00001770)   [AH]

    inbound:   5000        (0x00001388)   [AH]

    outbound:  8000        (0x00001f40)   [ESP]

    inbound:   7000        (0x00001b58)   [ESP]

Tunnel:

    local  address: 1.2.3.1

    remote address: 2.2.2.2

Flow:

    as defined in ACL3100

# Display information about IPsec tunnel 1.

<Sysname> display ipsec tunnel tunnel-id 1

Tunnel ID: 1

Status: Active

Perfect forward secrecy:

SA's SPI:

    outbound:  6000        (0x00001770)   [AH]

    inbound:   5000        (0x00001388)   [AH]

    outbound:  8000        (0x00001f40)   [ESP]

    inbound:   7000        (0x00001b58)   [ESP]

Tunnel:

    local  address: 1.2.3.1

    remote address: 2.2.2.2

Flow:

    as defined in ACL 3100

Table 78 Command output

Field

Description

Tunnel ID

IPsec ID, used to uniquely identify an IPsec tunnel.

Status

IPsec tunnel status: Active or Standby.

In a VSRP scenario, this field displays either Active or Standby.

In standalone mode, this field always displays Active.

Perfect Forward Secrecy

Perfect Forward Secrecy (PFS) used by the IPsec policy for negotiation:

·         768-bit Diffie-Hellman group (dh-group1)

·         1024-bit Diffie-Hellman group (dh-group2)

·         1536-bit Diffie-Hellman group (dh-group5)

·         2048-bit Diffie-Hellman group (dh-group14)

·         2048-bit and 256_bit subgroup Diffie-Hellman group (dh-group24)

·         256-bit ECP Diffie-Hellman group (dh-group19)

·         384-bit ECP Diffie-Hellman group (dh-group20)

SA's SPI

SPIs of the inbound and outbound SAs.

Tunnel

Local and remote addresses of the IPsec tunnel.

local  address

Local end IP address of the IPsec tunnel.

remote address

Remote end IP address of the IPsec tunnel.

Flow

Information about the data flow protected by the IPsec tunnel, including source IP address, destination IP address, source port, destination port and protocol.

as defined in ACL 3001

Range of data flow protected by the IPsec tunnel that is established manually. This information shows that the IPsec tunnel protects all data flows defined by ACL 3001.

 

encapsulation-mode

Use encapsulation-mode to set the encapsulation mode that the security protocol uses to encapsulate IP packets.

Use undo encapsulation-mode to restore the default.

Syntax

encapsulation-mode { transport | tunnel }

undo encapsulation-mode

Default

IP packets are encapsulated in tunnel mode.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

transport: Uses the transport mode for IP packet encapsulation.

tunnel: Uses the tunnel mode for IP packet encapsulation.

Usage guidelines

IPsec supports the following encapsulation modes:

·          Transport mode—The security protocols protect the upper layer data of an IP packet. Only the transport layer data is used to calculate the security protocol headers. The calculated security protocol headers and the encrypted data (only for ESP encapsulation) are placed after the original IP header. You can use the transport mode when end-to-end security protection is required (the secured transmission start and end points are the actual start and end points of the data). The transport mode is typically used for protecting host-to-host communications.

·          Tunnel mode—The security protocols protect the entire IP packet. The entire IP packet is used to calculate the security protocol headers. The calculated security protocol headers and the encrypted data (only for ESP encapsulation) are encapsulated in a new IP packet. In this mode, the encapsulated packet has two IP headers. The inner IP header is the original IP header. The outer IP header is added by the network device that provides the IPsec service. You must use the tunnel mode when the secured transmission start and end points are not the actual start and end points of the data packets (for example, when two gateways provide IPsec but the data start and end points are two hosts behind the gateways). The tunnel mode is typically used for protecting gateway-to-gateway communications.

The IPsec transform sets at both ends of the IPsec tunnel must have the same encapsulation mode.

Examples

# Configure the IPsec transform set tran1 to use the transport mode for IP packet encapsulation.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] encapsulation-mode transport

Related commands

ipsec transform-set

esn enable

Use esn enable to enable the Extended Sequence Number (ESN) feature.

Use undo esn enable to disable the ESN feature.

Syntax

esn enable [ both ]

undo esn enable

Default

ESN is disabled.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

both: Specifies IPsec to support both extended sequence number and traditional sequence number. If you do not specify this keyword, IPsec only supports extended sequence number.

Usage guidelines

The ESN feature extends the sequence number length from 32 bits to 64 bits. This feature prevents the sequence number space from being exhausted when large volumes of data are transmitted at high speeds over an IPsec SA. If the sequence number space is not exhausted, the IPsec SA does not need to be renegotiated.

This feature must be enabled at both the initiator and the responder.

Examples

# Enable the ESN feature in the IPsec transform set tran1.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] esn enable

Related commands

display ipsec transform-set

esp authentication-algorithm

Use esp authentication-algorithm to specify an authentication algorithm for ESP.

Use undo esp authentication-algorithm to restore the default.

Syntax

esp authentication-algorithm { aes-xcbc-mac | md5 | sha1 | sha256 | sha384 | sha512 } *

undo esp authentication-algorithm

Default

ESP does not use an authentication algorithm.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

aes-xcbc-mac: Uses the HMAC-AES-XCBC-MAC algorithm, which uses a 128-bit key.

md5: Uses the HMAC-MD5 algorithm, which uses a 128-bit key.

sha1: Uses the HMAC-SHA1 algorithm, which uses a 160-bit key.

sha256: Uses the HMAC-SHA256 algorithm, which uses a 256-bit key.

sha384: Uses the HMAC-SHA384 algorithm, which uses a 384-bit key.

sha512: Uses the HMAC-SHA512 algorithm, which uses a 512-bit key.

Usage guidelines

You can specify multiple ESP authentication algorithms for one IPsec transform set, and the algorithm specified earlier has a higher priority.

For a manual or IKEv1-based IPsec policy, the first specified ESP authentication algorithm takes effect. To make sure an IPsec tunnel can be established successfully, the IPsec transform sets specified at both ends of the tunnel must have the same first ESP authentication algorithm.

Examples

# Configure IPsec transform set tran1 to use HMAC-SHA1 algorithm as the ESP authentication algorithm.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] esp authentication-algorithm sha1

Related commands

ipsec transform-set

esp encryption-algorithm

Use esp encryption-algorithm to specify encryption algorithms for ESP.

Use undo esp encryption-algorithm to remove all encryption algorithms specified for ESP.

Syntax

esp encryption-algorithm { 3des-cbc | aes-cbc-128 | aes-cbc-192 | aes-cbc-256 | aes-ctr-128 | aes-ctr-192 | aes-ctr-256 | camellia-cbc-128 | camellia-cbc-192 | camellia-cbc-256 | des-cbc | gmac-128 | gmac-192 | gmac-256 | gcm-128 | gcm-192 | gcm-256 | null } *

undo esp encryption-algorithm

Default

ESP does not use any encryption algorithms.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

3des-cbc: Uses the 3DES algorithm in CBC mode, which uses a 168-bit key.

aes-cbc-128: Uses the AES algorithm in CBC mode, which uses a 128-bit key.

aes-cbc-192: Uses the AES algorithm in CBC mode, which uses a 192-bit key.

aes-cbc-256: Uses the AES algorithm in CBC mode, which uses a 256-bit key.

aes-ctr-128: Uses the AES algorithm in CTR mode, which uses a 128-bit key. This keyword is available only for IKEv2.

aes-ctr-192: Uses the AES algorithm in CTR mode, which uses a 192-bit key. This keyword is available only for IKEv2.

aes-ctr-256: Uses the AES algorithm in CTR mode, which uses a 256-bit key. This keyword is available only for IKEv2.

camellia-cbc-128: Uses the Camellia algorithm in CBC mode, which uses a 128-bit key. This keyword is available only for IKEv2.

camellia-cbc-192: Uses the Camellia algorithm in CBC mode, which uses a 192-bit key. This keyword is available only for IKEv2.

camellia-cbc-256: Uses the Camellia algorithm in CBC mode, which uses a 256-bit key. This keyword is available only for IKEv2.

des-cbc: Uses the DES algorithm in CBC mode, which uses a 64-bit key.

gmac-128: Uses the GMAC algorithm, which uses a 128-bit key. This keyword is available only for IKEv2.

gmac-192: Uses the GMAC algorithm, which uses a 192-bit key. This keyword is available only for IKEv2.

gmac-256: Uses the GMAC algorithm, which uses a 256-bit key. This keyword is available only for IKEv2.

gcm-128: Uses the GCM algorithm, which uses a 128-bit key. This keyword is available only for IKEv2.

gcm-192: Uses the GCM algorithm, which uses a 192-bit key. This keyword is available only for IKEv2.

gcm-256: Uses the GCM algorithm, which uses a 256-bit key. This keyword is available only for IKEv2.

null: Uses the NULL algorithm, which means encryption is not performed.

Usage guidelines

You can specify multiple ESP encryption algorithms for one IPsec transform set, and the algorithm specified earlier has a higher priority.

For a manual or IKEv1-based IPsec policy, the first specified ESP encryption algorithm takes effect. To make sure an IPsec tunnel can be established successfully, the IPsec transform sets specified at both ends of the tunnel must have the same first ESP encryption algorithm.

GCM and GMAC algorithms are combined mode algorithms. GCM algorithms provide encryption and authentication services. GMAC algorithms only provide authentication service. Combined mode algorithms can be used only when ESP is used alone without AH. Combined mode algorithms cannot be used together with ordinary ESP authentication algorithms.

Examples

# Configure IPsec transform set tran1 to use aes-cbc-128 as the ESP encryption algorithm.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] esp encryption-algorithm aes-cbc-128

Related commands

ipsec transform-set

ike-profile

Use ike-profile to specify an IKE profile for an IPsec policy or IPsec policy template.

Use undo ike-profile to restore the default.

Syntax

ike-profile profile-name

undo ike-profile

Default

No IKE profile is specified. The IPsec policy or IPsec policy template uses the global IKE settings for negotiation.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

profile-name: Specifies an IKE profile by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

If no IKE profile is specified for an IPsec policy or IPsec policy template, the device selects an IKE profile configured in system view for negotiation. If no IKE profile is configured, the globally configured IKE settings are used for negotiation.

The IKE profile specified for an IPsec policy or IPsec policy template defines the parameters used for IKE negotiation.

You can specify only one IKE profile for an IPsec policy or IPsec policy template.

Examples

# Specify the IKE profile profile1 for the IPsec policy policy1.

<Sysname> system-view

[Sysname] ipsec policy policy1 10 isakmp

[Sysname-ipsec-policy-isakmp-policy1-10] ike-profile profile1

Related commands

ike profile

ikev2-profile

Use ikev2-profile to specify an IKEv2 profile for an IPsec policy or IPsec policy template.

Use undo ikev2-profile to restore the default.

Syntax

ikev2-profile profile-name

undo ikev2-profile

Default

No IKEv2 profile is specified for an IPsec policy or IPsec policy template.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

profile-name: Specifies an IKEv2 profile by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

The IKEv2 profile specified for an IPsec policy or IPsec policy template defines the parameters used for IKEv2 negotiation.

You can specify only one IKEv2 profile for an IPsec policy or IPsec policy template.

On the initiator, you must specify an IKEv2 profile for the IPsec policy. On the responder, an IKEv2 profile is optional for the IPsec policy or IPsec policy template. If you do not specify an IKEv2 profile, the responder can use any IKEv2 profile for negotiation.

Examples

# Specify the IKEv2 profile profile1 for the IPsec policy policy1.

<Sysname> system-view

[Sysname] ipsec policy policy1 10 isakmp

[Sysname-ipsec-policy-isakmp-policy1-10] ikev2-profile profile1

Related commands

·          display ipsec ipv6-policy

·          display ipsec policy

·          ikev2 profile

ipsec { ipv6-policy | policy }

Use ipsec { ipv6-policy | policy } to create an IPsec policy entry and enter its view, or enter the view of an existing IPsec policy entry.

Use undo ipsec { ipv6-policy | policy } to delete the specified IPsec policy.

Syntax

ipsec { ipv6-policy | policy } policy-name seq-number [ isakmp | manual ]

undo ipsec { ipv6-policy | policy } policy-name [ seq-number ]

Default

No IPsec policy is created.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 IPsec policy.

policy: Specifies an IPv4 IPsec policy.

policy-name: Specifies a name for the IPsec policy, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies a sequence number for the IPsec policy entry, in the range of 1 to 65535.

isakmp: Establishes IPsec SAs through IKE negotiation.

manual: Establishes IPsec SAs manually.

Usage guidelines

When you create an IPsec policy, you must specify the SA setup mode (isakmp or manual). When you enter the view of an existing IPsec policy, you do not need to specify the SA setup mode.

You cannot change the SA setup mode of an existing IPsec policy.

An IPsec policy is a set of IPsec policy entries that have the same name but different sequence numbers. In the same IPsec policy, an IPsec policy entry with a smaller sequence number has a higher priority.

If you specify the seq-number argument, the undo command deletes the specified IPsec policy entry. If you do not specify this argument, the undo command deletes all entries of the specified IPsec policy.

An IPv4 IPsec policy and IPv6 IPsec policy can have the same name.

Examples

# Create an IKE-based IPsec policy entry with the name policy1 and sequence number 100, and enter the IPsec policy view.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 isakmp

[Sysname-ipsec-policy-isakmp-policy1-100]

# Create a manual IPsec policy entry with the name policy1 and sequence number 101, and enter the IPsec policy view.

<Sysname> system-view

[Sysname] ipsec policy policy1 101 manual

[Sysname-ipsec-policy-manual-policy1-101]

Related commands

·          display ipsec { ipv6-policy | policy }

·          ipsec apply

ipsec { ipv6-policy | policy } isakmp template

Use ipsec { ipv6-policy | policy } isakmp template to create an IKE-based IPsec policy by using an IPsec policy template.

Use undo ipsec { ipv6-policy | policy } to delete the specified IPsec policy.

Syntax

ipsec { ipv6-policy | policy } policy-name seq-number isakmp template template-name

undo ipsec { ipv6-policy | policy } policy-name [ seq-number ]

Default

No IPsec policy is created.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 IPsec policy.

policy: Specifies an IPv4 IPsec policy.

policy-name: Specifies a name for the IPsec policy, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies a sequence number for the IPsec policy, in the range of 1 to 65535. A smaller number indicates a higher priority.

isakmp template template-name: Specifies an IPsec policy template by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

If you do not specify the seq-number argument, the undo command deletes all entries of the specified IPsec policy.

An interface applied with an IPsec policy that is configured by using an IPsec policy template cannot initiate an SA negotiation, but it can respond to a negotiation request. The parameters not defined in the template are determined by the initiator. When the remote end's information (such as the IP address) is unknown, this method allows the remote end to initiate negotiations with the local end.

Examples

# Create an IPsec policy entry by using the IPsec policy template temp1, and specify the IPsec policy name as policy2 and the sequence number as 200.

<Sysname> system-view

[Sysname] ipsec policy policy2 200 isakmp template temp1

Related commands

·          display ipsec { ipv6-policy | policy }

·          ipsec { ipv6-policy-template | policy-template }

ipsec { ipv6-policy | policy } local-address

Use ipsec { ipv6-policy | policy } local-address to bind an IPsec policy to a source interface.

Use undo ipsec { ipv6-policy | policy } local-address to remove the bindings of IPsec policies and source interfaces.

Syntax

ipsec { ipv6-policy | policy } policy-name local-address interface-type interface-number

undo ipsec { ipv6-policy | policy } policy-name local-address

Default

No IPsec policy is bound to a source interface.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 IPsec policy.

policy: Specifies an IPv4 IPsec policy.

policy-name: Name of an IPsec policy, a case-insensitive string of 1 to 63 characters.

local-address interface-type interface-number: Specifies the shared source interface by its type and number.

Usage guidelines

For high availability, two interfaces can operate in backup or load sharing mode. After an IPsec policy is applied to the two interfaces, they negotiate with their peers to establish IPsec SAs respectively. When one interface fails and a link failover occurs, the other interface needs to take some time to renegotiate SAs, resulting in service interruption.

To solve these problems, bind a source interface to an IPsec policy and apply the policy to both interfaces. This enables the two physical interfaces to use the same source interface to negotiate IPsec SAs. As long as the source interface is up, the negotiated IPsec SAs will not be removed and will keep working, regardless of link failover.

After an IPsec policy is applied to a service interface and IPsec SAs have been established, if you bind the IPsec policy to a source interface, the existing IPsec SAs are deleted.

Only the IKE-based IPsec policies can be bound to a source interface.

An IPsec policy can be bound to only one source interface. If you execute this command multiple times for the same IPsec policy, the most recent configuration takes effect.

A source interface can be bound to multiple IPsec policies.

H3C recommends that you use a stable interface, such as a Loopback interface, as a source interface.

Examples

# Bind the IPsec policy map to source interface Loopback 11.

<Sysname> system-view

[Sysname] ipsec policy map local-address loopback 11

Related commands

ipsec { ipv6-policy | policy }

ipsec { ipv6-policy-template | policy-template }

Use ipsec { ipv6-policy-template | policy-template } to create an IPsec policy template entry and enter its view, or enter the view of an existing IPsec policy template entry.

Use undo ipsec { ipv6-policy-template | policy-template } to delete the specified IPsec policy template.

Syntax

ipsec { ipv6-policy-template | policy-template } template-name seq-number

undo ipsec { ipv6-policy-template | policy-template } template-name [ seq-number ]

Default

No IPsec policy templates exist.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy-template: Specifies an IPv6 IPsec policy template.

policy-template: Specifies an IPv4 IPsec policy template.

template-name: Specifies a name for the IPsec policy template, a case-insensitive string of 1 to 63 characters.

seq-number: Specifies a sequence number for the IPsec policy template, in the range of 1 to 65535. A smaller number indicates a higher priority.

Usage guidelines

The configurable parameters for an IPsec policy template are similar to the parameters that you use when you configure an IKE-based IPsec policy. However, all parameters except for the IPsec transform sets and the IKE peer are optional for an IPsec policy template.

An IPsec policy template is a set of IPsec policy template entries that have the same name but different sequence numbers.

With the seq-number argument specified, the undo command deletes an IPsec policy template entry.

An IPv4 IPsec policy template and an IPv6 IPsec policy template can have the same name.

Examples

# Create an IPsec policy template entry with the name template1 and sequence number 100, and enter the IPsec policy template view.

<Sysname> system-view

[Sysname] ipsec policy-template template1 100

[Sysname-ipsec-policy-template-template1-100]

Related commands

·          display ipsec { ipv6-policy-template | policy-template }

·          ipsec { ipv6-policy | policy }

·          ipsec { ipv6-policy | policy } isakmp template

ipsec anti-replay check

Use ipsec anti-replay check to enable IPsec anti-replay checking.

Use undo ipsec anti-replay check to disable IPsec anti-replay checking.

Syntax

ipsec anti-replay check

undo ipsec anti-replay check

Default

IPsec anti-replay checking is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

IPsec packet de-encapsulation involves complicated calculation. De-encapsulation of replayed packets is not necessary but consumes large amounts of resources and degrades performance, resulting in DoS. IPsec anti-replay checking, when enabled, is performed before the de-encapsulation process, reducing resource waste.

In some situations, service data packets are received in a different order than their original order. The IPsec anti-replay feature drops them as replayed packets, which impacts communications. If this happens, disable IPsec anti-replay checking or adjust the size of the anti-replay window as required.

IPsec anti-replay checking does not affect manually created IPsec SAs. According to the IPsec protocol, only IPsec SAs negotiated by IKE support anti-replay checking.

Examples

# Enable IPsec anti-replay checking.

<Sysname> system-view

[Sysname] ipsec anti-replay check

Related commands

ipsec anti-replay window

ipsec anti-replay window

Use ipsec anti-replay window to set the anti-replay window size.

Use undo ipsec anti-replay window to restore the default.

Syntax

ipsec anti-replay window width

undo ipsec anti-replay window

Default

The anti-replay window size is 64.

Views

System view

Predefined user roles

network-admin

Parameters

width: Specifies the size for the anti-replay window. It can be 64, 128, 256, 512, or 1024 packets.

Usage guidelines

Changing the anti-replay window size affects only the IPsec SAs negotiated later.

In some cases, some service data packets might be received in a very different order than their original order, and the IPsec anti-replay feature might drop them as replayed packets, affecting normal communications. If this happens, disable IPsec anti-replay checking or adjust the size of the anti-replay window as required.

Examples

# Set the size of the anti-replay window to 128.

<Sysname> system-view

[Sysname] ipsec anti-replay window 128

Related commands

ipsec anti-replay check

ipsec apply

Use ipsec apply to apply an IPsec policy to an interface.

Use undo ipsec apply to remove the application.

Syntax

ipsec apply { ipv6-policy | policy } policy-name

undo ipsec apply { ipv6-policy | policy }

Default

No IPsec policy is applied to an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 IPsec policy.

policy: Specifies an IPv4 IPsec policy.

policy-name: Name of an IPsec policy, a case-insensitive string of 1 to 63 characters.

Usage guidelines

You can apply only one IPsec policy on an interface.

An IKE-based IPsec policy can be applied to multiple interfaces. A manual IPsec policy can be applied to only one interface.

Examples

# Apply the IPsec policy policy1 to interface VLAN-interface 200.

<Sysname> system-view

[Sysname] interface vlan-interface 200

[Sysname-Vlan-interface200] ipsec apply policy policy1

Related commands

·          display ipsec { ipv6-policy | policy }

·          ipsec { ipv6-policy | policy }

ipsec decrypt-check enable

Use ipsec decrypt-check enable to enable ACL checking for de-encapsulated IPsec packets.

Use undo ipsec decrypt-check to disable ACL checking for de-encapsulated IPsec packets.

Syntax

ipsec decrypt-check enable

undo ipsec decrypt-check enable

Default

ACL checking for de-encapsulated IPsec packets is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

In tunnel mode, the IP packet encapsulated in an inbound IPsec packet might not be under the protection of the ACL specified in the IPsec policy. After being de-encapsulated, such packets bring threats to the network security. In this scenario, you can enable ACL checking for de-encapsulated IPsec packets. All packets failing the checking are discarded, improving the network security.

Examples

# Enable ACL checking for de-encapsulated IPsec packets.

<Sysname> system-view

[Sysname] ipsec decrypt-check enable

ipsec df-bit

Use ipsec df-bit to configure the DF bit for the outer IP header of IPsec packets on an interface.

Use undo ipsec df-bit to restore the default.

Syntax

ipsec df-bit { clear | copy | set }

undo ipsec df-bit

Default

The DF bit is not configured for the outer IP header of IPsec packets on an interface. The global DF bit setting is used.

Views

Interface view

Predefined user roles

network-admin

Parameters

clear: Clears the DF bit in the outer IP header. IPsec packets can be fragmented.

copy: Copies the DF bit setting of the original IP header to the outer IP header.

set: Sets the DF bit in the outer IP header. IPsec packets cannot be fragmented.

Usage guidelines

This command is effective only when the IPsec encapsulation mode is tunnel mode. It is not effective in transport mode because the outer IP header is not added in transport mode.

This command does not change the DF bit for the original IP header of IPsec packets.

If multiple interfaces use an IPsec policy that is bound to a source interface, you must use the same DF bit setting on these interfaces.

Packet fragmentation and reassembly might cause packet forwarding to be delayed. You can set the DF bit to avoid the forwarding delay. However, to prevent the IPsec packets from being discarded, you must make sure the path MTU is larger than the IPsec packet size. If you cannot make sure of this, H3C recommends that you clear the DF bit.

Examples

# Set the DF bit in the outer IP header of IPsec packets on VLAN-interface 200.

<Sysname> system-view

[Sysname] interface vlan-interface 200

[Sysname-Vlan-interface200] ipsec df-bit set

Related commands

ipsec global-df-bit

ipsec fragmentation

Use ipsec fragmentation to configure the IPsec fragmentation feature.

Use undo ipsec fragmentation to restore the default.

Syntax

ipsec fragmentation { after-encryption | before-encryption }

undo ipsec fragmentation

Default

The device fragments packets before IPsec encapsulation.

Views

System view

Predefined user roles

network-admin

Parameters

after-encryption: Fragments packets after IPsec encapsulation.

before-encryption: Fragments packets before IPsec encapsulation.

Usage guidelines

If you configure the device to fragment packets before IPsec encapsulation, the device predetermines the encapsulated packet size before the actual encapsulation. If the encapsulated packet size exceeds the MTU of the output interface, the device fragments the packets before encapsulation. If a packet's DF bit is set, the device drops the packet and sends an ICMP error message.

If you configure the device to fragment packets after IPsec encapsulation, the device directly encapsulates the packets and fragments the encapsulated packets in subsequent service modules.

Examples

# Configure the device to fragment packets after IPsec encapsulation.

<Sysname>system-view

[Sysname] ipsec fragmentation after-encryption

ipsec global-df-bit

Use ipsec global-df-bit to configure the DF bit for the outer IP header of IPsec packets on all interfaces.

Use undo ipsec global-df-bit to restore the default.

Syntax

ipsec global-df-bit { clear | copy | set }

undo ipsec global-df-bit

Default

The DF bit setting of the original IP header is copied to the outer IP header for IPsec packets.

Views

System view

Predefined user roles

network-admin

Parameters

clear: Clears the DF bit in the outer IP header. IPsec packets can be fragmented.

copy: Copies the DF bit setting of the original IP header to the outer IP header.

set: Sets the DF bit in the outer IP header. IPsec packets cannot be fragmented.

Usage guidelines

This command is effective only when the IPsec encapsulation mode is tunnel mode. It is not effective in transport mode because the outer IP header is not added in transport mode.

This command does not change the DF bit for the original IP header of IPsec packets.

Packet fragmentation and reassembly might cause packet forwarding to be delayed. You can set the DF bit to avoid the forwarding delay. However, to prevent IPsec packets from being discarded, you must make sure the path MTU is larger than the IPsec packet size. If you cannot make sure of this, H3C recommends that you clear the DF bit.

Examples

# Set the DF bit in the outer IP header of IPsec packets on all interfaces.

<Sysname> system-view

[Sysname] ipsec global-df-bit set

Related commands

ipsec df-bit

ipsec limit max-tunnel

Use ipsec limit max-tunnel to set the maximum number of IPsec tunnels that can be established.

Use undo ipsec limit max-tunnel to restore the default.

Syntax

ipsec limit max-tunnel tunnel-limit

undo ipsec limit max-tunnel

Default

The number of IPsec tunnels is not limited.

Views

System view

Predefined user roles

network-admin

Parameters

tunnel-limit: Specifies the maximum number of IPsec tunnels, in the range of 1 to 4294967295.

Usage guidelines

To maximize concurrent performance of IPsec when memory is sufficient, increase the maximum number of IPsec tunnels. To ensure service availability when memory is insufficient, decrease the maximum number of IPsec tunnels.

Examples

# Set the maximum number of IPsec tunnels that can be established to 5000.

<Sysname> system-view

[Sysname] ipsec limit max-tunnel 5000

Related commands

ike limit

ipsec logging negotiation enable

Use ipsec logging negotiation enable to enable logging for IPsec negotiation.

Use undo ipsec logging negotiation packet enable to disable logging for IPsec negotiation.

Syntax

ipsec logging negotiation enable

undo ipsec logging negotiation enable

Default

Logging for IPsec negotiation is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command enables the device to output logs for the IPsec negotiation process.

Examples

# Enable logging for IPsec negotiation.

<Sysname> system-view

[Sysname] ipsec logging negotiation enable

ipsec logging packet enable

Use ipsec logging packet enable to enable logging for IPsec packets.

Use undo ipsec logging packet enable to disable logging for IPsec packets.

Syntax

ipsec logging packet enable

undo ipsec logging packet enable

Default

Logging for IPsec packets is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

After logging for IPsec packets is enabled, the device outputs a log when an IPsec packet is discarded. IPsec packets might be discarded due to lack of inbound SA, AH/ESP authentication failure, or ESP encryption failure. A log contains the source and destination IP addresses, SPI, and sequence number of the packet, and the reason it was discarded.

Examples

# Enable logging for IPsec packets.

<Sysname> system-view

[Sysname] ipsec logging packet enable

ipsec redundancy enable

Use ipsec redundancy enable to enable IPsec redundancy.

Use undo ipsec redundancy enable to disable IPsec redundancy.

Syntax

ipsec redundancy enable

undo ipsec redundancy enable

Default

IPsec redundancy is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

With IPsec redundancy enabled, the system synchronizes the following information from the active device to the standby device at configurable intervals:

·          Lower bound values of the IPsec anti-replay window for inbound packets.

·          IPsec anti-replay sequence numbers for outbound packets.

The synchronization ensures uninterrupted IPsec traffic forwarding and anti-replay protection when the active device fails.

To configure synchronization intervals, use the redundancy replay-interval command.

Examples

# Enable IPsec redundancy.

<Sysname> system-view

[Sysname] ipsec redundancy enable

Related commands

redundancy replay-interval

ipsec sa global-duration

Use ipsec sa global-duration to configure the global IPsec SA lifetime.

Use undo ipsec sa global-duration to restore the default.

Syntax

ipsec sa global-duration { time-based seconds | traffic-based kilobytes }

undo ipsec sa global-duration { time-based | traffic-based }

Default

The time-based global lifetime is 3600 seconds, and the traffic-based global lifetime is 1843200 kilobytes.

Views

System view

Predefined user roles

network-admin

Parameters

time-based seconds: Specifies the time-based global lifetime for IPsec SAs, in the range of 180 to 604800 seconds.

traffic-based kilobytes: Specifies the traffic-based global lifetime for IPsec SAs, in the range of 2560 to 4294967295 kilobytes. When traffic on an SA reaches this value, the SA expires.

Usage guidelines

You can also configure IPsec SA lifetimes in IPsec policy view or IPsec policy template view. The device prefers the IPsec SA lifetimes configured in IPsec policy view or IPsec policy template view over the global IPsec SA lifetimes.

When IKE negotiates IPsec SAs, it uses the local lifetime settings or those proposed by the peer, whichever are smaller.

An IPsec SA can have both a time-based lifetime and a traffic-based lifetime. The IPsec SA expires when either lifetime expires. Before the IPsec SA expires, IKE negotiates a new IPsec SA, which takes over immediately after its creation.

Examples

# Configure the global IPsec SA lifetime as 7200 seconds.

<Sysname> system-view

[Sysname] ipsec sa global-duration time-based 7200

# Configure the global IPsec SA lifetime as 10240 kilobytes.

[Sysname] ipsec sa global-duration traffic-based 10240

Related commands

·          display ipsec sa

·          sa duration

ipsec sa idle-time

Use ipsec sa idle-time to enable the global IPsec SA idle timeout feature and set the idle timeout. If no traffic matches an IPsec SA within the idle timeout interval, the IPsec SA is deleted.

Use undo ipsec sa idle-time to disable the global IPsec SA idle timeout feature.

Syntax

ipsec sa idle-time seconds

undo ipsec sa idle-time

Default

The global IPsec SA idle timeout feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Sets the IPsec SA idle timeout in the range of 60 to 86400 seconds.

Usage guidelines

This feature applies only to IPsec SAs negotiated by IKE.

The IPsec SA idle timeout can also be configured in IPsec policy view or IPsec policy template view, which takes precedence over the global IPsec SA timeout.

Examples

# Set the IPsec SA idle timeout to 600 seconds.

<Sysname> system-view

[Sysname] ipsec sa idle-time 600

Related commands

·          display ipsec sa

·          sa idle-time

ipsec transform-set

Use ipsec transform-set to create an IPsec transform set and enter its view, or enter the view of an existing IPsec transform set.

Use undo ipsec transform-set to delete an IPsec transform set.

Syntax

ipsec transform-set transform-set-name

undo ipsec transform-set transform-set-name

Default

No IPsec transform sets exist.

Views

System view

Predefined user roles

network-admin

Parameters

transform-set-name: Specifies a name for the IPsec transform set, a case-insensitive string of 1 to 63 characters.

Usage guidelines

An IPsec transform set, part of an IPsec policy, defines the security parameters for IPsec SA negotiation, including the security protocol, encryption algorithms, and authentication algorithms.

Examples

# Create an IPsec transform set named tran1 and enter its view.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-transform-set-tran1]

Related commands

display ipsec transform-set

local-address

Use local-address to configure the local IP address for the IPsec tunnel.

Use undo local-address to restore the default.

Syntax

local-address { ipv4-address | ipv6 ipv6-address }

undo local-address

Default

The primary IPv4 address of the interface to which the IPsec policy is applied is used as the local IPv4 address. The first IPv6 address of the interface to which the IPsec policy is applied is used as the local IPv6 address.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the local IPv4 address for the IPsec tunnel.

ipv6 ipv6-address: Specifies the local IPv6 address for the IPsec tunnel.

Usage guidelines

The remote IP address on the IKE negotiation initiator must be the same as the local address on the IKE negotiation responder.

In a VRRP network, the local IP address must be the virtual IP address of the VRRP group to which the IPsec-applied interface belongs.

Examples

# Configure the local address 1.1.1.1 for the IPsec tunnel.

<Sysname> system-view

[Sysname] ipsec policy map 1 isakmp

[Sysname-ipsec-policy-isakmp-map-1] local-address 1.1.1.1

Related commands

remote-address

pfs

Use pfs to enable the Perfect Forward Secrecy (PFS) feature for an IPsec transform set, used for IKE negotiation.

Use undo pfs to restore the default.

Syntax

pfs { dh-group1 | dh-group2 | dh-group5 | dh-group14 | dh-group24 | dh-group19 | dh-group20 }

undo pfs

Default

The PFS feature is disabled for the IPsec transform set.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

dh-group1: Uses 768-bit Diffie-Hellman group.

dh-group2: Uses 1024-bit Diffie-Hellman group.

dh-group5: Uses 1536-bit Diffie-Hellman group.

dh-group14: Uses 2048-bit Diffie-Hellman group.

dh-group24: Uses 2048-bit and 256-bit subgroup Diffie-Hellman group.

dh-group19: Uses 256-bit ECP Diffie-Hellman group. This keyword is available only for IKEv2.

dh-group20: Uses 384-bit ECP Diffie-Hellman group. This keyword is available only for IKEv2.

Usage guidelines

In terms of security and necessary calculation time, the following groups are in descending order: 384-bit ECP Diffie-Hellman group (dh-group20), 256-bit ECP Diffie-Hellman group (dh-group19), 2048-bit and 256-bit subgroup Diffie-Hellman group (dh-group24), 2048-bit Diffie-Hellman group (dh-group14), 1536-bit Diffie-Hellman group (dh-group5), 1024-bit Diffie-Hellman group (dh-group2), and 768-bit Diffie-Hellman group (dh-group1).

The security level of the Diffie-Hellman group of the initiator must be higher than or equal to that of the responder.

The end without the PFS feature performs IKE negotiation according to the PFS requirements of the peer end.

Examples

# Enable PFS using 2048-bit Diffie-Hellman group for IPsec transform set tran1.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] pfs dh-group14

protocol

Use protocol to specify a security protocol for an IPsec transform set.

Use undo protocol to restore the default.

Syntax

protocol { ah | ah-esp | esp }

undo protocol

Default

The IPsec transform set uses the ESP protocol.

Views

IPsec transform set view

Predefined user roles

network-admin

Parameters

ah: Specifies the AH protocol.

ah-esp: Specifies using the ESP protocol first and then using the AH protocol.

ah: Specifies the AH protocol.

Usage guidelines

The two tunnel ends must use the same security protocol in the IPsec transform set.

Examples

# Specify the AH protocol for the IPsec transform set.

<Sysname> system-view

[Sysname] ipsec transform-set tran1

[Sysname-ipsec-transform-set-tran1] protocol ah

qos pre-classify

Use qos pre-classify to enable the QoS pre-classify feature.

Use undo qos pre-classify to disable the QoS pre-classify feature.

Syntax

qos pre-classify

undo qos pre-classify

Default

The QoS pre-classify feature is disabled. QoS uses the new IP header of IPsec packets to perform traffic classification.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Usage guidelines

The QoS pre-classify feature enables QoS to classify packets by using the IP header of the original IP packets.

Examples

# Enable the QoS pre-classify feature.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] qos pre-classify

redundancy replay-interval

Use redundancy replay-interval to set the anti-replay window lower bound value synchronization interval for inbound packets and the sequence number synchronization interval for outbound packets.

Use undo redundancy replay-interval to restore the default.

Syntax

redundancy replay-interval inbound inbound-interval outbound outbound-interval

undo redundancy replay-interval

Default

The active device synchronizes the anti-replay window lower bound value every time it receives 1000 packets and synchronizes the sequence number every time it sends 100000 packets.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

inbound inbound-interval: Sets the interval at which the active device synchronizes the lower bound value of the IPsec anti-replay window to the standby device. This interval is expressed in the number of received packets, in the range of 0 to 1000. If you set the value to 0, the lower bound value of the anti-replay window will not be synchronized.

outbound outbound-interval: Sets the interval at which the active device synchronizes the IPsec anti-replay sequence number to the standby device. This interval is expressed in the number of sent packets, in the range of 1000 to 100000.

Usage guidelines

The intervals take effect only after you enable IPsec redundancy by using the ipsec redundancy enable command.

A short interval improves the anti-replay information consistency between the active device and the standby device, but it sacrifices the forwarding performance of the devices.

Examples

# Set the anti-replay window lower bound value synchronization interval for inbound packets to 800. Set the sequence number synchronization interval for outbound packets to 50000.

<Sysname> system-view

[Sysname] ipsec policy test 1 manual

[sysname-ipsec-policy-manual-test-1] redundancy replay-interval inbound 800 outbound 50000

Related commands

·          ipsec anti-replay check

·          ipsec anti-replay window

·          ipsec redundancy enable

remote-address

Use remote-address to configure the remote IP address for the IPsec tunnel.

Use undo remote-address to restore the default.

Syntax

remote-address { [ ipv6 ] host-name | ipv4-address | ipv6 ipv6-address }

undo remote-address { [ ipv6 ] host-name | ipv4-address | ipv6 ipv6-address }

Default

No remote IP address is specified for the IPsec tunnel.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies a remote IPv6 address. If you do not specify this keyword, you specify an IPv4 address or host name.

hostname: Specifies the remote host name, a case-insensitive string of 1 to 253 characters. The host name can be resolved to an IP address by the DNS server.

ipv4-address: Specifies a remote IPv4 address.

ipv6-address: Specifies a remote IPv6 address.

Usage guidelines

This remote IP address configuration is required on the IKE negotiation initiator and optional on the responder if the responder uses an IPsec policy template.

A manual IPsec policy does not support DNS. Therefore, you must specify a remote IP address rather than a remote host name for the manual IPsec policy.

If you configure a remote host name, make sure the local end can always resolve the host name into the latest IP address of the remote end.

·          If a DNS server is used for resolution, the local end queries the remote IP address again from the DNS server after the previously cached remote IP address expires. This mechanism ensures that the local end can always obtain the latest remote IP address.

·          If a static DNS entry is used for resolution, you must reconfigure the remote-address command whenever the remote IP address changes. Without the reconfiguration, the local end cannot obtain the latest remote IP address.

For example, the local end has a static DNS entry which maps the host name test to the IP address 1.1.1.1. Configure the following commands:

# Configure the remote host name to test for the IPsec tunnel in the IPsec policy policy1.

[Sysname] ipsec policy policy1 1 isakmp

[Sysname-ipsec-policy-isakmp-policy1-1] remote-address test

# Change the IP address for the host test to 2.2.2.2.

[Sysname] ip host test 2.2.2.2

In this case, you must reconfigure the remote host name for the IPsec policy policy1 so that the local end can obtain the latest IP address of the remote host.

# Reconfigure the remote host name to test for the IPsec tunnel in the IPsec policy policy1.

[Sysname] ipsec policy policy1 1 isakmp

[Sysname -ipsec-policy-isakmp-policy1-1] remote-address test

Examples

# Specify the remote IP address 10.1.1.2 for the IPsec tunnel.

<Sysname> system-view

[Sysname] ipsec policy policy1 10 manual

[Sysname-ipsec-policy-manual-policy1-10] remote-address 10.1.1.2

Related commands

·          ip host (see Layer 3—IP Services Commands Reference)

·          local-address

reset ipsec sa

Use reset ipsec sa to clear IPsec SAs.

Syntax

reset ipsec sa [ { ipv6-policy | policy } policy-name [ seq-number ] | remote { ipv4-address | ipv6 ipv6-address } | spi { ipv4-address | ipv6 ipv6-address } { ah | esp } spi-num ]

Views

User view

Predefined user roles

network-admin

Parameters

{ ipv6-policy | policy } policy-name [ seq-number ]: Clears IPsec SAs for the specified IPsec policy.

·          ipv6-policy: Specifies an IPv6 IPsec policy.

·          policy: Specifies an IPv4 IPsec policy.

·          policy-name: Specifies the name of the IPsec policy, a case-insensitive string of 1 to 63 characters.

·          seq-number: Specifies the sequence number of an IPsec policy entry, in the range of 1 to 65535. If you do not specify this argument, all the entries in the IPsec policy are specified.

remote: Clears IPsec SAs for the specified remote address.

·          ipv4-address: Specifies a remote IPv4 address.

·          ipv6 ipv6-address: Specifies a remote IPv6 address.

spi { ipv4-address | ipv6 ipv6-address } { ah | esp } spi-num ]: Clears IPsec SAs matching the specified SA triplet: the remote address, the security protocol, and the SPI.

·          ipv4-address: Specifies a remote IPv4 address.

·          ipv6 ipv6-address: Specifies a remote IPv6 address.

·          ah: Specifies the AH protocol.

·          esp: Specifies the ESP protocol.

·          spi-num: Specifies the security parameter index in the range of 256 to 4294967295.

Usage guidelines

If you do not specify any parameters, this command clears all IPsec SAs.

If you specify an SA triplet, this command clears the IPsec SA matching the triplet, and all the other IPsec SAs that were established during the same negotiation process, including the corresponding IPsec SA in the other direction, and the inbound and outbound IPSec SAs using the other security protocol (AH or ESP).

An outbound SA is uniquely identified by an SA triplet and an inbound SA is uniquely identified by an SPI. To clear IPsec SAs by specifying a triplet in the outbound direction, you should provide the remote IP address, the security protocol, and the SPI. To clear IPsec SAs by specifying a triplet in the inbound direction, you should provide the SPI and use any valid values for the other two parameters.

After a manual IPsec SA is cleared, the system automatically creates a new SA based on the parameters of the IPsec policy. After IKE negotiated SAs are cleared, the system creates new SAs only when IKE negotiation is triggered by packets.

Examples

# Clear all IPsec SAs.

<Sysname> reset ipsec sa

# Clear the inbound and outbound IPsec SAs for the triplet of SPI 256, remote IP address 10.1.1.2, and security protocol AH.

<Sysname> reset ipsec sa spi 10.1.1.2 ah 256

# Clear all IPsec SAs for the remote IP address 10.1.1.2.

<Sysname> reset ipsec sa remote 10.1.1.2

# Clear all IPsec SAs for the entry 10 of the IPsec policy policy1.

<Sysname> reset ipsec sa policy policy1 10

# Clear all IPsec SAs for the IPsec policy policy1.

<Sysname> reset ipsec sa policy policy1

Related commands

display ipsec sa

reset ipsec statistics

Use reset ipsec statistics to clear IPsec packet statistics.

Syntax

reset ipsec statistics[ tunnel-id tunnel-id ]

Views

User view

Predefined user roles

network-admin

Parameters

tunnel-id tunnel-id: Clears IPsec packet statistics for the specified IPsec tunnel. The value range for the tunnel-id argument is 0 to 4294967295. If you do not specify this option, the command clears all IPsec packet statistics.

Examples

# Clear IPsec packet statistics.

<Sysname> reset ipsec statistics

Related commands

display ipsec statistics

reverse-route dynamic

Use reverse-route dynamic to enable the IPsec reverse route inject (RRI) feature.

Use undo reverse-route dynamic to disable IPsec RRI.

Syntax

reverse-route dynamic

undo reverse-route dynamic

Default

IPsec RRI is disabled.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Usage guidelines

IPsec RRI is usually used on a gateway device at the headquarters side in an IPsec VPN.

After IPsec RRI is enabled for an IPsec policy or an IPsec policy template on a gateway device, the gateway device automatically creates a static route upon IPsec SA creation according to this IPsec policy or IPsec policy template.

In the static route, the destination IP address is the protected peer private network, and the next hop is the IP address of the remote tunnel interface.

When you enable or disable IPsec RRI for an IPsec policy, the device deletes all IPsec SAs that are created according to this IPsec policy, and the associated static routes.

To display the static routes created by RRI, use the display ip routing-table command.

Examples

# Enable IPsec RRI to create a static route according to the IPsec SA negotiated by the specified IPsec policy. The destination IP address is the protected peer private network 3.0.0.0/24, and the next hop is the IP address (1.1.1.2) of the remote tunnel interface.

<Sysname> system-view

[Sysname] ipsec policy 1 1 isakmp

[Sysname-ipsec-policy-isakmp-1-1] reverse-route dynamic

[Sysname-ipsec-policy-isakmp-1-1] quit

# Display the routing table. You can see a created static route. (Other information is not shown.)

[Sysname] display ip routing-table

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

3.0.0.0/24          Static 60   0            1.1.1.2         Vlan-interface100

Related commands

·          display ip routing-table (Layer 3—IP Routing Command Reference)

·          ipsec policy

·          ipsec policy-template

reverse-route preference

Use reverse-route preference to change the preference of the static routes created by IPsec RRI.

Use undo reverse-route preference to restore the default.

Syntax

reverse-route preference number

undo reverse-route preference

Default

The preference for the static routes created by IPsec RRI is 60.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

number: Sets a preference value. The value range is 1 to 255. A smaller value represents a higher preference.

Usage guidelines

When you change this preference in an IPsec policy, the device deletes all IPsec SAs created according to this IPsec policy, and the associated static routes.

Examples

# Change the preference to 100 for static routes created by IPsec RRI.

<Sysname> system-view

[Sysname] ipsec policy 1 1 isakmp

[Sysname-ipsec-policy-isakmp-1-1] reverse-route preference 100

Related commands

·          ipsec policy

·          ipsec policy-template

reverse-route tag

Use reverse-route tag to set a route tag for the static routes created by IPsec RRI.

Use undo reverse-route tag to restore the default.

Syntax

reverse-route tag tag-value

undo reverse-route tag

Default

The tag value is 0 for the static routes created by IPsec RRI.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

tag-value: Sets a tag value. The value range is 1 to 4294967295.

Usage guidelines

The tag value set by this command helps in implementing flexible route control through routing policies. When you change this tag value in an IPsec policy, the device deletes all IPsec SAs created by this IPsec policy, and all associated static routes.

Examples

# Set the tag value to 50 for the static routes created by IPsec RRI.

<Sysname>system-view

[Sysname] ipsec policy 1 1 isakmp

[Sysname-ipsec-policy-isakmp-1-1] reverse-route tag 50

Related commands

·          ipsec policy

·          ipsec policy-template

sa duration

Use sa duration to set an SA lifetime for an IPsec policy or IPsec policy template.

Use undo sa duration to remove the specified type of SA lifetime.

Syntax

sa duration { time-based seconds | traffic-based kilobytes }

undo sa duration { time-based | traffic-based }

Default

The SA lifetime of an IPsec policy or IPsec policy template is the current global SA lifetime.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

time-based seconds: Sets the time-based SA lifetime in the range of 180 to 604800 seconds.

traffic-based kilobytes: Sets the traffic-based SA lifetime in the range of 2560 to 4294967295 kilobytes.

Usage guidelines

IKE prefers the SA lifetime of the IPsec policy or IPsec policy template over the global SA lifetime configured by the ipsec sa global-duration command. If the IPsec policy or IPsec policy template is not configured with the SA lifetime, IKE uses the global SA lifetime for SA negotiation.

During SA negotiation, IKE selects the shorter SA lifetime between the local SA lifetime and the remote SA lifetime.

Examples

# Set the SA lifetime for the IPsec policy policy1 to 7200 seconds.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 isakmp

[Sysname-ipsec-policy-isakmp-policy1-100] sa duration time-based 7200

# Set the SA lifetime for the IPsec policy policy1 to 20 MB. The IPsec SA expires after transmitting 20480 bytes.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 isakmp

[Sysname-ipsec-policy-isakmp-policy1-100] sa duration traffic-based 20480

Related commands

·          display ipsec sa

·          ipsec sa global-duration

sa hex-key authentication

Use sa hex-key authentication to configure a hexadecimal authentication key for manual IPsec SAs.

Use undo sa hex-key authentication to remove the hexadecimal authentication key.

Syntax

sa hex-key authentication { inbound | outbound } { ah | esp } { cipher | simple } string

undo sa hex-key authentication { inbound | outbound } { ah | esp }

Default

No authentication key is configured for manual IPsec SAs.

Views

IPsec policy view

Predefined user roles

network-admin

Parameters

inbound: Specifies a hexadecimal authentication key for inbound SAs.

outbound: Specifies a hexadecimal authentication key for outbound SAs.

ah: Uses AH.

esp: Uses ESP.

cipher: Specifies a key in encrypted form.

simple: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its plaintext form is case insensitive and must be a 16-byte hexadecimal string for HMAC-MD5, a 20-byte hexadecimal string for HMAC-SHA1, and a 32-byte hexadecimal string for HMAC-SM3. Its encrypted form is a case-sensitive string of 1 to 85 characters.

Usage guidelines

This command applies only to manual IPsec policies.

You must set an authentication key for both the inbound and outbound SAs.

The local inbound SA must use the same authentication key as the remote outbound SA, and the local outbound SA must use the same authentication key as the remote inbound SA.

If you execute this command multiple times, the most recent configuration takes effect.

The keys for the IPsec SAs at the two tunnel ends must be input in the same format (either in hexadecimal or character format). Otherwise, they cannot establish an IPsec tunnel.

Examples

# Configure plaintext authentication keys 0x112233445566778899aabbccddeeff00 and 0xaabbccddeeff001100aabbccddeeff00 for the inbound and outbound SAs that use AH.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] sa hex-key authentication inbound ah simple 112233445566778899aabbccddeeff00

[Sysname-ipsec-policy-manual-policy1-100] sa hex-key authentication outbound ah simple aabbccddeeff001100aabbccddeeff00

Related commands

·          display ipsec sa

·          sa string-key

sa hex-key encryption

Use sa encryption-hex to configure a hexadecimal encryption key for manual IPsec SAs.

Use undo sa encryption-hex to remove the hexadecimal encryption key.

Syntax

sa hex-key encryption { inbound | outbound } esp { cipher | simple } string

undo sa hex-key encryption { inbound | outbound } esp

Default

No encryption key is configured for manual IPsec SAs.

Views

IPsec policy view

Predefined user roles

network-admin

Parameters

inbound: Specifies a hexadecimal encryption key for inbound SAs.

outbound: Specifies a hexadecimal encryption key for outbound SAs.

esp: Uses ESP.

cipher: Specifies a key in encrypted form.

simple: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. Its encrypted form is a case-sensitive string of 1 to 117 characters. Its plaintext form is a case-insensitive hexadecimal string and the key length varies by algorithm.

The following matrix shows the key length for the algorithms:

 

Algorithm

Key length (bytes)

DES-CBC

8

3DES-CBC

24

AES128-CBC

16

AES192-CBC

24

AES256-CBC

32

SM1128-CBC

16

SM1192-CBC

24

SM1256-CBC

32

 

Usage guidelines

This command applies only to manual IPsec policies.

You must set an encryption key for both the inbound and outbound SAs.

The local inbound SA must use the same encryption key as the remote outbound SA, and the local outbound SA must use the same encryption key as the remote inbound SA.

If you execute this command multiple times, the most recent configuration takes effect.

The keys for the IPsec SAs at the two tunnel ends must be configured in the same format (either in hexadecimal or character format). Otherwise, they cannot establish an IPsec tunnel.

Examples

# Configure plaintext encryption keys 0x1234567890abcdef and 0xabcdefabcdef1234 for the inbound and outbound IPsec SAs that use ESP.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] sa hex-key encryption inbound esp simple 1234567890abcdef

[Sysname-ipsec-policy-manual-policy1-100] sa hex-key encryption outbound esp simple abcdefabcdef1234

Related commands

·          display ipsec sa

·          sa string-key

sa idle-time

Use sa idle-time to set the IPsec SA idle timeout for an IPsec policy or IPsec policy template. If no traffic matches an IPsec SA within the idle timeout interval, the IPsec SA is deleted.

Use undo sa idle-time to restore the default.

Syntax

sa idle-time seconds

undo sa idle-time

Default

An IPsec policy or IPsec policy template uses the global IPsec SA idle timeout.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

seconds: Sets the IPsec SA idle timeout in the range of 60 to 86400 seconds.

Usage guidelines

This feature applies only to IPsec SAs negotiated by IKE and takes effect when the ipsec sa idle-time command has been configured.

The IPsec SA idle timeout configured by this command takes precedence over the global IPsec SA timeout configured by the ipsec sa idle-time command.

Examples

# Set the IPsec SA idle timeout to 600 seconds for the IPsec policy.

<Sysname> system-view

[Sysname] ipsec policy map 100 isakmp

[Sysname-ipsec-policy-isakmp-map-100] sa idle-time 600

Related commands

·          display ipsec sa

·          ipsec sa idle-time

sa spi

Use sa spi to configure an SPI for IPsec SAs.

Use undo sa spi to remove the SPI.

Syntax

sa spi { inbound | outbound } { ah | esp } spi-number

undo sa spi { inbound | outbound } { ah | esp }

Default

No SPI is configured for IPsec SAs.

Views

IPsec policy view

Predefined user roles

network-admin

Parameters

inbound: Specifies an SPI for inbound SAs.

outbound: Specifies an SPI for outbound SAs.

ah: Uses AH.

esp: Uses ESP.

spi-number: Specifies a security parameters index (SPI) in the range of 256 to 4294967295.

Usage guidelines

This command applies only to manual IPsec policies.

You must configure an SPI for both inbound and outbound SAs, and make sure the SAs in each direction are unique: For an outbound SA, make sure its triplet (remote IP address, security protocol, and SPI) is unique. For an inbound SA, make sure its SPI is unique.

The local inbound SA must use the same SPI as the remote outbound SA, and the local outbound SA must use the same SPI as the remote inbound SA.

Examples

# Set the SPI for the inbound SA to 10000 and the SPI for the outbound SA to 20000 in a manual IPsec policy.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] sa spi inbound ah 10000

[Sysname-ipsec-policy-manual-policy1-100] sa spi outbound ah 20000

Related commands

display ipsec sa

sa string-key

Use sa string-key to set a key string (a key in character format) for manual IPsec SAs.

Use undo sa string-key to remove the key string.

Syntax

sa string-key { inbound | outbound } { ah | esp } [ cipher | simple ] string

undo sa string-key { inbound | outbound } { ah | esp }

Default

No key string is configured for manual IPsec SAs.

Views

IPsec policy view

Predefined user roles

network-admin

Parameters

inbound: Sets a key string for inbound IPsec SAs.

outbound: Sets a key string for outbound IPsec SAs.

ah: Uses AH.

esp: Uses ESP.

cipher: Specifies a key string in encrypted form.

simple: Specifies a key string in plaintext form. For security purposes, the key string specified in plaintext form will be stored in encrypted form.

string: Specifies the key string. Its encrypted form is a case-sensitive string of 1 to 373 characters. Its plaintext form is a case-sensitive string of 1 to 255 characters. Using the key string, the system automatically generates keys that meet the algorithm requirements. When the protocol is ESP, the system automatically generates keys for the authentication algorithm and encryption algorithm.

Usage guidelines

This command applies only to manual IPsec policies.

You must set a key for both inbound and outbound SAs.

The local inbound SA must use the same key as the remote outbound SA, and the local outbound SA must use the same key as the remote inbound SA.

If you execute this command multiple times, the most recent configuration takes effect.

The keys for the IPsec SAs at the two tunnel ends must be input in the same format (either in hexadecimal or character format). Otherwise, they cannot establish an IPsec tunnel.

Examples

# Configure the inbound and outbound SAs that use AH to use the plaintext keys abcdef and efcdab, respectively.

<Sysname> system-view

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] sa string-key inbound ah simple abcdef

[Sysname-ipsec-policy-manual-policy1-100] sa string-key outbound ah simple efcdab

Related commands

·          display ipsec sa

·          sa hex-key

security acl

Use security acl to specify an ACL for an IPsec policy or IPsec policy template.

Use undo security acl to restore the default.

Syntax

security acl [ ipv6 ] { acl-number | name acl-name } [ aggregation | per-host ]

undo security acl

Default

An IPsec policy or IPsec policy template does not use an ACL.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an IPv6 ACL.

acl-number: Specifies an ACL by its number in the range of 3000 to 3999.

name acl-name: Specifies an ACL by its name, a case-insensitive string of 1 to 63 characters.

aggregation: Specifies the data protection mode as aggregation. The device does not support protecting IPv6 data flows in aggregation mode.

per-host: Specifies the data protection mode as per-host.

Usage guidelines

An IKE-based IPsec policy supports the following data flow protection modes:

·          Standard mode—One IPsec tunnel protects one data flow. The data flow permitted by an ACL rule is protected by one IPsec tunnel that is established solely for it. The standard mode is used if you do not specify the aggregation or the per-host mode.

·          Aggregation mode—One IPsec tunnel protects all data flows permitted by all the rules of an ACL. This mode is only used to communicate with old-version devices.

·          Per-host mode—One IPsec tunnel protects one host-to-host data flow. One host-to-host data flow is identified by one ACL rule and protected by one IPsec tunnel established solely for it. This mode consumes more system resources when multiple data flows exist between two subnets to be protected.

A manual IPsec policy supports only the aggregation mode.

Examples

# Specify IPv4 advanced ACL 3001 for the IPsec policy policy1.

<Sysname> system-view

[Sysname] acl advanced 3001

[Sysname-acl-ipv4-adv-3001] rule permit tcp source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255

[Sysname-acl-ipv4-adv-3001] quit

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] security acl 3001

# Specify IPv4 advanced ACL 3002 for the IPsec policy policy2 and specify the data protection mode as aggregation.

<Sysname> system-view

[Sysname] acl advanced 3002

[Sysname-acl-ipv4-adv-3002] rule 0 permit ip source 10.1.2.1 0.0.0.255 destination 10.1.2.2 0.0.0.255

[Sysname-acl-ipv4-adv-3002] rule 1 permit ip source 10.1.3.1 0.0.0.255 destination 10.1.3.2 0.0.0.255

[Sysname] ipsec policy policy2 1 isakmp

[Sysname-ipsec-policy-isakmp-policy2-1] security acl 3002 aggregation

Related commands

·          display ipsec sa

·          display ipsec tunnel

snmp-agent trap enable ipsec

Use snmp-agent  trap enable ipsec command to enable SNMP notifications for IPsec.

Use undo snmp-agent trap enable ipsec command to disable SNMP notifications for IPsec.

Syntax

snmp-agent trap enable ipsec [ auth-failure | decrypt-failure | encrypt-failure | global | invalid-sa-failure | no-sa-failure | policy-add | policy-attach | policy-delete | policy-detach tunnel-start | tunnel-stop] *

undo snmp-agent trap enable ipsec [ auth-failure | decrypt-failure | encrypt-failure | global | invalid-sa-failure | no-sa-failure | policy-add | policy-attach | policy-delete | policy-detach tunnel-start | tunnel-stop] *

Default

All SNMP notifications for IPsec are disabled.

Views

System view

Predefined user roles

network-admin

Parameters

auth-failure: Specifies SNMP notifications for authentication failures.

decrypt-failure: Specifies SNMP notifications for decryption failures.

encrypt-failure: Specifies SNMP notifications for encryption failures.

global: Specifies SNMP notifications globally.

invalid-sa-failure: Specifies SNMP notifications for invalid-SA failures.

no-sa-failure: Specifies SNMP notifications for SA-not-found failures.

policy-add: Specifies SNMP notifications for events of adding IPsec policies.

policy-attach: Specifies SNMP notifications for events of applying IPsec policies to interfaces.

policy-delete: Specifies SNMP notifications for events of deleting IPsec policies.

policy-detach: Specifies SNMP notifications for events of removing IPsec policies from interfaces.

tunnel-start: Specifies SNMP notifications for events of creating IPsec tunnels.

tunnel-stop: Specifies SNMP notifications for events of deleting IPsec tunnels.

Usage guidelines

If you do not specify any keywords, this command enables or disables all SNMP notifications for IPsec.

To generate and output SNMP notifications for a specific IPsec failure type or event type, perform the following tasks:

1.        Enable SNMP notifications for IPsec globally.

2.        Enable SNMP notifications for the failure type or event type.

Examples

# Enable SNMP notifications for IPsec globally.

<Sysname> system-view

[Sysname] snmp-agent trap enable ipsec global

# Enable SNMP notifications for events of creating IPsec tunnels.

[Sysname] snmp-agent trap enable ipsec tunnel-start

tfc enable

Use tfc enable to enable the Traffic Flow Confidentiality (TFC) padding feature.

Use undo tfc enable to disable TFC padding.

Syntax

tfc enable

undo tfc enable

Default

TFC padding is disabled.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Usage guidelines

The TFC padding feature can hide the length of the original packet, and might affect the packet encapsulation and de-encapsulation performance. This feature takes effect on UDP packets encapsulated by ESP in transport mode and on original IP packets encapsulated by ESP in tunnel mode.

Examples

# Enable TFC padding for the IPsec policy policy1.

<Sysname> system-view

[Sysname] ipsec policy policy1 10 isakmp

[Sysname-ipsec-policy-isakmp-policy1-10] tfc enable

Related commands

·          display ipsec ipv6-policy

·          display ipsec policy

transform-set

Use transform-set to specify an IPsec transform set for an IPsec policy or IPsec policy template.

Use undo transform-set to remove the IPsec transform set specified for an IPsec policy or IPsec policy template.

Syntax

transform-set transform-set-name&<1-6>

undo transform-set [ transform-set-name ]

Default

No IPsec transform set is specified for an IPsec policy or IPsec policy template.

Views

IPsec policy view

IPsec policy template view

Predefined user roles

network-admin

Parameters

transform-set-name&<1-6>: Specifies a space-separated list of up to six IPsec transform sets by their names, a case-insensitive string of 1 to 63 characters.

Usage guidelines

A manual IPsec policy can use only one IPsec transform set. If you specify an IPsec transform set for the manual IPsec policy multiple times, the most recent configuration takes effect.

An IKE-based IPsec policy can use a maximum of six IPsec transform sets. During an IKE negotiation, IKE searches for a fully matched IPsec transform set at the two ends of the IPsec tunnel. If no match is found, no SA can be set up, and the packets expecting to be protected will be dropped.

If you do not specify the transform-set-name argument, the undo transform-set command removes all IPsec transform sets specified for the IPsec policy or IPsec policy template.

Examples

# Specify the IPsec transform set prop1 for the IPsec policy policy1.

<Sysname> system-view

[Sysname] ipsec transform-set prop1

[Sysname-ipsec-transform-set-prop1] quit

[Sysname] ipsec policy policy1 100 manual

[Sysname-ipsec-policy-manual-policy1-100] transform-set prop1

Related commands

·          ipsec { ipv6-policy | policy }

·          ipsec transform-set

 


IKE commands

The following matrix shows the feature and hardware compatibility:

 

Hardware series

Model

IKE compatibility

WX1800H series

WX1804H

Yes

WX1810H

Yes

WX1820H

Yes

WX1840H

No

WX3800H series

WX3820H

WX3840H

No

WX5800H series

WX5860H

No

 

aaa authorization

Use aaa authorization to enable IKE AAA authorization.

Use undo aaa authorization to disable IKE AAA authorization.

Syntax

aaa authorization domain domain-name username user-name

undo aaa authorization

Default

IKE AAA authorization is disabled.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

domain domain-name: Specifies the ISP domain used for requesting authorization attributes. The ISP domain name is a case-insensitive string of 1 to 255 characters and must meet the following requirements:

·          The name cannot contain a forward slash (/), backslash (\), vertical bar (|), quotation mark ("), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or an at sign (@).

·          The name cannot be d, de, def, defa, defau, defaul, default, i, if, if-, if-u, if-un, if-unk, if-unkn, if-unkno, if-unknow, or if-unknown.

username user-name: Specifies the username used for requesting authorization attributes. The username is a case-sensitive string of 1 to 55 characters and must meet the following requirements:

·          The username cannot contain the domain name.

·          The username cannot contain a forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or an at sign (@).

·          The username cannot be a, al, or all.

Usage guidelines

The AAA authorization feature enables IKE to request authorization attributes, such as the IKE IPv4 address pool, from AAA.

IKE uses the ISP domain and username to request authorization attributes. AAA uses the authorization settings in the ISP domain to request the user's authorization attributes from the remote AAA server or the local user database. After IKE passes the username authentication, it obtains the authorization attributes.

This feature is applicable when AAA is used to centrally manage and deploy authorization attributes.

Examples

# Create the IKE profile profile1.

<Sysname> system-view

[Sysname] ike profile profile1

# Enable AAA authorization. Specify the ISP domain abc and the username test.

[Sysname-ike-profile-profile1] aaa authorization domain abc username test

authentication-algorithm

Use authentication-algorithm to specify an authentication algorithm for an IKE proposal.

Use undo authentication-algorithm to restore the default.

Syntax

authentication-algorithm { md5 | sha | sha256 | sha384 | sha512 }

undo authentication-algorithm

Default

The IKE proposal uses the HMAC-SHA1 authentication algorithm.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

md5: Specifies HMAC-MD5 as the authentication algorithm.

sha: Specifies HMAC-SHA1 as the authentication algorithm.

sha256: Specifies HMAC-SHA256 as the authentication algorithm.

sha384: Specifies HMAC-SHA384 as the authentication algorithm.

sha512: Specifies HMAC-SHA512 as the authentication algorithm.

Examples

# Specify HMAC-SHA1 as the authentication algorithm for IKE proposal 1.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] authentication-algorithm sha

Related commands

display ike proposal

authentication-method

Use authentication-method to specify an authentication method to be used in an IKE proposal.

Use undo authentication-method to restore the default.

Syntax

authentication-method { dsa-signature | pre-share | rsa-signature }

undo authentication-method

Default

The IKE proposal uses the pre-shared key as the authentication method.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

dsa-signature: Specifies the DSA signatures as the authentication method.

pre-share: Specifies the pre-shared key as the authentication method.

rsa-signature: Specifies the RSA signatures as the authentication method.

Usage guidelines

Pre-shared key authentication does not require certificates as signature authentication does, and it is usually used in a simple network. Signature authentication provides higher security, and it is usually deployed in a large-scale network, such as a network with many branches.

Authentication methods configured on both IKE ends must match.

If you specify RSA or DSA signatures, you must configure the IKE peer to obtain certificates from a CA.

If you specify pre-shared keys, you must configure these pre-shared keys on both IKE ends.

Examples

# Specify pre-shared key authentication to be used in IKE proposal 1.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] authentication-method pre-share

Related commands

·          display ike proposal

·          ike keychain

·          pre-shared-key

certificate domain

Use certificate domain to specify a PKI domain for signature authentication.

Use undo certificate domain to remove a PKI domain for signature authentication.

Syntax

certificate domain domain-name

undo certificate domain domain-name

Default

No PKI domains are specified for signature authentication.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

domain-name: Specifies the name of a PKI domain, a case-insensitive string of 1 to 31 characters. If you do not specify this argument, all PKI domains configured on the device are used for enrollment, authentication, certificate issuing, validation, and signature.

Usage guidelines

You can specify a maximum of six PKI domains for an IKE profile.

IKE uses the specified PKI domains for enrollment, authentication, certificate issuing, validation, and signature. If you do not specify any PKI domains, IKE uses all PKI domains configured on the device.

Follow these restrictions and guidelines for the device to obtain the CA certificate during IKE negotiation:

·          On the initiator:

?  If the IKE profile has a PKI domain and the automatic certificate request mode is configured for the PKI domain, the initiator automatically obtains the CA certificate.

?  If the IKE profile has no PKI domain, you must manually obtain the CA certificate.

·          On the responder:

?  If main mode is used in IKE phase 1, the responder does not automatically obtain the CA certificate. You must manually obtain the CA certificate.

?  If aggressive mode is used in IKE phase 1, the responder automatically obtains the CA certificate if the following conditions are met:

-      A matching IKE profile is found.

-      An PKI domain is specified in the IKE profile.

-      The automatic certificate request mode is configured for the PKI domain.

If the conditions are not met, you must manually obtain the CA certificate.

IKE first automatically obtains the CA certificate, and then requests a local certificate. If the CA certificate already exists locally, IKE automatically requests a local certificate.

Examples

# Specify the PKI domain abc for IKE profile 1.

<Sysname> system-view

[Sysname] ike profile 1

[Sysname-ike-profile-1] certificate domain abc

Related commands

·          authentication-method

·          pki domain

client-authentication

Use client-authentication to enable client authentication.

Use undo client-authentication to disable client authentication.

Syntax

client-authentication xauth

undo client-authentication

Default

Client authentication is disabled.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

xauth: Uses Extended Authentication within ISAKMP/Oakley (XAUTH) for authentication.

Usage guidelines

The client authentication feature provides additional authentication in IKE negotiation for secure remote access to an IPsec VPN.

When networking an IPsec VPN for remote access, enable client authentication on the IPsec gateway. During the IKE negotiation, the IPsec gateway uses a RADIUS server to authenticate the remote users. Remote users that provide the correct username and password pass the authentication and continue with the negotiation. This feature simplifies the configuration on the IPsec gateway and ensures the validity of the remote users. If you do not use this feature, you must configure an IPsec policy and an authentication password for each remote user, which is time-consuming and hard to maintain.

Examples

# Enable XAUTH client authentication.

<Sysname> system-view

[Sysname] ike profile test

[Sysname-ike-profile-test] client-authentication xauth

Related commands

local-user

description

Use description to configure a description for an IKE proposal.

Use undo description to restore the default.

Syntax

description text

undo description

Default

An IKE proposal does not have a description.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

text: Specifies the description, a case-sensitive string of 1 to 80 characters.

Usage guidelines

You can configure different descriptions for IKE proposals to distinguish them.

Examples

# Configure a description of test for IKE proposal 1.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] description test

dh

Use dh to specify the DH group to be used in key negotiation phase 1 for an IKE proposal.

Use undo dh to restore the default.

Syntax

dh { group1 | group14 | group2 | group24 | group5 }

undo dh

Default

An IKE proposal uses group1, the 768-bit Diffie-Hellman group.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

group1: Uses the 768-bit Diffie-Hellman group.

group14: Uses the 2048-bit Diffie-Hellman group.

group2: Uses the 1024-bit Diffie-Hellman group.

group24: Uses the 2048-bit Diffie-Hellman group with the 256-bit prime order subgroup.

group5: Uses the 1536-bit Diffie-Hellman group.

Usage guidelines

A DH group with a higher group number provides higher security but needs more time for processing. To achieve the best trade-off between processing performance and security, choose a proper Diffie-Hellman group for your network.

Examples

# Specify the 2048-bit Diffie-Hellman group group1 to be used in key negotiation phase 1 for an IKE proposal.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] dh group14

Related commands

display ike proposal

display ike proposal

Use display ike proposal to display configuration information about all IKE proposals.

Syntax

display ike proposal

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

This command displays the configuration information about all IKE proposals in descending order of proposal priorities. If no IKE proposal is configured, this command displays the default IKE proposal.

Examples

# Display the configuration information about all IKE proposals.

<Sysname> display ike proposal

 Priority Authentication Authentication Encryption  Diffie-Hellman Duration

              method       algorithm    algorithm       group      (seconds)

----------------------------------------------------------------------------

 1        RSA-SIG            SHA1        DES-CBC     Group 1        5000

 11       PRE-SHARED-KEY     SHA1        DES-CBC     Group 1        50000

 default  PRE-SHARED-KEY     SHA1       DES-CBC     Group 1        86400

Table 79 Command output

Field

Description

Priority

Priority of the IKE proposal

Authentication method

Authentication method used by the IKE proposal.

Authentication algorithm

Authentication algorithm used in the IKE proposal:

·         MD5—HMAC-MD5 algorithm.

·         SHA1—HMAC-SHA1 algorithm.

·         SHA256—HMAC-SHA256 algorithm.

·         SHA384—HMAC-SHA384 algorithm.

·         SHA512—HMAC-SHA512 algorithm.

Encryption algorithm

Encryption algorithm used by the IKE proposal:

·         3DES-CBC168-bit 3DES algorithm in CBC mode.

·         AES-CBC-128128-bit AES algorithm in CBC mode.

·         AES-CBC-192—192-bit AES algorithm in CBC mode.

·         AES-CBC-256—256-bit AES algorithm in CBC mode.

·         DES-CBC56-bit DES algorithm in CBC mode.

Diffie-Hellman group

DH group used in IKE negotiation phase 1.

Duration (seconds)

IKE SA lifetime (in seconds) of the IKE proposal

 

Related commands

ike proposal

display ike sa

Use display ike sa to display information about the current IKE SAs.

Syntax

display ike sa [ verbose [ connection-id connection-id | remote-address [ ipv6 ] remote-address ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

verbose: Displays detailed information.

connection-id connection-id: Displays detailed information about IKE SAs by connection ID in the range of 1 to 2000000000.

remote-address: Displays detailed information about IKE SAs with the specified remote address.

ipv6: Specifies an IPv6 address.

remote-address: Remote IP address.

Usage guidelines

If you do not specify any parameters, this command displays a summary about all IKE SAs.

Examples

# Display information about the current IKE SAs.

<Sysname> display ike sa

    Connection-ID  Remote          Flag        DOI

  ----------------------------------------------------------

      1            202.38.0.2      RD          IPSEC

Flags:

RD--READY ST--STAYALIVE RL--REPLACED FD—FADING

Table 80 Command output

Field

Description

Connection-ID

Identifier of the IKE SA.

Remote

Remote IP address of the SA.

Flags

Status of the SA:

·         RD (READY)—The SA has been established.

·         ST (STAYALIVE)—This end is the initiator of the tunnel negotiation.

·         RL (REPLACED)—The SA has been replaced by a new one and will be deleted later.

·         FD (FADING)—The SA is in use, but it is about to expire and will be deleted soon.

·         RK (REKEY)—The SA is a Rekey SA.

·         UnknownThe SA status is unknown.

DOI

Interpretation domain to which the SA belongs.

·         IPSEC—The SA belongs to an IPsec DOI.

·         Group—The SA belongs to a GDOI. The device does not support GDOI in the current software version.

 

# Display detailed information about the current IKE SAs.

<Sysname> display ike sa verbose

    ---------------------------------------------

    Connection ID: 2

    Outside VPN: 1

    Inside VPN: 1

    Profile: prof1

    Transmitting entity: Initiator

    ---------------------------------------------

    Local IP: 4.4.4.4

    Local ID type: IPV4_ADDR

    Local ID: 4.4.4.4

 

    Remote IP: 4.4.4.5

    Remote ID type: IPV4_ADDR

    Remote ID: 4.4.4.5

 

    Authentication-method: PRE-SHARED-KEY

    Authentication-algorithm: SHA1

    Encryption-algorithm: AES-CBC-128

 

    Life duration(sec): 86400

    Remaining key duration(sec): 86379

    Exchange-mode: Main

    Diffie-Hellman group: Group 1

    NAT traversal: Not detected

    Extend authentication: Enabled

    Assigned IP address: 192.168.2.1

# Display detailed information about the IKE SA with the remote address of 4.4.4.5.

<Sysname> display ike sa verbose remote-address 4.4.4.5

    ---------------------------------------------

    Connection ID: 2

    Outside VPN: 1

    Inside VPN: 1

    Profile: prof1

    Transmitting entity: Initiator

    ---------------------------------------------

    Local IP: 4.4.4.4

    Local ID type: IPV4_ADDR

    Local ID: 4.4.4.4

 

    Remote IP: 4.4.4.5

    Remote ID type: IPV4_ADDR

    Remote ID: 4.4.4.5

 

    Authentication-method: PRE-SHARED-KEY

    Authentication-algorithm: SHA1

    Encryption-algorithm: AES-CBC-128

 

    Life duration(sec): 86400

    Remaining key duration(sec): 86379

    Exchange-mode: Main

    Diffie-Hellman group: Group 1

    NAT traversal: Not detected

    Extend authentication: Enabled

    Assigned IP address: 192.168.2.1

Table 81 Command output

Field

Description

Connection ID

Identifier of the IKE SA.

Outside VPN

Name of the VPN instance to which the receiving interface belongs.

The device does not support this field in the current software version.

Inside VPN

Name of the VPN instance to which the protected data belongs.

The device does not support this field in the current software version.

Profile

Name of the matching IKE profile found in the IKE SA negotiation.

If no matching profile is found, this field displays nothing.

Transmitting entity

Role of the IKE negotiation entity: Initiator or Responder.

Local IP

IP address of the local gateway.

Local ID type

Identifier type of the local gateway.

Local ID

Identifier of the local gateway.

Remote IP

IP address of the remote gateway.

Remote ID type

Identifier type of the remote gateway.

Remote ID

Identifier of the remote security gateway.

Authentication-method

Authentication method used by the IKE proposal.

Authentication-algorithm

Authentication algorithm used by the IKE proposal:

·         MD5—HMAC-MD5 algorithm.

·         SHA1—HMAC-SHA1 algorithm.

·         SHA256—HMAC-SHA256 algorithm.

·         SHA384—HMAC-SHA384 algorithm.

·         SHA512—HMAC-SHA512 algorithm.

Encryption-algorithm

Encryption algorithm used by the IKE proposal:

·         3DES-CBC168-bit 3DES algorithm in CBC mode.

·         AES-CBC-128128-bit AES algorithm in CBC mode.

·         AES-CBC-192—192-bit AES algorithm in CBC mode.

·         AES-CBC-256—256-bit AES algorithm in CBC mode.

·         DES-CBC56-bit DES algorithm in CBC mode.

Life duration(sec)

Lifetime of the IKE SA in seconds.

Remaining key duration(sec)

Remaining lifetime of the IKE SA in seconds.

Exchange-mode

IKE negotiation mode in phase 1: main mode or aggressive mode.

Diffie-Hellman group

DH group used for key negotiation in IKE phase 1.

NAT traversal

Whether NAT traversal is detected.

Extend authentication

Whether extended authentication for clients is enabled.

Assigned IP address

IP address assigned to the remote peer.

This field is not displayed if no IP address is assigned.

 

display ike statistics

Use display ike statistics to display IKE statistics.

Syntax

display ike statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display IKE statistics.

<Sysname> display ike statistics

  No matching proposal: 0

  Invalid ID information: 0

  Unavailable certificate: 0

  Unsupported DOI: 0

  Unsupported situation: 0

  Invalid proposal syntax: 0

  Invalid SPI: 0

  Invalid protocol ID: 0

  Invalid certificate: 0

  Authentication failure: 0

  Invalid flags: 0

  Invalid message id: 0

  Invalid cookie: 0

  Invalid transform ID: 0

  Malformed payload: 0

  Invalid key information: 0

  Invalid hash information: 0

  Unsupported attribute: 0

  Unsupported certificate type: 0

  Invalid certificate authority: 0

  Invalid signature: 0

  Unsupported exchage type: 0

  No available SA: 1

  Retransmit timeout: 0

  Not enough memory: 0

  Enqueue fails: 0

Related commands

reset ike statistics

dpd

Use dpd to enable the device to send DPD messages.

Use undo dpd to disable the IKE DPD feature.

Syntax

dpd interval interval [ retry seconds ] { on-demand | periodic }

undo dpd interval

Default

IKE DPD is disabled.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

interval interval: Specifies a period of time in seconds. The value range is from 1 to 300.

·          If the on-demand keyword is specified, this parameter specifies the number of seconds during which no IPsec packet is received before DPD is triggered if the local end has IPsec traffic to send.

·          If the periodic keyword is specified, this parameter specifies a DPD triggering interval.

retry seconds: Specifies the number of seconds between DPD retries if the DPD message fails. The value for the second argument is from 1 to 60 seconds, and it defaults to 5 seconds.

on-demand: Sends DPD messages on demand.

periodic: Sends DPD messages at regular intervals.

Usage guidelines

DPD is triggered periodically or on-demand. The on-demand mode is recommended when the device communicates with a large number of IKE peers. For an earlier detection of dead peers, use the periodic triggering mode, which consumes more bandwidth and CPU.

When DPD settings are configured in both IKE profile view and system view, the DPD settings in IKE profile view apply. If DPD is not configured in IKE profile view, the DPD settings in system view apply.

It is a good practice to set the triggering interval longer than the retry interval so that a DPD detection does not occur during a DPD retry.

Examples

# Configure DPD to be triggered every 10 seconds and every 5 seconds between retries if the peer does not respond.

<Sysname> system-view

[Sysname] ike profile 1

[Sysname-ike-profile-1] dpd interval 10 retry 5 on-demand

Related commands

ike dpd

encryption-algorithm

Use encryption-algorithm to specify an encryption algorithm for an IKE proposal.

Use undo encryption-algorithm to restore the default.

Syntax

encryption-algorithm { 3des-cbc | aes-cbc-128 | aes-cbc-192 | aes-cbc-256 | des-cbc }

undo encryption-algorithm

Default

An IKE proposal uses the 56-bit DES encryption algorithm in CBC mode.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

3des-cbc: Uses the 3DES algorithm in CBC mode as the encryption algorithm. The 3DES algorithm uses a 168-bit key for encryption.

aes-cbc-128: Uses the AES algorithm in CBC mode as the encryption algorithm. The AES algorithm uses a 128-bit key for encryption.

aes-cbc-192: Uses the AES algorithm in CBC mode as the encryption algorithm. The AES algorithm uses a 192-bit key for encryption.

aes-cbc-256: Uses the AES algorithm in CBC mode as the encryption algorithm. The AES algorithm uses a 256-bit key for encryption.

des-cbc: Uses the DES algorithm in CBC mode as the encryption algorithm. The DES algorithm uses a 56-bit key for encryption.

Usage guidelines

Different algorithms provide different levels of protection. Generally, an algorithm with a longer key is stronger. A stronger algorithm provides more resistance to decryption but uses more resources. The algorithm strength from low to high is des-cbc, 3des-cbc, aes-cbc-128, aes-cbc-192, and aes-cbc-256.

Examples

# Use the 128-bit AES in CBC mode as the encryption algorithm for IKE proposal 1.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] encryption-algorithm aes-cbc-128

Related commands

display ike proposal

exchange-mode

Use exchange-mode to select an IKE negotiation mode for phase 1.

Use undo exchange-mode to restore the default.

Syntax

exchange-mode { aggressive | main }

undo exchange-mode

Default

Main mode is used for phase 1.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

aggressive: Specifies the aggressive mode.

main: Specifies the main mode.

Usage guidelines

When a user at the local end of an IPsec tunnel obtains an IP address automatically and pre-shared key authentication is used, H3C recommends specifying the aggressive mode at the local end.

Examples

# Specify that IKE negotiation operates in main mode.

<Sysname> system-view

[Sysname] ike profile 1

[Sysname-ike-profile-1] exchange-mode main

Related commands

display ike proposal

ike address-group

Use ike address-group to configure an IKE IPv4 address pool for assigning IPv4 addresses to remote peers.

Use undo ike address-group to delete an IKE IPv4 address pool.

Syntax

ike address-group group-name start-ipv4-address end-ipv4-address [ mask | mask-length ]

undo ike address-group group-name

Default

No IKE IPv4 address pools exist.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies a name for the IKE IPv4 address pool, a case-insensitive string of 1 to 63 characters.

start-ipv4-address end-ipv4-address: Specifies an IPv4 address range. The start-ipv4-address argument specifies the start IPv4 address. The end-ipv4-address argument specifies the end IPv4 address.

mask: Specifies the IPv4 address mask.

mask-length: Specifies the length of the IPv4 address mask.

Usage guidelines

An IKE IPv4 address pool can contain a maximum of 8192 IPv4 addresses.

To modify or delete an address pool, you must delete all IKE SAs and IPsec SAs. Otherwise, the assigned IPv4 addresses might not be reclaimed.

Examples

# Configure an IKE IPv4 address pool with the name ipv4group, address range 1.1.1.1 to 1.1.1.2, and the mask 255.255.255.0.

<Sysname> system-view

[Sysname] ike address-group ipv4group 1.1.1.1 1.1.1.2 255.255.255.0

# Configure an IKE IPv4 address pool with the name ipv4group, address range 1.1.1.1 to 1.1.1.2, and the mask length 32.

<Sysname> system-view

[Sysname] ike address-group ipv4group 1.1.1.1 1.1.1.2 32

Related commands

aaa authorization

ike dpd

Use ike dpd to enable sending DPD messages.

Use undo ike dpd to disable the DPD feature.

Syntax

ike dpd interval interval [ retry seconds ] { on-demand | periodic }

undo ike dpd interval

Default

IKE DPD is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

interval interval: Specifies a period of time in seconds. The value range is from 1 to 300.

·          If the on-demand keyword is specified, this parameter specifies the number of seconds during which no IPsec packet is received before DPD is triggered if the local end has IPsec traffic to send.

·          If the periodic keyword is specified, this parameter specifies a DPD triggering interval.

retry seconds: Specifies the number of seconds between DPD retries if the DPD message fails. The value for the second argument is from 1 to 60 seconds, and it defaults to 5 seconds.

on-demand: Sends DPD messages on demand.

periodic: Sends DPD messages at regular intervals.

Usage guidelines

DPD is triggered periodically or on-demand. The on-demand mode is recommended when the device communicates with a large number of IKE peers. For an earlier detection of dead peers, use the periodical triggering mode, which consumes more bandwidth and CPU.

When DPD settings are configured in both IKE profile view and system view, the DPD settings in IKE profile view apply. If DPD is not configured in IKE profile view, the DPD settings in system view apply.

It is a good practice to set the triggering interval longer than the retry interval so that a DPD detection does not occur during a DPD retry.

Examples

# Configure DPD to be triggered every 10 seconds and every 5 seconds between retries if the peer does not respond.

<Sysname> system-view

[Sysname] ike dpd interval 10 retry 5 on-demand

Related commands

dpd

ike identity

Use ike identity to specify the global identity used by the local end during IKE negotiations.

Use undo ike identity to restore the default.

Syntax

ike identity { address { ipv4-address | ipv6 ipv6-address } | dn | fqdn [ fqdn-name ] | user-fqdn [ user-fqdn-name ] }

undo ike identity

Default

The IP address of the interface where the IPsec policy applies is used as the IKE identity.

Views

System view

Predefined user roles

network-admin

Parameters

address { ipv4-address | ipv6 ipv6-address }: Uses an IPv4 or IPv6 address as the identity.

dn: Uses the DN in the digital signature as the identity.

fqdn fqdn-name: Uses the FQDN name as the identity. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, for example, www.test.com. If you do not specify this argument, the device name configured by using the sysname command is used as the local FQDN.

user-fqdn user-fqdn-name: Uses the user FQDN name as the identity. The user-fqdn-name argument is a case-sensitive string of 1 to 255 characters, for example, abc@test.com. If you do not specify this argument, the device name configured by using the sysname command is used as the user FQDN.

Usage guidelines

The global identity can be used by the device for all IKE SA negotiations. The local identity (set by the local-identity command) can be used only by the device that uses the IKE profile.

In pre-shared key authentication, you cannot set the DN as the identity.

When you specify the global identity for signature authentication, follow these restrictions and guidelines:

·          You can set any type of identity information.

·          The ike signature-identity from-certificate command sets the local device to always use the identity information obtained from the local certificate.

·          If the ike signature-identity from-certificate command is not set, the local-identity command configuration, if configured, takes precedence over the ike identity command configuration.

Examples

# Set the IP address 2.2.2.2 as the identity.

<sysname> system-view

[sysname] ike identity address 2.2.2.2

Related commands

·          local-identity

·          ike signature-identity from-certificate

ike invalid-spi-recovery enable

Use ike invalid-spi-recovery enable to enable invalid security parameter index (SPI) recovery.

Use undo ike invalid-spi-recovery enable to disable invalid SPI recovery.

Syntax

ike invalid-spi-recovery enable

undo ike invalid-spi-recovery enable

Default

Invalid SPI recovery is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

IPsec "black hole" occurs when one IPsec peer fails (for example, a peer can fail if a reboot occurs). One peer fails and loses its SAs with the other peer. When an IPsec peer receives a data packet for which it cannot find an SA, an invalid SPI is encountered. The peer drops the data packet and tries to send an SPI invalid notification to the data originator. This notification is sent by using the IKE SA. When no IKE SA is available, the notification is not sent. The originating peer continues sending the data by using the IPsec SA that has the invalid SPI, and the receiving peer keeps dropping the traffic.

The invalid SPI recovery feature enables the receiving peer to set up an IKE SA with the originator so that an SPI invalid notification can be sent. Upon receiving the notification, the originating peer deletes the IPsec SA that has the invalid SPI. If the originator has data to send, new SAs will be set up.

Use caution when you enable the invalid SPI recovery feature, because using this feature can result in a DoS attack. Attackers can make a great number of invalid SPI notifications to the same peer.

Examples

# Enable invalid SPI recovery.

<Sysname> system-view

[Sysname] ike invalid-spi-recovery enable

ike keepalive interval

Use ike keepalive interval to enable sending IKE keepalives and set the sending interval.

Use undo ike keepalive interval to restore the default.

Syntax

ike keepalive interval interval

undo ike keepalive interval

Default

No IKE keepalives are sent.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Sets the number of seconds between IKE keepalives, in the range of 20 to 28800.

Usage guidelines

To detect the status of the peer, configure IKE DPD instead of the IKE keepalive feature, unless IKE DPD is not supported on the peer.

The keepalive timeout time configured at the local must be longer than the keepalive interval configured at the peer. Because more than three consecutive packets are rarely lost on a network, you can set the keepalive timeout timer to three times as long as the keepalive interval.

Examples

# Set the keepalive interval to 200 seconds

<Sysname> system-view

[Sysname] ike keepalive interval 200

Related commands

ike keepalive timeout

ike keepalive timeout

Use ike keepalive timeout to set the IKE keepalive timeout time.

Use undo ike keepalive timeout to restore the default.

Syntax

ike keepalive timeout seconds

undo ike keepalive timeout

Default

The IKE keepalive timeout time is not set.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Sets the number of seconds between IKE keepalives. The value is in the range of 20 to 28800.

Usage guidelines

If the local end receives no keepalive packets from the peer during the timeout time, the IKE SA is deleted along with the IPsec SAs it negotiated.

The keepalive timeout time configured at the local end must be longer than the keepalive interval configured at the peer. Because more than three consecutive packets are rarely lost on a network, you can set the keepalive timeout timer to three times as long as the keepalive interval.

Examples

# Set the keepalive timeout time to 20 seconds.

<Sysname> system-view

[Sysname] ike keepalive timeout 20

Related commands

ike keepalive interval

ike keychain

Use ike keychain to create an IKE keychain and enter its view, or enter the view of an existing IKE keychain.

Use undo ike keychain to delete an IKE keychain.

Syntax

ike keychain keychain-name

undo ike keychain keychain-name

Default

No IKE keychains exist.

Views

System view

Predefined user roles

network-admin

Parameters

keychain-name: Specifies an IKE keychain name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

To use pre-shared key authentication, you must create and specify an IKE keychain for the IKE profile.

Examples

# Create IKE keychain key1 and enter its view.

<Sysname> system-view

[Sysname] ike keychain key1

[Sysname-ike-keychain-key1]

Related commands

·          authentication-method

·          pre-shared-key

ike limit

Use ike limit to set the maximum number of half-open IKE SAs and the maximum number of established IKE SAs.

Use undo ike limit to restore the default.

Syntax

ike limit { max-negotiating-sa negotiation-limit | max-sa sa-limit }

undo ike limit { max-negotiating-sa | max-sa }

Default

There is no limit to the maximum number of IKE SAs.

Views

System view

Predefined user roles

network-admin

Parameters

max-negotiating-sa negotiation-limit: Sets the maximum number of half-open IKE SAs and IPsec SAs. The value range for the negotiation-limit argument is 1 to 99999.

max-sa sa-limit: Sets the maximum number of established IKE SAs. The value range for the sa-limit argument is 1 to 99999.

Usage guidelines

The supported maximum number of half-open IKE SAs depends on the device's processing capability. Adjust the maximum number of half-open IKE SAs to make full use of the device's processing capability without affecting the IKE SA negotiation efficiency.

The supported maximum number of established IKE SAs depends on the device's memory space. Adjust the maximum number of established IKE SAs to make full use of the device's memory space without affecting other applications in the system.

Examples

# Set the maximum number of half-open IKE SAs and IPsec SAs to 200.

<Sysname> system-view

[Sysname] ike limit max-negotiating-sa 200

# Set the maximum number of established IKE SAs to 5000.

<Sysname> system-view

[Sysname] ike limit max-sa 5000

ike logging negotiation enable

Use ike logging negotiation enable to enable logging for IKE negotiation.

Use undo ike logging negotiation packet enable to disable logging for IKE negotiation.

Syntax

ike logging negotiation enable

undo ike logging negotiation enable

Default

Logging for IKE negotiation is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command enables the device to output logs for the IKE negotiation process.

Examples

# Enable logging for IKE negotiation.

<Sysname> system-view

[Sysname] ike logging negotiation enable

ike nat-keepalive

Use ike nat-keepalive to set the NAT keepalive interval.

Use undo ike nat-keepalive to restore the default.

Syntax

ike nat-keepalive seconds

undo ike nat-keepalive

Default

The NAT keepalive interval is 20 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Sets the NAT keepalive interval in seconds, in the range of 5 to 300.

Usage guidelines

This command takes effect only for a device behind a NAT server. When the device resides behind a NAT server, the IKE gateway behind the NAT server needs to send NAT keepalive packets to its peer IKE gateway to keep the NAT session alive. For information about how to display the lifetime of NAT entries, see Layer 3–IP Services Command Reference.

Examples

# Set the NAT keepalive interval to 5 seconds.

<Sysname> system-view

[Sysname] ike nat-keepalive 5

ike profile

Use ike profile to create an IKE profile and enter its view, or enter the view of an existing IKE profile.

Use undo ike profile to delete an IKE profile.

Syntax

ike profile profile-name

undo ike profile profile-name

Default

No IKE profiles exist.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies an IKE profile name, a case-insensitive string of 1 to 63 characters.

Examples

# Create IKE profile 1 and enter its view.

<Sysname> system-view

[Sysname] ike profile 1

[Sysname-ike-profile-1]

ike proposal

Use ike proposal to create an IKE proposal and enter its view, or enter the view of an existing IKE proposal.

Use undo ike proposal to delete an IKE proposal.

Syntax

ike proposal proposal-number

undo ike proposal proposal-number

Default

The system has an IKE proposal that is used as the default IKE proposal. This proposal has the lowest priority and uses the following settings:

·          Encryption algorithm—DES-CBC.

·          Authentication method—HMAC-SHA1.

·          Authentication algorithmPre-shared key authentication.

·          DH groupGroup 1.

·          IKE SA lifetime86400 seconds.

You cannot change the settings of the default IKE proposal.

Views

System view

Predefined user roles

network-admin

Parameters

proposal-number: Specifies an IKE proposal number in the range of 1 to 65535. The lower the number, the higher the priority of the IKE proposal.

Usage guidelines

During IKE negotiation:

·          The initiator sends its IKE proposals to the peer.

?  If the initiator is using an IPsec policy with an IKE profile, the initiator sends all IKE proposals specified for the IKE profile to the peer. An IKE proposal specified earlier for the IKE profile has a higher priority.

?  If the initiator is using an IPsec policy with no IKE profile, the initiator sends all its IKE proposals to the peer. An IKE proposal with a smaller number has a higher priority.

·          The peer searches its own IKE proposals for a match. The search starts from the IKE proposal with the highest priority and proceeds in descending order of priority until a match is found. The matching IKE proposals are used to establish the IKE SA. If all user-defined IKE proposals are mismatched, the two peers use their default IKE proposals to establish the IKE SA.

Examples

# Create IKE proposal 1 and enter its view.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1]

Related commands

display ike proposal

ike signature-identity from-certificate

Use ike signature-identity from-certificate to configure the local device to obtain identity information from the local certificate for signature authentication.

Use undo ike signature-identity from-certificate to restore the default.

Syntax

ike signature-identity from-certificate

undo ike signature-identity from-certificate

Default

The local end uses identity information specified by local-identity or ike identity for signature authentication.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command requires the local device to always use the identity information in the local certificate for signature authentication, regardless of the local-identity or ike identity configuration.

Configure this command when the aggressive mode and signature authentication are used and the device interconnects with a Comware 5-based peer device. Comware 5 supports only DN for signature authentication.

If the ike signature-identity from-certificate command is not configured, the local-identity command configuration, if configured, takes precedence over the ike identity command configuration.

Examples

# Configure the local device to always obtain the identity information from the local certificate for signature authentication.

<Sysname> system-view

[sysname] ike signature-identity from-certificate

Related commands

·          local-identity

·          ike identity

keychain

Use keychain to specify an IKE keychain for pre-shared key authentication.

Use undo keychain to remove an IKE keychain.

Syntax

keychain keychain-name

undo keychain keychain-name

Default

No IKE keychain is specified for pre-shared key authentication.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

keychain-name: Specifies an IKE keychain name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

You can specify a maximum of six IKE keychains for an IKE profile. An IKE keychain specified earlier has a higher priority.

Examples

# Specify IKE profile 1 for IKE keychain abc.

<Sysname> system-view

[Sysname] ike profile 1

[Sysname-ike-profile-1] keychain abc

Related commands

ike keychain

local-identity

Use local-identity to configure the local ID, the ID that the device uses to identify itself to the peer during IKE negotiation.

Use undo local-identity to restore the default.

Syntax

local-identity { address { ipv4-address | ipv6 ipv6-address } | dn | fqdn [ fqdn-name ] | user-fqdn [ user-fqdn-name ] }

undo local-identity

Default

No local ID is configured for an IKE profile. An IKE profile uses the local ID configured in system view by using the ike identity command. If the local ID is not configured in system view, the IKE profile uses the IP address of the interface to which the IPsec policy is applied as the local ID.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

address { ipv4-address | ipv6 ipv6-address }: Uses an IPv4 or IPv6 address as the local ID.

dn: Uses the DN in the local certificate as the local ID.

fqdn fqdn-name: Uses an FQDN as the local ID. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as www.test.com. If you do not specify this argument, the device name configured by using the sysname command is used as the local FQDN.

user-fqdn user-fqdn-name: Uses a user FQDN as the local ID. The user-fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as adc@test.com. If you do not specify this argument, the device name configured by using the sysname command is used as the user FQDN.

Usage guidelines

An IKE profile can have only one local ID.

For digital signature authentication, the device can use any type of ID. If the local ID is an IP address that is different from the IP address in the local certificate, the device uses its FQDN (the device name configured by using the sysname command) instead.

For pre-shared key authentication, the device can use any type of ID other than the DN.

An IKE profile with no local ID specified uses the local ID configured by using the ike identity command in system view.

Examples

# Set the local ID to IP address 2.2.2.2.

<Sysname> system-view

[Sysname] ike profile prof1

[Sysname-ike-profile-prof1] local-identity address 2.2.2.2

Related commands

·          match remote

·          ike identity

match local address (IKE keychain view)

Use match local address to specify a local interface or IP address to which an IKE keychain can be applied.

Use undo match local address to restore the default.

Syntax

match local address { interface-type interface-number | { ipv4-address | ipv6 ipv6-address } }

undo match local address

Default

An IKE keychain can be applied to any local interface or IP address.

Views

IKE keychain view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies a local interface. It can be any Layer 3 interface.

ipv4-address: Specifies the IPv4 address of a local interface.

ipv6 ipv6-address: Specifies the IPv6 address of a local interface.

Usage guidelines

Use this command to specify which address or interface can use the IKE keychain for IKE negotiation.

Specify the local address configured in IPsec policy or IPsec policy template view (using the local-address command) for this command. If no local address is configured, specify the IP address of the interface that uses the IPsec policy.

You can specify a maximum of six IKE keychains for an IKE profile. An IKE keychain specified earlier has a higher priority. To give an IKE keychain a higher priority, you can configure this command for the keychain. For example, suppose you specified IKE keychain A before specifying IKE keychain B, and you configured the peer ID 2.2.0.0/16 for IKE keychain A and the peer ID 2.2.2.0/24 for IKE keychain B. For the local interface with the IP address 3.3.3.3 to negotiate with the peer 2.2.2.6, IKE keychain A is preferred because IKE keychain A was specified earlier. To use IKE keychain B, you can use this command to restrict the application scope of IKE keychain B to address 3.3.3.3.

Examples

# Create IKE keychain key1.

<Sysname> system-view

[Sysname] ike keychain key1

# Apply the IKE keychain key1 to the interface with the IP address 2.2.2.2.

[sysname-ike-keychain-key1] match local address 2.2.2.2

match local address (IKE profile view)

Use match local address to specify a local interface or IP address to which an IKE profile can be applied.

Use undo match local address to restore the default.

Syntax

match local address { interface-type interface-number | { ipv4-address | ipv6 ipv6-address } }

undo match local address

Default

An IKE profile can be applied to any local interface or IP address.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies a local interface. It can be any Layer 3 interface.

ipv4-address: Specifies the IPv4 address of a local interface.

ipv6 ipv6-address: Specifies the IPv6 address of a local interface.

Usage guidelines

Use this command to specify which address or interface can use the IKE profile for IKE negotiation.

Specify the local address configured in IPsec policy or IPsec policy template view (using the local-address command) for this command. If no local address is configured, specify the IP address of the interface that uses the IPsec policy.

An IKE profile configured earlier has a higher priority. To give an IKE profile that is configured later a higher priority, you can configure this command for the profile. For example, suppose you configured IKE profile A before configuring IKE profile B, and you configured the match remote identity address range 2.2.2.1 2.2.2.100 command for IKE profile A and the match remote identity address range 2.2.2.1 2.2.2.10 command for IKE profile B. For the local interface with the IP address 3.3.3.3 to negotiate with the peer 2.2.2.6, IKE profile A is preferred because IKE profile A was configured earlier. To use IKE profile B, you can use this command to restrict the application scope of IKE profile B to address 3.3.3.3.

Examples

# Create IKE profile prof1.

<Sysname> system-view

[Sysname] ike profile prof1

# Apply the IKE profile prof1 to the interface with the IP address 2.2.2.2.

[sysname-ike-profile-prof1] match local address 2.2.2.2

match remote

Use match remote to configure a peer ID for IKE profile matching.

Use undo match remote to delete a peer ID.

Syntax

match remote { certificate policy-name | identity { address { { ipv4-address [ mask | mask-length ] | range low-ipv4-address high-ipv4-address } | ipv6 { ipv6-address [ prefix-length ] | range low-ipv6-address high-ipv6-address } } | fqdn fqdn-name | user-fqdn user-fqdn-name } }

undo match remote { certificate policy-name | identity { address { { ipv4-address [ mask | mask-length ] | range low-ipv4-address high-ipv4-address } | ipv6 { ipv6-address [ prefix-length ] | range low-ipv6-address high-ipv6-address } } | fqdn fqdn-name | user-fqdn user-fqdn-name } }

Default

No peer ID is configured for IKE profile matching.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

certificate policy-name: Uses the DN in the peer's digital certificate as the peer ID for IKE profile matching. The policy-name argument is a string of 1 to 31 characters.

identity: Uses the specified information as the peer ID for IKE profile matching. The specified information is configured on the peer by using the local-identity command.

·          address ipv4-address [ mask | mask-length ]: Uses an IPv4 host address or an IPv4 subnet address as the peer ID for IKE profile matching. The mask-length argument is in the range of 0 to 32.

·          address range low-ipv4-address high-ipv4-address: Uses a range of IPv4 addresses as the peer ID for IKE profile matching. The end address must be higher than the start address.

·          address ipv6 ipv6-address [ prefix-length ] : Uses an IPv6 host address or an IPv6 subnet address as the peer ID for IKE profile matching. The prefix-length argument is in the range of 0 to 128.

·          address ipv6 range low-ipv6-address high-ipv6-address: Uses a range of IPv6 addresses as the peer ID for IKE profile matching. The end address must be higher than the start address.

·          fqdn fqdn-name: Uses the peer's FQDN as the peer ID for IKE profile matching. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as www.test.com.

·          user-fqdn user-fqdn-name: Uses the peer's user FQDN as the peer ID for IKE profile matching. The user-fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as adc@test.com.

Usage guidelines

When an end needs to select an IKE profile, it compares the peer's ID received with the peer IDs of its local IKE profiles. If a match is found, it uses the IKE profile with the matching peer ID for IKE negotiation.

Each IKE profile must have at least one peer ID configured.

To make sure only one IKE profile is matched for a peer, do not configure the same peer ID for two or more IKE profiles. If you configure the same peer ID for two or more IKE profiles, which IKE profile is selected for IKE negotiation is unpredictable.

For an IKE profile, you can configure multiple peer IDs. A peer ID configured earlier has a higher priority.

Examples

# Create IKE profile prof1.

<Sysname> system-view

[Sysname] ike profile prof1

# Configure a peer ID with the identity type of FQDN and the value of www.test.com.

 [Sysname-ike-profile-prof1] match remote identity fqdn www.test.com

# Configure a peer ID with the identity type of IP address and the value of 10.1.1.1.

[Sysname-ike-profile-prof1] match remote identity address 10.1.1.1

Related commands

local-identity

pre-shared-key

Use pre-shared-key to configure a pre-shared key.

Use undo pre-shared-key to remove a pre-shared key.

Syntax

pre-shared-key { address { ipv4-address [ mask | mask-length ] | ipv6 ipv6-address [ prefix-length ] } | hostname host-name } key { cipher | simple } string

undo pre-shared-key { address { ipv4-address [ mask | mask-length ] | ipv6 ipv6-address [ prefix-length ] } | hostname host-name }

Default

No pre-shared key is configured.

Views

IKE keychain view

Predefined user roles

network-admin

Parameters

address: Specifies a peer by its address.

ipv4-address: Specifies the IPv4 address of the peer.

mask: Specifies the mask in dotted decimal notation. The default mask is 255.255.255.255.

mask-length: Specifies the mask length in the range of 0 to 32. The default mask length is 32.

ipv6: Specifies an IPv6 peer.

ipv6-address: Specifies the IPv6 address of the peer.

prefix-length: Specifies the prefix length in the range of 0 to 128. The default prefix length is 128.

hostname host-name: Specifies a peer by its hostname, a case-sensitive string of 1 to 255 characters.

key: Specifies a pre-shared key.

cipher: Specifies a pre-shared key in encrypted form.

simple: Specifies a pre-shared key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the pre-shared key. The key is case sensitive. Its plaintext form is a string of 1 to 128 characters and its encrypted form is a string of 1 to 201 characters.

Usage guidelines

The address option or the hostname option specifies the peer with which the device can use the pre-shared key to perform IKE negotiation.

Two peers must be configured with the same pre-shared key to pass pre-shared key authentication.

Examples

# Create IKE keychain key1 and enter IKE keychain view.

<Sysname> system-view

[Sysname] ike keychain key1

# Set the pre-shared key to be used for IKE negotiation with peer 1.1.1.2 to 123456TESTplat&!.

[Sysname-ike-keychain-key1] pre-shared-key address 1.1.1.2 255.255.255.255 key simple 123456TESTplat&!

Related commands

·          authentication-method

·          keychain

priority (IKE keychain view)

Use priority to specify a priority for an IKE keychain.

Use undo priority to restore the default.

Syntax

priority priority

undo priority

Default

The priority of an IKE keychain is 100.

Views

IKE keychain view

Predefined user roles

network-admin

Parameters

priority priority: Specifies a priority number in the range of 1 to 65535. The lower the priority number, the higher the priority.

Usage guidelines

To determine the priority of an IKE keychain, the device examines the existence of the match local address command before examining the priority number. An IKE keychain with the match local address command configured has a higher priority than an IKE keychain that does not have the match local address command configured.

Examples

# Set the priority to 10 for IKE keychain key1.

<Sysname> system-view

[Sysname] ike keychain key1

[Sysname-ike-keychain-key1] priority 10

priority (IKE profile view)

Use priority to specify a priority for an IKE profile.

Use undo priority to restore the default.

Syntax

priority priority

undo priority

Default

The priority of an IKE profile is 100.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

priority priority: Specifies a priority number in the range of 1 to 65535. The smaller the priority number, the higher the priority.

Usage guidelines

To determine the priority of an IKE profile, the device examines the existence of the match local address command before examining the priority number. An IKE profile with the match local address command configured has a higher priority than an IKE profile that does not have the match local address command configured.

Examples

# Set the priority to 10 for IKE profile prof1.

<Sysname> system-view

[Sysname] ike profile prof1

[Sysname-ike-profile-prof1] priority 10

proposal

Use proposal to specify IKE proposals for an IKE profile.

Use undo proposal to restore the default.

Syntax

proposal proposal-number&<1-6>

undo proposal

Default

No IKE proposals are specified for an IKE profile and the IKE proposals configured in system view are used for IKE negotiation.

Views

IKE profile view

Predefined user roles

network-admin

Parameters

proposal-number&<1-6>: Specifies a space-separated list of up to six IKE proposals by their numbers in the range of 1 to 65535. An IKE proposal specified earlier has a higher priority.

Usage guidelines

When acting as the initiator, the device sends the specified IKE proposals to its peer for IKE negotiation. When acting as the responder, the device uses the IKE proposals configured in system view to match the IKE proposals received from the initiator.

Examples

# Specify IKE proposal 10 for IKE profile prof1.

<Sysname> system-view

[Sysname] ike profile prof1

[Sysname-ike-profile-prof1] proposal 10

Related commands

ike proposal

reset ike sa

Use reset ike sa to delete IKE SAs.

Syntax

reset ike sa [ connection-id connection-id ]

Views

User view

Predefined user roles

network-admin

Parameters

connection-id connection-id: Specifies the connection ID of the IKE SA to be cleared, in the range of 1 to 2000000000.

Usage guidelines

When you delete an IKE SA, the device automatically sends a notification to the peer.

Examples

# Display the current IKE SAs.

<Sysname> display ike sa

    Total IKE SAs:  2

    Connection-ID  Remote            Flag        DOI

  ----------------------------------------------------------

      1            202.38.0.2      RD|ST       IPSEC

      2            202.38.0.3      RD|ST       IPSEC

Flags:

RD--READY ST--STAYALIVE RL--REPLACED FD—FADING TO—TIMEOUT

# Delete the IKE SA with the connection ID 2.

<Sysname> reset ike sa connection-id 2

# Display the current IKE SAs.

<Sysname> display ike sa

 

Total IKE SAs:  1

    Connection-ID  Remote            Flag        DOI

  ----------------------------------------------------------

      1            202.38.0.2      RD|ST       IPSEC

Flags:

RD--READY ST--STAYALIVE RL--REPLACED FD—FADING TO—TIMEOUT

reset ike statistics

Use reset ike statistics command to clear IKE MIB statistics.

Syntax

reset ike statistics

Views

User view

Predefined user roles

network-admin

Examples

# Clears IKE MIB statistics.

<Sysname> reset ike statistics

Related commands

snmp-agent trap enable ike

sa duration

Use sa duration to set the IKE SA lifetime for an IKE proposal.

Use undo sa duration to restore the default.

Syntax

sa duration seconds

undo sa duration

Default

The IKE SA lifetime is 86400 seconds.

Views

IKE proposal view

Predefined user roles

network-admin

Parameters

seconds: Sets the IKE SA lifetime in seconds, in the range of 60 to 604800.

Usage guidelines

If the communicating peers are configured with different IKE SA lifetime settings, the smaller setting takes effect.

Before an IKE SA expires, IKE negotiates a new SA. The new SA takes effect immediately after it is negotiated. The old IKE SA will be cleared when it expires.

Examples

# Set the IKE SA lifetime to 600 seconds for IKE proposal 1.

<Sysname> system-view

[Sysname] ike proposal 1

[Sysname-ike-proposal-1] sa duration 600

Related commands

display ike proposal

snmp-agent trap enable ike

Use snmp-agent trap enable ike command to enable SNMP notifications for IKE.

Use undo snmp-agent trap enable ike to disable SNMP notifications for IKE.

Syntax

snmp-agent trap enable ike [ attr-not-support | auth-failure | cert-type-unsupport | cert-unavailable | decrypt-failure | encrypt-failure | global | invalid-cert-auth | invalid-cookie | invalid-id | invalid-proposal | invalid-protocol | invalid-sign | no-sa-failure | proposal-add | proposal–delete | tunnel-start | tunnel-stop | unsupport-exch-type ] *

undo snmp-agent trap enable ike [ attr-not-support | auth-failure | cert-type-unsupport | cert-unavailable | decrypt-failure | encrypt-failure | global | invalid-cert-auth | invalid-cookie | invalid-id | invalid-proposal | invalid-protocol | invalid-sign | no-sa-failure | proposal-add | proposal–delete | tunnel-start | tunnel-stop | unsupport-exch-type ] *

Default

All SNMP notifications for IKE are enabled.

Views

System view

Predefined user roles

network-admin

Parameters

attr-not-support: Specifies SNMP notifications for attribute-unsupported failures.

auth-failure: Specifies SNMP notifications for authentication failures.

cert-type-unsupport: Specifies SNMP notifications for certificate-type-unsupported failures.

cert-unavailable: Specifies SNMP notifications for certificate-unavailable failures.

decrypt-failure: Specifies SNMP notifications for decryption failures.

encrypt-failure: Specifies SNMP notifications for encryption failures.

global: Specifies SNMP notifications globally.

invalid-cert-auth: Specifies SNMP notifications for invalid-certificate-authentication failures.

invalid-cookie: Specifies SNMP notifications for invalid-cookie failures.

invalid-id: Specifies SNMP notifications for invalid-ID failures.

invalid-proposal: Specifies SNMP notifications for invalid-IKE-proposal failures.

invalid-protocol: Specifies SNMP notifications for invalid-protocol failures.

invalid-sign: Specifies SNMP notifications for invalid-signature failures.

no-sa-failure: Specifies SNMP notifications for SA-not-found failures.

proposal-add: Specifies SNMP notifications for events of adding IKE proposals.

proposal-delete: Specifies SNMP notifications for events of deleting IKE proposals.

tunnel-start: Specifies SNMP notifications for events of creating IKE tunnels.

tunnel-stop: Specifies SNMP notifications for events of deleting IKE tunnels.

unsupport-exch-type: Specifies SNMP notifications for negotiation-type-unsupported failures.

Usage guidelines

If you do not specify any keywords, this command enables or disables all SNMP notifications for IKE.

To generate and output SNMP notifications for a specific IKE failure type or event type, perform the following tasks:

1.        Enable SNMP notifications for IKE globally.

2.        Enable SNMP notifications for the failure type or event type.

Examples

# Enable SNMP notifications for IKE globally.

<Sysname> system-view

[Sysname] snmp-agent trap enable ike global

# Enable SNMP notifications for events of creating IKE tunnels.

[Sysname] snmp-agent trap enable ike tunnel-start


IKEv2 commands

The following matrix shows the feature and hardware compatibility:

 

Hardware series

Model

IKEv2 compatibility

WX1800H series

WX1804H

Yes

WX1810H

Yes

WX1820H

Yes

WX1840H

No

WX3800H series

WX3820H

WX3840H

No

WX5800H series

WX5860H

No

 

aaa authorization

Use aaa authorization to enable IKEv2 AAA authorization.

Use undo aaa authorization to disable IKEv2 AAA authorization.

Syntax

aaa authorization domain domain-name username user-name

undo aaa authorization

Default

IKEv2 AAA authorization is disabled.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

domain domain-name: Specifies the ISP domain used for requesting authorization attributes. The ISP domain name is a case-insensitive string of 1 to 255 characters and must meet the following requirements:

·          The name cannot contain a forward slash (/), backslash (\), vertical bar (|), quotation mark ("), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or an at sign (@).

·          The name cannot be d, de, def, defa, defau, defaul, default, i, if, if-, if-u, if-un, if-unk, if-unkn, if-unkno, if-unknow, or if-unknown.

username user-name: Specifies the username used for requesting authorization attributes. The username is a case-sensitive string of 1 to 55 characters and must meet the following requirements:

·          The username cannot contain the domain name.

·          The username cannot contain a forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle bracket (<), right angle bracket (>), or an at sign (@).

·          The username cannot be a, al, or all.

Usage guidelines

The AAA authorization feature enables IKEv2 to request authorization attributes, such as the IKEv2 IPv4 address pool, from AAA.

IKEv2 uses the ISP domain and username to request authorization attributes. AAA uses the authorization settings in the ISP domain to request the user's authorization attributes from the remote AAA server or the local user database. After IKEv2 passes the username authentication, it obtains the authorization attributes.

This feature is applicable when AAA is used to centrally manage and deploy authorization attributes.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Enable AAA authorization. Specify the ISP domain name abc and the username test.

[Sysname-ikev2-profile-profile1] aaa authorization domain abc username test

Related commands

display ikev2 profile

address

Use address to specify the IP address or IP address range of the IKEv2 peer.

Use undo address to restore the default.

Syntax

address { ipv4-address [ mask | mask-length ] | ipv6 ipv6-address [ prefix-length ] }

undo address

Default

The IKEv2 peer's IP address or IP address range is not specified.

Views

IKEv2 peer view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the IKEv2 peer.

Mask: Specifies the subnet mask of the IPv4 address.

mask-length: Specifies the subnet mask length of the IPv4 address, in the range of 0 to 32.

ipv6 ipv6-address: Specifies the IPv6 address of the IKEv2 peer.

prefix-length: Specifies the prefix length of the IPv6 address, in the range of 0 to 128.

Usage guidelines

Both the initiator and the responder can look up an IKEv2 peer by IP address in IKEv2 negotiation.

The IP addresses of different IKEv2 peers in the same IKEv2 keychain cannot be the same.

Examples

# Create an IKEv2 keychain named key1.

<Sysname> system-view

[Sysname] ikev2 keychain key1

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-key1] peer peer1

# Specify the IKEv2 peer's IP address 3.3.3.3 with the subnet mask 255.255.255.0.

[Sysname-ikev2-keychain-key1-peer-peer1] address 3.3.3.3 255.255.255.0

Related commands

·          ikev2 keychain

·          peer

authentication-method

Use authentication-method to specify the local or remote identity authentication method.

Use undo authentication-method to remove the local or remote identity authentication method.

Syntax

authentication-method { local | remote } { dsa-signature | ecdsa-signature | pre-share | rsa-signature }

undo authentication-method local

undo authentication-method remote { dsa-signature | ecdsa-signature | pre-share | rsa-signature }

Default

No local or remote identity authentication method is specified.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

local: Specifies the local identity authentication method.

remote: Specifies the remote identity authentication method.

dsa-signature: Specifies the DSA signatures as the identity authentication method.

ecdsa-signature: Specifies the ECDSA signatures as the identity authentication method.

pre-share: Specifies the pre-shared key as the identity authentication method.

rsa-signature: Specifies the RSA signatures as the identity authentication method.

Usage guidelines

The local and remote identity authentication methods must both be specified and they can be different.

You can specify only one local identity authentication method. You can specify multiple remote identity authentication methods by executing this command multiple times when there are multiple remote ends whose authentication methods are unknown.

If you use RSA, DSA, or ECDSA signature authentication, you must specify PKI domains for obtaining certificates. You can specify PKI domains by using the certificate domain command in IKEv2 profile view or by using the pki domain command in system view. PKI domains specified in IKEv2 profile view take precedence over those specified in system view.

If you specify the pre-shared key method, you must specify a pre-shared key for the IKEv2 peer in the keychain used by the IKEv2 profile.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Specify the pre-shared key and RSA signatures as the local and remote authentication methods, respectively.

[Sysname-ikev2-profile-profile1] authentication local pre-share

[Sysname-ikev2-profile-profile1] authentication remote rsa-signature

# Specify the PKI domain genl as the PKI domain for obtaining certificates.

[Sysname-ikev2-profile-profile1] certificate domain genl

# Specify the keychain keychain1.

[Sysname-ikev2-profile-profile1] keychain keychain1

Related commands

·          display ikev2 profile

·          certificate domain (IKEv2 profile view)

·          keychain (IKEv2 profile view)

certificate domain

Use certificate domain to specify a PKI domain for signature authentication in IKEv2 negotiation.

Use undo certificate domain to remove a PKI domain for signature authentication in IKEv2 negotiation.

Syntax

certificate domain domain-name [ sign | verify ]

undo certificate domain domain-name

Default

PKI domains specified in system view are used.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters.

sign: Uses the local certificate in the PKI domain to generate a signature.

verify: Uses the CA certificate in the PKI domain to verify the remote end's certificate.

Usage guidelines

You can specify a PKI domain for each purpose (sign or verify). If you specify the same PKI domain for both purposes, the later configuration takes effect. For example, if you execute certificate domain abc sign and certificate domain abc verify successively, the PKI domain abc will be used only for verification. To use the same PKI domain for both purposes, specify the PKI domain without specifying the sign or verify keyword.

If the local end uses RSA, DSA, or ECDSA signature authentication, you must specify a PKI domain for signature generation. If the remote end uses RSA, DSA, or ECDSA signature authentication, you must specify a PKI domain for verifying the remote end's certificate. If you do not specify PKI domains, the PKI domains specified in system view will be used.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Specify the PKI domain abc for signature. Specify the PKI domain def for verification.

[Sysname-ikev2-profile-profile1] certificate domain abc sign

[Sysname-ikev2-profile-profile1] certificate domain def verify

Related commands

·          authentication-method

·          pki domain

config-exchange

Use config-exchange to enable the configuration exchange feature.

Use undo config-exchange to disable the configuration exchange feature.

Syntax

config-exchange { request | set { accept | send } }

undo config-exchange { request | set { accept | send } }

Default

Configuration exchange is disabled.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

request: Enables the device to send request messages carrying the configuration request payload during the IKE_AUTH exchange.

set: Specifies the configuration set payload exchange.

accept: Enables the device to accept the configuration set payload carried in Info messages.

send: Enables the device to send Info messages carrying the configuration set payload.

Usage guidelines

The configuration exchange feature enables the local and remote ends to exchange configuration data, such as gateway address, internal IP address, and route. The exchange includes data request and response, and data push and response. The enterprise center can push IP addresses to branches. The branches can request IP addresses, but the requested IP addresses cannot be used.

You can specify both request and set for the device.

If you specify request for the local end, the remote end will respond if it can obtain the requested data through AAA authorization.

If you specify set send for the local end, you must specify set accept for the remote end.

The device with set send specified pushes an IP address after the IKEv2 SA is set up if it does not receive any configuration request from the peer.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Enable the local end to add the configuration request payload to the request message of IKE_AUTH exchange.

[Sysname-ikev2-profile-profile1] config-exchange request

Related commands

·          aaa authorization

·          configuration policy

·          display ikev2 profile

dh

Use dh to specify DH groups to be used in IKEv2 key negotiation for an IKEv2 proposal.

Use undo group to restore the default.

Syntax

dh { group1 | group14 | group2 | group24 | group5 | group19 | group20 } *

undo dh

Default

No DH group is specified for an IKEv2 proposal.

Views

IKEv2 proposal view

Predefined user roles

network-admin

Parameters

group1: Uses the 768-bit Diffie-Hellman group.

group2: Uses the 1024-bit Diffie-Hellman group.

group5: Uses the 1536-bit Diffie-Hellman group.

group14: Uses the 2048-bit Diffie-Hellman group.

group24: Uses the 2048-bit Diffie-Hellman group with the 256-bit prime order subgroup.

group19: Uses 256-bit ECP Diffie-Hellman group.

group20: Uses 384-bit ECP Diffie-Hellman group.

Usage guidelines

A DH group with a higher group number provides higher security but needs more time for processing. To achieve the best trade-off between processing performance and security, choose proper DH groups for your network.

You must specify a minimum of one DH group for an IKEv2 proposal. Otherwise, the proposal is incomplete and useless.

You can specify multiple DH groups for an IKEv2 proposal. A group specified earlier has a higher priority.

Examples

# Specify DH groups 1 for the IKEv2 proposal 1.

<Sysname> system-view

[Sysname] ikev2 proposal 1

[Sysname-ikev2-proposal-1] dh group1

Related commands

ikev2 proposal

display ikev2 policy

Use display ikev2 policy to display the IKEv2 policy configuration.

Syntax

display ikev2 policy [ policy-name | default ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an IKEv2 policy by its name, a case-insensitive string of 1 to 63 characters.

default: Specifies the default IKEv2 policy.

Usage guidelines

If you do not specify any parameters, this command displays the configuration of all IKEv2 policies.

Examples

# Display the configuration of all IKEv2 policies.

<Sysname> display ikev2 policy

IKEv2 policy: 1

  Priority: 100

  Match local address: 1.1.1.1

  Match local address ipv6: 1:1::1:1

  Match VRF: vpn1

  Proposal: 1

  Proposal: 2

IKEv2 policy: default

  Match local address: Any

  Match VRF: Any

  Proposal: default

Table 82 Command output

Field

Description

IKEv2 policy

Name of the IKEv2 policy.

Priority

Priority of the IKEv2 policy.

Match local address

IPv4 address to which the IKEv2 policy can be applied.

Match local address ipv6

IPv6 address to which the IKEv2 policy can be applied.

Match VRF

VPN instance to which the IKEv2 policy can be applied.

The device does not support this field in the current software version.

Proposal

IKEv2 proposal that the IKEv2 policy uses.

 

Related commands

ikev2 policy

display ikev2 profile

Use display ikev2 profile to display the IKEv2 profile configuration.

Syntax

display ikev2 profile [ profile-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

profile-name: Specifies an IKEv2 profile by its name, a case-insensitive string of 1 to 63 characters. If you do not specify any parameters, this command displays the configuration of all IKEv2 profiles.

Examples

# Display the configuration of all IKEv2 profiles.

<Sysname> display ikev2 profile

IKEv2 profile: 1

  Priority: 100

  Match criteria:

    Local address 1.1.1.1

    Local address Vlan-interface100

    Local address 1:1::1:1

    Remote identity address 3.3.3.3/32

    VRF vrf1

  Inside-vrf:

  Local identity: address 1.1.1.1

  Local authentication method: pre-share

  Remote authentication methods: pre-share

  Keychain: Keychain1

  Sign certificate domain:

     Domain1

     abc

  Verify certificate domain:

     Domain2

     yy

  SA duration: 500 seconds

  DPD: Interval 32 secs, retry-interval 23 secs, periodic

  Config exchange: request, set accept, set send

  NAT keepalive: 10 seconds

  AAA authorization: Domain domain1, username ikev2

Table 83 Command output

Field

Description

IKEv2 profile

Name of the IKEv2 profile.

Priority

Priority of the IKEv2 profile.

Match criteria

Criteria for looking up the IKEv2 profile.

Inside vrf

Inside VPN instance.

The device does not support this field in the current software version.

Local identity

ID of the local end.

Local authentication method

Method that the local end uses for authentication.

Remote authentication methods

Methods that the remote end uses for authentication.

Keychain

IKEv2 keychain that the IKEv2 profile uses.

Sign certificate domain

PKI domain used for signature generation.

Verify certificate domain

PKI domain used for verifying the remote end's certificate.

SA duration

Lifetime of the IKEv2 SA.

DPD

DPD settings:

·         Detection interval in seconds.

·         Retry interval in seconds.

·         Detection mode, on demand or periodically.

If DPD is disabled, this field displays Disabled.

Config exchange

Configuration exchange settings:

·         request—The local end sends request messages carrying the configuration request payload during the IKE_AUTH exchange.

·         set accept—The local end accepts the configuration set payload carried in Info messages.

·         set send—The local end sends Info messages carrying the configuration set payload.

NAT keepalive

NAT keepalive interval in seconds.

AAA authorization

AAA authorization settings:

·         ISP domain name.

·         Username.

 

Related commands

ikev2 profile

display ikev2 proposal

Use display ikev2 proposal to display the IKEv2 proposal configuration.

Syntax

display ikev2 proposal [ name | default ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

name: Specifies an IKEv2 proposal by its name, a case-insensitive string of 1 to 63 characters.

default: Specifies the default IKEv2 proposal.

Usage guidelines

This command displays IKEv2 proposals in descending order of priorities.

If you do not specify any parameters, this command displays the configuration of all IKEv2 proposals.

Examples

# Display the configuration of all IKEv2 proposals.

<Sysname> display ikev2 proposal

IKEv2 proposal: 1

  Encryption: 3DES-CBC, AES-CBC-128, AES-CTR-192, CAMELLIA-CBC-128

  Integrity: MD5, SHA256, AES-XCBC

  PRF: MD5, SHA256, AES-XCBC

  DH group: MODP1024/Group 2, MODP1536/Group 5

 

IKEv2 proposal: default

  Encryption: AES-CBC-128, 3DES-CBC

  Integrity: SHA1, MD5

  PRF: SHA1, MD5

  DH group: MODP1536/Group 5, MODP1024/Group 2

Table 84 Command output

Field

Description

IKEv2 proposal

Name of the IKEv2 proposal.

Encryption

Encryption algorithms that the IKEv2 proposal uses.

Integrity

Integrity protection algorithms that the IKEv2 proposal uses.

PRF

PRF algorithms that the IKEv2 proposal uses.

DH group

DH groups that the IKEv2 proposal uses.

 

Related commands

ikev2 proposal

display ikev2 sa

Use display ikev2 sa to display the IKEv2 SA information.

Syntax

display ikev2 sa [ count | [ { local | remote } { ipv4-address | ipv6 ipv6-address } ] [ verbose [ tunnel tunnel-id ] ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

count: Displays the number of IKEv2 SAs.

local: Displays IKEv2 SA information for a local IP address.

remote: Displays IKEv2 SA information for a remote IP address.

ipv4-address: Specifies a local or remote IPv4 address.

ipv6 ipv6-address: Specifies a local or remote IPv6 address.

verbose: Displays detailed information. If you do not specify this keyword, the command displays the summary information.

tunnel tunnel-id: Displays detailed IKEv2 SA information for an IPsec tunnel. The tunnel-id argument specifies an IPsec tunnel by its ID in the range of 1 to 2000000000.

Usage guidelines

If you do not specify any parameters, this command displays summary information about all IKEv2 SAs.

Examples

# Display summary information about all IKEv2 SAs.

<Sysname> display ikev2 sa

     Tunnel ID          Local             Remote             Status

  --------------------------------------------------------------------

     1                  1.1.1.1/500       1.1.1.2/500        EST

     2                  2.2.2.1/500       2.2.2.2/500        EST

  Status:

  IN-NEGO: Negotiating, EST: Established, DEL: Deleting

# Display summary IKEv2 SA information for the remote IP address 1.1.1.2.

<Sysname> display ikev2 sa remote 1.1.1.2

     Tunnel ID          Local             Remote             Status

  --------------------------------------------------------------------

     1                  1.1.1.1/500       1.1.1.2/500        EST

  Status:

  IN-NEGO: Negotiating, EST: Established, DEL: Deleting

Table 85 Command output

Field

Description

Tunnel ID

ID of the IPsec tunnel to which the IKEv2 SA belongs.

Local

Local IP address of the IKEv2 SA.

Remote

Remote IP address of the IKEv2 SA.

Status

Status of the IKEv2 SA:

·         IN-NEGO (Negotiating)—The IKEv2 SA is under negotiation.

·         EST (Established)—The IKEv2 SA has been set up.

·         DEL (Deleting)—The IKEv2 SA is about to be deleted.

 

# Display detailed information about all IKEv2 SAs.

<Sysname> display ikev2 sa verbose

  Tunnel ID: 1

  Local IP/Port: 1.1.1.1/500

  Remote IP/Port: 1.1.1.2/500

  Outside VRF: -

  Inside VRF: -

  Local SPI: 8f8af3dbf5023a00

  Remote SPI: 0131565b9b3155fa

 

  Local ID type: FQDN

  Local ID: device_a

  Remote ID type: FQDN

  Remote ID: device_b

 

  Auth sign method: Pre-shared key

  Auth verify method: Pre-shared key

  Integrity algorithm: HMAC_MD5

  PRF algorithm: HMAC_MD5

  Encryption algorithm: AES-CBC-192

 

  Life duration: 86400 secs

  Remaining key duration: 85604 secs

  Diffie-Hellman group: MODP1024/Group2

  NAT traversal: Not detected

  DPD: Interval 20 secs, retry interval 2 secs

  Transmitting entity: Initiator

 

  Local window: 1

  Remote window: 1

  Local request message ID: 2

  Remote request message ID:2

  Local next message ID: 0

  Remote next message ID: 0

 

  Pushed IP address: 192.168.1.5

  Assigned IP address: 192.168.2.24

 

# Display detailed IKEv2 SA information for the remote IP address 1.1.1.2.

<Sysname> display ikev2 sa remote 1.1.1.2 verbose

  Tunnel ID: 1

  Local IP/Port: 1.1.1.1/500

  Remote IP/Port: 1.1.1.2/500

  Outside VRF: -

  Inside VRF: -

  Local SPI: 8f8af3dbf5023a00

  Remote SPI: 0131565b9b3155fa

 

  Local ID type: FQDN

  Local ID: device_a

  Remote ID type: FQDN

  Remote ID: device_b

 

  Auth sign method: Pre-shared key

  Auth verify method: Pre-shared key

  Integrity algorithm: HMAC_MD5

  PRF algorithm: HMAC_MD5

  Encryption algorithm: AES-CBC-192

 

  Life duration: 86400 secs

  Remaining key duration: 85604 secs

  Diffie-Hellman group: MODP1024/Group2

  NAT traversal: Not detected

  DPD: Interval 30 secs, retry 10 secs

  Transmitting entity: Initiator

 

  Local window: 1

  Remote window: 1

  Local request message ID: 2

  Remote request message ID: 2

  Local next message ID: 0

  Remote next message ID: 0

 

  Pushed IP address: 192.168.1.5

  Assigned IP address: 192.168.2.24

Table 86 Command output

Field

Description

Tunnel ID

ID of the IPsec tunnel to which the IKEv2 SA belongs.

Local IP/Port

IP address and port number of the local security gateway.

Remote IP/Port

IP address and port number of the remote security gateway.

Outside VRF

Name of the VPN instance to which the protected outbound data flow belongs.

If the protected outbound data flow belongs to the public network, this field displays a hyphen (-).

The device does not support this field in the current software version.

Inside VRF

Name of the VPN instance to which the protected inbound data flow belongs.

If the protected inbound data flow belongs to the public network, this field displays a hyphen (-).

The device does not support this field in the current software version.

Local SPI

SPI that the local end uses.

Remote SPI

SPI that the remote end uses.

Local ID type

ID type of the local security gateway.

Local ID

ID of the local security gateway.

Remote ID type

ID type of the remote security gateway.

Remote ID

ID of the remote security gateway.

Auth sign method

Signature method that the IKEv2 proposal uses in authentication.

Auth verify method

Verification method that the IKEv2 proposal uses in authentication.

Integrity algorithm

Integrity protection algorithms that the IKEv2 proposal uses.

PRF algorithm

PRF algorithms that the IKEv2 proposal uses.

Encryption algorithm

Encryption algorithms that the IKEv2 proposal uses.

Life duration

Lifetime of the IKEv2 SA, in seconds.

Remaining key duration

Remaining lifetime of the IKEv2 SA, in seconds.

Diffie-Hellman group

DH groups used in IKEv2 key negotiation.

NAT traversal

Whether a NAT gateway is detected between the local and remote ends.

DPD

DPD settings:

·         Detection interval in seconds.

·         Retry interval in seconds.

If DPD is disabled, this field displays Disabled.

Transmitting entity

Role of the local end in IKEv2 negotiation, initiator or responder.

Local window

Window size that the local end uses.

Remote window

Window size that the remote end uses.

Local request message ID

ID of the request message that the local end is about to send.

Remote request message ID

ID of the request message that the remote end is about to send.

Local next message ID

ID of the message that the local end expects to receive.

Remote next message ID

ID of the message that the remote end expects to receive.

Pushed IP address

IP address pushed to the local end by the remote end.

Assigned IP address

IP address assigned to the remote end by the local end .

 

# Display the number of IKEv2 SAs.

[Sysname] display ikev2 sa count

IKEv2 SAs count: 0

display ikev2 statistics

Use display ikev2 statistics to display IKEv2 statistics.

Syntax

display ikev2 statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display IKEv2 statistics.

<Sysname> display ikev2 statistics

  Unsupported critical payload: 0

  Invalid IKE SPI: 0

  Invalid major version: 0

  Invalid syntax: 0

  Invalid message ID: 0

  Invalid SPI: 0

  No proposal chosen: 0

  Invalid KE payload: 0

  Authentication failed: 0

  Single pair required: 0

  TS unacceptable: 0

  Invalid selectors: 0

  Tempture failure: 0

  No child SA: 0

  Unknown other notify: 0

  No enough resource: 0

  Enqueue error: 0

  No IKEv2 SA: 0

  Packet error: 0

  Other error: 0

  Retransmit timeout: 0

  DPD detect error: 0

  Del child for IPsec message: 1

  Del child for deleting IKEv2 SA: 1

  Del child for receiving delete message: 0

Related commands

reset ikev2 statistics

dpd

Use dpd to configure the IKEv2 DPD feature.

Use undo dpd to disable the IKEv2 DPD feature.

Syntax

dpd interval interval [ retry seconds ] { on-demand | periodic }

undo dpd interval

Default

IKEv2 DPD is disabled. The global IKEv2 DPD settings are used.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

interval interval: Specifies a DPD triggering interval in the range of 10 to 3600 seconds.

·          If the on-demand keyword is specified, the device triggers DPD if it has IPsec traffic to send and has not received any IPsec packets from the peer for the specified interval.

·          If the periodic keyword is specified, the device triggers DPD at the specified intervals.

retry seconds: Specifies the DPD retry interval in the range of 2 to 60 seconds. The default is 5 seconds.

on-demand: Triggers DPD on demand.

periodic: Triggers DPD at regular intervals.

Usage guidelines

DPD is triggered periodically or on-demand. The on-demand mode is recommended when the device communicates with a large number of IKEv2 peers. For an earlier detection of dead peers, use the periodic triggering mode, but it consumes more bandwidth and CPU.

The triggering interval must be longer than the retry interval, so that the device will not trigger a new round of DPD during a DPD retry.

Examples

# Configure on-demand IKEv2 DPD. Set the DPD triggering interval to 10 seconds and the retry interval to 5 seconds.

<Sysname> system-view

[Sysname] ikev2 profile profile1

[Sysname-ikev2-profile-profile1] dpd interval 10 retry 5 on-demand

Related commands

ikev2 dpd

encryption

Use encryption to specify encryption algorithms for an IKEv2 proposal.

Use undo encryption to restore the default.

Syntax

encryption { 3des-cbc | aes-cbc-128 | aes-cbc-192 | aes-cbc-256 | aes-ctr-128 | aes-ctr-192 | aes-ctr-256 | camellia-cbc-128 | camellia-cbc-192 | camellia-cbc-256 | des-cbc } *

undo encryption

Default

No encryption algorithm is specified for an IKEv2 proposal.

Views

IKEv2 proposal view

Predefined user roles

network-admin

Parameters

3des-cbc: Uses the 3DES algorithm in CBC mode, which uses a 168-bit key.

aes-cbc-128: Uses the AES algorithm in CBC mode, which uses a 128-bit key.

aes-cbc-192: Uses the AES algorithm in CBC mode, which uses a 192-bit key.

aes-cbc-256: Uses the AES algorithm in CBC mode, which uses a 256-bit key.

aes-ctr-128: Uses the AES algorithm in CTR mode, which uses a 128-bit key.

aes-ctr-192: Uses the AES algorithm in CTR mode, which uses a 192-bit key.

aes-ctr-256: Uses the AES algorithm in CTR mode, which uses a 256-bit key.

camellia-cbc-128: Uses the Camellia algorithm in CBC mode, which uses a 128-bit key.

camellia-cbc-192: Uses the Camellia algorithm in CBC mode, which uses a 192-bit key.

camellia-cbc-256: Uses the Camellia algorithm in CBC mode, which uses a 256-bit key.

des-cbc: Uses the DES algorithm in CBC mode, which uses a 56-bit key.

Usage guidelines

You must specify a minimum of one encryption algorithm for an IKEv2 proposal. Otherwise, the proposal is incomplete and useless.

You can specify multiple encryption algorithms for an IKEv2 proposal. An algorithm specified earlier has a higher priority.

Examples

# Specify the 168-bit 3DES algorithm in CBC mode as the encryption algorithm for IKE proposal prop1.

<Sysname> system-view

[Sysname] ikev2 proposal prop1

[Sysname-ikev2-proposal-prop1] encryption 3des-cbc

Related commands

ikev2 proposal

hostname

Use hostname to specify the host name of the IKEv2 peer.

Use undo hostname to restore the default.

Syntax

hostname name

undo hostname

Default

The IKEv2 peer's host name is not specified.

Views

IKEv2 peer view

Predefined user roles

network-admin

Parameters

name: Specifies the host name of the IKEv2 peer, a case-insensitive string of 1 to 253 characters.

Usage guidelines

Only the initiator can look up an IKEv2 peer by host name in IKEv2 negotiation.

Examples

# Create an IKEv2 keychain named key1.

<Sysname> system-view

[Sysname] ikev2 keychain key1

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-key1] peer peer1

# Specify the host name test of the IKEv2 peer.

[Sysname-ikev2-keychain-key1-peer-peer1] hostname test

Related commands

·          ikev2 keychain

·          peer

identity

Use identity to specify the ID of the IKEv2 peer.

Use undo identity to restore the default.

Syntax

identity { address { ipv4-address | ipv6 { ipv6-address } } | fqdn fqdn-name | email email-string | key-id key-id-string }

undo identity

Default

The IKEv2 peer's ID is not specified.

Views

IKEv2 peer view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the peer.

ipv6 ipv6-address: Specifies the IPv6 address of the peer.

fqdn fqdn-name: Specifies the FQDN of the peer. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as www.test.com.

email email-string: Specifies the email address of the peer. The email-string argument is a case-sensitive string of 1 to 255 characters in the format defined by RFC 822, such as esec@test.com.

key-id key-id: Specifies the remote gateway's key ID. The key-id argument is a case-sensitive string of 1 to 255 characters, and is usually a vendor-specific string for doing proprietary types of identification.

Usage guidelines

Only the responder can look up an IKEv2 peer by ID in IKEv2 negotiation. The initiator does not know the peer ID when initiating the IKEv2 negotiation, so it cannot use an ID for IKEv2 peer lookup.

Examples

# Create an IKEv2 keychain named key1.

<Sysname> system-view

[Sysname] ikev2 keychain key1

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-key1] peer peer1

# Specify the peer IPv4 address 1.1.1.2 as the ID of the IKEv2 peer.

[Sysname-ikev2-keychain-key1-peer-peer1] identity address 1.1.1.2

Related commands

·          ikev2 keychain

·          peer

identity local

Use identity local to configure the local ID, the ID that the device uses to identify itself to the peer during IKEv2 negotiation.

Use undo identity local to restore the default.

Syntax

identity local { address { ipv4-address | ipv6 ipv6-address } | dn | email email-string | fqdn fqdn-name | key-id key-id-string }

undo identity local

Default

No local ID is specified. The IP address of the interface to which the IPsec policy is applied is used as the local ID.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

address { ipv4-address | ipv6 ipv6-address }: Uses an IPv4 or IPv6 address as the local ID.

dn: Uses the DN in the local certificate as the local ID.

email email-string: Uses an email address as the local ID. The email-string argument is a case-sensitive string of 1 to 255 characters in the format defined by RFC 822, such as sec@abc.com.

fqdn fqdn-name: Uses an FQDN as the local ID. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as www.test.com.

key-id key-id: Uses the device's key ID as the local ID. The key-id argument is a case-sensitive string of 1 to 255 characters, and is usually a vendor-specific string for doing proprietary types of identification.

Usage guidelines

Peers exchange local IDs for identifying each other in negotiation.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Use the IP address 2.2.2.2 as the local ID.

[Sysname-ikev2-profile-profile1] identity local address 2.2.2.2

Related commands

peer

ikev2 address-group

Use ikev2 address-group to configure an IKEv2 IPv4 address pool for assigning IPv4 addresses to remote peers.

Use undo ikev2 address-group to delete an IKEv2 IPv4 address pool.

Syntax

ikev2 address-group group-name start-ipv4-address end-ipv4-address [ mask | mask-length ]

undo ikev2 address-group group-name

Default

No IKEv2 IPv4 address pool exists.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies an name for the IKEv2 IPv4 address pool. The group-name argument is a case-insensitive string of 1 to 63 characters.

start-ipv4-address end-ipv4-address: Specifies an IPv4 address range. The start-ipv4-address argument specifies the start IPv4 address. The end-ipv4-address argument specifies the end IPv4 address.

mask: Specifies the IPv4 address mask.

mask-length: Specifies the length of the IPv4 address mask.

Usage guidelines

An IKE IPv4 address pool can contain a maximum of 8192 IPv4 addresses.

Examples

# Configure an IKEv2 IPv4 address pool with the name ipv4group, address range 1.1.1.1 to 1.1.1.2, and the mask 255.255.255.0.

<Sysname> system-view

[Sysname] ikev2 address-group ipv4group 1.1.1.1 1.1.1.2 255.255.255.0

# Configure an IKEv2 IPv4 address pool with the name ipv4group, address range 1.1.1.1 to 1.1.1.2, and the mask length 32.

<Sysname> system-view

[Sysname] ikev2 address-group ipv4group 1.1.1.1 1.1.1.2 32

Related commands

address-group

ikev2 cookie-challenge

Use ikev2 cookie-challenge to enable the cookie challenging feature.

Use undo ikev2 cookie-challenge to disable the cookie challenging feature.

Syntax

ikev2 cookie-challenge number

undo ikev2 cookie-challenge

Default

The cookie challenging feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

number: Sets the threshold for triggering the cookie challenging feature. The value range for this argument is 1 to 1000 half-open IKE SAs.

Usage guidelines

When an IKEv2 responder maintains a threshold number of half-open IKE SAs, it starts the cookie challenging mechanism. The responder generates a cookie and includes it in the response sent to the initiator. If the initiator initiates a new IKE_SA_INIT request that carries the correct cookie, the responder considers the initiator valid and proceeds with the negotiation. If the carried cookie is incorrect, the responder terminates the negotiation.

This feature can protect the responder against DoS attacks which aim to exhaust the responder's system resources by using a large number of IKE_SA_INIT requests with forged source IP addresses.

Examples

# Enable the cookie challenging feature and set the threshold to 450.

<Sysname> system-view

[Sysname] ikev2 cookie-challenge 450

ikev2 dpd

Use ikev2 dpd to configure the global IKEv2 DPD feature.

Use undo ikev2 dpd to disable the global IKEv2 DPD feature.

Syntax

ikev2 dpd interval interval [ retry seconds ] { on-demand | periodic }

undo ikev2 dpd interval

Default

The global IKEv2 DPD feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

interval interval: Specifies a DPD triggering interval in the range of 10 to 3600 seconds.

·          If the on-demand keyword is specified, the device triggers DPD if it has IPsec traffic to send and has not received any IPsec packets from the peer for the specified interval.

·          If the periodic keyword is specified, the device triggers DPD at the specified intervals.

retry seconds: Specifies the DPD retry interval in the range of 2 to 60 seconds. The default is 5 seconds.

on-demand: Triggers DPD on demand.

periodic: Triggers DPD at regular intervals.

Usage guidelines

DPD is triggered periodically or on-demand. The on-demand mode is recommended when the device communicates with a large number of IKEv2 peers. For an earlier detection of dead peers, use the periodic triggering mode, but it consumes more bandwidth and CPU.

The triggering interval must be longer than the retry interval, so that the device will not trigger a new round of DPD during a DPD retry.

If you do not configure IKEv2 DPD in IKEv2 profile view, the IKEv2 DPD settings in system view apply. If you configure IKEv2 DPD in both IKEv2 profile view and system view, the IKEv2 DPD settings in IKEv2 profile view apply.

Examples

# Configure the device to trigger IKEv2 DPD if it has IPsec traffic to send and has not received any IPsec packets from the peer for 15 seconds.

<Sysname> system-view

[Sysname] ikev2 dpd interval 15 on-demand

# Configure the device to trigger IKEv2 DPD every 15 seconds.

<Sysname> system-view

[Sysname] ikev2 dpd interval 15 periodic

Related commands

dpd (IKEv2 profile view)

ikev2 ipv6-address-group

Use ikev2 ipv6-address-group to configure an IKEv2 IPv6 address pool for assigning IPv6 addresses to remote peers.

Use undo ikev2 ipv6-address-group to delete an IKEv2 IPv6 address pool.

Syntax

ikev2 ipv6-address-group group-name prefix prefix/prefix-len assign-len assign-len

undo ikev2 ipv6-address-group group-name

Default

No IKEv2 IPv6 address pool exists.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies a name for the IKEv2 IPv6 address pool. The group-name argument is a case-insensitive string of 1 to 63 characters.

prefix prefix/prefix-len: Specifies an IPv6 prefix in the format of prefix/prefix length. The value range for the prefix-len argument is 1 to 128.

assign-len assign-len: Specifies the assigned prefix length. The value range for the assign-len argument is 0 to 128, and the value must be greater than or equal to prefix-len. The difference between assign-len and prefix-len must be no more than 16.

Usage guidelines

Different from the IKEv2 IPv4 address pool, the device assigns an IPv6 subnet to a peer from the IKEv2 IPv6 address pool. The peer can use the assigned IPv6 subnet to assign IPv6 addresses to other devices.

IKEv2 IPv6 address pools cannot overlap with each other.

Examples

# Configure an IKEv2 IPv6 address pool with the name ipv6group, prefix 1:1::/64, and the assigned prefix length 80.

<Sysname> system-view

[Sysname] ikev2 ipv6-address-group ipv6group prefix 1:1::/64 assign-len 80

Related commands

ipv6-address-group

ikev2 keychain

Use ikev2 keychain to create an IKEv2 keychain and enter its view, or enter the view of an existing IKEv2 keychain.

Use undo ikev2 keychain to delete an IKEv2 keychain.

Syntax

ikev2 keychain keychain-name

undo ikev2 keychain keychain-name

Default

No IKEv2 keychain exists.

Views

System view

Predefined user roles

network-admin

Parameters

keychain-name: Specifies a name for the IKEv2 keychain. The keychain name is a case-insensitive string of 1 to 63 characters and cannot contain a hyphen (-).

Usage guidelines

An IKEv2 keychain is required on both ends if either end uses pre-shared key authentication. The pre-shared key configured on both ends must be the same.

You can configure multiple IKEv2 peers in an IKEv2 keychain.

Examples

# Create an IKEv2 keychain named key1 and enter IKEv2 keychain view.

<Sysname> system-view

[Sysname] ikev2 keychain key1

[Sysname-ikev2-keychain-key1]

ikev2 nat-keepalive

Use ikev2 nat-keepalive to set the NAT keepalive interval.

Use undo ikev2 nat-keepalive to restore the default.

Syntax

ikev2 nat-keepalive seconds

undo ikev2 nat-keepalive

Default

The NAT keepalive interval is 10 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Sets the NAT keepalive interval in seconds, in the range of 5 to 3600.

Usage guidelines

This command takes effect when the device resides behind a NAT device. The device must send NAT keepalive packets regularly to its peer to keep the NAT session alive, so that the peer can access the device.

The NAT keepalive interval must be shorter than the NAT session lifetime.

Examples

# Set the NAT keepalive interval to 5 seconds.

<Sysname> system-view

[Sysname] ikev2 nat-keepalive 5

ikev2 policy

Use ikev2 policy to create an IKEv2 policy and enter its view, or enter the view of an existing IKEv2 policy.

Use undo ikev2 policy to delete an IKEv2 policy.

Syntax

ikev2 policy policy-name

undo ikev2 policy policy-name

Default

The device has a system default IKEv2 policy named default. The default IKEv2 policy uses the default IKEv2 proposal and matches any local addresses.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies a name for the IKEv2 policy. The policy name is a case-insensitive string of 1 to 63 characters.

Usage guidelines

Each end must have an IKEv2 policy for the IKE_SA_INIT exchange. The initiator looks up an IKEv2 policy by the IP address of the interface to which the IPsec policy is applied. The responder looks up an IKEv2 policy by the IP address of the interface that receives the IKEv2 packet.

An IKEv2 policy uses IKEv2 proposals to define the encryption algorithms, integrity protection algorithms, PRF algorithms, and DH groups to be used for negotiation.

You can configure multiple IKEv2 policies.

An IKEv2 policy must have a minimum of one IKEv2 proposal. Otherwise, the policy is incomplete.

If the initiator uses an IPsec policy that is bound to a source interface, the initiator looks up an IKEv2 policy by the IP address of the source interface.

You can set priorities to adjust the match order of IKEv2 policies that have the same match criteria.

You cannot enter the view of the default IKEv2 policy, nor modify it.

Examples

# Create an IKEv2 policy named policy1 and enter IKEv2 policy view.

<Sysname> system-view

[Sysname] ikev2 policy policy1

[Sysname-ikev2-policy-policy1]

Related commands

display ikev2 policy

ikev2 profile

Use ikev2 profile to create an IKEv2 profile and enter its view, or enter the view of an existing IKEv2 profile.

Use undo ikev2 profile to delete an IKEv2 profile.

Syntax

ikev2 profile profile-name

undo ikev2 profile profile-name

Default

No IKEv2 profile exists.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a name for the IKEv2 profile. The profile name is a case-insensitive string of 1 to 63 characters.

Usage guidelines

An IKEv2 profile contains the IKEv2 SA parameters that are not negotiated, such as the identity information and authentication methods of the peers, and the matching criteria for profile lookup.

Examples

# Create an IKEv2 profile named profile1 and enter IKEv2 profile view.

<Sysname> system-view

[Sysname] ikev2 profile profile1

[Sysname-ikev2-profile-profile1]

Related commands

display ikev2 profile

ikev2 proposal

Use ikev2 proposal to create an IKEv2 proposal and enter its view, or enter the view of an existing IKEv2 proposal.

Use undo ikev2 proposal to delete an IKEv2 proposal.

Syntax

ikev2 proposal proposal-name

undo ikev2 proposal proposal-name

Default

The device has a system default IKEv2 proposal named default. This proposal has the lowest priority and uses the following settings:

·          Encryption algorithm—AES-CBC-128 and 3DES.

·          Integrity protection algorithm—HMAC-SHA1 and HMAC-MD5.

·          PRF algorithm—HMAC-SHA1 and HMAC-MD5.

·          DH group—Group 5 and group 2.

Views

System view

Predefined user roles

network-admin

Parameters

proposal-name: Specifies a name for the IKEv2 proposal. The proposal name is a case-insensitive string of 1 to 63 characters and cannot be default.

Usage guidelines

An IKEv2 proposal contains security parameters used in IKE_SA_INIT exchanges, including the encryption algorithms, integrity protection algorithms, PRF algorithms, and DH groups.

An IKEv2 proposal must have a minimum of one set of security parameters, including one encryption algorithm, one integrity protection algorithm, one PRF algorithm, and one DH group.

In an IKEv2 proposal, you can specify multiple parameters of the same type. The parameters of different types combine and form multiple sets of security parameters. If you want to use only one set of security parameters, configure only one set of security parameters for the IKEv2 proposal.

Examples

# Create an IKEv2 proposal named prop1. Specify the encryption algorithm AES-CBC-128, integrity protection algorithm SHA1, PRF algorithm SHA1, and DH group 2.

<Sysname> system-view

[Sysname] ikev2 proposal prop1

[Sysname-ikev2-proposal-prop1] encryption aes-cbc-128

[Sysname-ikev2-proposal-prop1] integrity sha1

[Sysname-ikev2-proposal-prop1] prf sha1

[Sysname-ikev2-proposal-prop1] dh group2

Related commands

·          encryption-algorithm

·          integrity

·          prf

·          dh

integrity

Use integrity to specify integrity protection algorithms for an IKEv2 proposal.

Use undo integrity to restore the default.

Syntax

integrity { aes-xcbc-mac | md5 | sha1 | sha256 | sha384 | sha512 } *

undo integrity

Default

No integrity protection algorithm is specified for an IKEv2 proposal.

Views

IKEv2 proposal view

Predefined user roles

network-admin

Parameters

aes-xcbc-mac: Uses the HMAC-AES-XCBC-MAC algorithm.

md5: Uses the HMAC-MD5 algorithm.

sha1: Uses the HMAC-SHA1 algorithm.

sha256: Uses the HMAC-SHA256 algorithm.

sha384: Uses the HMAC-SHA384 algorithm.

sha512: Uses the HMAC-SHA512 algorithm.

Usage guidelines

You can specify multiple integrity protection algorithms for an IKEv2 proposal. An algorithm specified earlier has a higher priority.

You must specify a minimum of one integrity protection algorithm for an IKEv2 proposal. Otherwise, the proposal is incomplete and useless.

Examples

# Create an IKEv2 proposal named prop1.

<Sysname> system-view

[Sysname] ikev2 proposal prop1

# Specify HMAC-SHA1 and HMAC-MD5 as the integrity protection algorithms, with HMAC-SHA1 preferred.

[Sysname-ikev2-proposal-prop1] integrity sha1 md5

Related commands

ikev2 proposal

keychain

Use keychain to specify an IKEv2 keychain for pre-shared key authentication.

Use undo keychain to restore the default.

Syntax

keychain keychain-name

undo keychain

Default

No IKEv2 keychain is specified for an IKEv2 profile.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

keychain-name: Specifies an IKEv2 keychain by its name. The keychain name is a case-insensitive string of 1 to 63 characters and cannot contain a hyphen (-).

Usage guidelines

An IKEv2 keychain is required on both ends if either end uses pre-shared key authentication.

You can specify only one IKEv2 keychain for an IKEv2 profile.

You can specify the same IKEv2 keychain for different IKEv2 profiles.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Specify the IKEv2 keychain keychain1.

[Sysname-ikev2-profile-profile1] keychain keychain1

Related commands

·          display ikev2 profile

·          ikev2 keychain

match local (IKEv2 profile view)

Use match local to specify a local interface or a local IP address to which an IKEv2 profile can be applied.

Use undo match local to remove a local interface or a local IP address to which an IKEv2 profile can be applied.

Syntax

match local address { interface-type interface-number | ipv4-address | ipv6 ipv6-address }

undo match local address { interface-type interface-number | ipv4-address | ipv6 ipv6-address }

Default

An IKEv2 profile can be applied to any local interface or IP address.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

address: Specifies a local interface or IP address to which an IKEv2 profile can be applied.

interface-type interface-number: Specifies a local interface by its type and number. It can be any Layer 3 interface.

ipv4-address: Specifies the IPv4 address of a local interface.

ipv6 ipv6-address: Specifies the IPv6 address of a local interface.

Usage guidelines

Use this command to specify which address or interface can use the IKEv2 profile for IKEv2 negotiation. The interface is the interface that receives IKEv2 packets. The IP address is the IP address of the interface that receives IKEv2 packets.

An IKEv2 profile configured earlier has a higher priority. To give an IKEv2 profile that is configured later a higher priority, you can configure the priority command or this command for the profile. For example, suppose you configured IKEv2 profile A before configuring IKEv2 profile B, and you configured the match remote identity address range 2.2.2.1 2.2.2.100 command for IKEv2 profile A and the match remote identity address range 2.2.2.1 2.2.2.10 command for IKEv2 profile B. For the local interface with the IP address 3.3.3.3 to negotiate with the peer 2.2.2.6, IKEv2 profile A is preferred because IKEv2 profile A was configured earlier. To use IKEv2 profile B, you can use this command to restrict the application scope of IKEv2 profile B to IPv4 address 3.3.3.3.

You can specify multiple applicable local interfaces or IP addresses for an IKEv2 profile.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Apply the IKEv2 profile profile1 to the interface whose IP address is 2.2.2.2.

[Sysname-ikev2-profile-profile1] match local address 2.2.2.2

Related commands

match remote

match local address (IKEv2 policy view)

Use match local address to specify a local interface or a local address that an IKEv2 policy matches.

Use undo match local address to remove a local interface or a local address that an IKEv2 policy matches.

Syntax

match local address { interface-type interface-number | ipv4-address | ipv6 ipv6-address }

undo match local address { interface-type interface-number | ipv4-address | ipv6 ipv6-address }

Default

No local interface or address is specified, and the IKEv2 policy matches any local interface or address.

Views

IKEv2 policy view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies a local interface by its type and number. It can be any Layer 3 interface.

ipv4-address: Specifies the IPv4 address of a local interface.

ipv6 ipv6-address: Specifies the IPv6 address of a local interface.

Usage guidelines

IKEv2 policies with this command configured are looked up before those that do not have this command configured.

Examples

# Configure the IKEv2 policy policy1 to match the local address 3.3.3.3.

<Sysname> system-view

[Sysname] ikev2 policy policy1

[Sysname-ikev2-policy-policy1] match local address 3.3.3.3

Related commands

·          display ikev2 policy

·          match vrf

match remote

Use match remote to specify a peer ID that an IKEv2 profile matches.

Use undo match remote to delete a peer ID that an IKEv2 profile matches.

Syntax

match remote { certificate policy-name | identity { address { { ipv4-address [ mask | mask-length ] | range low-ipv4-address high-ipv4-address } | ipv6 { ipv6-address [ prefix-length ] | range low-ipv6-address high-ipv6-address } } | fqdn fqdn-name | email email-string | key-id key-id-string } }

undo match remote { certificate policy-name | identity { address { { ipv4-address [ mask |mask-length ] | range low-ipv4-address high-ipv4-address } | ipv6 { ipv6-address [ prefix-length ] | range low-ipv6-address high-ipv6-address } } | fqdn fqdn-name | email email-string | key-id key-id-string } }

Default

No matching peer ID is specified for the IKEv2 profile.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

certificate policy-name: Uses the information in the peer's digital certificate as the peer ID for IKEv2 profile matching. The policy-name argument specifies a certificate-based access control policy by its name, a case-insensitive string of 1 to 31 characters.

identity: Uses the specified information as the peer ID for IKEv2 profile matching. The specified information is configured on the peer by using the local-identity command.

address ipv4-address [ mask | mask-length ]: Uses an IPv4 host address or an IPv4 subnet address as the peer ID for IKEv2 profile matching. The value range for the mask-length argument is 0 to 32.

address range low-ipv4-address high-ipv4-address: Uses a range of IPv4 addresses as the peer ID for IKEv2 profile matching. The end address must be higher than the start address.

address ipv6 ipv6-address [ prefix-length ]: Uses an IPv6 host address or an IPv6 subnet address as the peer ID for IKEv2 profile matching. The value range for the prefix-length argument is 0 to 128.

address ipv6 range low-ipv6-address high-ipv6-address: Uses a range of IPv6 addresses as the peer ID for IKEv2 profile matching. The end address must be higher than the start address.

fqdn fqdn-name: Uses the peer's FQDN as the peer ID for IKEv2 profile matching. The fqdn-name argument is a case-sensitive string of 1 to 255 characters, such as www.test.com.

email email-string: Uses peer's email address as the peer ID for IKEv2 profile matching. The email-string argument is a case-sensitive string of 1 to 255 characters in the format defined by RFC 822, such as sec@abc.com.

key-id key-id: Uses the peer's key ID as the peer ID for IKEv2 profile matching. The key-id argument is a case-sensitive string of 1 to 255 characters, and is usually a vendor-specific string for doing proprietary types of identification.

Usage guidelines

The device compares the received peer ID with the peer IDs specified in local IKEv2 profiles. If a match is found, it uses the IKEv2 profile with the matching peer ID for IKEv2 negotiation. If you have configured the match local address and match vrf commands, the IKEv2 profile must also match the specified local interface or address and the specified VPN instance.

To make sure only one IKEv2 profile is matched for a peer, do not specify the same peer ID for two or more IKEv2 profiles. If you configure the same peer ID for two or more IKEv2 profiles, which IKEv2 profile is selected for IKEv2 negotiation is unpredictable.

You can configure an IKEv2 profile to match multiple peer IDs. A peer ID specified earlier has a higher priority.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Configure the IKEv2 profile to match the peer ID that is the FQDN name www.test.com.

[Sysname-ikev2-profile-profile1] match remote identity fqdn www.test.com

# Configure the IKEv2 profile to match the peer ID that is the IP address 10.1.1.1.

[Sysname-ikev2-profile-profile1]match remote identity address 10.1.1.1

Related commands

·          identity local

·          match local address

·          match vrf

nat-keepalive

Use nat-keepalive to set the NAT keepalive interval.

Use ikev2 nat-keepalive to restore the default.

Syntax

nat-keepalive seconds

undo nat-keepalive

Default

The NAT keepalive interval set in system view is used.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

seconds: Sets the NAT keepalive interval in seconds, in the range of 5 to 3600.

Usage guidelines

This command takes effect when the device resides behind a NAT device. The device must send NAT keepalive packets regularly to its peer to keep the NAT session alive, so that the peer can access the device.

The NAT keepalive interval must be shorter than the NAT session lifetime.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Set the NAT keepalive interval to 1200 seconds.

[Sysname-ikev2-profile-profile1]nat-keepalive 1200

Related commands

·          display ikev2 profile

·          ikev2 nat-keepalive

peer

Use peer to create an IKEv2 peer and enter its view, or enter the view of an existing IKEv2 peer.

Use undo peer to delete an IKEv2 peer.

Syntax

peer name

undo peer name

Default

No IKEv2 peer exists.

Views

IKEv2 keychain view

Predefined user roles

network-admin

Parameters

name: Specifies a name for the IKEv2 peer. The peer name is a case-insensitive string of 1 to 63 characters.

Usage guidelines

An IKEv2 peer contains a pre-shared key and the criteria for looking up the peer. The criteria for peer lookup includes the peer's host name, IP address, IP address range, and ID. The IKEv2 negotiation initiator uses the peer's host name, IP address, or IP address range to look up its peer. The responder uses the peer's IP address, IP address range, or ID to look up its peer.

Examples

# Create an IKEv2 keychain named key1 and enter IKEv2 keychain view.

<Sysname> system-view

[Sysname] ikev2 keychain key1

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-key1] peer peer1

Related commands

·          address

·          hostname

·          identity

·          ikev2 keychain

pre-shared-key

Use pre-shared-key to configure a pre-shared key.

Use undo pre-shared-key to delete a pre-shared key.

Syntax

pre-shared-key [ local | remote ] { ciphertext | plaintext } srting

undo pre-shared-key [ local | remote ]

Default

No pre-shared key exists.

Views

IKEv2 peer view

Predefined user roles

network-admin

Parameters

local: Specifies a pre-shared key for certificate signing.

remote: Specifies a pre-shared key for certificate authentication.

ciphertext: Specifies a pre-shared key in encrypted form.

plaintext: Specifies a pre-shared key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the pre-shared key. The key is case sensitive. Its plaintext form is a string of 1 to 128 characters and its encrypted form is a string of 1 to 201 characters.

Usage guidelines

If you specify the local or remote keyword, you configure an asymmetric key. If you specify neither the local nor the remote keyword, you configure a symmetric key.

To delete a key by using the undo command, you must specify the correct key type. For example, if you configure a key by using the pre-shared-key local command, you cannot delete the key by using the undo pre-shared-key or undo pre-shared-key remote command.

If you use this command multiple times, the most recent configuration takes effect.

Examples

·          On the initiator:

# Create an IKEv2 keychain named key1.

<Sysname> system-view

[Sysname] ikev2 keychain key1

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-key1] peer peer1

# Configure the symmetric plaintext pre-shared key 111-key.

[Sysname-ikev2-keychain-key1-peer-peer1] pre-shared-key plaintext 111-key

[Sysname-ikev2-keychain-key1-peer-peer1] quit

# Create an IKEv2 peer named peer2.

[Sysname-ikev2-keychain-key1] peer peer2

# Configure asymmetric plaintext pre-shared keys. The key for certificate signing is 11-key-a and the key for certificate authentication is 111-key-b.

[Sysname-ikev2-keychain-key1-peer-peer2] pre-shared-key local plaintext 111-key-a

[Sysname-ikev2-keychain-key1-peer-peer2] pre-shared-key remote plaintext 111-key-b

·          On the responder:

# Create an IKEv2 keychain named telecom.

<Sysname> system-view

[Sysname] ikev2 keychain telecom

# Create an IKEv2 peer named peer1.

[Sysname-ikev2-keychain-telecom] peer peer1

# Configure the symmetric plaintext pre-shared key 111-key.

[Sysname-ikev2-keychain-telecom-peer-peer1] pre-shared-key plaintext 111-key

[Sysname-ikev2-keychain-telecom-peer-peer1] quit

# Create an IKEv2 peer named peer2.

[Sysname-ikev2-keychain-telecom] peer peer2

# Configure asymmetric plaintext pre-shared keys. The key for certificate signing is 11-key-b and the key for certificate authentication is 111-key-a.

[Sysname-ikev2-keychain-telecom-peer-peer2] pre-shared-key local plaintext 111-key-b

[Sysname-ikev2-keychain-telecom-peer-peer2] pre-shared-key remote plaintext 111-key-a

Related commands

·          ikev2 keychain

·          peer

prf

Use prf to specify pseudo-random function (PRF) algorithms for an IKEv2 proposal.

Use undo prf to restore the default.

Syntax

prf { aes-xcbc-mac | md5 | sha1 | sha256 | sha384 | sha512 } *

undo prf

Default

An IKEv2 proposal uses the integrity protection algorithms as the PRF algorithms.

Views

IKEv2 proposal view

Predefined user roles

network-admin

Parameters

aes-xcbc-mac: Uses the HMAC-AES-XCBC-MAC algorithm.

md5: Uses the HMAC-MD5 algorithm.

sha1: Uses the HMAC-SHA1 algorithm.

sha256: Uses the HMAC-SHA256 algorithm.

sha384: Uses the HMAC-SHA384 algorithm.

sha512: Uses the HMAC-SHA512 algorithm.

Usage guidelines

You can specify multiple PRF algorithms for an IKEv2 proposal. An algorithm specified earlier has a higher priority.

Examples

# Create an IKEv2 proposal named prop1.

<Sysname> system-view

[Sysname] ikev2 proposal prop1

# Specify HMAC-SHA1 and HMAC-MD5 as the PRF algorithms, with HMAC-SHA1 preferred.

[Sysname-ikev2-proposal-prop1] prf sha1 md5

Related commands

·          ikev2 proposal

·          integrity

priority (IKEv2 policy view)

Use priority to set a priority for an IKEv2 policy.

Use undo priority to restore the default.

Syntax

priority priority

undo priority

Default

The priority of an IKEv2 policy is 100.

Views

IKEv2 policy view

Predefined user roles

network-admin

Parameters

priority: Sets the priority of the IKEv2 policy, in the range of 1 to 65535. A smaller number represents a higher priority.

Usage guidelines

The priority set by this command can only be used to adjust the match order of IKEv2 policies.

Examples

# Set the priority to 10 for the IKEv2 policy policy1.

<Sysname> system-view

[Sysname] ikev2 policy policy1

[Sysname-ikev2-policy-policy1] priority 10

Related commands

display ikev2 policy

priority (IKEv2 profile view)

Use priority to set a priority for an IKEv2 profile.

Use undo priority to restore the default.

Syntax

priority priority

undo priority

Default

The priority of an IKEv2 profile is 100.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

priority: Sets the priority of the IKEv2 profile, in the range of 1 to 65535. A smaller number represents a higher priority.

Usage guidelines

The priority set by this command can only be used to adjust the match order of IKEv2 profiles.

Examples

# Set the priority to 10 for the IKEv2 profile profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

[Sysname-ikev2-profile-profile1] priority 10

proposal

Use proposal to specify an IKEv2 proposal for an IKEv2 policy.

Use undo proposal to remove an IKEv2 proposal from an IKEv2 policy.

Syntax

proposal proposal-name

undo proposal proposal-name

Default

No IKEv2 proposal is specified for an IKEv2 policy.

Views

IKEv2 policy view

Predefined user roles

network-admin

Parameters

proposal-name: Specifies an IKEv2 proposal by its name, a case-insensitive string of 1 to 63 characters.

Usage guidelines

You can specify multiple IKEv2 proposals for an IKEv2 policy. A proposal specified earlier has a higher priority.

Examples

# Specify the IKEv2 proposal proposal1 for the IKEv2 policy policy1.

<Sysname> system-view

[Sysname] ikev2 policy policy1

[Sysname-ikev2-policy-policy1] proposal proposal1

Related commands

·          display ikev2 policy

·          ikev2 proposal

reset ikev2 sa

Use reset ikev2 sa to delete IKEv2 SAs.

Syntax

reset ikev2 sa [ [ { local | remote } { ipv4-address | ipv6 ipv6-address } ] | tunnel tunnel-id ] [ fast ]

Views

User view

Predefined user roles

network-admin

Parameters

local: Deletes IKEv2 SAs for a local IP address.

remote: Deletes IKEv2 SAs for a remote IP address.

ipv4-address: Specifies a local or remote IPv4 address.

ipv6 ipv6-address: Specifies a local or remote IPv6 address.

tunnel tunnel-id: Deletes IKEv2 SAs for an IPsec tunnel. The tunnel-id argument specifies an IPsec tunnel by its ID in the range of 1 to 2000000000.

fast: Notifies the peers of the deletion and deletes IKEv2 SAs directly before receiving the peers' responses. If you do not specify this keyword, the device notifies the peers of the deletion and deletes IKEv2 SAs after it receives the peers' responses.

Usage guidelines

Deleting an IKEv2 SA will also delete the child SAs negotiated through the IKEv2 SA.

If you do not specify any parameters, this command deletes all IKEv2 SAs and the child SAs negotiated through the IKEv2 SAs.

Examples

# Display information about IKEv2 SAs.

<Sysname> display ikev2 sa

     Tunnel ID          Local             Remote             Status

  --------------------------------------------------------------------

     1                  1.1.1.1/500       1.1.1.2/500        EST

     2                  2.2.2.1/500       2.2.2.2/500        EST

  Status:

  IN-NEGO: Negotiating EST: Established, DEL: Deleting

# Delete the IKEv2 SA whose remote IP address is 1.1.1.2.

<Sysname> reset ikev2 sa remote 1.1.1.2

# Display information about IKEv2 SAs again. Verify that the IKEv2 SA is deleted.

<Sysname> display ikev2 sa

     Tunnel ID          Local             Remote             Status

  --------------------------------------------------------------------

     2                  2.2.2.1/500       2.2.2.2/500        EST

  Status:

  IN-NEGO: Negotiating EST: Established, DEL: Deleting   

Related commands

display ikev2 sa

reset ikev2 statistics

Use reset ikev2 statistics to clear IKEv2 statistics.

Syntax

reset ikev2 statistics

Views

User view

Predefined user roles

network-admin

Examples

# Clear IKEv2 statistics.

<Sysname> reset ikev2 statistics

Related commands

display ikev2 statistics

sa duration

Use sa duration to set the IKEv2 SA lifetime.

Use undo sa duration to restore the default.

Syntax

sa duration seconds

undo sa duration

Default

The IKEv2 SA lifetime is 86400 seconds.

Views

IKEv2 profile view

Predefined user roles

network-admin

Parameters

seconds: Sets the IKEv2 SA lifetime in seconds, in the range of 120 to 86400.

Usage guidelines

An IKEv2 SA can be used for subsequent IKEv2 negotiations before its lifetime expires, saving a lot of negotiation time. However, the longer the lifetime, the higher the possibility that attackers collect enough information and initiate attacks.

Two peers can have different IKEv2 SA lifetime settings, and they do not perform lifetime negotiation. The peer with a shorter lifetime always initiates the rekeying.

Examples

# Create an IKEv2 profile named profile1.

<Sysname> system-view

[Sysname] ikev2 profile profile1

# Set the IKEv2 SA lifetime to 1200 seconds.

[Sysname-ikev2-profile-profile1] sa duration 1200

Related commands

display ikev2 profile

 


SSH commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

SSH server commands

display ssh server

Use display ssh server on an SSH server to display the SSH server status or sessions.

Syntax

display ssh server { session [ slot slot-number ] | status }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

session: Displays the SSH server sessions.

status: Displays the SSH server status.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays SSH server session information for the active MPU.

Examples

# Display the SSH server status.

<Sysname> display ssh server status

 Stelnet server: Disable

 SSH version : 2.0

 SSH authentication-timeout : 60 second(s)

 SSH server key generating interval : 0 hour(s)

 SSH authentication retries : 3 time(s)

 SFTP server: Disable

 SFTP server Idle-Timeout: 10 minute(s)

 NETCONF server: Disable

 SCP server: Disable

Table 87 Command output

Field

Description

Stelnet server

Whether the Stelnet server is enabled.

SSH version

SSH protocol version.

When the SSH supports SSH1, the protocol version is 1.99. Otherwise, the protocol version is 2.

SSH authentication-timeout

Authentication timeout timer.

SSH server key generating interval

Minimum interval for updating the RSA server key pair.

SSH authentication retries

Maximum number of authentication attempts for SSH users.

SFTP server

Whether the SFTP server is enabled.

SFTP server Idle-Timeout

SFTP connection idle timeout timer.

NETCONF server

Whether NETCONF over SSH is enabled.

SCP server

Whether the SCP server is enabled.

 

# Display the SSH server sessions.

<Sysname> display ssh server session

UserPid   SessID Ver   Encrypt    State          Retries  Serv     Username   Idx

 184       0     2.0   aes128-cbc Established    1        Stelnet  abc@123

Table 88 Command output

Field

Description

UserPid

User process ID.

SessID

Session ID.

Ver

Protocol version of the SSH server.

Encrypt

Encryption algorithm used on the SSH server.

State

Session state:

·         Init—Initialization.

·         Ver-exchange—Version negotiation.

·         Keys-exchange—Key exchange.

·         Auth-request—Authentication request.

·         Serv-request—Session service request.

·         Established—The session is established.

·         Disconnected—The session is terminated.

Retries

Number of authentication failures.

Serv

Service type:

·         SCP.

·         SFTP.

·         Stelnet.

·         NETCONF.

Username

Name of a user for logging in to the server.

Idx

Absolute number of the user line that the client uses to log in to the server. The value for this field is empty if the SSH connection for the user is not redirected.

 

display ssh user-information

Use display ssh user-information to display information about SSH users on an SSH server.

Syntax

display ssh user-information [ username ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

username: Specifies an SSH username, a case-sensitive string of 1 to 80 characters. If you do not specify an SSH user, this command displays information about all SSH users.

Usage guidelines

This command displays information only about SSH users that are configured by using the ssh user command on the SSH server.

Examples

# Display information about all SSH users.

<Sysname> display ssh user-information

 Total ssh users:2

 Username            Authentication-type  User-public-key-name  Service-type

 yemx                password                                   Stelnet|SFTP

 test                publickey            pubkey                SFTP

Table 89 Command output

Field

Description

Total ssh users

Total number of SSH users.

Authentication-type

Authentication methods:

·         Password authentication.

·         Publickey authentication.

·         Password-publickey authentication.

·         Any authentication.

User-public-key-name

Public key name of the user. If the authentication method is password authentication, this field does not display a value.

Service-type

Service types:

·         Stelnet.

·         SFTP.

·         SCP.

·         NETCONF.

If multiple service types are available for an SSH user, they are separated by vertical bars (|).

 

Related commands

ssh user

scp server enable

Use scp server enable to enable the SCP server.

Use undo scp server enable to restore the default.

Syntax

scp server enable

undo scp server enable

Default

The SCP server is disabled.

Views

System view

Predefined user roles

network-admin

Examples

# Enable the SCP server.

<Sysname> system-view

[Sysname] scp server enable

Related commands

display ssh server

sftp server enable

Use sftp server enable to enable the SFTP server.

Use undo sftp server enable to restore the default.

Syntax

sftp server enable

undo sftp server enable

Default

The SFTP server is disabled.

Views

System view

Predefined user roles

network-admin

Examples

# Enable the SFTP server.

<Sysname> system-view

[Sysname] sftp server enable

Related commands

display ssh server

sftp server idle-timeout

Use sftp server idle-timeout to set the idle timeout timer for SFTP connections on an SFTP server.

Use undo sftp server idle-timeout to restore the default.

Syntax

sftp server idle-timeout time-out-value

undo sftp server idle-timeout

Default

The idle timeout timer is 10 minutes.

Views

System view

Predefined user roles

network-admin

Parameters

time-out-value: Specifies an idle timeout timer in the range of 1 to 35791 minutes.

Usage guidelines

If an SFTP connection is idle when the idle timeout timer expires, the system automatically terminates the connection. If many SFTP connections concurrently exist, set a small value for the idle timeout timer to promptly release the connection resources.

Examples

# Set the idle timeout timer to 500 minutes for SFTP connections.

<Sysname> system-view

[Sysname] sftp server idle-timeout 500

Related commands

display ssh server

ssh server acl

Use ssh server acl to specify an ACL to control IPv4 SSH user connections.

Use undo ssh server acl to restore the default.

Syntax

ssh server acl { basic-acl-number | advanced-acl-number | mac mac-acl-number }

undo ssh server acl

Default

No ACLs are specified and all IPv4 SSH users can initiate SSH connections to the server.

Views

System view

Predefined user roles

network-admin

Parameters

basic-acl-number: Specifies an IPv4 basic ACL number in the range of 2000 to 2999.

advanced-acl-number: Specifies an IPv4 advanced ACL number in the range of 3000 to 3999.

mac mac-acl-number: Specifies a Layer 2 ACL by its number in the range of 4000 to 4999.

Usage guidelines

The specified ACL filters IPv4 SSH users' connection requests. Only the IPv4 SSH users that the ACL permits can initiate SSH connections to the server.

All IPv4 SSH users can initiate SSH connections to the device when any one of the following conditions exists:

·          You do not specify an ACL.

·          The specified ACL does not exist.

·          The specified ACL does not have rules.

The ACL takes effect only on SSH connections that are initiated after the ACL configuration.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure ACL 2001 and permit only the users at 1.1.1.1 to initiate SSH connections to the server.

<Sysname> system-view

[Sysname] acl basic 2001

[Sysname-acl-ipv4-basic-2001] rule permit source 1.1.1.1 0

[Sysname-acl-ipv4-basic-2001] quit

[Sysname] ssh server acl 2001

Related commands

display ssh server

ssh server authentication-retries

Use ssh server authentication-retries to set the maximum number of authentication attempts for SSH users.

Use undo ssh server authentication-retries to restore the default.

Syntax

ssh server authentication-retries times

undo ssh server authentication-retries

Default

The maximum number of authentication attempts is 3 for SSH users.

Views

System view

Predefined user roles

network-admin

Parameters

times: Specifies the maximum number of authentication attempts for SSH users, in the range of 1 to 5.

Usage guidelines

Setting the maximum number of authentication attempts prevents malicious hacking of usernames and passwords.

This configuration does not affect logged-in users. It affects only subsequently logged-in SSH users.

If the authentication method is any, the total number of authentication attempts (including both publickey and password authentication attempts) must not exceed the upper limit.

If the authentication method is password-publickey, the server first uses publickey authentication, and then uses password authentication to authenticate the SSH user. The process is considered one authentication attempt.

Examples

# Set the maximum number of authentication attempts to 4 for SSH users.

<Sysname> system-view

[Sysname] ssh server authentication-retries 4

Related commands

display ssh server

ssh server authentication-timeout

Use ssh server authentication-timeout to set the SSH user authentication timeout timer on the SSH server.

Use undo ssh server authentication-timeout to restore the default.

Syntax

ssh server authentication-timeout time-out-value

undo ssh server authentication-timeout

Default

The authentication timeout timer is 60 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

time-out-value: Specifies an authentication timeout timer in the range of 1 to 120 seconds.

Usage guidelines

If a user does not finish the authentication when the timeout timer expires, the connection cannot be established.

To prevent malicious occupation of TCP connections, set a small value for the authentication timeout timer.

Examples

# Set the authentication timeout timer to 10 seconds for SSH users.

<Sysname> system-view

[Sysname] ssh server authentication-timeout 10

Related commands

display ssh server

ssh server compatible-ssh1x enable

Use ssh server compatible-ssh1x enable to enable the SSH server to support SSH1 clients.

Use undo ssh server compatible-ssh1x [ enable ] to restore the default.

Syntax

ssh server compatible-ssh1x enable

undo ssh server compatible-ssh1x [ enable ]

Default

The SSH server does not support SSH1 clients.

Views

System view

Predefined user roles

network-admin

network-operator

Usage guidelines

This configuration does not affect logged-in users. It affects only subsequently logged-in SSH users.

Examples

# Enable the SSH server to support SSH1 clients.

<Sysname> system-view

[Sysname] ssh server compatible-ssh1x enable

Related commands

display ssh server

ssh server dscp

Use ssh server dscp to set the DSCP value in the IPv4 packets that the SSH server sends to SSH clients.

Use undo ssh server dscp to restore the default.

Syntax

ssh server dscp dscp-value

undo ssh server dscp

Default

The DSCP value is 48 in IPv4 packets sent by the SSH server.

Views

System view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies the DSCP value in the outbound IPv4 packets, in the range of 0 to 63.

Usage guidelines

The DSCP value of a packet specifies the priority of the packet and affects the transmission priority of the packet. A bigger DSCP value represents a higher priority.

Examples

# Set the DSCP value to 30 for IPv4 packets sent by the SSH server.

<Sysname> system-view

[Sysname] ssh server dscp 30

ssh server enable

Use ssh server enable to enable the Stelnet server.

Use undo ssh server enable to restore the default.

Syntax

ssh server enable

undo ssh server enable

Default

The Stelnet server is disabled.

Views

System view

Predefined user roles

network-admin

Examples

# Enable the Stelnet server.

<Sysname> system-view

[Sysname] ssh server enable

Related commands

display ssh server

ssh server ipv6 acl

Use ssh server ipv6 acl to specify an ACL to control IPv6 SSH user connections.

Use undo ssh server ipv6 acl to restore the default.

Syntax

ssh server ipv6 acl { ipv6 basic-acl-number | ipv6 advanced-acl-number | mac mac-acl-number }

undo ssh server ipv6 acl

Default

No ACLs are specified and all IPv6 SSH users can initiate SSH connections to the server.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6 basic-acl-number: Specifies an IPv6 basic ACL number in the range of 2000 to 2999.

ipv6 advanced-acl-number: Specifies an IPv6 advanced ACL number in the range of 3000 to 3999.

mac mac-acl-number: Specifies a Layer 2 ACL by its number in the range of 4000 to 4999.

Usage guidelines

The specified ACL filters IPv6 SSH users' connection requests. Only the IPv6 SSH users that the ACL permits can initiate SSH connections to the device.

All IPv6 SSH users can initiate SSH connections to the device when any one of the following conditions exists:

·          You do not specify an ACL.

·          The specified ACL does not exist.

·          The specified ACL does not have rules.

The ACL takes effect only on SSH connections that are initiated after the ACL configuration.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure ACL 2001 and permit only the users on the subnet 1::1/64 to initiate SSH connections to the server.

<Sysname> system-view

[Sysname] acl ipv6 basic 2001

[Sysname-acl6-ipv6-basic-2001] rule permit source 1::1 64

[Sysname-acl6-ipv6-basic-2001] quit

[Sysname] ssh server ipv6 acl ipv6 2001

Related commands

display ssh server

ssh server ipv6 dscp

Use ssh server ipv6 dscp to set the DSCP value in the IPv6 packets that the SSH server sends to SSH clients.

Use undo ssh server ipv6 dscp to restore the default.

Syntax

ssh server ipv6 dscp dscp-value

undo ssh server ipv6 dscp

Default

The DSCP value is 48 in IPv6 packets sent by the SSH server.

Views

System view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies the DSCP value in the outbound IPv6 packets, in the range of 0 to 63.

Usage guidelines

The DSCP value of an IPv6 packet specifies the priority of the packet and affects the transmission priority of the packet. A bigger DSCP value represents a higher priority.

Examples

# Set the DSCP value to 30 for IPv6 packets sent by the SSH server.

<Sysname> system-view

[Sysname] ssh server ipv6 dscp 30

ssh server rekey-interval

Use ssh server rekey-interval to set the minimum interval for updating the RSA server key pair.

Use undo ssh server rekey-interval to restore the default.

Syntax

ssh server rekey-interval hours

undo ssh server rekey-interval

Default

The minimum interval for updating the RSA server key pair is 0 hours.

Views

System view

Predefined user roles

network-admin

Parameters

hours: Specifies the minimum interval for updating the RSA server key pair, in the range of 1 to 24 hours.

Usage guidelines

This command takes effect only on SSH1 clients.

The system starts to count down the minimum update interval after the first SSH1 user logs in to the server. If a new SSH1 user logs in to the server after the interval, the system performs the following operations:

1.        Updates the RSA server key pair.

2.        Uses the updated RSA server key pair for key pair negotiation with the new user.

3.        Starts to count down the interval again.

Periodically updating the RSA server key pair prevents malicious hacking to the key pair and enhances security of the SSH connections.

Examples

# Set the minimum interval to 3 hours for updating the RSA server key pair.

<Sysname> system-view

[Sysname] ssh server rekey-interval 3

Related commands

display ssh server

ssh user

Use ssh user to create an SSH user and specify the service type and authentication method.

Use undo ssh user to delete an SSH user.

Syntax

ssh user username service-type { all | netconf | scp | sftp | stelnet } authentication-type { password | { any | password-publickey | publickey } assign { pki-domain domain-name | publickey keyname } }

undo ssh user username

Default

No SSH user exists.

Views

System view

Predefined user roles

network-admin

Parameters

username: Specifies an SSH username, a case-sensitive string of 1 to 80 characters. If the username contains an ISP domain name, use the pureusername@domain, pureusername/domain, or domain\pureusername format. The pureusername argument is a string of 1 to 55 characters. The domain argument is a string of 1 to 24 characters. Do not include hyphens (-) in the username of an SCP user. Otherwise, SCP logins using that username will fail.

service-type: Specifies a service type for an SSH user.

·          all: Specifies Stelnet, SFTP, SCP, and NETCONF.

·          scp: Specifies the service type as SCP.

·          sftp: Specifies the service type as SFTP.

·          stelnet: Specifies the service type as Stelnet.

·          netconf: Specifies the service type as NETCONF.

authentication-type: Specifies an authentication method for an SSH user.

·          password: Specifies password authentication. This authentication method provides easy and fast encryption, but it is vulnerable. It can work with AAA to implement user authentication, authorization, and accounting.

·          any: Specifies either password authentication or publickey authentication.

·          password-publickey: Specifies both password authentication and publickey authentication for SSH2 clients. In SSH2, the password-publickey authentication method provides higher security. If the client runs SSH1, this keyword specifies either password authentication or publickey authentication.

·          publickey: Specifies publickey authentication. This authentication method has complicated and slow encryption, but it provides strong authentication that can defend against brute-force attacks. This authentication method is easy to use. If this method is configured, the authentication process completes automatically without entering any password.

assign: Specifies parameters used for client verification.

·          pki-domain domain-name: Specifies the PKI domain that verifies the client's digital certificate. The domain-name argument is a case-insensitive string of 1 to 31 characters. Invalid characters are tildes (~), asterisks (*), backslashes (\), vertical bars (|), colons (:), dots (.), angle brackets (< >), quotation marks ("), and apostrophes ('). The server uses the CA certificate that is saved in the PKI domain to verify the client's digital certificate. In this scenario, the server does not need to save clients' public keys in advance.

·          publickey keyname: Specifies the public key of the SSH client. The keyname argument represents the SSH client's public key configured on the server. It is a case-insensitive string of 1 to 64 characters. The server uses the client's public key to check the validity of the client. If the public key file of the client is changed, you must update the client's public key on the server promptly.

Usage guidelines

Use this command to configure an SSH user depending on the authentication method.

·          If the authentication method is publickey, you must create an SSH user and a local user on the SSH server. The two users must have the same username, so that the SSH user can be assigned the correct working directory and user role.

·          If the authentication method is password, you must perform one of the following tasks:

?  For local authentication, configure a local user on the SSH server.

?  For remote authentication, configure an SSH user on a remote authentication server, for example, a RADIUS server.

You do not need to create an SSH user by using the ssh user command. However, if you want to display all SSH users, including the password-only SSH users, for centralized management, you can use this command to create them. If such an SSH user has been created, make sure you have specified the correct service type and authentication method.

·          If the authentication method is password-publickey or any, you must create an SSH user on the SSH server and perform one of the following tasks:

?  For local authentication, configure a local user on the SSH server.

?  For remote authentication, configure an SSH user on a remote authentication server, for example, a RADIUS server.

In either case, the local user or the SSH user configured on the remote authentication server must have the same username as the SSH user.

If you use this command to specify a host public key or a PKI domain for a user multiple times, the most recent configuration takes effect.

You can change the authentication parameters for a logged-in SSH user, but your changes take effect on the clients at the next login.

For an SFTP or SCP user, the working directory depends on the authentication method.

·          If the authentication method is password, the working directory is authorized by AAA.

·          If the authentication method is publickey or password-publickey, the working directory is specified by the authorization-attribute command in the associated local user view.

For an SSH user, the user role also depends on the authentication method.

·          If the authentication method is password, the user role is authorized by the remote AAA server or the local device.

·          If the authentication method is publickey or password-publickey, the user role is specified by the authorization-attribute command in the associated local user view.

Examples

# Create an SSH user user1. Specify the service type as sftp and the authentication method as password-publickey for the user. Assign the host public key key1 to the user.

<Sysname> system-view

[Sysname] ssh user user1 service-type sftp authentication-type password-publickey assign publickey key1

# Create a local device management user user1. Specify the password as 123456TESTplat&! in plain text and the service type as ssh for the user. Assign the working directory flash: and the user role network-admin to the user.

[Sysname] local-user user1 class manage

[Sysname-luser-manage-user1] password simple 123456TESTplat&!

[Sysname-luser-manage-user1] service-type ssh

[Sysname-luser-manage-user1] authorization-attribute work-directory flash: user-role network-admin

Related commands

·          authorization-attribute

·          display ssh user-information

·          local-user

·          pki domain

SSH client commands

bye

Use bye to terminate the connection with an SFTP server and return to user view.

Syntax

bye

Views

SFTP client view

Predefined user roles

network-admin

Usage guidelines

This command has the same function as the exit and quit commands.

Examples

# Terminate the connection with the SFTP server.

sftp> bye

<Sysname>

cd

Use cd to change the working directory on an SFTP server.

Syntax

cd [ remote-path ]

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-path: Specifies the name of a directory on the server.

Usage guidelines

You can use the cd .. command to return to the upper-level directory.

You can use the cd / command to return to the root directory of the system.

Examples

# Change the working directory to new1.

sftp> cd new1

Current Directory is:/new1

sftp> pwd

Remote working directory: /new1

sftp>

cdup

Use cdup to return to the upper-level directory.

Syntax

cdup

Views

SFTP client view

Predefined user roles

network-admin

Example

# Return to the upper-level directory from the current working directory /test1.

sftp> cd test1

Current Directory is:/test1

sftp> pwd

Remote working directory: /test1

sftp> cdup

Current Directory is:/

sftp> pwd

Remote working directory: /

sftp>

delete

Use delete to delete a file from the SFTP server.

Syntax

delete remote-file

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-file: Specifies a file.

Usage guidelines

This command has the same function as the remove command.

Examples

# Delete the file temp.c from the server.

sftp> delete temp.c

Removing /temp.c

dir

Use dir to display information about the files and subdirectories under a directory.

Syntax

dir [ -a | -l ] [ remote-path ]

Views

SFTP client view

Predefined user roles

network-admin

Parameters

-a: Displays detailed information about files and subdirectories under a directory in a list, including the files and subdirectories with names starting with dots (.).

-l: Displays detailed information about the files and subdirectories under a directory in a list, excluding the files and subdirectories with names starting with dots (.).

remote-path: Specifies the name of the directory to be queried. If you do not specify this argument, the command displays information about the files and subdirectories under the current working directory.

Usage guidelines

If you do not specify both of the –a and –l keywords, this command displays the names of the files and subdirectories under a directory.

This command has the same function as the ls command.

Examples

# Display detailed information about the files and subdirectories under the current directory, including the files and subdirectories with names starting with dots (.).

sftp> dir -a

drwxrwxrwx    2 1        1               512 Dec 18 14:12 .

drwxrwxrwx    2 1        1               512 Dec 18 14:12 ..

-rwxrwxrwx    1 1        1               301 Dec 18 14:11 010.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 011.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 012.pub

# Display detailed information about the files and subdirectories under the current directory, excluding the files and subdirectories with names starting with dots (.).

sftp> dir -l

-rwxrwxrwx    1 1        1               301 Dec 18 14:11 010.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 011.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 012.pu

 

 

NOTE:

The output format varies by SSH server device model.

 

display sftp client source

Use display sftp client source to display the source IP address configuration of the SFTP client.

Syntax

display sftp client source

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the source IP address configured for the SFTP client.

<Sysname> display sftp client source

The source IP address of the SFTP client is 192.168.0.1

The source IPv6 address of the SFTP client is 2:2::2:2.

Related commands

·          sftp client ipv6 source

·          sftp client source

display ssh client source

Use display ssh client source to display the source IP address configuration of the Stelnet client.

Syntax

display ssh client source

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the source IP address configured for the Stelnet client.

<Sysname> display ssh client source

The source IP address of the SSH client is 192.168.0.1

The source IPv6 address of the SSH client is 2:2::2:2.

Related commands

·          ssh client ipv6 source

·          ssh client source

exit

Use exit to terminate the SFTP connection and return to user view.

Syntax

exit

Views

SFTP client view

Predefined user roles

network-admin

Usage guidelines

This command has the same function as the bye and quit commands.

Examples

# Terminate the SFTP connection.

sftp> exit

<Sysname>

get

Use get to download a file from an SFTP server and save it locally.

Syntax

get remote-file [ local-file ]

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-file: Specifies the name of a file on the SFTP server.

local-file: Specifies the name for the local file. If you do not specify this argument, the file will be saved locally with the same name as the file on the SFTP server.

Examples

# Download the file temp1.c and save it as temp.c locally.

sftp> get temp1.c temp.c

Fetching /temp1.c to temp.c

/temp.c                                                 100% 1424     1.4KB/s   00:00

help

Use help to display help information.

Syntax

help

Views

SFTP client view

Predefined user roles

network-admin

Usage guidelines

The help command has the same function as entering the question mark (?).

Examples

# Display help information.

sftp> help

Available commands:

  bye                          Quit sftp

  cd [path]                    Change remote directory to 'path'

  cdup                         Change remote directory to the parent directory

  delete path                  Delete remote file

  dir [-a|-l][path]            Display remote directory listing

       -a                        List all filenames

       -l                        List filename including the specific

                                 information of the file

  exit                         Quit sftp

  get remote-path [local-path] Download file

  help                         Display this help text

  ls [-a|-l][path]             Display remote directory

       -a                         List all filenames

       -l                         List filename including the specific

                                  information of the file

  mkdir path                   Create remote directory

  put local-path [remote-path] Upload file

  pwd                          Display remote working directory

  quit                         Quit sftp

  rename oldpath newpath       Rename remote file

  remove path                  Delete remote file

  rmdir path                   Delete remote empty directory

  ?                            Synonym for help

ls

Use ls to display information about the files and subdirectories under a directory.

Syntax

ls [ -a | -l ] [ remote-path ]

Views

SFTP client view

Predefined user roles

network-admin

Parameters

-a: Displays detailed information about files and subdirectories under a directory in a list, including the files and subdirectories with names starting with dots (.).

-l: Displays detailed information about the files and subdirectories under a directory in a list, excluding the files and subdirectories with names starting with dots (.).

remote-path: Specifies the name of the directory to be queried. If you do not specify this argument, the command displays information about the files and subdirectories under the current working directory.

Usage guidelines

If you do not specify both of the –a and –l keywords, this command displays the names of the files and subdirectories under a directory.

This command has the same function as the dir command.

Examples

# Display detailed information about the files and subdirectories under the current directory, including the files and subdirectories with names starting with dots (.).

sftp> ls -a

drwxrwxrwx    2 1        1               512 Dec 18 14:12 .

drwxrwxrwx    2 1        1               512 Dec 18 14:12 ..

-rwxrwxrwx    1 1        1               301 Dec 18 14:11 010.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 011.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 012.pub

# Display detailed information about the files and subdirectories under the current working directory, excluding the files and subdirectories with names starting with dots (.).

sftp> ls -l

-rwxrwxrwx    1 1        1               301 Dec 18 14:11 010.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 011.pub

-rwxrwxrwx    1 1        1               301 Dec 18 14:12 012.pub

 

 

NOTE:

The output format varies by SSH server device model.

 

mkdir

Use mkdir to create a directory on an SFTP server.

Syntax

mkdir remote-path

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-path: Specifies the name of a directory.

Examples

# Create a directory test on the SFTP server.

sftp> mkdir test

put

Use put to upload a local file to an SFTP server.

Syntax

put local-file [ remote-file ]

Views

SFTP client view

Predefined user roles

network-admin

Parameters

local-file: Specifies the name of a local file.

remote-file: Specifies the name of a file on an SFTP server. If you do not specify this argument, the file will be remotely saved with the same name as the local file.

Examples

# Upload the local file startup.bak to the SFTP server and save it as startup01.bak.

sftp> put startup.bak startup01.bak

Uploading startup.bak to /startup01.bak

startup01.bak                                   100% 1424     1.4KB/s   00:00

pwd

Use pwd to display the current working directory of an SFTP server.

Syntax

pwd

Views

SFTP client view

Predefined user roles

network-admin

Examples

# Display the current working directory of the SFTP server.

sftp> pwd

Remote working directory: /

The output shows that the current working directory is the root directory.

quit

Use quit to terminate the SFTP connection and return to user view.

Syntax

quit

Views

SFTP client view

Predefined user roles

network-admin

Usage guidelines

This command has the same function as the bye and exit commands.

Examples

# Terminate the SFTP connection.

sftp> quit

<Sysname>

remove

Use remove to delete a file from an SFTP server.

Syntax

remove remote-file

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-file: Specifies a file.

Usage guidelines

This command has the same function as the delete command.

Examples

# Delete the file temp.c from the SFTP server.

sftp> remove temp.c

Removing /temp.c

rename

Use rename to change the name of a file or directory on an SFTP server.

Syntax

rename old-name new-name

Views

SFTP client view

Predefined user roles

network-admin

Parameters

oldname: Specifies the name of an existing file or directory.

newname: Specifies the new name for the file or directory.

Examples

# Change the name of a file on the SFTP server from temp1.c to temp2.c.

sftp> dir

aa.pub  temp1.c

sftp> rename temp1.c temp2.c

sftp> dir

aa.pub  temp2.c

rmdir

Use rmdir to delete a directory from an SFTP server.

Syntax

rmdir remote-path

Views

SFTP client view

Predefined user roles

network-admin

Parameters

remote-path: Specifies a directory.

Examples

# Delete the subdirectory temp1 under the current directory on the SFTP server.

sftp> rmdir temp1

scp

Use scp to establish a connection to an IPv4 SCP server and transfer files with the server.

Syntax

scp server [ port-number ] { put | get } source-file-name [ destination-file-name ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ public-key keyname | source { interface interface-type interface-number | ip ip-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv4 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range of 1 to 65535. The default is 22.

get: Downloads the file.

put: Uploads the file.

source-file-name: Specifies the name of the source file.

destination-file-name: Specifies the name of the target file. If you do not specify this argument, the target file uses the same filename as the source file.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

public-key keyname: Specifies the host public key of the server, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv4 address or source interface for SCP packets. By default, the device uses the primary IPv4 address of the output interface in the routing entry as the source address of SCP packets. To ensure successful SCP connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv4 address as the source IPv4 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The IPv4 address of this interface is the source IPv4 address of the SCP packets.

ip ip-address: Specifies a source IPv4 address.

Examples

# Connect an SCP client to the SCP server 200.1.1.1. Specify the public key of the server as svkey, and download the file abc.txt from the server. The SCP client uses publickey authentication. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> scp 200.1.1.1 get abc.txt prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey

scp ipv6

Use scp ipv6 to establish a connection to an IPv6 SCP server and transfer files with the server.

Syntax

scp ipv6 server [ port-number ] [ -i interface-type interface-number ] { put | get } source-file-name [ destination-file-name ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ public-key keyname | source { interface interface-type interface-number | ipv6 ipv6-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv6 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range of 1 to 65535. The default is 22.

-i interface-type interface-number: Specifies an output interface by its type and number for SCP packets. This option is used only when the server uses a link-local address to provide the SCP service for the client. The specified output interface on the SCP client must have a link-local address.

get: Downloads the file.

put: Uploads the file.

source-file-name: Specifies the name of the source file.

destination-file-name: Specifies the name of the target file. If you do not specify this argument, the target file uses the same filename as the source file.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

publickey keyname: Specifies the host public key of the server, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv6 address or source interface for IPv6 SCP packets. By default, the device automatically selects a source address for IPv6 SCP packets in compliance with RFC 3484. To ensure successful SCP connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv6 address as the source IPv6 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The IPv6 address of this interface is the source IPv6 address of the IPv6 SCP packets.

ipv6 ipv6-address: Specifies a source IPv6 address.

Examples

# Connect an SCP client to the SCP server 2000::1. Specify the public key of the server as svkey, and download the file abc.txt from the server. The SCP client uses publickey authentication. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> scp ipv6 2000::1 get abc.txt prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey

sftp

Use sftp to establish a connection to an IPv4 SFTP server and enter SFTP client view.

Syntax

sftp server [ port-number ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ dscp dscp-value | public-key keyname | source { interface interface-type interface-number | ip ip-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv4 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range of 1 to 65535. The default is 22.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

dscp dscp-value: Specifies the DSCP value in the IPv4 SFTP packets. The value range for the dscp-value argument is 0 to 63, and the default value is 48. The DSCP value determines the transmission priority of the packet.

public-key keyname: Specifies the host public key of the server, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv4 address or source interface for SFTP packets. By default, the device uses the primary IPv4 address of the output interface in the routing entry as the source address of SFTP packets. To ensure successful SFTP connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv4 address as the source IPv4 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The primary IPv4 address of this interface is the source IPv4 address of the SFTP packets.

ip ip-address: Specifies a source IPv4 address.

Examples

# Connect an SFTP client to the IPv4 SFTP server 10.1.1.2 and specify the public key of the server as svkey. The SFTP client uses publickey authentication. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> sftp 10.1.1.2 prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey

sftp client ipv6 source

Use sftp client ipv6 source to specify the source IPv6 address for SFTP packets that are sent by the SFTP client.

Use undo sftp client ipv6 source to restore the default.

Syntax

sftp client ipv6 source { interface interface-type interface-number | ipv6 ipv6-address }

undo sftp client ipv6 source

Default

The source IPv6 address for outgoing SFTP packets is not configured. The SFTP client automatically selects an IPv6 address for outgoing SFTP packets in compliance with RFC 3484.

Views

System view

Predefined user roles

network-admin

Parameters

interface interface-type interface-number: Specifies a source interface by its type and number. The SFTP client selects the interface's address that most specifically matches the destination address of outgoing SFTP packets as the source address of the SFTP packets.

ipv6 ipv6-address: Specifies a source IPv6 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

This command takes effect on all IPv6 SFTP connections. The source IPv6 address specified in the sftp ipv6 command takes effect only on the current IPv6 SFTP connection.

If you specify the source IPv6 address both in this command and the sftp ipv6 command, the source IPv6 address specified in the sftp ipv6 command takes effect.

Examples

# Specify 2:2::2:2 as the source IPv6 address for SFTP packets.

<Sysname> system-view

[Sysname] sftp client ipv6 source ipv6 2:2::2:2

Related commands

display sftp client source

sftp client source

Use sftp client source to specify the source IPv4 address for SFTP packets that are sent by the SFTP client.

Use undo sftp client source to restore the default.

Syntax

sftp client source { interface interface-type interface-number | ip ip-address }

undo sftp client source

Default

The source IPv4 address for outgoing SFTP packets is not configured. The SFTP client uses the primary IPv4 address of the output interface in the matching route as the source IPv4 address of outgoing SFTP packets.

Views

System view

Predefined user roles

network-admin

Parameters

interface interface-type interface-number: Specifies a source interface by its type and number. The SFTP client uses the primary IPv4 address of the interface as the source address of outgoing SFTP packets.

ip ip-address: Specifies a source IPv4 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

This command takes effect on all SFTP connections. The source IPv4 address specified in the sftp command takes effect only on the current SFTP connection.

If you specify the source IPv4 address both in this command and the sftp command, the source IPv4 address specified in the sftp command takes effect.

Examples

# Specify 192.168.0.1 as the source IPv4 address for SFTP packets.

<Sysname> system-view

[Sysname] sftp client source ip 192.168.0.1

Related commands

display sftp client source

sftp ipv6

Use sftp ipv6 to connect an SFTP client to an IPv6 SFTP server and enter SFTP client view.

Syntax

sftp ipv6 server [ port-number ] [ -i interface-type interface-number ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ dscp dscp-value | public-key keyname | source { interface interface-type interface-number | ipv6 ipv6-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv6 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range of 1 to 65535. The default is 22.

-i interface-type interface-number: Specifies an output interface by its type and number for IPv6 SFTP packets. This option is used only when the server uses a link-local address to provide the SFTP service for the client. The specified output interface on the SFTP client must have a link-local address.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

dscp dscp-value: Specifies the DSCP value in the IPv6 SFTP packets. The value range for the dscp-value argument is 0 to 63, and the default value is 48. The DSCP value determines the transmission priority of the packet.

public-key keyname: Specifies the host public key of the server, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv6 address or source interface for IPv6 SFTP packets. By default, the device automatically selects a source address for IPv6 SFTP packets in compliance with RFC 3484. To ensure successful SFTP connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv6 address as the source IPv6 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The IPv6 address of this interface is the source IP address of the IPv6 SFTP packets.

ipv6 ipv6-address: Specifies a source IPv6 address.

Examples

# Connect an SFTP client to the IPv6 SFTP server 2000::1 and specify the public key of the server as svkey. The SFTP client uses publickey authentication. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> sftp ipv6 2000::1 prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey

Username:

ssh client ipv6 source

Use ssh client ipv6 source to specify the source IPv6 address for SSH packets that are sent by the Stelnet client.

Use undo ssh client ipv6 source to restore the default.

Syntax

ssh client ipv6 source { interface interface-type interface-number | ipv6 ipv6-address }

undo ssh client ipv6 source

Default

The source IPv6 address for outgoing SSH packets is not configured. The Stelnet client automatically selects an IPv6 address for outgoing SSH packets in compliance with RFC 3484.

Views

System view

Predefined user roles

network-admin

Parameters

interface interface-type interface-number: Specifies a source interface by its type and number. The Stelnet client selects the interface's address that most specifically matches the destination address of outgoing SSH packets as the source address of the SSH packets.

ipv6 ipv6-address: Specifies a source IPv6 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

This command takes effect on all IPv6 Stelnet connections. The source IPv6 address specified in the ssh2 ipv6 command takes effect only on the current IPv6 Stelnet connection.

If you specify the source IPv6 address both in this command and the ssh2 ipv6 command, the source IPv6 address specified in the ssh2 ipv6 command takes effect.

Examples

# Specify 2:2::2:2 as the source IPv6 address for SSH packets.

<Sysname> system-view

[Sysname] ssh client ipv6 source ipv6 2:2::2:2

Related commands

display ssh client source

ssh client source

Use ssh client source to specify the source IPv4 address for SSH packets that are sent by the Stelnet client.

Use undo ssh client source to restore the default.

Syntax

ssh client source { interface interface-type interface-number | ip ip-address }

undo ssh client source

Default

The source IPv4 address for outgoing SSH packets is not configured. The Stelnet client uses the primary IPv4 address of the output interface in the matching route as the source address of outgoing SSH packets.

Views

System view

Predefined user roles

network-admin

Parameters

interface interface-type interface-number: Specifies a source interface by its type and number. The Stelnet client uses the primary IPv4 address of the interface as the source address of outgoing SSH packets.

ip ip-address: Specifies a source IPv4 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

This command takes effect on all Stelnet connections. The source IPv4 address specified in the ssh2 command takes effect only on the current Stelnet connection.

If you specify the source IPv4 address both in this command and the ssh2 command, the source IPv4 address specified in the ssh2 command takes effect.

Examples

# Specify 192.168.0.1 as the source IPv4 address for SSH packets.

<Sysname> system-view

[Sysname] ssh client source ip 192.168.0.1

Related commands

display ssh client source

ssh2

Use ssh2 to establish a connection to an IPv4 Stelnet server.

Syntax

ssh2 server [ port-number ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ dscp dscp-value | escape character | public-key keyname | source { interface interface-type interface-number | ip ip-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv4 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range 1 to 65535. The default is 22.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

dscp dscp-value: Specifies the DSCP value in the IPv4 SSH packets. The value range for the dscp-value argument is 0 to 63, and the default value is 48. The DSCP value determines the transmission priority of the packet.

escape character: Specifies an escape character. By default, the escape character is a tilde (~).

public-key keyname: Specifies the host public key of the server, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv4 address or source interface for SSH packets. By default, the device uses the primary IPv4 address of the output interface in the routing entry as the source address of SSH packets. To ensure successful Stelnet connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv4 address as the source IPv4 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The primary IPv4 address of this interface is the source IPv4 address of the SSH packets.

ip ip-address: Specifies a source IPv4 address.

Usage guidelines

The combination of an escape character and a dot (.) works as an escape sequence. This escape sequence is typically used to quickly terminate an SSH connection when the server reboots or malfunctions.

For the escape sequence to take effect, you must enter it at the very beginning of a line. If you have entered other characters or performed operations in a line, enter the escape sequence in the next line.

H3C recommends that you use the default escape character (~). Do not use any character in SSH usernames as the escape character.

Examples

# Establish a connection to the IPv4 Stelnet server 3.3.3.3 and specify the public key of the server as svkey. The Stelnet client uses publickey authentication. Specify the dollar sign ($) as the escape character. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> ssh2 3.3.3.3 prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey escape $

ssh2 ipv6

Use ssh2 ipv6 to establish a connection to an IPv6 Stelnet server.

Syntax

ssh2 ipv6 server [ port-number ] [ -i interface-type interface-number ] [ identity-key { dsa | ecdsa | rsa } | prefer-compress zlib | prefer-ctos-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange-sha1 | dh-group1-sha1 | dh-group14-sha1 } | prefer-stoc-cipher { 3des-cbc | aes128-cbc | aes256-cbc | des-cbc } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } ] * [ dscp dscp-value | escape character | public-key keyname | source { interface interface-type interface-number | ipv6 ipv6-address } ] *

Views

User view

Predefined user roles

network-admin

Parameters

server: Specifies a server by its IPv6 address or host name, a case-insensitive string of 1 to 253 characters.

port-number: Specifies the port number of the server, in the range 1 to 65535. The default is 22.

-i interface-type interface-number: Specifies an output interface by its type and number for IPv6 SSH packets. This option is used only when the server uses a link-local address to provide the Stelnet service for the client. The specified output interface on the Stelnet client must have a link-local address.

identity-key: Specifies a public key algorithm for the client. The default is dsa. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

·          dsa: Specifies the public key algorithm dsa.

·          ecdsa: Specifies the public key algorithm ecdsa.

·          rsa: Specifies the public key algorithm rsa.

prefer-compress: Specifies the preferred compression algorithm between the server and the client. By default, compression is not supported.

zlib: Specifies the compression algorithm zlib.

prefer-ctos-cipher: Specifies the preferred client-to-server encryption algorithm. The default is aes128-cbc.

The following algorithms are listed in ascending order of security strength and computation time:

·          des-cbc: Specifies the encryption algorithm des-cbc.

·          3des-cbc: Specifies the encryption algorithm 3des-cbc.

·          aes128-cbc: Specifies the encryption algorithm aes128-cbc.

·          aes256-cbc: Specifies the encryption algorithm aes256-cbc.

prefer-ctos-hmac: Specifies the preferred client-to-server HMAC algorithm. The default is sha1.

·          md5: Specifies the HMAC algorithm hmac-md5.

·          md5-96: Specifies the HMAC algorithm hmac-md5-96.

·          sha1: Specifies the HMAC algorithm hmac-sha1. The algorithm sha1 provides stronger security but costs more computation time than the algorithm md5.

·          sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange-sha1.

·          dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

·          dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

·          dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1. The algorithm dh-group14-sha1 provides stronger security but costs more computation time than the algorithm dh-group1-sha1.

prefer-stoc-cipher: Specifies the preferred server-to-client encryption algorithm. The default is aes128-cbc. Supported algorithms are the same as the client-to-server encryption algorithms (see the prefer-ctos-cipher keyword).

prefer-stoc-hmac: Specifies the preferred server-to-client HMAC algorithm. The default is sha1. Supported algorithms are the same as the client-to-server HMAC algorithms (see the prefer-ctos-hmac keyword).

dscp dscp-value: Specifies the DSCP value in the IPv6 SSH packets. The value range for the dscp-value argument is 0 to 63, and the default value is 48. The DSCP value determines the transmission priority of the packet.

escape character: Specifies an escape character. By default, the escape character is a tilde (~).

public-key keyname: Specifies the server by its host public key, which is used to authenticate the server. The keyname argument is a case-insensitive string of 1 to 64 characters.

source: Specifies a source IPv6 address or source interface for IPv6 SSH packets. By default, the device automatically selects a source address for IPv6 SSH packets in compliance with RFC 3484. To ensure successful Stelnet connections, H3C recommends that you specify a loopback interface as the source interface or specify that interface's IPv6 address as the source IPv6 address.

interface interface-type interface-number: Specifies a source interface by its type and number. The IPv6 address of this interface is the source IP address of the IPv6 SSH packets.

ipv6 ipv6-address: Specifies a source IPv6 address.

Usage guidelines

The combination of an escape character and a dot (.) works as an escape sequence. This escape sequence is typically used to quickly terminate an SSH connection when the server reboots or malfunctions.

For the escape sequence to take effect, you must enter it at the very beginning of a line. If you have entered other characters or performed operations in a line, enter the escape sequence in the next line.

H3C recommends that you use the default escape character (~). Do not use any characters in SSH usernames as the escape character.

Examples

# Establish a connection to the IPv6 Stelnet server 2000::1 and specify the public key of the server as svkey. The SSH client uses publickey authentication. Specify the dollar sign ($) as the escape character. Use the following algorithms:

·          Preferred key exchange algorithm: dh-group14-sha1.

·          Preferred server-to-client encryption algorithm: aes128-cbc.

·          Preferred client-to-server HMAC algorithm: sha1.

·          Preferred server-to-client HMAC algorithm: sha1-96.

·          Preferred compression algorithm: zlib.

<Sysname> ssh2 ipv6 2000::1 prefer-kex dh-group14-sha1 prefer-stoc-cipher aes128-cbc prefer-ctos-hmac sha1 prefer-stoc-hmac sha1-96 prefer-compress zlib public-key svkey escape $

SSH2 commands

display ssh2 algorithm

Use display ssh2 algorithm to display algorithms used by SSH2 in the algorithm negotiation stage.

Syntax

display ssh2 algorithm

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display algorithms used by SSH2 in the algorithm negotiation stage.

<Sysname> display ssh2 algorithm

Key exchange algorithms: dh-group-exchange-sha1 dh-group14-sha1 dh-group1-sha1

Public key algorithms: dsa rsa ecdsa

Encryption algorithms: aes128-cbc 3des-cbc des-cbc aes256-cbc

MAC algorithms: sha1 md5 md5-96 sha1-96

Table 90 Command output

Field

Description

Key exchange algorithms

Key exchange algorithms in descending order of priority for algorithm negotiation.

Public key algorithms

Public key algorithms in descending order of priority for algorithm negotiation.

Encryption algorithms

Encryption algorithms in descending order of priority for algorithm negotiation.

MAC algorithms

MAC algorithms in descending order of priority for algorithm negotiation.

 

Related commands

·          ssh2 algorithm cipher

·          ssh2 algorithm key-exchange

·          ssh2 algorithm mac

·          ssh2 algorithm public-key

ssh2 algorithm cipher

Use ssh2 algorithm cipher to specify encryption algorithms for SSH2.

Use undo ssh2 algorithm cipher to restore the default.

Syntax

ssh2 algorithm cipher { aes128-cbc | aes256-cbc | 3des-cbc | des-cbc } *

undo ssh2 algorithm cipher

Default

SSH2 uses the encryption algorithms aes128-cbc, aes256-cbc, 3des-cbc, and des-cbc in descending order of priority for algorithm negotiation.

Views

System view

Predefined user roles

network-admin

Parameters

aes128-cbc: Specifies the encryption algorithm aes128-cbc.

aes256-cbc: Specifies the encryption algorithm aes256-cbc.

3des-cbc: Specifies the encryption algorithm 3des-cbc.

des-cbc: Specifies the encryption algorithm des-cbc.

Usage guidelines

If you specify the encryption algorithms, SSH2 uses only the specified algorithms for algorithm negotiation. The algorithm specified earlier has a higher priority during negotiation.

Examples

# Specify the algorithm 3des-cbc as the encryption algorithm for SSH2.

<Sysname> system-view

[Sysname] ssh2 algorithm cipher 3des-cbc

Related commands

·          display ssh2 algorithm

·          ssh2 algorithm key-exchange

·          ssh2 algorithm mac

·          ssh2 algorithm public-key

ssh2 algorithm key-exchange

Use ssh2 algorithm key-exchange to specify key exchange algorithms for SSH2.

Use undo ssh2 algorithm key-exchange to restore the default.

Syntax

ssh2 algorithm key-exchange { dh-group-exchange-sha1 | dh-group14-sha1 | dh-group1-sha1 } *

undo ssh2 algorithm key-exchange

Default

SSH2 uses the key exchange algorithms dh-group-exchange-sha1, dh-group14-sha1, and dh-group1-sha1 in descending order of priority for algorithm negotiation.

Views

System view

Predefined user roles

network-admin

Parameters

dh-group-exchange-sha1: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.

dh-group14-sha1: Specifies the key exchange algorithm diffie-hellman-group14-sha1.

dh-group1-sha1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.

Usage guidelines

If you specify the key exchange algorithms, SSH2 uses only the specified algorithms for algorithm negotiation. The algorithm specified earlier has a higher priority during negotiation.

Examples

# Specify the algorithm dh-group1-sha1 as the key exchange algorithm for SSH2.

<Sysname> system-view

[Sysname] ssh2 algorithm key-exchange dh-group1-sha1

Related commands

·          display ssh2 algorithm

·          ssh2 algorithm cipher

·          ssh2 algorithm mac

·          ssh2 algorithm public-key

ssh2 algorithm mac

Use ssh2 algorithm mac to specify MAC algorithms for SSH2.

Use undo ssh2 algorithm mac to restore the default.

Syntax

ssh2 algorithm mac { sha1 | sha1-96 | md5 | md5-96 } *

undo ssh2 algorithm mac

Default

SSH2 uses the MAC algorithms sha1, sha1-96, md5, and md5-96 in descending order of priority for algorithm negotiation.

Views

System view

Predefined user roles

network-admin

Parameters

sha1: Specifies the HMAC algorithm hmac-sha1.

sha1-96: Specifies the HMAC algorithm hmac-sha1-96.

md5: Specifies the HMAC algorithm hmac-md5.

md5-96: Specifies the HMAC algorithm hmac-md5-96.

Usage guidelines

If you specify the MAC algorithms, SSH2 uses only the specified algorithms for algorithm negotiation. The algorithm specified earlier has a higher priority during negotiation.

Examples

# Specify the algorithm md5 as the MAC algorithm for SSH2.

<Sysname> system-view

[Sysname] ssh2 algorithm mac md5

Related commands

·          display ssh2 algorithm

·          ssh2 algorithm cipher

·          ssh2 algorithm key-exchange

·          ssh2 algorithm public-key

ssh2 algorithm public-key

Use ssh2 algorithm public-key to specify public key algorithms for SSH2.

Use undo ssh2 algorithm public-key to restore the default.

Syntax

ssh2 algorithm public-key { ecdsa | dsa | rsa } *

undo ssh2 algorithm public-key

Default

SSH2 uses the public key algorithms ecdsa, dsa, and rsa in descending order of priority for algorithm negotiation.

Views

System view

Predefined user roles

network-admin

Parameters

ecdsa: Specifies the public key algorithm ecdsa.

dsa: Specifies the public key algorithm dsa.

rsa: Specifies the public key algorithm rsa.

Usage guidelines

If you specify the public key algorithms, SSH2 uses only the specified algorithms for algorithm negotiation. The algorithm specified earlier has a higher priority during negotiation.

Examples

# Specify the algorithm dsa as the public key algorithm for SSH2.

<Sysname> system-view

[Sysname] ssh2 algorithm public-key dsa

Related commands

·          display ssh2 algorithm

·          ssh2 algorithm cipher

·          ssh2 algorithm key-exchange

·          ssh2 algorithm mac


SSL commands

certificate-chain-sending enable

Use certificate-chain-sending enable to enable the SSL server to send the complete certificate chain to the client during SSL negotiation.

Use undo certificate-chain-sending enable to restore the default.

Syntax

certificate-chain-sending enable

undo certificate-chain-sending enable

Default

During SSL negotiation, the SSL server sends the server certificate rather than the complete certificate chain to the client.

Views

SSL server policy view

Predefined user roles

network-admin

Usage guidelines

This feature causes additional overheads in the SSL negotiation process. Enable it only when the SSL client do not have the complete certificate chain to verify the server certificate.

Examples

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] certificate-chain-sending enable

ciphersuite

Use ciphersuite to specify the cipher suites supported by an SSL server policy.

Use undo ciphersuite to restore the default.

Syntax

ciphersuite { dhe_rsa_aes_128_cbc_sha | dhe_rsa_aes_256_cbc_sha | exp_rsa_des_cbc_sha | exp_rsa_rc2_md5 | exp_rsa_rc4_md5 | rsa_3des_ede_cbc_sha | rsa_aes_128_cbc_sha | rsa_aes_256_cbc_sha | rsa_des_cbc_sha | rsa_rc4_128_md5 | rsa_rc4_128_sha } *

undo ciphersuite

Default

An SSL server policy supports all cipher suites.

Views

SSL server policy view

Predefined user roles

network-admin

Parameters

dhe_rsa_aes_128_cbc_sha: Specifies key exchange algorithm DHE RSA, data encryption algorithm 128-bit AES, and the MAC algorithm SHA.

dhe_rsa_aes_256_cbc_sha: Specifies key exchange algorithm DHE RSA, data encryption algorithm 256-bit AES, and the MAC algorithm SHA.

exp_rsa_des_cbc_sha: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm DES_CBC, and the MAC algorithm SHA.

exp_rsa_rc2_md5: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm RC2, and the MAC algorithm MD5.

exp_rsa_rc4_md5: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm RC4, and the MAC algorithm MD5.

rsa_3des_ede_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 3DES_EDE_CBC, and the MAC algorithm SHA.

rsa_aes_128_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit AES_CBC, and the MAC algorithm SHA.

rsa_aes_256_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 256-bit AES_CBC, and the MAC algorithm SHA.

rsa_des_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm DES_CBC, and the MAC algorithm SHA.

rsa_rc4_128_md5: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit RC4, and the MAC algorithm MD5.

rsa_rc4_128_sha: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit RC4, and MAC algorithm SHA.

Usage guidelines

SSL employs the following algorithms:

·          Data encryption algorithms—Encrypt data to ensure privacy. Commonly used data encryption algorithms are usually symmetric key algorithms, such as DES_CBC, 3DES_EDE_CBC, AES_CBC, and RC4. When using a symmetric key algorithm, the SSL server and the SSL client must use the same key.

·          Message Authentication Code (MAC) algorithms—Calculate the MAC value for data to ensure integrity. Commonly used MAC algorithms include MD5 and SHA. When using a MAC algorithm, the SSL server and the SSL client must use the same key.

·          Key exchange algorithms—Implement secure exchange of the keys used by the symmetric key algorithm and the MAC algorithm. Commonly used key exchange algorithms are usually asymmetric key algorithms, such as RSA.

After the SSL server receives a cipher suite from a client, the server matches the received cipher suite against the cipher suits it supports. If a match is found, the cipher suite negotiation succeeds. Otherwise, the negotiation fails.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure SSL server policy policy1 to support the following cipher suites:

·          Key exchange algorithm DHE RSA, data encryption algorithm 128-bit AES, and MAC algorithm SHA.

·          Key exchange algorithm RSA, data encryption algorithm 128-bit AES, and MAC algorithm SHA.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] ciphersuite dhe_rsa_aes_128_cbc_sha rsa_aes_128_cbc_sha

Related commands

·          display ssl server-policy

·          prefer-cipher

client-verify

Use client-verify to enable mandatory or optional SSL client authentication.

Use undo client-verify to restore the default.

Syntax

client-verify { enable | optional }

undo client-verify [ enable ]

Default

SSL client authentication is disabled. The SSL server does not authenticate SSL clients based on digital certificates.

Views

SSL server policy view

Predefined user roles

network-admin

Parameters

enable: Enables mandatory SSL client authentication.

optional: Enables optional SSL client authentication.

Usage guidelines

SSL uses digital certificates to authenticate communicating parties. For more information about digital certificates, see Security Configuration Guide.

Mandatory SSL client authentication—The SSL server requires an SSL client to submit its digital certificate for identity authentication. The SSL client can access the SSL server only after it passes identity authentication.

Optional SSL client authentication—The SSL server does not require an SSL client to submit its digital certificate for identity authentication.

·          If an SSL client submits its certificate to the SSL server, the server authenticates the client identity. The client must pass authentication to access the server.

·          If an SSL client does not submit its certificate to the SSL server, the server does not authenticate the client identity. The client can access the SSL server without authentication.

If SSL client authentication is disabled, the SSL server does not authenticate SSL clients regardless of whether the clients submit digital certificates or not. SSL clients can access the SSL server without authentication.

When authenticating a client by using the digital certificate, the SSL server performs the following operations:

·          Verifies the certificate chain presented by the client.

·          Checks that the certificates in the certificate chain (except the root CA certificate) are not revoked.

Examples

# Enable mandatory SSL client authentication.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] client-verify enable

# Enable optional SSL client authentication.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] client-verify optional

# Disable SSL client authentication.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] undo client-verify

Related commands

display ssl server-policy

display ssl client-policy

Use display ssl client-policy to display SSL client policy information.

Syntax

display ssl client-policy [ policy-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an SSL client policy by its name, a case-insensitive string of 1 to 31 characters. If you do not specify a policy name, this command displays information about all SSL client policies.

Examples

# Display information about the SSL client policy policy1.

<Sysname> display ssl client-policy policy1

 SSL client policy: policy1

     SSL version: SSL 3.0

     PKI domain: client-domain

     Preferred ciphersuite:

         RSA_AES_128_CBC_SHA

     Server-verify: enabled

Table 91 Command output

Field

Description

Server-verify

Indicates whether the client is enabled to use digital certificates to authenticate servers.

 

display ssl server-policy

Use display ssl server-policy to display SSL server policy information.

Syntax

display ssl server-policy [ policy-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an SSL server policy by its name, a case-insensitive string of 1 to 31 characters. If you do not specify a policy name, this command displays information about all SSL server policies.

Examples

# Display information about SSL server policy policy1.

<Sysname> display ssl server-policy policy1

 SSL server policy: policy1

     PKI domain: server-domain

     Ciphersuites:

         DHE_RSA_AES_128_CBC_SHA

         RSA_AES_128_CBC_SHA

     Session cache size: 600

     Caching timeout: 3600 seconds

     Client-verify: Enabled

Table 92 Command output

Field

Description

Caching timeout

Session cache timeout time in seconds.

Client-verify

SSL client authentication mode, including:

·         Disabled—SSL client authentication is disabled.

·         Enabled—SSL client authentication is mandatory.

·         Optional—SSL client authentication is optional.

 

pki-domain

Use pki-domain to specify a PKI domain for an SSL client policy or an SSL server policy.

Use undo pki-domain to restore the default.

Syntax

pki-domain domain-name

undo pki-domain

Default

No PKI domain is specified for an SSL client policy or an SSL server policy.

Views

SSL client policy view

SSL server policy view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

If you specify a PKI domain for an SSL client policy, the SSL client that uses the SSL client policy will obtain its digital certificate through the specified PKI domain.

If you specify a PKI domain for an SSL server policy, the SSL server that uses the SSL server policy will obtain its digital certificate through the specified PKI domain.

Examples

# Specify PKI domain client-domain for SSL client policy policy1.

<Sysname> system-view

[Sysname] ssl client-policy policy1

[Sysname-ssl-client-policy-policy1] pki-domain client-domain

# Specify PKI domain server-domain for SSL server policy policy1.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] pki-domain server-domain

Related commands

·          display ssl client-policy

·          display ssl server-policy

·          pki domain

prefer-cipher

Use prefer-cipher to specify a preferred cipher suite for an SSL client policy.

Use undo prefer-cipher to restore the default.

Syntax

prefer-cipher { dhe_rsa_aes_128_cbc_sha | dhe_rsa_aes_256_cbc_sha | exp_rsa_des_cbc_sha | exp_rsa_rc2_md5 | exp_rsa_rc4_md5 | rsa_3des_ede_cbc_sha | rsa_aes_128_cbc_sha | rsa_aes_256_cbc_sha | rsa_des_cbc_sha | rsa_rc4_128_md5 | rsa_rc4_128_sha }

undo prefer-cipher

Default

The preferred cipher suite of an SSL client policy is rsa_rc4_128_md5.

Views

SSL client policy view

Predefined user roles

network-admin

Parameters

dhe_rsa_aes_128_cbc_sha: Specifies key exchange algorithm DHE RSA, data encryption algorithm 128-bit AES, and MAC algorithm SHA.

dhe_rsa_aes_256_cbc_sha: Specifies key exchange algorithm DHE RSA, data encryption algorithm 256-bit AES, and MAC algorithm SHA.

exp_rsa_des_cbc_sha: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm DES_CBC, and MAC algorithm SHA.

exp_rsa_rc2_md5: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm RC2, and MAC algorithm MD5.

exp_rsa_rc4_md5: Specifies the export cipher suite that uses key exchange algorithm RSA, data encryption algorithm RC4, and MAC algorithm MD5.

rsa_3des_ede_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 3DES_EDE_CBC, and MAC algorithm SHA.

rsa_aes_128_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit AES_CBC, and MAC algorithm SHA.

rsa_aes_256_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm 256-bit AES_CBC, and MAC algorithm SHA.

rsa_des_cbc_sha: Specifies key exchange algorithm RSA, data encryption algorithm DES_CBC, and MAC algorithm SHA.

rsa_rc4_128_md5: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit RC4, and MAC algorithm MD5.

rsa_rc4_128_sha: Specifies key exchange algorithm RSA, data encryption algorithm 128-bit RC4, and MAC algorithm SHA.

Usage guidelines

SSL employs the following algorithms:

·          Data encryption algorithms—Encrypt data to ensure privacy. Commonly used data encryption algorithms are usually symmetric key algorithms, such as DES_CBC, 3DES_EDE_CBC, AES_CBC, and RC4. When using a symmetric key algorithm, the SSL server and the SSL client must use the same key.

·          Message Authentication Code (MAC) algorithms—Calculate the MAC value for data to ensure integrity. Commonly used MAC algorithms include MD5 and SHA. When using a MAC algorithm, the SSL server and the SSL client must use the same key.

·          Key exchange algorithms—Implement secure exchange of the keys used by the symmetric key algorithm and the MAC algorithm. Commonly used key exchange algorithms are asymmetric key algorithms, such as RSA.

The SSL client sends the preferred cipher suite to the SSL server, the server matches the received cipher suite against the cipher suits it supports. If a match is found, the cipher suite negotiation succeeds. Otherwise, the negotiation fails.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure SSL client policy policy1 to support key exchange algorithm RSA, data encryption algorithm 128-bit AES_CBC, and MAC algorithm SHA.

<Sysname> system-view

[Sysname] ssl client-policy policy1

[Sysname-ssl-client-policy-policy1] prefer-cipher rsa_aes_128_cbc_sha

Related commands

·          ciphersuite

·          display ssl client-policy

server-verify enable

Use server-verify enable to enable the SSL client to use digital certificates to authenticate SSL servers.

Use undo server-verify enable to disable authentication. That is, the client does not authenticate any server.

Syntax

server-verify enable

undo server-verify enable

Default

The SSL client uses digital certificates to authenticate SSL servers.

Views

SSL client policy view

Predefined user roles

network-admin

Usage guidelines

The SSL client and server use digital certificates to authenticate each other. For more information about digital certificates, see Security Configuration Guide.

If you execute the server-verify enable command, an SSL server must send its digital certificate to the SSL client for authentication. The client can access the SSL server only after the server passes the authentication.

Examples

# Enable the SSL client to use digital certificates to authenticate SSL servers.

<Sysname> system-view

[Sysname] ssl client-policy policy1

[Sysname-ssl-client-policy-policy1] server-verify enable

Related commands

display ssl client-policy

session

Use session to set the maximum number of sessions that the SSL server can cache and the timeout time for cached sessions.

Use undo session to restore the default.

Syntax

session { cachesize size | timeout time } *

undo session { cachesize | timeout } *

Default

The SSL server can cache a maximum of 500 sessions, and the timeout time for cached sessions is 3600 seconds.

Views

SSL server policy view

Predefined user roles

network-admin

Parameters

cachesize size: Sets the maximum number of cached sessions, in the range of 100 to 20480.

timeout time: Sets the session cache timeout in the range of 1 to 4294967295 seconds.

Usage guidelines

The SSL server caches SSL sessions to reuse negotiated session parameters to simplify SSL handshake. Use this command to limit the maximum number and timeout time for cached sessions. When the number of cached sessions reaches the maximum, SSL does not cache new sessions. When the timeout timer for a cached session expires, SSL deletes the session.

Examples

# Set the maximum number of cached sessions to 600, and the timeout time for cached sessions to 1800 seconds.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1] session cachesize 600 timeout 1800

Related commands

display ssl server-policy

ssl client-policy

Use ssl client-policy to create an SSL client policy and enter SSL client policy view.

Use undo ssl client-policy to delete an SSL client policy.

Syntax

ssl client-policy policy-name

undo ssl client-policy policy-name

Default

No SSL client policy exists on the device.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies an SSL client policy by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

This command creates an SSL client policy for which you can configure SSL parameters that the client uses to establish a connection to the server. The parameters include a PKI domain and a preferred cipher suite. An SSL client policy takes effect only after it is associated with an application such as DDNS.

Examples

# Create SSL client policy policy1 and enter SSL client policy view.

<Sysname> system-view

[Sysname] ssl client-policy policy1

[Sysname-ssl-client-policy-policy1]

Related commands

display ssl client-policy

ssl renegotiation disable

Use ssl renegotiation disable to disable SSL session renegotiation.

Use undo ssl renegotiation disable to restore the default.

Syntax

ssl renegotiation disable

undo ssl renegotiation disable

Default

SSL session renegotiation is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

The SSL session renegotiation feature enables the SSL client and server to reuse a previously negotiated SSL session for an abbreviated handshake.

Disabling session renegotiation causes more computational overhead to the system but it can avoid potential risks. Disable SSL session renegotiation only when explicitly required.

Examples

#Disable SSL session renegotiation.

<Sysname> system-view

[Sysname] ssl renegotiation disable

ssl server-policy

Use ssl server-policy to create an SSL server policy and enter SSL server policy view.

Use undo ssl server-policy to delete an SSL server policy.

Syntax

ssl server-policy policy-name

undo ssl server-policy policy-name

Default

No SSL server policy exists on the device.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies a name for the SSL server policy, a case-insensitive string of 1 to 31 characters.

Usage guidelines

This command creates an SSL server policy for which you can configure SSL parameters such as a PKI domain and supported cipher suits. An SSL server policy takes effect only after it is associated with an application such as HTTPS.

Examples

# Create SSL server policy policy1 and enter SSL server policy view.

<Sysname> system-view

[Sysname] ssl server-policy policy1

[Sysname-ssl-server-policy-policy1]

Related commands

display ssl server-policy

ssl version ssl3.0 disable

Use ssl version ssl3.0 disable to disable SSL 3.0 on the device.

Use undo ssl version ssl3.0 disable restore the default.

Syntax

ssl version ssl3.0 disable

undo ssl version ssl3.0 disable

Default

SSL 3.0 is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Use this command to disable SSL 3.0 on a device to enhance system security.

·          An SSL server supports only TLS 1.0 after SSL 3.0 is disabled.

·          An SSL client always uses SSL 3.0 if SSL 3.0 is specified for the client policy, whether you disable SSL 3.0 or not.

To ensure successful establishment of an SSL connection, do not disable SSL 3.0 on a device when the peer device only supports SSL 3.0. As a best practice to improve security, upgrade the peer device to support TLS 1.0.

Examples

# Disable SSL 3.0 on the device.

<Sysname> system-view

[Sysname] ssl version ssl3.0 disable

version

Use version to specify an SSL protocol version for an SSL client policy.

Use undo version to restore the default.

Syntax

version { ssl3.0 | tls1.0 }

undo version

Default

The SSL protocol version for an SSL client policy is TLS 1.0.

Views

SSL client policy view

Predefined user roles

network-admin

Parameters

ssl3.0: Specifies SSL 3.0.

tls1.0: Specifies TLS 1.0.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

You can specify SSL 3.0 or TLS 1.0 for an SSL client policy:

·          If TLS 1.0 is specified and SSL 3.0 is not disabled, the client first uses TLS 1.0 to connect to the SSL server. If the connection attempt fails, the client uses SSL 3.0.

·          If TLS 1.0 is specified and SSL 3.0 is disabled, the client only uses TLS 1.0 to connect to the SSL server.

·          If SSL 3.0 is specified, the client uses SSL 3.0 to connect to the SSL server, whether you disable SSL 3.0 or not.

As a best practice to enhance system security, disable SSL 3.0 on the device and specify TLS 1.0 for an SSL client policy.

Examples

# Set the SSL protocol version to TLS 1.0 for SSL client policy policy1.

<Sysname> system-view

[Sysname] ssl client-policy policy1

[Sysname-ssl-client-policy-policy1] version tls1.0

Related commands

display ssl client-policy


Session management commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

display session aging-time state

Use display session aging-time stat to display the aging time for sessions in different protocol states.

Syntax

display session aging-time state

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the aging time for sessions in different protocol states.

<Sysname> display session aging-time state

State                     Aging Time(s)

SYN                       10

TCP-EST                   3600

FIN                       10

UDP-OPEN                  10

UDP-READY                 30

ICMP-REQUEST              30

ICMP-REPLY                10

RAWIP-OPEN                30

RAWIP-READY               60

UDPLITE-OPEN              30

UDPLITE-READY             60

DCCP-REQUEST              30

DCCP-EST                  3600

DCCP-CLOSEREQ             30

SCTP-INIT                 30

SCTP-EST                  3600

SCTP-SHUTDOWN             30

ICMPV6-REQUEST            60

ICMPV6-REPLY              30

TCP-TIME-WAIT             2

TCP-CLOSE                 2

Table 93 Command output

Field

Description

State

Protocol state.

Aging Time(s)

Aging time in seconds.

 

Related commands

session aging-time state

display session relation-table

Use display session relation-table to display relation entries.

Syntax

display session relation-table { ipv4 | ipv6 } [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ipv4: Specifies IPv4 relation entries.

ipv6: Specifies IPv6 relation entries.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays relation entries for all member devices.

Examples

# Display all IPv4 relation entries.

<Sysname> display session relation-table ipv4

Slot 1:

Source IP/port:      192.168.1.100/-

Destination IP/port: 192.168.2.100/99

DS-Lite tunnel peer: -

VPN instance/VLAN ID/Inline ID: 1/-/-

Protocol: TCP(6)    TTL: 1234s    App: FTP-DATA

 

Source IP/port:      -/-

Destination IP/port: 192.168.2.200/1212

DS-Lite tunnel peer: -

VPN instance/VLAN ID/Inline ID: -/-/-

Protocol: TCP(6)    TTL: 3100s    App: H225

 

Total entries found:  2

# Display all IPv6 relation entries.

<Sysname> display session relation-table ipv6

Slot 1:

Source IP:             2011::0002

Destination IP/port: 2011::0008/1212

DS-Lite tunnel peer: -

VPN instance/VLAN ID/Inline ID: -/-/-

Protocol: TCP(6)    TTL: 567s    App: FTP-DATA

 

Total entries found:  1

Table 94 Command output

Field

Description

Source IP/port

Source IP address and port number of the session. If the IP or port number is not specified, this field displays a hyphen (-).

For an IPv6 relation entry, the source port number is not displayed.

Destination IP/port

Destination IP address and port number of the session.

DS-Lite tunnel peer

Peer tunnel interface address of the DS-Lite tunnel to which the session belongs. If no peer tunnel interface address is specified, a hyphen (-) is displayed.

The device does not support this field in the current software version.

VPN instance/VLAN ID/Inline ID

MPLS L3VPN to which the relation entry belongs. The device does not support the VPN instance field in the current software version.

VLAN and INLINE to which the relation entry belongs during Layer 2 forwarding.

If a parameter is not specified, a hyphen (-) is displayed for the proper field.

Protocol

Transport layer protocol.

TTL

Remaining lifetime of the relation entry, in seconds.

App

Application layer protocol.

Total entries found

Total number of found relation entries.

 

display session statistics ipv4

Use display session statistics ipv4 to display IPv4 unicast session statistics.

Syntax

display session statistics ipv4 { source-ip source-ip | destination-ip destination-ip | protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } | source-port source-port | destination-port destination-port } * [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

source-ip source-ip: Specifies a source IPv4 address for a unicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv4 address for a unicast session from the initiator to the responder.

protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv4 transport layer protocol, including DCCP, ICMP, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of an IPv4 unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of an IPv6 unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv4 unicast session statistics for all member devices.

Examples

# Display statistics for unicast sessions from IP address 111.15.111.66.

<Sysname> display session statistics ipv4 source-ip 111.15.111.66

Slot 1:

Current sessions: 3

          TCP sessions:                    0

          UDP sessions:                    0

         ICMP sessions:                    3

       ICMPv6 sessions:                    0

     UDP-Lite sessions:                    0

         SCTP sessions:                    0

         DCCP sessions:                    0

        RAWIP sessions:                    0

# Display statistics for IPv4 unicast TCP sessions.

<Sysname> display session statistics ipv4 protocol tcp

Slot 1:

Current sessions: 3

          TCP sessions:                    3

          UDP sessions:                    0

         ICMP sessions:                    0

       ICMPv6 sessions:                    0

     UDP-Lite sessions:                    0

         SCTP sessions:                    0

         DCCP sessions:                    0

        RAWIP sessions:                    0

Table 95 Command output

Field

Description

Current sessions

Total number of unicast sessions.

TCP sessions

Number of TCP unicast sessions.

UDP sessions

Number of UDP unicast sessions.

ICMP sessions

Number of ICMP unicast sessions.

ICMPv6 sessions

Number of ICMPv6 unicast sessions.

UDP-Lite sessions

Number of UDP-Lite unicast sessions.

SCTP sessions

Number of SCTP unicast sessions.

DCCP sessions

Number of DCCP unicast sessions.

RAWIP sessions

Number of Raw IP unicast sessions.

 

display session statistics ipv6

Use display session statistics ipv6 to display IPv6 unicast session statistics.

Syntax

display session statistics ipv6 { source-ip source-ip | destination-ip destination-ip | protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite } | source-port source-port | destination-port destination-port } * [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

source-ip source-ip: Specifies a source IPv6 address for a unicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv6 address for a unicast session from the initiator to the responder.

protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv6 transport layer protocol, including DCCP, ICMPv6, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of an IPv6 unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of an IPv6 unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv6 unicast session statistics for all member devices.

Examples

# Display statistics for unicast sessions from IPv6 address 100::2.

<Sysname> display session statistics ipv6 source-ip 100::2

Slot 1:

Current sessions: 3

          TCP sessions:                    0

          UDP sessions:                    0

         ICMP sessions:                    3

       ICMPv6 sessions:                    0

     UDP-Lite sessions:                    0

         SCTP sessions:                    0

         DCCP sessions:                    0

        RAWIP sessions:                    0

# Display statistics for IPv6 unicast TCP sessions.

<Sysname> display session statistics ipv6 protocol tcp

Slot 1:

Current sessions: 3

          TCP sessions:                    3

          UDP sessions:                    0

         ICMP sessions:                    0

       ICMPv6 sessions:                    0

     UDP-Lite sessions:                    0

         SCTP sessions:                    0

         DCCP sessions:                    0

        RAWIP sessions:                    0

Table 96 Command output

Field

Description

Current sessions

Total number of unicast sessions.

TCP sessions

Number of TCP unicast sessions.

UDP sessions

Number of UDP unicast sessions.

ICMP sessions

Number of ICMP unicast sessions.

ICMPv6 sessions

Number of ICMPv6 unicast sessions.

UDP-Lite sessions

Number of UDP-Lite unicast sessions.

SCTP sessions

Number of SCTP unicast sessions.

DCCP sessions

Number of DCCP unicast sessions.

RAWIP sessions

Number of Raw IP unicast sessions.

 

display session statistics

Use display session statistics to display unicast session statistics.

Syntax

display session statistics [ summary ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

summary: Displays summary information about unicast session statistics. If you do not specify this keyword, the command displays detailed information about unicast session statistics.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays unicast session statistics for all member devices.

Examples

# Display detailed information about unicast session statistics.

<Sysname> display session statistics

Slot 1:

Current sessions: 3

          TCP sessions:                    0

          UDP sessions:                    0

         ICMP sessions:                    3

       ICMPv6 sessions:                    0

     UDP-Lite sessions:                    0

         SCTP sessions:                    0

         DCCP sessions:                    0

        RAWIP sessions:                    0

 

History average sessions per second:

      Past hour: 1

      Past 24 hours: 0

      Past 30 days: 0

History average session establishment rate:

      Past hour: 0/s

      Past 24 hours: 0/s

      Past 30 days: 0/s  

 

Current relation-table entries: 0

 

Session establishment rate: 0/s

          TCP:                   0/s

          UDP:                   0/s

         ICMP:                   0/s

       ICMPv6:                   0/s

     UDP-Lite:                   0/s

         SCTP:                   0/s

         DCCP:                   0/s

        RAWIP:                   0/s

 

Received TCP      :                   0 packets                    0 bytes

Received UDP      :                 118 packets                13568 bytes

Received ICMP     :                 105 packets                 8652 bytes

Received ICMPv6   :                   0 packets                    0 bytes

Received UDP-Lite :                   0 packets                    0 bytes

Received SCTP     :                   0 packets                    0 bytes

Received DCCP     :                   0 packets                    0 bytes

Received RAWIP    :                   0 packets                    0 bytes

Table 97 Command output

Field

Description

Current sessions

Total number of unicast sessions.

TCP sessions

Number of TCP sessions.

UDP sessions

Number of UDP sessions.

ICMP sessions

Number of ICMP sessions.

ICMPv6 sessions

Number of ICMPv6 sessions.

UDP-Lite sessions

Number of UDP-Lite sessions.

SCTP sessions

Number of SCTP sessions.

DCCP sessions

Number of DCCP sessions.

RAWIP sessions

Number of Raw IP sessions.

History average sessions per second

History statistics of average sessions per second.

Past hour

Average number of sessions per second in the most recent hour.

Past 24 hours

Average number of sessions per second in the most recent 24 hours.

Past 30 days

Average number of sessions per second in the most recent 30 days.

History average session establishment rate

History statistics of average session establishment rates.

Past hour

Average session establishment rate in the most recent hour.

Past 24 hours

Average session establishment rate in the most recent 24 hours.

Past 30 days

Average session establishment rate in the most recent 30 days.

Current relation-table entries

Total number of relation entries.

Session establishment rate

Unicast session establishment rate, and rates for establishing unicast sessions of different protocols.

Received TCP

Number of received TCP packets and bytes.

Received UDP

Number of received UDP packets and bytes.

Received ICMP

Number of received ICMP packets and bytes.

Received ICMPv6

Number of received ICMPv6 packets and bytes.

Received UDP-Lite

Number of received UDP-Lite packets and bytes.

Received SCTP

Number of received SCTP packets and bytes.

Received DCCP

Number of received DCCP packets and bytes.

Received RAWIP

Number of received Raw IP packets and bytes.

 

display session statistics multicast

Use display session statistics multicast to display multicast session statistics.

Syntax

display session statistics multicast [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID.

Examples

# Display information about multicast session statistics.

<Sysname> display session statistics multicast

Slot 0:

Current sessions: 0

Session establishment rate: 0/s

Received:                   0 packets                    0 bytes

Sent    :                   0 packets                    0 bytes

 

Slot 2:

Current sessions: 0

Session establishment rate: 0/s

Received:                   0 packets                    0 bytes

Sent    :                   0 packets                    0 bytes

Table 98 Command output

Field

Description

Current sessions

Total number of multicast sessions.

Session establishment rate

Rate of multicast session creation.

Received

Number of received multicast packets and packet bytes.

Sent

Number of sent multicast packets and packet bytes.

 

display session table ipv4

Use display session table ipv4 to display IPv4 unicast session entries.

Syntax

display session table ipv4 [ slot slot-number ] [ source-ip start-source-ip [ end-source-ip ] ] [ destination-ip start-destination-ip [ end-destination-ip ] ] [ protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv4 unicast session entries that match specific criteria for all member devices.

source-ip start-source-ip [ end-source-ip ]: Specifies a source IPv4 address or IPv4 address range for a unicast session from the initiator to the responder. The start source-ip argument specifies the start source IPv4 address. The end source-ip argument specifies the end source IPv4 address.

destination-ip start-destination-ip [ end-destination-ip ]: Specifies a destination IPv4 address or IPv4 address range for a unicast session from the initiator to the responder. The start destination-ip argument specifies the start destination IPv4 address. The end destination-ip argument specifies the end destination IPv4 address.

protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv4 transport layer protocol, including DCCP, ICMP, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

verbose: Displays detailed information about IPv4 unicast session entries. If you do not specify this keyword, the command displays brief information about IPv4 unicast session entries.

Usage guidelines

If you do not specify any parameters, this command displays all IPv4 unicast session entries.

Examples

# Display brief information about all IPv4 unicast session entries.

<Sysname> display session table ipv4

Slot 1:

Initiator:

Source      IP/port: 192.168.100.14/54324

  Destination IP/port: 192.168.100.138/27011

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: UDP(17)

  Inbound interface: Vlan-interface3

Initiator:

  Source      IP/port: 192.168.100.14/56105

  Destination IP/port: 192.168.100.138/23

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: Vlan-interface3

Total sessions found: 2

# Display detailed information about all IPv4 unicast session entries.

<Sysname> display session table ipv4 verbose

Slot 1:

Initiator:

Source      IP/port: 192.168.100.14/56105

  Destination IP/port: 192.168.100.138/23

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: Vlan-interface3

Responder:

  Source      IP/port: 192.168.100.138/23

  Destination IP/port: 192.168.100.14/56105

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: InLoopBack0

State: TCP_ESTABLISHED

Application: TELNET

Start time: 2017-03-06 09:21:29  TTL: 1199s

Initiator->Responder:            0 packets          0 bytes

Responder->Initiator:            0 packets          0 bytes

Total sessions found: 1

Table 99 Command output

Field

Description

Initiator

Information about the unicast session from the initiator to the responder.

Responder

Information about the unicast session from the responder to the initiator.

DS-Lite tunnel peer

Address of the DS-Lite tunnel peer.

When the session does not belong to any DS-Lite tunnel, this field displays a hyphen (-).

The device does not support this field in the current software version.

VPN instance/VLAN ID/Inline ID

MPLS L3VPN to which the session belongs. The device does not support the VPN instance field in the current software version.

VLAN and INLINE to which the session belongs during Layer 2 forwarding.

If a parameter is not specified, a hyphens (-) is displayed for the proper field.

Protocol

Transport layer protocol:

·         DCCP.

·         ICMP.

·         ICMPv6.

·         Raw IP.

·         SCTP.

·         TCP.

·         UDP.

·         UDP-Lite.

The number in the brackets indicates the protocol number.

State

Session state.

Application

Application layer protocol, FTP or DNS.

If it is an unknown protocol identified by an unknown port, this field displays OTHER.

Start time

Session establishment time.

TTL

Remaining lifetime of the unicast session, in seconds.

Initiator->Responder

Number of packets and packet bytes from the initiator to the responder.

Responder->Initiator

Number of packets and packet bytes from the responder to the initiator.

Total sessions found

Total number of found unicast session entries.

 

display session table ipv6

Use display session table ipv6 to display IPv6 unicast session entries.

Syntax

display session table ipv6 [ slot slot-number ] [ source-ip start-source-ip [ end-source-ip ] ] [ destination-ip start-destination-ip [ end-destination-ip ] ] [ protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv6 unicast session entries that match specific criteria for all member devices.

source-ip start-source-ip [ end-source-ip ]: Specifies a source IPv6 address or IPv6 address range for a unicast session from the initiator to the responder. The start source-ip argument specifies the start source IPv6 address. The end source-ip argument specifies the end source IPv6 address.

destination-ip start-destination-ip [ end-destination-ip ]: Specifies a destination IPv6 address or IPv6 address range for a unicast session from the initiator to the responder. The start destination-ip argument specifies the start destination IPv6 address. The end destination-ip argument specifies the end destination IPv6 address.

protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv6 transport layer protocol, including DCCP, ICMPv6, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

verbose: Displays detailed information about IPv6 unicast session entries. If you do not specify this keyword, the command displays brief information about IPv6 unicast session entries.

Usage guidelines

If you do not specify any parameters, this command displays all IPv6 unicast session entries.

Examples

# Display brief information about all IPv6 unicast session entries.

<Sysname> display session table ipv6

Slot 1:

Initiator:

  Source      IP/port: 2011::2/58473

  Destination IP/port: 2011::8/32768

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: IPV6-ICMP(58)

  Inbound interface: Vlan-interface3

 

Total sessions found: 1

# Display detailed information about all IPv6 unicast session entries.

<Sysname> display session table ipv6 verbose

Slot 1:

Initiator:

  Source      IP/port: 2011::2/58473

  Destination IP/port: 2011::8/32768

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: IPV6-ICMP(58)

  Inbound interface: Vlan-interface3

Responder:

  Source      IP/port: 2011::8/58473

  Destination IP/port: 2011::2/33024

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: IPV6-ICMP(58)

  Inbound interface: InLoopBack0

State: ICMPV6_REQUEST

Application: OTHER

Start time: 2011-07-29 19:23:41  TTL: 55s

Initiator->Responder:         1 packets         104 bytes

Responder->Initiator:         0 packets          0 bytes

 

Total sessions found: 1

Table 100 Command output

Field

Description

Initiator

Information about the unicast session from the initiator to the responder.

Responder

Information about the unicast session from the responder to the initiator.

DS-Lite tunnel peer

Address of the DS-Lite tunnel peer.

When the session is not tunneled by DS-Lite, this field displays a hyphen (-).

The device does not support this field in the current software version.

VPN instance/VLAN ID/Inline ID

MPLS L3VPN to which the unicast session belongs. The device does not support the VPN instance field in the current software version.

VLAN and INLINE to which the session belongs during Layer 2 forwarding.

If a parameter is not specified, a hyphens (-) is displayed for the proper field.

Protocol

Transport layer protocol:

·         DCCP.

·         ICMP.

·         ICMPv6.

·         Raw IP.

·         SCTP.

·         TCP.

·         UDP.

·         UDP-Lite.

The number in the brackets indicates the protocol number.

State

Session state.

Application

Application layer protocol, FTP or DNS.

If it is an unknown protocol identified by an unknown port, this field displays OTHER.

Start time

Session establishment time.

TTL

Remaining lifetime of the unicast session, in seconds.

Initiator->Responder

Number of packets and packet bytes from the initiator to the responder.

Responder->Initiator

Number of packets and packet bytes from the responder to the initiator.

Total sessions found

Total number of found unicast session entries.

 

display session table multicast ipv4

Use display session table multicast ipv4 to display IPv4 multicast session entries.

Syntax

display session table multicast ipv4 [ slot slot-number ] [ source-ip start-source-ip [ end-source-ip ] ] [ destination-ip start-destination-ip [ end-destination-ip ] ] [ protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv4 multicast session entries that match specific criteria for all member devices.

source-ip start-source-ip [ end-source-ip ]: Specifies a source IPv4 address or IPv4 address range for a multicast session from the initiator to the responder. The start source-ip argument specifies the start source IPv4 address. The end source-ip argument specifies the end source IPv4 address.

destination-ip start-destination-ip [ end-destination-ip ]: Specifies a destination IPv4 address or IPv4 address range for a multicast session from the initiator to the responder. The start destination-ip argument specifies the start destination IPv4 address. The end destination-ip argument specifies the end destination IPv4 address.

protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv4 transport layer protocol, including DCCP, ICMP, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a multicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a multicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

verbose: Displays detailed information about IPv4 multicast session entries. If you do not specify this keyword, the command displays brief information about IPv4 multicast session entries.

Usage guidelines

If you do not specify any parameters, this command displays all IPv4 multicast session entries.

Examples

# Display brief information about all IPv4 multicast session entries.

<Sysname> display session table multicast ipv4

Slot 1:

Inbound initiator:

  Source IP/port: 160.51.0.2/63

  Destination IP/port: 232.0.0.1/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

Outbound interface list:

    WLAN-BSS1/0/12067

Total sessions found: 2

Slot 2:

Inbound initiator:

  Source IP/port: 160.51.0.2/63

  Destination IP/port: 232.0.0.1/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

Outbound interface list:

Total sessions found: 1

# Display detailed information about all IPv4 multicast session entries.

<Sysname> display session table multicast ipv4 verbose

Slot 1:

Inbound initiator:

  Source IP/port: 160.51.0.2/63

  Destination IP/port: 232.0.0.1/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound responder:

  Source IP/port: 232.0.0.1/63

  Destination IP/port: 160.51.0.2/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:30 TTL: 29s

Initiator->Responder: 0 packets 0 bytes

Outbound initiator:

  Source IP/port: 160.51.0.2/63

  Destination IP/port: 232.0.0.1/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Outbound responder:

  Source IP/port: 232.0.0.1/63

  Destination IP/port: 160.51.0.2/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Outbound interface: WLAN-BSS1/0/12067

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:30 TTL: 29s

Initiator->Responder: 0 packets 0 bytes

Total sessions found: 2

Slot 2:

Inbound initiator:

  Source IP/port: 160.51.0.2/63

  Destination IP/port: 232.0.0.1/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound responder:

  Source IP/port: 232.0.0.1/63

  Destination IP/port: 160.51.0.2/63

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:31 TTL: 30s

Initiator->Responder: 0 packets 0 bytes

Total sessions found: 1

Table 101 Command output

Field

Description

Inbound initiator

Information about the multicast session from the initiator to the responder on the inbound interface.

Inbound responder

Information about the multicast session from the responder to the initiator on the inbound interface.

Outbound initiator

Information about the multicast session from the initiator to the responder on the outbound interface.

Outbound responder

Information about the multicast session from the responder to the initiator on the outbound interface.

DS-Lite tunnel peer

Address of the DS-Lite tunnel peer.

If the multicast session is not tunneled by DS-Lite, this field displays a hyphen (-).

The device does not support this field in the current software version.

VPN instance/VLAN ID/Inline ID

MPLS L3VPN to which the multicast session belongs. The device does not support the VPN instance field in the current software version.

VLAN and INLINE to which the multicast session belongs during Layer 2 forwarding.

If a parameter is not specified, a hyphens (-) is displayed for the proper field.

Protocol

Transport layer protocol:

·         DCCP.

·         ICMP.

·         Raw IP.

·         SCTP.

·         TCP.

·         UDP.

·         UDP-Lite.

The number in the brackets indicates the protocol number.

State

Multicast session state.

Application

Application layer protocol, FTP or DNS.

If it is an unknown protocol identified by an unknown port, this field displays OTHER.

Start time

Time when the multicast session was created.

TTL

Remaining lifetime of the multicast session, in seconds.

Inbound interface

Inbound interface of the first packet from the initiator to responder.

Outbound interface

Outbound interface of the first packet from the initiator to responder.

Outbound interface list

Outbound interfaces of the first packet from the initiator to responder.

Initiator->Responder

Number of packets and packet bytes from the initiator to the responder.

Total sessions found

Total number of found multicast session entries.

 

display session table multicast ipv6

Use display session table multicast ipv6 to display IPv6 multicast session entries.

Syntax

display session table multicast ipv6 [ slot slot-number ] [ source-ip start-source-ip [ end-source-ip ] ] [ destination-ip start-destination-ip [ end-destination-ip ] ] [ protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv6 multicast session entries that match specific criteria for all member devices.

source-ip start-source-ip [ end-source-ip ]: Specifies a source IPv6 address or IPv6 address range for a multicast session from the initiator to the responder. The start source-ip argument specifies the start source IPv6 address. The end source-ip argument specifies the end source IPv6 address.

destination-ip start-destination-ip [ end-destination-ip ]: Specifies a destination IPv6 address or IPv6 address range for a multicast session from the initiator to the responder. The start destination-ip argument specifies the start destination IPv6 address. The end destination-ip argument specifies the end destination IPv6 address.

protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv6 transport layer protocol, including DCCP, ICMPv6, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a multicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a multicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

verbose: Displays detailed information about IPv6 multicast session entries. If you do not specify this keyword, the command displays brief information about IPv6 multicast session entries.

Usage guidelines

If you do not specify any parameters, this command displays all IPv6 multicast session entries.

Examples

# Display brief information about all IPv6 multicast session entries.

<Sysname> display session table multicast ipv6

Slot 1:

Inbound initiator:

  Source IP/port: 3::4/1617

  Destination IP/port: FF0E::1/1025

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

Outbound interface list:

    WLAN-BSS1/0/12067

Total sessions found: 2

Slot 2:

Inbound initiator:

  Source IP/port: 3::4/1617

  Destination IP/port: FF0E::1/1025

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

Outbound interface list:

Total sessions found: 1

# Display detailed information about all IPv6 multicast session entries.

<Sysname> display session table multicast ipv6 verbose

Slot 1:

Inbound initiator:

  Source IP/port: 3::4/1617

  Destination IP/port: FF0E::1/1025

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound responder:

  Source IP/port: FF0E::1/1025

  Destination IP/port: 3::4/1617

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:30 TTL: 29s

Initiator->Responder: 0 packets 0 bytes

Outbound initiator:

  Source IP/port: 3::4/1617

  Destination IP/port: FF0E::1/1025

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Outbound responder:

  Source IP/port: FF0E::1/1025

  Destination IP/port: 3::4/1617

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Outbound interface: WLAN-BSS1/0/12067

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:30 TTL: 29s

Initiator->Responder: 0 packets 0 bytes

Total sessions found: 2

Slot 2:

Inbound initiator:

  Source IP/port: 3::4/1617

  Destination IP/port: FF0E::1/1025

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound responder:

  Source IP/port: FF0E::1/1025

  Destination IP/port: 3::4/1617

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/53/-

  Protocol: UDP(17)

Inbound interface: GigabitEthernet2/0/2

State: UDP_OPEN

Application: -

Start time: 2017-03-13 17:13:31 TTL: 30s

Initiator->Responder: 0 packets 0 bytes

Total sessions found: 1

Table 102 Command output

Field

Description

Inbound initiator

Information about the multicast session from the initiator to the responder on the inbound interface.

Inbound responder

Information about the multicast session from the responder to the initiator on the inbound interface.

Outbound initiator

Information about the multicast session from the initiator to the responder on the outbound interface.

Outbound responder

Information about the multicast session from the responder to the initiator on the outbound interface.

DS-Lite tunnel peer

Address of the DS-Lite tunnel peer.

If the multicast session is not tunneled by DS-Lite, this field displays a hyphen (-).

The device does not support this field in the current software version.

VPN instance/VLAN ID/Inline ID

MPLS L3VPN to which the multicast session belongs. The device does not support the VPN instance field in the current software version.

VLAN and INLINE to which the multicast session belongs during Layer 2 forwarding.

If a parameter is not specified, a hyphens (-) is displayed for the proper field.

Protocol

Transport layer protocol:

·         DCCP.

·         ICMPv6.

·         Raw IP.

·         SCTP.

·         TCP.

·         UDP.

·         UDP-Lite.

The number in the brackets indicates the protocol number.

State

Multicast session state.

Application

Application layer protocol, FTP or DNS.

If it is an unknown protocol identified by an unknown port, this field displays OTHER.

Start time

Time when the multicast session was created.

TTL

Remaining lifetime of the multicast session, in seconds.

Inbound interface

Inbound interface of the first packet from the initiator to responder.

Outbound interface

Outbound interface of the first packet from the initiator to responder.

Outbound interface list

Outbound interfaces of the first packet from the initiator to responder.

Initiator->Responder

Number of packets and packet bytes from the initiator to the responder.

Total sessions found

Total number of found multicast session entries.

 

reset session relation-table

Use reset session relation-table to clear relation entries.

Syntax

reset session relation-table [ ipv4 | ipv6 ] [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

ipv4: Specifies IPv4 relation entries.

ipv6: Specifies IPv6 relation entries.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears relation entries for all member devices.

Usage guidelines

If you do not specify the IPv4 keyword or the IPv6 keyword, this command clears all IPv4 and IPv6 relation entries.

Examples

# Clear all IPv4 relation entries.

<Sysname> reset session relation-table ipv4

Related commands

display session relation-table

reset session statistics

Use reset session statistics to clear unicast session statistics.

Syntax

reset session statistics [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears unicast session statistics for all member devices.

Examples

# Clear all unicast session statistics.

<Sysname> reset session statistics

Related commands

display session statistics

reset session statistics multicast

Use reset session statistics multicast to clear multicast session statistics.

Syntax

reset session statistics multicast [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears multicast session statistics for all member devices.

Examples

# Clear all multicast session statistics.

<Sysname> reset session statistics multicast

Related commands

display session statistics multicast

reset session table

Use reset session table to clear IPv4 and IPv6 unicast session entries.

Syntax

reset session table [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears unicast session entries for all member devices.

Examples

# Clear all IPv4 and IPv6 unicast session entries.

<Sysname> reset session table

Related commands

·          display session table ipv4

·          display session table ipv6

reset session table ipv4

Use reset session table ipv4 to clear IPv4 unicast session entries.

Syntax

reset session table ipv4 [ slot slot-number ] [ source-ip source-ip ] [ destination-ip destination-ip ] [ protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears IPv4 unicast session entries that match specific criteria for all member devices.

source-ip source-ip: Specifies a source IPv4 address. The source-ip argument specifies the source IPv4 address of a unicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv4 address. The destination-ip argument specifies the destination IPv4 address of a unicast session from the initiator to the responder.

protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv4 transport layer protocol, including DCCP, ICMP, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

Usage guidelines

If you do not specify any parameters, this command clears all IPv4 unicast session entries.

Examples

# Clear all IPv4 unicast session entries.

<Sysname> reset session table ipv4

# Clear the IPv4 unicast session entries with the source IP address of 10.10.10.10.

<Sysname> reset session table ipv4 source-ip 10.10.10.10

Related commands

display session table ipv4

reset session table ipv6

Use reset session table ipv6 to clear IPv6 unicast session entries.

Syntax

reset session table ipv6 [ slot slot-number ] [ source-ip source-ip ] [ destination-ip destination-ip ] [ protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears IPv6 unicast session entries that match the specified criteria for all member devices.

source-ip source-ip: Specifies a source IPv6 address. The source-ip argument specifies the source IPv6 address of a unicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv6 address. The destination-ip argument specifies the destination IPv6 address of a unicast session from the initiator to the responder.

protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv6 transport layer protocol, including DCCP, ICMPv6, Raw IP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a unicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a unicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

Usage guidelines

If you do not specify any parameters, this command clears all IPv6 unicast session entries.

Examples

# Clear all IPv6 unicast session entries.

<Sysname> reset session table ipv6

# Clear the IPv6 unicast session entries with the source IP address of 2011::0002.

<Sysname> reset session table ipv6 source-ip 2011::0002

Related commands

display session table ipv6

reset session table multicast

Use reset session table multicast to clear IPv4 and IPv6 multicast session entries.

Syntax

reset session table multicast [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears multicast session entries for all member devices.

Examples

# Clear all IPv4 and IPv6 multicast session entries.

<Sysname> reset session table multicast

Related commands

·          display session table multicast ipv4

·          display session table multicast ipv6

reset session table multicast ipv4

Use reset session table multicast ipv4 to clear IPv4 multicast session entries.

Syntax

reset session table multicast ipv4 [ slot slot-number ] [ source-ip source-ip ] [ destination-ip destination-ip ] [ protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears IPv4 multicast session entries that match specific criteria for all member devices.

source-ip source-ip: Specifies a source IPv4 address. The source-ip argument specifies the source IPv4 address of a multicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv4 address. The destination-ip argument specifies the destination IPv4 address of a multicast session from the initiator to the responder.

protocol { dccp | icmp | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv4 transport layer protocol, including DCCP, ICMP, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a multicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a multicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

Usage guidelines

If you do not specify any parameters, this command clears all IPv4 multicast session entries.

Examples

# Clear all IPv4 multicast session entries.

<Sysname> reset session table multicast ipv4

# Clear the IPv4 multicast session entries with the source IP address of 10.10.10.10.

<Sysname> reset session table multicast ipv4 source-ip 10.10.10.10

Related commands

display session table multicast ipv4

reset session table multicast ipv6

Use reset session table multicast ipv6 to clear IPv6 multicast session entries.

Syntax

reset session table multicast ipv6 [ slot slot-number ] [ source-ip source-ip ] [ destination-ip destination-ip ] [ protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite } ] [ source-port source-port ] [ destination-port destination-port ]

Views

User view

Predefined user roles

network-admin

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears IPv6 multicast session entries that match specific criteria for all member devices.

source-ip source-ip: Specifies a source IPv6 address. The source-ip argument specifies the source IPv6 address of a multicast session from the initiator to the responder.

destination-ip destination-ip: Specifies a destination IPv6 address. The destination-ip argument specifies the destination IPv6 address of a multicast session from the initiator to the responder.

protocol { dccp | icmpv6 | raw-ip | sctp | tcp | udp | udp-lite }: Specifies an IPv6 transport layer protocol, including DCCP, ICMPv6, RawIP, SCTP, TCP, UDP, and UDP-Lite.

source-port source-port: Specifies a source port by its number. The source-port argument specifies the source port of a multicast session from the initiator to the responder. The value range for the source-port argument is 0 to 65535.

destination-port destination-port: Specifies a destination port by its number. The destination-port argument specifies the destination port of a multicast session from the initiator to the responder. The value range for the destination-port argument is 0 to 65535.

Usage guidelines

If you do not specify any parameters, this command clears all IPv6 multicast session entries.

Examples

# Clear all IPv6 multicast session entries.

<Sysname> reset session table multicast ipv6

# Clear the IPv6 multicast session entries with the source IP address of 2011::0002.

<Sysname> reset session table multicast ipv6 source-ip 2011::0002

Related commands

display session table multicast ipv6

session aging-time state

Use session aging-time state to set the aging time for the sessions in a protocol state.

Use undo session aging-time state to restore the default. If you do not specify a protocol state, this command restores all aging time for sessions in different protocol states to the default.

Syntax

session aging-time state { fin | icmp-reply | icmp-request | rawip-open | rawip-ready | syn | tcp-close | tcp-est | tcp-time-wait | udp-open | udp-ready } time-value

undo session aging-time state [ fin | icmp-reply | icmp-request | rawip-open | rawip-ready | syn | tcp-close | tcp-est | tcp-time-wait | udp-open | udp-ready ]

Default

The aging time for sessions in different protocol states is as follows:

·          FIN_WAIT: 30 seconds.

·          ICMP-REPLY: 30 seconds.

·          ICMP-REQUEST: 60 seconds.

·          RAWIP-OPEN: 30 seconds.

·          RAWIP-READY: 60 seconds.

·          TCP SYN-SENT and SYN-RCV: 30 seconds.

·          TCP CLOSE: 2 seconds.

·          TCP ESTABLISHED: 3600 seconds.

·          TCP TIME-WAIT: 2 seconds.

·          UDP-OPEN: 30 seconds.

·          UDP-READY: 60 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

fin: Specifies the TCP FIN_WAIT state.

icmp-reply: Specifies the ICMP REPLY state.

icmp-request: Specifies the IGMP REQUEST state.

rawip-open: Specifies the RAWIP-OPEN state.

rawip-ready: Specifies the RAWIP-READY state.

syn: Specifies the TCP SYN-SENT and SYN-RCV states.

tcp-close: Specifies the TCP CLOSE state.

tcp-est: Specifies the TCP ESTABLISHED state.

tcp-time-wait: Specifies the TCP TIME-WAIT state.

udp-open: Specifies the UDP OPEN state.

udp-ready: Specifies the UDP READY state.

time-value: Sets the aging time in seconds. The value range for the time-value argument is 1 to 100000.

Usage guidelines

For persistent sessions, the aging time is set by the session persistent acl command.

Examples

# Set the aging time for TCP sessions in SYN-SENT and SYN-RCV states to 60 seconds.

<Sysname> system-view

[Sysname] session aging-time state syn 60

Related commands

·          display session aging-time state

·          session persistent acl

session log { bytes-active | packets-active }

Use session log { bytes-active | packets-active } to set a threshold for traffic-based logging.

Use undo session log { bytes-active | packets-active } to restore the default.

Syntax

session log { bytes-active bytes-value | packets-active packets-value }

undo session log { bytes-active | packets-active }

Default

No threshold is set for traffic-based logging.

Views

System view

Predefined user roles

network-admin

Parameters

bytes-value: Specifies the byte-based threshold in the range of 1 to 100000 MB.

packets-value: Specifies the packet-based threshold in the range of 1 to 100000 mega-packets.

Usage guidelines

For this command to take effect, make sure the session statistics collection feature is enabled.

If you set both the traffic-based and time-based logging, the device outputs a session log when whichever is reached. After outputting a session log, the device resets the traffic counter and restarts the interval for the session.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure the device to output session logs on a per-10-mega-packet basis.

<Sysname> system-view

[Sysname] session statistics enable

[Sysname] session log packets-active 10

Related commands

·          session log enable

·          session statistics enable

session log enable

Use session log enable to enable session logging.

Use undo session log enable to disable session logging.

Syntax

session log enable { ipv4 | ipv6 } [ acl acl-number ] { inbound | outbound }

undo session log enable { ipv4 | ipv6 } [ acl acl-number ] { inbound | outbound }

Default

Session logging is disabled.

Views

Interface view

Predefined user roles

network-admin

Parameters

ipv4: Logs IPv4 sessions.

ipv6: Logs IPv6 sessions.

acl acl-number: Specifies an ACL by its number in the range of 2000 to 3999.

inbound: Specifies the inbound direction.

outbound: Specifies the outbound direction.

Usage guidelines

If you do not specify an ACL, this command enables session logging for all IPv4 or IPv6 sessions on the interface.

If you do not specify the inbound or the outbound keyword, this command enables session logging on both directions.

Up to one IPv4 ACL and one IPv6 ACL can be applied to each direction.

The session logging feature must work with the flow log feature to generate session logs. For information about flow log, see Network Management and Monitoring.

After session logging is enabled, the device outputs session logs as follows:

·          Outputs a session log when the specified traffic threshold or interval is reached.

·          Outputs a session log when a session entry is created or removed only if the logging for session creation or deletion is enabled.

Examples

# Enable IPv4 session logging in the inbound direction of VLAN-interface 2.

<Sysname> system-view

[Sysname] session log flow-begin

[Sysname] session log flow-end

[Sysname] interface Vlan-interface 2

[Sysname-Vlan-interface2] session log enable ipv4 inbound

# Enable session logging on VLAN-interface 3 for IPv4 sessions that match ACL 2050 in the outbound direction.

<Sysname> system-view

[Sysname] session log flow-begin

[Sysname] session log flow-end

[Sysname] interface Vlan-interface 3

[Sysname-Vlan-interface3] session log enable ipv4 acl 2050 outbound

# Enable session logging on VLAN-interface 4 for IPv6 sessions that match ACL 2050 in the outbound direction.

<Sysname> system-view

[Sysname] session log flow-begin

[Sysname] session log flow-end

[Sysname] interface Vlan-interface 4

[Sysname-Vlan-interface4] session log enable ipv6 acl 2050 outbound

Related commands

·          session log bytes-active

·          session log flow-begin

·          session log flow-end

·          session log packets-active

·          session log time-active

session log flow-begin

Use session log flow-begin to enable logging for session creation.

Use undo session log flow-begin to disable logging for session creation.

Syntax

session log flow-begin

undo session log flow-begin

Default

Logging for session creation is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For the device to output a session log when a session entry is created, make sure both session logging and logging for session creation are enabled.

Examples

# Enable logging for session creation.

<Sysname> system-view

[Sysname] session log flow-begin

Related commands

session log enable

session log flow-end

Use session log flow-end to enable logging for session deletion.

Use undo session log flow-end to disable logging for session deletion.

Syntax

session log flow-end

undo session log flow-end

Default

Logging for session deletion is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For the device to output a session log when a session entry is deleted, make sure both session logging and logging for session deletion are enabled.

Examples

# Enable logging for session deletion.

<Sysname> system-view

[Sysname] session log flow-end

Related commands

session log enable

session log time-active

Use session log time-active to set the time-based session logging.

Use undo session log time-active to restore the default.

Syntax

session log time-active time-value

undo session log time-active

Default

No threshold is set for time-based session logging.

Views

System view

Predefined user roles

network-admin

Parameters

time-value: Sets the interval in minutes. The value range for the time-value argument is 10 to 120 and the value must be integer times of 10.

Usage guidelines

If you set both time-based and traffic-based logging, the device outputs a session log when whichever is reached. After outputting a session log, the device resets the traffic counter and restarts the interval for the session.

Examples

# Configure the device to output session logs every 50 minutes.

<Sysname> system

[Sysname] session log time-active 50

Related commands

·          session log enable

·          session log bytes-active

·          session log packets-active

session persistent acl

Use session persistent acl to specify persistent sessions.

Use undo session persistent acl to remove the configuration.

Syntax

session persistent acl [ ipv6 ] acl-number [ aging-time time-value ]

undo session persistent acl [ ipv6 ] acl-number

Default

No persistent sessions are specified.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an IPv6 ACL. To specify an IPv4 ACL, do not specify this keyword.

acl-number: Specifies an ACL by its number in the range of 2000 to 3999.

aging-time time-value: Sets the aging time for persistent sessions in hours. The value range for the time-value argument is 0 to 360, and the default value is 24. To disable the aging for persistent sessions, set the value to 0.

Usage guidelines

This command is effective only on TCP sessions in ESTABLISHED state.

For a TCP session in ESTABLISHED state, the priority of the aging time is as follows:

·          Aging time for persistent sessions.

·          Aging time for sessions of application layer protocols.

·          Aging time for sessions in different protocol states.

A never-age-out session is not removed until the device receives a connection close request from the initiator or responder, or you manually clear the session entries.

The configuration of persistent sessions applies only to new sessions. It has no effect on existing sessions.

Repeat this command to use multiple ACLs to specify persistent sessions.

Examples

# Specify IPv4 ACL 2000 for identifying persistent sessions and set the aging time to 72 hours.

<Sysname> system-view

[Sysname] session persistent acl 2000 aging-time 72

# Specify IPv6 ACL 3000 for identifying persistent sessions and set the aging time to 100 hours.

<Sysname> system-view

[Sysname] session persistent acl ipv6 3000 aging-time 100

Related commands

session aging-time state

session state-machine mode loose

Use session state-machine mode loose to set the mode of session state machine to loose.

Use undo session state-machine mode loose to restore the default.

Syntax

session state-machine mode loose

undo session state-machine mode loose

Default

The session state machine is in strict mode.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For asymmetric-path networks, if session synchronization is not enabled, to prevent the device from dropping packets abnormally, set the mode of the session state machine to loose.

As a best practice, use the default setting on symmetric-path networks.

Examples

# Set the mode of session state machine to loose.

<Sysname> system-view

[Sysname] session state-machine mode loose

session statistics enable

Use session statistics enable to enable session statistics collection.

Use undo session statistics enable to disable session statistics collection.

Syntax

session statistics enable

undo session statistics enable

Default

Session statistics collection is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command enables the device to collect the session-based outbound and inbound packets and bytes.

To display statistics per session, use the display session table command. To display statistics per packet type, use the display session statistics command.

Examples

# Enable session statistics collection.

<Sysname> system-view

[Sysname] session statistics enable

Related commands

·          display session statistics

·          display session table

 


Connection limit commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

connection-limit

Use connection-limit to create a connection limit policy and enter its view.

Use undo connection-limit to remove the configuration.

Syntax

connection-limit { ipv6-policy | policy } policy-id

undo connection-limit { ipv6-policy | policy } policy-id

Default

No connection limit policy exists.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 connection limit policy.

policy: Specifies an IPv4 connection limit policy.

policy-id: Specifies the ID of a connection limit policy. An IPv4 or IPv6 connection limit policy has its own number. The value for this argument is 1 to 32.

Examples

# Create IPv4 connection limit policy 1 and enter its view.

<Sysname> system-view

[Sysname] connection-limit policy 1

[Sysname-connlmt-policy-1]

# Create IPv6 connection limit policy 12 and enter its view.

<Sysname> system-view

[Sysname] connection-limit ipv6-policy 12

[Sysname-connlmt-ipv6-policy-12]

Related commands

·          connection-limit apply

·          connection-limit apply global

·          display connection-limit

·          limit

connection-limit apply

Use connection-limit apply to apply a connection limit policy to an interface.

Use undo connection-limit apply to remove the application.

Syntax

connection-limit apply { ipv6-policy | policy } policy-id

undo connection-limit apply { ipv6-policy | policy }

Default

No connection limit policy is applied to an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 connection limit policy.

policy: Specifies an IPv4 connection limit policy.

policy-id: Specifies the ID of a connection limit policy. The value range for this argument is 1 to 32.

Usage guidelines

Only one IPv4 connection limit policy and one IPv6 connection limit policy can be applied to an interface. A new IPv4 or IPv6 connection limit policy overwrites the old one.

Examples

# Apply IPv4 connection limit policy 1 to VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] connection-limit apply policy 1

# Apply IPv6 connection limit policy 12 to VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] connection-limit apply ipv6-policy 12

Related commands

·          connection-limit

·          limit

connection-limit apply global

Use connection-limit apply global to apply a connection limit policy globally.

Use undo connection-limit apply global to remove the application.

Syntax

connection-limit apply global { ipv6-policy | policy } policy-id

undo connection-limit apply global { ipv6-policy | policy }

Default

No connection limit policy is applied globally.

Views

System view

Predefined user roles

network-admin

Parameters

ipv6-policy: Specifies an IPv6 connection limit policy.

policy: Specifies an IPv4 connection limit policy.

policy-id: Specifies the ID of a connection limit policy. The value range for this argument is 1 to 32.

Usage guidelines

Only one IPv4 connection limit policy and one IPv6 connection limit policy can be applied globally. A new IPv4 or IPv6 connection limit policy overwrites the old one.

Examples

# Apply IPv4 connection limit policy 1 globally.

<Sysname> system-view

[Sysname] connection-limit apply global policy 1

# Apply IPv6 connection limit policy 12 globally.

<Sysname> system-view

[Sysname] connection-limit apply global ipv6-policy 12

Related commands

·          connection-limit

·          limit

description

Use description to configure a description for a connection limit policy.

Use undo description to restore the default.

Syntax

description text

undo description

Default

A connection limit policy does not have a description.

Views

IPv4 connection limit policy view

IPv6 connection limit policy view

Predefined user roles

network-admin

Parameters

text: Specifies the connection limit policy description, a case-sensitive string of 1 to 127 characters.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure the description as CenterToA for IPv4 connection limit policy 1.

<Sysname> system-view

[Sysname] connection-limit policy 1

[Sysname-connlmt-policy-1] description CenterToA

Related commands

display connection-limit

display connection-limit

Use display connection-limit to display information about connection limit policies.

Syntax

display connection-limit { ipv6-policy | policy } { policy-id | all }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ipv6-policy: Specifies an IPv6 connection limit policy.

policy: Specifies an IPv4 connection limit policy.

policy-id: Specifies a connection limit policy by its ID. The value range for this argument is 1 to 32.

all: Specifies all connection limit policies.

Examples

# Display information about all IPv4 connection limit policies.

<Sysname> display connection-limit policy all

3 policies in total:

 Policy  Rule     Stat Type  HiThres  LoThres  Rate     ACL

--------------------------------------------------------------------------------

      0     1  Src-Dst-Port     2000     1800    10     3000

           12       Src-Dst      500       45     0     3001

          255            --  1000000   980000     0     2001

 

      1     2      Dst-Port      800      70      0     3010

            3       Src-Dst      100      90      0     3000

           10  Src-Dst-Port       50      45      0     3003

           11           Src      200     200      0     3004

          200           --    500000  498000      0     2002

 

     28     4          Port     1500    1400      0     3100

            5           Dst     3000     280      0     3101

           21       Src-Dst      200     180      0     3102

           25      Src-Port       50      35      0     3200

Description list:

 Policy      Description

--------------------------------------------------------------------------------

      1       IPv4Description1

     28      Description for IPv4 28

# Display information about IPv4 connection limit policy 1.

<Sysname> display connection-limit policy 1

IPv4 connection limit policy 1 has been applied 5 times, and has 5 limit rules.

Description: IPv4Description1

Limit rule list:

 Policy  Rule     Stat Type  HiThres  LoThres     Rate   ACL

--------------------------------------------------------------------------------

      1     2      Dst-Port      800      700     10     3010

            3       Src-Dst      100       90     0      3000

           10  Src-Dst-Port       50       45     0      3003

           11           Src      200      200     0      3004

          200            --   500000   498000     0      2002

 Application list:

     Vlan-interface2

     Global

# Display information about all IPv6 connection limit policies.

<Sysname> display connection-limit ipv6-policy all

2 policies in total:

 Policy  Rule     Stat Type  HiThres  LoThres  Rate     ACL

--------------------------------------------------------------------------------

      3     1       Src-Dst     1000      800    10     3010

            2           Dst      500      450     0     3001

      4     2  Src-Dst-Port      800      700     0     3010

            3           Src      100       90     0     3020

          200            --   100000    89000     0     2005

Description list:

 Policy      Description

--------------------------------------------------------------------------------

      3      IPv6Description3

      4      Description for IPv6 4

# Display information about IPv6 connection limit policy 3.

<Sysname> display connection-limit ipv6-policy 3

IPv6 connection limit policy 3 has been applied 3 times, and has 2 limit rules.

Description: IPv6Description3

Limit rule list:

Policy  Rule     Stat Type  HiThres  LoThres  Rate     ACL

--------------------------------------------------------------------------------

     3     1       Src-Dst     1000      800     0     3010 

           2           Dst      500      450     0     3001

Application list:

    Vlan-interface2

Table 103 Command output

Field

Description

Limit rule list

Connection limit policy information.

Policy

Number of the connection limit policy.

Rule

Number of the connection limit rule.

Stat Type

Statistics types:

·         Src-Dst-PortLimits connections by source IP, destination IP, and service combination.

·         Src-Dst—Limits connections by source IP address and destination IP address combination.

·         Src-Port—Limits connections by source IP and service combination.

·         Dst-Port—Limits connections by destination IP and service combination.

·         Src—Limits connections by source IP address.

·         Dst—Limits connections by destination IP address.

·         Port—Limits connections by service.

·         --—Limits connections not by a specific IP address or service. All connections that match the ACL used by the rule are limited.

HiThres

Upper limit of the connections.

LoThres

Lower limit of the connections.

Rate

Number of connections established per second.

ACL

Number or name of the ACL used by the rule.

Application list

Application list of the connection limit policy, including interface name and Global. Global indicates that the connection limit policy is applied globally.

Description

Connection limit policy description.

Description list

List of connection limit policy descriptions.

 

Related commands

·          connection-limit

·          connection-limit apply

·          connection-limit apply global

·          limit

display connection-limit ipv6-stat-nodes

Use display connection-limit ipv6-stat-nodes to display statistics about IPv6 connections that match connection limit rules globally or on an interface.

Syntax

display connection-limit ipv6-stat-nodes { global | interface interface-type interface-number } [ slot slot-number ] [ destination destination-ip | service-port port-number | source source-ip ] * [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

global: Displays statistics about IPv6 connections that match connection limit rules globally.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the global keyword or specify a virtual interface, such as a VLAN-interface.

destination destination-ip: Specifies a destination by its IP address.

service-port port-number: Specifies a service port by its port number.

source source-ip: Specifies a source by its IP address.

count: Displays only the number of limit rule-based statistics sets. Detailed information about the specified IPv6 connections is not displayed. If you do not specify this keyword, the command displays detailed information about the specified IPv6 connections that match connection limit rules.

Usage guidelines

The statistics for connections that match connection limit rules include the following information:

·          Connection information, including the source/destination IP address, service port, and transport layer protocol of connections.

·          Matching connection limit rules.

·          Number of current connections.

·          Whether or not new connections can be created.

To further filter the output statistics, specify the following options in the command:

·          source source-ip.

·          destination destination-ip.

·          service-port port-number.

For example, if you specify the source source-ip and destination destination-ip combination, this command displays statistics about IPv6 connections that match connection limit rules by source IP address and destination IP address.

If you specify none of the source source-ip, destination destination-ip, and service-port port-number options, this command displays statistics about all IPv6 connections that match connection limit rules.

Examples

# Display statistics about all IPv6 connections that match the connection limit rule on VLAN-interface 10 on IRF member device 1.

<Sysname> display connection-limit ipv6-stat-nodes interface vlan-interface 10 slot 1

Slot 1:

 Src IP address          : 112::2

     VPN instance        : --

 Dst IP address          : Any

     VPN instance        : --

 Tunnel ID               : --

 Service                 : udp/300

 Limit rule ID           : 0(ACL: 3571)

 Sessions threshold Hi/Lo: 3000/2900

 Sessions count          : 2002

 Sessions limit rate     : 0

 New session flag        : Permit

# Display statistics about IPv6 connections that match the connection limit rule on IRF member device 1.

<Sysname> display connection-limit ipv6-stat-nodes global slot 1

Slot 1:

 Src IP address          : Any

     VPN instance        : --

 Dst IP address          : Any

     VPN instance        : --

 Tunnel ID               : --

 Service                 : icmp/0

 Limit rule ID           : 22(ACL: 3666)

 Sessions threshold Hi/Lo: 3500/3000

 Sessions count          : 3100

 Sessions limit rate     : 0

 New session flag        : Permit

# Display the number of limit rule-based statistics sets on VLAN-interface 10 on IRF member device 1.

<Sysname> display connection-limit ipv6-stat-nodes interface vlan-interface 10 slot 1 count

Slot 1:

       Current limit statistic nodes count is 1.

Table 104 Command output

Field

Description

Src IP address

Source IP address.

Dst IP address

Destination IP address.

VPN instance

MPLS L3VPN to which the IP address belongs. Two hyphens (--) indicates that the IP address is on the public network.

This field is not supported in the current software version.

Tunnel ID

ID of the DS-Lite tunnel. Two hyphens (--) indicates that the connection does not belong to a DS-Lite tunnel.

This field is not supported in the current software version.

Service

Protocol name and service port number.

For an unwell-known protocol, this field displays unknown(xx).The cross signs (xx) indicates the protocol number. For the ICMP protocol, the protocol number is the decimal digits that are converted from the hexadecimal contents of the type and code fields.

Limit rule ID

ID of the matched rule. The ACL number of the rule is enclosed in parentheses.

Sessions threshold Hi/Lo

Upper and lower connection limits.

Sessions count

Number of current connections.

Sessions limit rate

Maximum number of connections established per second.

New session flag

Whether or not new connections can be created:

·         PermitNew connections can be created.

·         DenyNew connections cannot be created.

 

Related commands

·          connection-limit apply global ipv6-policy

·          connection-limit apply ipv6-policy

·          connection-limit ipv6-policy

·          limit

display connection-limit statistics

Use display connection-limit statistics to display the connection limit statistics globally or on an interface.

Syntax

display connection-limit statistics { global | interface interface-type interface-number } [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

global: Displays the global connection limit statistics.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the global keyword or specify a virtual interface, such as a VLAN interface.

Examples

# Display the global connection limit statistics on IRF member device 2.

<Sysname> display connection-limit statistics global slot 2

Connection limit statistics (Global, slot 2):

    Dropped IPv4 packets:   74213

    Dropped IPv6 packets:   58174

Table 105 Command output

Field

Description

Dropped IPv4 packet

Number of IPv4 packets that are dropped because the upper connection limit is exceeded when an IPv4 connection limit policy is configured globally or on an interface.

Dropped IPv6 packet

Number of IPv6 packets that are dropped because the upper connection limit is exceeded when an IPv6 connection limit policy is configured globally or on an interface.

 

Related commands

·          connection-limit

·          connection-limit apply

·          connection-limit apply global

·          limit

display connection-limit stat-nodes

Use display connection-limit stat-nodes to display statistics about IPv4 connections that match connection limit rules globally or on an interface.

Syntax

display connection-limit stat-nodes { global | interface interface-type interface-number } [ slot slot-number ] [ destination destination-ip | service-port port-number | source source-ip ] * [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

global: Displays statistics about IPv4 connections that match connection limit rules globally.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the global keyword or specify a virtual interface, such as a VLAN-interface.

destination destination-ip: Specifies a destination by its IP address.

service-port port-number: Specifies a service port by its port number.

source source-ip: Specifies a source by its IP address.

count: Displays only the number of limit rule-based statistics sets. Detailed information about the specified IPv4 connections is not displayed. If you do not specify this keyword, the command displays detailed information about the specified IPv4 connections that match connection limit rules.

Usage guidelines

The statistics for connections that match connection limit rules include the following information:

·          Connection information, including the source/destination IP address, service port, and transport layer protocol of connections.

·          Matching connection limit rules.

·          Number of current connections.

·          Whether or not new connections can be created.

To further filter the output statistics, specify the following options in the command:

·          source source-ip.

·          destination destination-ip.

·          service-port port-number.

For example, if you specify the source source-ip and destination destination-ip combination, this command displays statistics about IPv4 connections that match connection limit rules by source IP address and destination IP address.

If you do not specify any of the source source-ip, destination destination-ip, and service-port port-number options, this command displays statistics about all IPv4 connections that match connection limit rules.

Examples

# Display statistics about IPv4 connections that match the connection limit rule on IRF member device 1.

<Sysname> display connection-limit stat-nodes global slot 1

Slot 1:

 Src IP address          : Any

     VPN instance        : Vpn1

 Dst IP address          : 202.113.16.117

     VPN instance        : Vpn2

 Tunnel ID               : --

 Service                 : icmp/0

 Limit rule ID           : 7(ACL: 3102)

 Sessions threshold Hi/Lo: 4000/3800

 Sessions count          : 1001

 Sessions limit rate     : 0

 New session flag        : Permit

# Display the number of limit rule-based statistics sets on VLAN-interface 10 on IRF member device 1.

<Sysname> display connection-limit stat-nodes interface vlan-interface 10 slot 1 count

Slot 1:

       Current limit statistic nodes count is 1.

# Display the number of limit rule-based statistics sets on IRF member device 1 by source IP address 1.1.1.1.

<Sysname> display connection-limit stat-nodes global slot 1 source 1.1.1.1 count

Slot 1:

       Current limit statistic nodes count is 0.

Table 106 Command output

Field

Description

Src IP address

Source IP address.

Dst IP address

Destination IP address.

VPN instance

MPLS L3VPN to which the IP address belongs. Two hyphens (--) indicates that the IP address is on the public network.

This field is not supported in the current software version.

Tunnel ID

ID of the DS-Lite tunnel. Two hyphens (--) indicates that the connection does not belong to a DS-Lite tunnel.

This field is not supported in the current software version.

Service

Protocol name and service port number.

For an unwell-known protocol, this field displays unknown(xx). The cross signs (xx) represents the protocol number. For the ICMP protocol, the protocol number is the decimal digits that are converted from the hexadecimal contents of the type and code fields.

Sessions threshold Hi/Lo

Upper and lower connection limits.

Sessions count

Number of current connections.

Sessions limit rate

Maximum number of connections established per second.

New session flag

Whether or not new connections can be created:

·         PermitNew connections can be created.

·         DenyNew connections cannot be created.

 

Related commands

·          connection-limit apply global policy

·          connection-limit apply policy

·          connection-limit policy

·          limit

limit

Use limit to configure a connection limit rule.

Use undo limit to remove the specified connection limit rule.

Syntax

In IPv4 connection limit policy view:

limit limit-id acl { acl-number | name acl-name } [ per-destination | per-service | per-source ] * { amount max-amount min-amount | rate rate } * [ description text ]

undo limit limit-id

In IPv6 connection limit policy view:

limit limit-id acl ipv6 { acl-number | name acl-name } [ per-destination | per-service | per-source ] * { amount max-amount min-amount | rate rate } * [ description text ]

undo limit limit-id

Default

No connection limit rule exists in the connection limit policy.

Views

IPv4 connection limit policy view

IPv6 connection limit policy view

Predefined user roles

network-admin

Parameters

limit-id: Specifies a connection limit rule by its ID. The value range for this argument is 1 to 256.

acl: Specifies the ACL that matches the user range. Only the user connections that match the ACL are limited.

ipv6: Specifies an IPv6 ACL. If you do not specify this keyword, an IPv4 ACL is used.

acl-number: Specifies an ACL by its number in the range of 2000 to 3999.

name acl-name: Specifies an ACL by its name.

per-destination: Limits connections by destination IP address.

per-service: Limits connections by service depending on transport layer protocol and service port.

per-source: Limits connections by source IP address.

amount: Limits the number of connections.

max-amount: Specifies the upper connection limit in the range of 1 to 4294967294. When user connections in a range or of a type exceed the upper connection limit, new connections cannot be created.

min-amount: Specifies the lower connection limit in the range of 1 to 4294967294. The lower connection limit cannot be greater than the upper connection limit. New connections cannot be created until the connection number goes below the lower connection limit.

rate: Limits the connection establishment rate.

rate: Specifies the maximum number of connections established per second. The value range is 5 to 10000000.

description text: Specifies a description for the connection limit rule, a case-sensitive string of 1 to 127 characters. By default, a connection limit rule does not have a description.

Usage guidelines

Each connection limit policy can define multiple rules. Each rule must specify the used ACL, rule type, and either of upper/lower connection limit and connection establishment rate limit. In one rule, you can specify one or multiple of the keywords per-destination, per-source, and per-service. For example, if the per-destination and per-source combination is specified, connections are limited by the source IP address and destination IP address. Connections with the same source IP address and destination IP address are the same type.

When you configure a connection limit rule, follow these restrictions and guidelines:

·          Different rules in the same connection limit policy must use different ACLs.

·          If you specify none of the per-destination, per-source, and per-service keywords, all connections that match the specified ACL are limited by the specified value.

·          When the connections established on a device are matched against a connection limit policy, the limit rules in the policy are matched in ascending order of rule ID.

·          When the specified ACL changes, the connections that have been established are limited by the new connection limit policy.

Examples

# Configure connection limit rule 1 for IPv4 connection limit policy 1:

1.        Configure ACL 3000.

<Sysname> system-view

[Sysname] acl advanced 3000

[Sysname-acl-ipv4-adv-3000] rule permit ip source 192.168.0.0 0.0.0.255

[Sysname-acl-ipv4-adv-3000] quit

2.        Limit connections that match ACL 3000 by the source and destination IP addresses, with the upper limit 2000, lower limit 1800, and establishment rate 10 per second.

[Sysname] connection-limit policy 1

[Sysname-connlmt-policy-1] limit 1 acl 3000 per-destination per-source amount 2000 1800 rate 10

3.        Verify that when the connection number exceeds 2000, new connections cannot be established until the connection number goes below 1800. (Details not shown.)

# Configure connection limit rule 2 for IPv6 connection limit policy 12:

1.        Configure ACL 2001.

<Sysname> system-view

[Sysname] acl ipv6 basic 2001

[Sysname-acl-ipv6-basic-2001] rule permit source 2:1::/96

[Sysname-acl-ipv6-basic-2001] quit

2.        Limit connections that match ACL 2001 by the source and destination IP addresses, with the upper limit 200, lower limit 100, and establishment rate 10 per second.

[Sysname] connection-limit ipv6-policy 12

[Sysname-connlmt-ipv6-policy-12] limit 2 acl ipv6 2001 per-destination amount 200 100 rate 10

3.        Verify that when the connection number exceeds 200, new connections cannot be established until the connection number goes below 100. (Details not shown.)

Related commands

·          connection-limit

·          display connection-limit

reset connection-limit statistics

Use reset connection-limit statistics to clear the connection limit statistics globally or on an interface.

Syntax

reset connection-limit statistics { global | interface interface-type interface-number } [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

network-operator

Parameters

global: Clears the global connection limit statistics.

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. The slot-number argument represents the ID of the IRF member device. This option is available only when you specify the global keyword or specify a virtual interface, such as a VLAN interface.

Examples

# Clear the global connection limit statistics on IRF member device 1.

<Sysname> reset connection-limit statistics global slot 1

Related commands

display connection-limit statistics


Attack detection and prevention commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

ack-flood action

Use ack-flood action to specify global actions against ACK flood attacks.

Use undo ack-flood action to restore the default.

Syntax

ack-flood action { drop | logging } *

undo ack-flood action

Default

No global action is specified for ACK flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent ACK packets destined for the victim IP addresses.

logging: Enables logging for ACK flood attack events.

Examples

# Specify drop as the global action against ACK flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] ack-flood action drop

Related commands

·          ack-flood threshold

·          ack-flood detect

·          ack-flood detect non-specific

ack-flood detect

Use ack-flood detect to configure IP address-specific ACK flood attack detection.

Use undo ack-flood detect to remove IP address-specific ACK flood attack detection configuration.

Syntax

ack-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo ack-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific ACK flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering ACK flood attack prevention. The value range is 1 to 1000000 in units of ACK packets sent to the specified IP address per second.

action: Specifies the actions when an ACK flood attack is detected. If no action is specified, the global actions set by the ack-flood action command apply.

drop: Drops subsequent ACK packets destined for the protected IP address.

logging: Enables logging for ACK flood attack events.

none: Takes no action.

Usage guidelines

With ACK flood attack detection configured, the device is in attack detection state. An attack occurs when the device detects that the sending rate of ACK packets to a protected IP address reaches the threshold. The device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure ACK flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] ack-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          ack-flood action

·          ack-flood detect non-specific

·          ack-flood threshold

ack-flood detect non-specific

Use ack-flood detect non-specific to enable global ACK flood attack detection.

Use undo ack-flood detect non-specific to restore the default.

Syntax

ack-flood detect non-specific

undo ack-flood detect non-specific

Default

Global ACK flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global ACK flood attack detection applies to all IP addresses except those specified by the ack-flood detect command. The global detection uses the global trigger threshold set by the ack-flood threshold command and global actions specified by the ack-flood action command.

Examples

# Enable global ACK flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] ack-flood detect non-specific

Related commands

·          ack-flood action

·          ack-flood detect

·          ack-flood threshold

ack-flood threshold

Use ack-flood threshold to set the global threshold for triggering ACK flood attack prevention.

Use undo ack-flood threshold to restore the default.

Syntax

ack-flood threshold threshold-value

undo ack-flood threshold

Default

The global threshold is 1000 for triggering ACK flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of ACK packets sent to an IP address per second.

Usage guidelines

The device applies the global threshold to global ACK flood attack detection.

Adjust the threshold according to the application scenarios. If the number of ACK packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering ACK flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] ack-flood threshold 100

Related commands

·          ack-flood action

·          ack-flood detect

·          ack-flood detect non-specific

attack-defense apply policy

Use attack-defense apply policy to apply an attack defense policy to an interface.

Use undo attack-defense apply policy to remove the attack defense policy application.

Syntax

attack-defense apply policy policy-name

undo attack-defense apply policy

Default

No attack defense policy is applied to an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

Usage guidelines

An interface can have only one attack defense policy applied. If you use this command for an interface multiple times, the most recent configuration takes effect.

An attack defense policy can be applied to multiple interfaces.

Examples

# Apply the attack defense policy atk-policy-1 to interface VLAN-interface 200.

<Sysname> system-view

[Sysname] interface vlan-interface 200

[Sysname-Vlan-interface200] attack-defense apply policy atk-policy-1

Related commands

·          attack-defense policy

·          display attack-defense policy

attack-defense local apply policy

Use attack-defense local apply policy to apply an attack defense policy to the device.

Use undo attack-defense local apply policy to restore the default.

Syntax

attack-defense local apply policy policy-name

undo attack-defense local apply policy

Default

No attack defense policy is applied to the device.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

Usage guidelines

An attack defense policy applied to the device itself detects packets destined for the device and prevents attacks targeted at the device.

Applying an attack defense policy to the device can improve the efficiency of processing attack packets destined for the device.

Each device can have only one attack defense policy applied. If you use this command multiple times, the most recent configuration takes effect.

An attack defense policy can be applied to the device itself and to multiple interfaces.

If a device and its interfaces have attack defense policies applied, a packet destined for the device is processed as follows:

1.        The policy applied to the receiving interface processes the packet.

2.        If the packet is not dropped by the receiving interface, the policy applied to the device processes the packet.

Examples

# Apply the attack defense policy atk-policy-1 to the device.

<Sysname> system-view

[Sysname] attack-defense local apply policy atk-policy-1

Related commands

·          attack-defense policy

·          display attack-defense policy

attack-defense login reauthentication-delay

Use attack-defense login reauthentication-delay to enable the login delay feature.

Use undo attack-defense login reauthentication-delay to restore the default.

Syntax

attack-defense login reauthentication-delay seconds

undo attack-defense login reauthentication-delay

Default

The login delay feature is disabled. The device does not delay accepting a login request from a user who has failed a login attempt.

Views

System view

Predefined user roles

network-admin

Parameters

seconds: Sets the delay period in seconds, in the range of 4 to 60.

Usage guidelines

The login delay feature delays the device to accept a login request from a user after the user fails a login attempt.

This feature can slow down login dictionary attacks.

Examples

# Enable the login delay feature and set the delay period to 5 seconds.

<Sysname> system-view

[Sysname] attack-defense login reauthentication-delay 5

attack-defense policy

Use attack-defense policy to create an attack defense policy and enter attack defense policy view.

Use undo attack-defense policy to remove an attack defense policy.

Syntax

attack-defense policy policy-name

undo attack-defense policy policy-name

Default

No attack defense policy exists.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Assigns a name to the attack defense policy. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

Examples

# Create the attack defense policy atk-policy-1 and enter its view.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1]

Related commands

·          attack-defense apply policy

·          display attack-defense policy

attack-defense signature log non-aggregate

Use attack-defense signature log non-aggregate to disable log aggregation for single-packet attack events.

Use undo attack-defense signature log non-aggregate to restore the default.

Syntax

attack-defense signature log non-aggregate

undo attack-defense signature log non-aggregate

Default

Log aggregation is enabled for single-packet attack events.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Log aggregation aggregates all logs generated during a period of time and sends one log. The logs with the same attributes for the following items can be aggregated:

·          Interface where the attack is detected.

·          Attack type.

·          Attack defense action.

·          Source and destination IP addresses.

H3C recommends that you not disable log aggregation. A large number of logs will consume the display resources of the console.

Examples

# Disable log aggregation for single-packet attack events.

<Sysname> system-view

[Sysname] attack-defense signature log non-aggregate

Related commands

signature detect

attack-defense tcp fragment enable

Use attack-defense tcp fragment enable to enable TCP fragment attack prevention.

Use undo attack-defense tcp fragment enable to disable TCP fragment attack prevention.

Syntax

attack-defense tcp fragment enable

undo attack-defense tcp fragment enable

Default

TCP fragment attack prevention is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command enables the device to drop attack TCP fragments to prevent TCP fragment attacks that the packet filter cannot detect. As defined in RFC 1858, attack TCP fragments refer to the following TCP fragments:

·          First fragments in which the TCP header is smaller than 20 bytes.

·          Non-first fragments with a fragment offset of 8 bytes (FO=1).

TCP fragment attack prevention takes precedence over single-packet attack prevention. When both are used, incoming TCP packets are processed first by TCP fragment attack prevention and then by the single-packet attack defense policy.

Examples

# Enable TCP fragment attack prevention.

<Sysname> System-view

[Sysname] attack-defense tcp fragment enable

display attack-defense flood statistics ip

Use display attack-defense flood statistics ip to display flood attack detection and prevention statistics for a protected IPv4 address.

Syntax

display attack-defense { ack-flood | dns-flood | fin-flood | flood | http-flood | icmp-flood | rst-flood | syn-ack-flood | syn-flood | udp-flood } statistics ip [ ip-address ] [ interface interface-type interface-number [ slot slot-number ] | local [ slot slot-number ] ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ack-flood: Specifies ACK flood attack.

dns-flood: Specifies DNS flood attack.

fin-flood: Specifies FIN flood attack.

flood: Specifies all IPv4 flood attacks.

http-flood: Specifies HTTP flood attack.

icmp-flood: Specifies ICMP flood attack.

rst-flood: Specifies RST flood attack.

syn-ack-flood: Specifies SYN-ACK flood attack.

syn-flood: Specifies SYN flood attack.

udp-flood: Specifies UDP flood attack.

ip-address: Specifies an IPv4 address. If you do not specify an IPv4 address, this command displays flood attack detection and prevention statistics for all protected IPv4 addresses.

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays IPv4 flood attack detection and prevention statistics for all member devices.

count: Displays the number of matching protected IPv4 addresses.

Usage guidelines

The device collects statistics about protected IP addresses for flood attack detection and prevention. The attackers' IP addresses are not recorded.

If the interface and local parameters are not specified, this command display IPv4 flood attack detection and prevention statistics on all interfaces and the device.

Examples

# Display flood attack detection and prevention statistics for all IPv4 addresses.

<Sysname> display attack-defense flood statistics ip

<Sysname> display attack-defense flood statistics ip

slot 1:

IPv6 address    VPN    Detected on  Detect type    State    PPS    Dropped

2000::1011      --     Vlan-int2    SYN-FLOOD      Normal   0      4294967295

1::2            --     Vlan-int2    DNS-FLOOD      Normal   1000   111111111

1::3            --     Vlan-int3    SYN-ACK-FLOOD  Normal   1000   222222222

1::4            --     Vlan-int4    ACK-FLOOD      Normal   1000   111111111

1::5            --     Vlan-int5    SYN-FLOOD      Normal   1000   22222222

# Display the number of IPv4 addresses that are protected against flood attacks.

<Sysname> display attack-defense flood statistics ip count

Slot 1:

Totally 2 flood entries.

Table 107 Command output

Field

Description

IP address

Protected IPv4 address.

VPN

MPLS L3VPN instance to which the protected IPv4 address belongs. If the protected IPv4 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Detect type

Type of the detected flood attack.

State

Whether the interface or device is attacked:

·         Attacked.

·         Normal.

PPS

Number of packets sent to the IPv4 address per second.

Dropped

Number of attack packets dropped by the interface or the device.

Totally 2 flood entries

Total number of IPv4 addresses that are protected.

 

display attack-defense flood statistics ipv6

Use display attack-defense flood statistics ipv6 to display flood attack detection and prevention statistics for a protected IPv6 address.

Syntax

display attack-defense { ack-flood | dns-flood | fin-flood | flood | http-flood | icmpv6-flood | rst-flood | syn-ack-flood | syn-flood | udp-flood } statistics ipv6 [ ipv6-address ] [ interface interface-type interface-number [ slot slot-number ] | local [ slot slot-number ] ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ack-flood: Specifies ACK flood attack.

dns-flood: Specifies DNS flood attack.

fin-flood: Specifies FIN flood attack.

flood: Specifies all IPv6 flood attacks.

http-flood: Specifies HTTP flood attack.

icmpv6-flood: Specifies ICMPv6 flood attack.

rst-flood: Specifies RST flood attack.

syn-ack-flood: Specifies SYN-ACK flood attack.

syn-flood: Specifies SYN flood attack.

udp-flood: Specifies UDP flood attack.

ipv6-address: Specifies an IPv6 address. If you do not specify an IPv6 address, this command displays flood attack detection and prevention statistics for all protected IPv6 addresses.

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays IPv6 flood attack detection and prevention statistics for all member devices.

count: Displays the number of matching protected IPv6 addresses.

Usage guidelines

The device collects statistics about protected IP addresses for flood attack detection and prevention. The attackers' IP addresses are not recorded.

If the interface and local parameters are not specified, this command display IPv6 flood attack detection and prevention statistics on all interfaces and the device.

Examples

# Display flood attack detection and prevention statistics for all IPv6 addresses.

<Sysname> display attack-defense flood statistics ipv6

Slot 1:

IPv6 address    VPN         Detected on  Detect type   State    PPS    Dropped

2000::1011      a0123456789 Vlan-int2    SYN-FLOOD     Normal   0      4294967295

1::2            1222232     Vlan-int2    DNS-FLOOD     Normal   1000   111111111

1::3            --          Vlan-int3    SYN-ACK-FLOOD Normal   1000   222222222

1::4            --          Vlan-int4    ACK-FLOOD     Normal   1000   111111111

1::5            --          Vlan-int5    SYN-FLOOD     Normal   1000   22222222

# Display the number of IPv6 addresses that are protected against flood attacks.

<Sysname> display attack-defense flood statistics ipv6 count

Slot 1:

Totally 5 flood entries.

Table 108 Command output

Field

Description

IPv6 address

Protected IPv6 address.

VPN

MPLS L3VPN instance to which the protected IPv6 address belongs. If the protected IPv6 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Detect type

Type of the detected flood attack.

State

Whether the interface or device is attacked:

·         Attacked.

·         Normal.

PPS

Number of packets sent to the IPv6 address per second.

Dropped

Number of attack packets dropped by the interface or the device.

Totally 5 flood entries

Total number of IPv6 addresses that are protected.

 

display attack-defense policy

Use display attack-defense policy to display attack defense policy configuration.

Syntax

display attack-defense policy [ policy-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-). If no attack defense policy is specified, this command displays brief information about all attack defense policies.

Usage guidelines

This command output includes the following configuration information about an attack defense policy:

·          Whether attack detection is enabled.

·          Attack prevention actions.

·          Attack prevention trigger thresholds.

Examples

# Display the configuration of attack defense policy abc.

<Sysname> display attack-defense policy abc

          Attack-defense Policy Information

--------------------------------------------------------------------------

Policy name                        : abc

Applied list                       : Local

                                     Vlan1

--------------------------------------------------------------------------

Exempt IPv4 ACL:                  : Not configured

Exempt IPv6 ACL:                  : vip

--------------------------------------------------------------------------

  Actions: CV-Client verify  BS-Block source  L-Logging  D-Drop  N-None

 

Signature attack defense configuration:

Signature name                     Defense      Level             Actions

Fragment                           Enabled      Info              L

Impossible                         Enabled      Info              L

Teardrop                           Disabled     Info              L

Tiny fragment                      Disabled     Info              L

IP option abnormal                 Disabled     Info              L

Smurf                              Disabled     Info              N

Traceroute                         Disabled     Medium            L,D

Ping of death                      Disabled     Low               L

Large ICMP                         Disabled     Medium            L,D

  Max length                       4000 bytes

Large ICMPv6                       Disabled     Low               L

  Max length                       4000 bytes

TCP invalid flags                  Disabled     medium            L,D

TCP null flag                      Disabled     Low               L

TCP all flags                      Enabled      Info              L

TCP SYN-FIN flags                  Disabled     Info              L

TCP FIN only flag                  Enabled      Info              L

TCP Land                           Disabled     Info              L

Winnuke                            Disabled     Info              L

UDP Bomb                           Disabled     Info              L

UDP Snork                          Disabled     Info              L

UDP Fraggle                        Enabled      Info              L

IP option record route             Disabled     Info              L

IP option internet timestamp       Enabled      Info              L

IP option security                 Disabled     Info              L

IP option loose source routing     Enabled      Info              L

IP option stream ID                Disabled     Info              L

IP option strict source routing    Disabled     Info              L

IP option route alert              Disabled     Info              L

ICMP echo request                  Disabled     Info              L

ICMP echo reply                    Disabled     Info              L

ICMP source quench                 Disabled     Info              L

ICMP destination unreachable       Enabled      Info              L

ICMP redirect                      Enabled      Info              L

ICMP time exceeded                 Enabled      Info              L

ICMP parameter problem             Disabled     Info              L

ICMP timestamp request             Disabled     Info              L

ICMP timestamp reply               Disabled     Info              L

ICMP information request           Disabled     Info              L

ICMP information reply             Disabled     Medium            L,D

ICMP address mask request          Disabled     Medium            L,D

ICMP address mask reply            Disabled     Medium            L,D

ICMPv6 echo request                Enabled      Medium            L,D

ICMPv6 echo reply                  Disabled     Medium            L,D

ICMPv6 group membership query      Disabled     Medium            L,D

ICMPv6 group membership report     Disabled     Medium            L,D

ICMPv6 group membership reduction  Disabled     Medium            L,D

ICMPv6 destination unreachable     Enabled      Medium            L,D

ICMPv6 time exceeded               Enabled      Medium            L,D

ICMPv6 parameter problem           Disabled     Medium            L,D

ICMPv6 packet too big              Disabled     Medium            L,D

 

Scan attack defense configuration:

 Defense: Disabled

 Level: Medium

 Actions: L

 

Flood attack defense configuration:

Flood type      Global thres(pps)  Global actions  Service ports   Non-specific

SYN flood       1000               -               -               Disabled

ACK flood       1000               -               -               Enabled

SYN-ACK flood   1000               -               -               Disabled

RST flood       200                -               -               Enabled

FIN flood       1000               L,D             -               Disabled

UDP flood       1000               -               -               Disabled

ICMP flood      1000               -               -               Disabled

ICMPv6 flood    1000               D               -               Disabled

DNS flood       10000              -               30,61 to 62     Enabled

HTTP flood      10000              -               80,8080         Enabled

 

Flood attack defense for protected IP addresses:

 Address                 VPN instance   Flood type    Thres(pps)  Actions Ports

 1::1                    --             FIN-FLOOD     10          L,D     -

 1::1                    --             RST-FLOOD     -           L       -

 2013:2013:2013:2013:    --             DNS-FLOOD     100         L       53

 2013:2013:2013:2013

Table 109 Command output

Field

Description

Policy name

Name of the attack defense policy.

Applied list

List of objects to which the attack defense policy is applied. If the policy is applied to the local device, this field displays Local.

Exempt IPv4 ACL

IPv4 ACL used for attack detection exemption.

Exempt IPv6 ACL

IPv6 ACL used for attack detection exemption.

Actions

Attack prevention actions:

·         CV—Client verification. The device does not support this action in the current software version.

·         BS—Blocking sources. The device does not support this action in the current software version.

·         L—Logging.

·         D—Dropping packets.

·         N—No action.

Signature attack defense configuration

Configuration information about single-packet attack detection and prevention.

Signature name

Type of the single-packet attack.

Defense

Whether attack detection is enabled.

Level

Level of the single-packet attack, info, low, medium, or high.

Actions

Prevention actions against the single-packet attack:

·         L—Logging.

·         D—Dropping packets.

·         N—No action.

Scan attack defense configuration

Configuration information about scanning attack detection and prevention.

Defense

Whether attack detection is enabled.

Level

Level of the scanning attack detection, low, medium, or high.

Actions

Prevention actions against the scanning attack:

·         D—Dropping packets.

·         L—Logging.

Flood attack defense configuration

Configuration information about flood attack detection and prevention.

Flood type

Type of the flood attack:

·         ACK flood.

·         DNS flood.

·         FIN flood.

·         ICMP flood.

·         ICMPv6 flood.

·         SYN flood.

·         SYN-ACK flood.

·         UDP flood.

·         RST flood.

·         HTTP flood.

Global thres (pps)

Global threshold for triggering the flood attack prevention, in units of packets sent to an IP address per second. The default is 1000 pps.

Global actions

Global prevention actions against the flood attack:

·         D—Dropping packets.

·         L—Logging.

·         -—Not configured.

Service ports

Ports that are protected against the flood attack. This field is displays port numbers only for the DNS and HTTP flood attacks. For other flood attacks, this field displays a hyphen (-).

Non-specific

Whether the global flood attack detection is enabled.

Flood attack defense for protected IP addresses

Configuration of the IP address-specific flood attack detection and prevention.

Address

Protected IP address.

VPN instance

MPLS L3VPN instance to which the protected IP address belongs. If no MPLS L3VPN instance is specified, this field displays a hyphen (-).

Thres(pps)

Threshold for triggering the flood attack prevention, in units of packets sent to the IP address per second. If no threshold is specified, this field displays 1000.

Actions

Prevention actions against the flood attack:

·         D—Dropping packets.

·         L—Logging.

·         N—No action.

Ports

Ports that are protected against the flood attack. This field displays port numbers only for the DNS and HTTP flood attacks. For other flood attacks, this field displays a hyphen (-).

 

# Display brief information about all attack defense policies.

<Sysname> display attack-defense policy

           Attack-defense Policy Brief Information

------------------------------------------------------------

Policy Name                        Applied list

Atk-policy-1                       Local

                                   Vlan100

                                   Vlan200

P2                                 None

P123                               Vlan200

Table 110 Command output

Field

Description

Policy name

Name of the attack defense policy.

Applied list

List of objects to which the attack defense policy is applied. If the policy is applied to the local device, this field displays Local.

 

Related commands

attack-defense policy

display attack-defense policy ip

Use display attack-defense policy ip to display information about IPv4 addresses protected by flood attack detection and prevention.

Syntax

display attack-defense policy policy-name { ack-flood | dns-flood | fin-flood | flood | http-flood | icmp-flood | rst-flood | syn-ack-flood | syn-flood | udp-flood } ip [ ip-address ] [ slot slot-number ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

ack-flood: Specifies ACK flood attack.

dns-flood: Specifies DNS flood attack.

fin-flood: Specifies FIN flood attack.

flood: Specifies all IPv4 flood attacks.

http-flood: Specifies HTTP flood attack.

icmp-flood: Specifies ICMP flood attack.

rst-flood: Specifies RST flood attack.

syn-ack-flood: Specifies SYN-ACK flood attack.

syn-flood: Specifies SYN flood attack.

udp-flood: Specifies UDP flood attack.

ip-address: Specifies a protected IPv4 address. If you do not specify an IPv4 address, this command displays information about all protected IPv4 addresses.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays information about IPv4 addresses protected by flood attack detection and prevention for all IRF member devices.

count: Displays the number of matching IPv4 addresses protected by flood attack detection and prevention.

Examples

# Display information about all IPv4 addresses protected by flood attack detection and prevention in the attack defense policy abc.

<Sysname> display attack-defense policy abc flood ip

Slot 1:

IP address      VPN instance     Type          Rate threshold(PPS) Dropped

123.123.123.123 --               SYN-ACK-FLOOD 1000                4294967295

201.55.7.45     --               ICMP-FLOOD    100                 10

192.168.11.5    --               DNS-FLOOD     23                  100

# Display the number of IPv4 addresses protected by flood attack detection and prevention in the attack defense policy abc.

<Sysname> display attack-defense policy abc flood ip count

Slot 1:

Totally 3 flood protected IP addresses.

Table 111 Command output

Field

Description

Totally 3 flood protected IP addresses

Total number of the IPv4 addresses protected by flood attack detection and prevention.

IP address

Protected IPv4 address.

VPN instance

MPLS L3VPN instance to which the protected IPv4 address belongs. If the protected IPv4 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Type

Type of the flood attack.

Rate threshold(PPS)

Threshold for triggering the flood attack prevention, in units of packets sent to the IP address per second. If no rate threshold is set, this field displays 1000.

Dropped

Number of dropped attack packets. If the prevention action is logging, this field displays 0.

 

display attack-defense policy ipv6

Use display attack-defense policy ipv6 to display information about IPv6 addresses protected by flood attack detection and prevention.

Syntax

display attack-defense policy policy-name { ack-flood | dns-flood | fin-flood | flood | http-flood | icmpv6-flood | rst-flood | syn-ack-flood | syn-flood | udp-flood } ipv6 [ ipv6-address ] [ slot slot-number ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

ack-flood: Specifies ACK flood attack.

dns-flood: Specifies DNS flood attack.

fin-flood: Specifies FIN flood attack.

flood: Specifies all IPv4 flood attacks.

http-flood: Specifies HTTP flood attack.

icmpv6-flood: Specifies ICMPv6 flood attack.

rst-flood: Specifies RST flood attack.

syn-ack-flood: Specifies SYN-ACK flood attack.

syn-flood: Specifies SYN flood attack.

udp-flood: Specifies UDP flood attack.

ipv6-address: Specifies a protected IPv6 address. If you do not specify an IPv6 address, this command displays information about all protected IPv6 addresses.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays information about IPv6 addresses protected by flood attack detection and prevention for all IRF member devices.

count: Displays the number of matching IPv6 addresses protected by flood attack detection and prevention.

Examples

# Display information about all IPv6 addresses protected by flood attack detection and prevention in the attack defense policy abc.

<Sysname> display attack-defense policy abc flood ipv6

Slot 1:

IPv6 address    VPN instance     Type          Rate threshold(PPS) Dropped

2013::127f      --               SYN-ACK-FLOOD 1000                4294967295

2::5            --               ACK-FLOOD     100                 10

1::5            --               ACK-FLOOD     100                 23

# Display the number of IPv6 addresses protected by flood attack detection and prevention in the attack defense policy abc.

<Sysname> display attack-defense policy abc flood ipv6 count

Slot 1:

Totally 3 flood protected IP addresses.

Table 112 Command output

Field

Description

Totally 3 flood protected IP addresses

Total number of the IPv6 addresses protected by flood attack detection and prevention.

IPv6 address

Protected IPv6 address.

VPN instance

MPLS L3VPN instance to which the protected IPv6 address belongs. If the protected IPv6 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Type

Type of the flood attack.

Rate threshold(PPS)

Threshold for triggering the flood attack prevention, in units of packets sent to the IPv6 address per second. If no rate threshold is set, this field displays 1000.

Dropped

Number of dropped attack packets. If the prevention action is logging, this field displays 0.

 

display attack-defense scan attacker ip

Use display attack-defense scan attacker ip to display information about IPv4 scanning attackers.

Syntax

display attack-defense scan attacker ip [ interface interface-type interface-number [ slot slot-number ] | local ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays information about IPv4 scanning attackers for all member devices.

count: Displays the number of matching IPv4 scanning attackers.

Usage guidelines

If no parameter is specified, this command displays information about all IPv4 scanning attackers.

Examples

# Display information about all IPv4 scanning attackers.

<Sysname> display attack-defense scan attacker ip

Slot 1:

IP addr(DslitePeer)   VPN instance     Protocol      Detected on   Duration(min)

192.168.31.2(--)      --               TCP           Vlan-int1    1284

2.2.2.3(--)           --               UDP           Vlan-int1    23

# Display the number of IPv4 scanning attackers.

<Sysname> display attack-defense scan attacker ip count

Slot 1:

Totally 3 attackers.

Table 113 Command output

Field

Description

Totally 3 attackers

Total number of IPv4 scanning attackers.

IP addr(DslitePeer)

The IP addr field displays the IPv4 address of the attacker.

The DslitePeer field displays the DS-Lite tunnel source IPv6 address of the attacker in a DS-Lite network. In other situations, this field displays hyphens (--).

VPN instance

MPLS L3VPN instance to which the attacker's IPv4 address belongs. If the IPv4 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Protocol

Name of the protocol.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Duration(min)

How long the attack lasts, in minutes.

 

Related commands

·          display attack-defense scan victim ip

·          scan detect

display attack-defense scan attacker ipv6

Use display attack-defense scan attacker ipv6 to display information about IPv6 scanning attackers.

Syntax

display attack-defense scan attacker ipv6 [ interface interface-type interface-number [ slot slot-number ] | local ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays information about IPv6 scanning attackers for all member devices.

count: Displays the number of matching IPv6 scanning attackers.

Usage guidelines

If no parameter is specified, this command displays information about all IPv6 scanning attackers.

Examples

# Display information about all IPv6 scanning attackers.

<Sysname> display attack-defense scan attacker ipv6

Slot 1:

IPv6 address      VPN instance     Protocol     Detected on      Duration(min)

2013::2           --               TCP          Vlan-int1    1234

1230::22          --               UDP          Vlan-int1    10

# Display the number of IPv6 scanning attackers.

<Sysname> display attack-defense scan attacker ipv6 count

Slot 1:

Totally 3 attackers.

Table 114 Command output

Field

Description

Totally 3 attackers

Total number of IPv6 scanning attackers.

IPv6 address

IPv6 address of the attacker.

VPN instance

MPLS L3VPN instance to which the attacker IPv6 address belongs. If the attacker IPv6 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Protocol

Name of the protocol.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Duration(min)

How long the attack lasts, in minutes.

 

Related commands

·          display attack-defense scan victim ipv6

·          scan detect

display attack-defense scan victim ip

Use display attack-defense scan victim ip to display information about IPv4 scanning attack victims.

Syntax

display attack-defense scan victim ip [ interface interface-type interface-number [ slot slot-number ] | local ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays information about IPv4 scanning attack victims for all member devices.

count: Displays the number of matching IPv4 scanning attack victims.

Usage guidelines

If no parameter is specified, this command displays information about all IPv4 scanning attack victims.

Examples

# Display information about all IPv4 scanning attack victims.

<Sysname> display attack-defense scan victim ip

Slot 1:

IP address      VPN instance      Protocol      Detected on        Duration(min)

192.168.31.2    --                TCP           Vlan-int1          21

2.2.2.3         --                UDP           Vlan-int1          1234

# Display the number of IPv4 scanning attack victims.

<Sysname> display attack-defense scan victim ip count

Slot 1:

Totally 3 victim IP addresses.

Table 115 Command output

Field

Description

Totally 3 victim IP addresses

Total number of IPv4 scanning attack victims.

IP address

IPv4 address of the victim.

VPN instance

MPLS L3VPN instance to which the victim IPv4 address belongs. If the victim IPv4 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Protocol

Name of the protocol.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Duration(min)

How long the attack lasts, in minutes.

 

Related commands

·          display attack-defense scan attacker ip

·          scan detect

display attack-defense scan victim ipv6

Use display attack-defense scan victim ipv6 to display information about IPv6 scanning attack victims.

Syntax

display attack-defense scan victim ipv6 [ interface interface-type interface-number [ slot slot-number ] | local ] [ count ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number.

local: Specifies the device.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify the device or a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this command displays information about IPv6 scanning attack victims for all member devices.

count: Displays the number of matching IPv6 scanning attack victims.

Usage guidelines

If no parameter is specified, this command displays information about all IPv6 scanning attack victims.

Examples

# Display information about all IPv6 scanning attack victims.

<Sysname> display attack-defense scan victim ipv6

Slot 1:

IPv6 address      VPN instance     Protocol      Detected on      Duration(min)

2013::2           --               TCP           Vlan-int1        210

1230::22          --               UDP           Vlan-int1        13

# Display the number of IPv6 scanning attack victims.

<Sysname> display attack-defense scan victim ipv6 count

Slot 1:

Totally 3 victim IP addresses.

Table 116 Command output

Field

Description

Totally 3 victim IP addresses

Total number of IPv6 scanning attack victims.

IPv6 address

IPv6 address of the victim.

VPN instance

MPLS L3VPN instance to which the victim IPv6 address belongs. If the victim IPv6 address is on the public network, this field displays hyphens (--).

The device does not support this field in the current software version.

Protocol

Name of the protocol.

Detected on

Where the attack is detected, on the device (Local) or an interface.

Duration(min)

How long the attack lasts, in minutes.

 

Related commands

·          display attack-defense scan attacker ipv6

·          scan detect

display attack-defense statistics interface

Use display attack-defense statistics interface to display attack detection and prevention statistics on an interface.

Syntax

display attack-defense statistics interface interface-type interface-number [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its member ID. This option is available only when you specify a global interface, such as a VLAN interface or tunnel interface. If you do not specify a member device, this commands displays attack detection and prevention statistics for all member devices.

Examples

# Display attack detection and prevention statistics on interface VLAN-interface 200 for the member device in slot 1.

<Sysname> display attack-defense statistics interface vlan-interface 200 slot 1

Attack policy name: abc

Slot 1:

Scan attack defense statistics:

 AttackType                          AttackTimes Dropped

 Port scan                           2           23

 IP sweep                            3           33

 Distribute port scan                1           10

Flood attack defense statistics:

 AttackType                          AttackTimes Dropped

 SYN flood                           1           0

 ACK flood                           1           0

 SYN-ACK flood                       3           5000

 RST flood                           2           0

 FIN flood                           2           0

 UDP flood                           1           0

 ICMP flood                          1           0

 ICMPv6 flood                        1           0

 DNS flood                           1           0

 HTTP flood                          1           0

Signature attack defense statistics:

 AttackType                          AttackTimes Dropped

 IP option record route              1           100

 IP option security                  2           0

 IP option stream ID                 3           0

 IP option internet timestamp        4           1

 IP option loose source routing      5           0

 IP option strict source routing     6           0

 IP option route alert               3           0

 Fragment                            1           0

 Impossible                          1           1

 Teardrop                            1           1

 Tiny fragment                       1           0

 IP options abnormal                 3           0

 Smurf                               1           0

 Ping of death                       1           0

 Traceroute                          1           0

 Large ICMP                          1           0

 TCP NULL flag                       1           0

 TCP all flags                       1           0

 TCP SYN-FIN flags                   1           0

 TCP FIN only flag                   1           0

 TCP invalid flag                    1           0

 TCP Land                            1           0

 Winnuke                             1           0

 UDP Bomb                            1           0

 Snork                               1           0

 Fraggle                             1           0

 Large ICMPv6                        1           0

 ICMP echo request                   1           0

 ICMP echo reply                     1           0

 ICMP source quench                  1           0

 ICMP destination unreachable        1           0

 ICMP redirect                       2           0

 ICMP time exceeded                  3           0

 ICMP parameter problem              4           0

 ICMP timestamp request              5           0

 ICMP timestamp reply                6           0

 ICMP information request            7           0

 ICMP information reply              4           0

 ICMP address mask request           2           0

 ICMP address mask reply             1           0

 ICMPv6 echo request                 1           1

 ICMPv6 echo reply                   1           1

 ICMPv6 group membership query       1           0

 ICMPv6 group membership report      1           0

 ICMPv6 group membership reduction   1           0

 ICMPv6 destination unreachable      1           0

 ICMPv6 time exceeded                1           0

 ICMPv6 parameter problem            1           0

 ICMPv6 packet too big               1           0

Table 117 Command output

Field

Description

AttackType

Type of the attack.

AttackTimes

Number of times that the attack occurred.

Dropped

Number of dropped packets.

 

display attack-defense statistics local

Use display attack-defense statistics local to display attack detection and prevention statistics for the device.

Syntax

display attack-defense statistics local [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays attack detection and prevention statistics for all IRF member devices.

Examples

# Display attack detection and prevention statistics for the device.

<Sysname> display attack-defense statistics local

Attack policy name: abc

Slot 1:

Scan attack defense statistics:

 AttackType                          AttackTimes Dropped

 Port scan                           2           23

 IP sweep                            3           33

 Distribute port scan                1           10

Flood attack defense statistics:

 AttackType                          AttackTimes Dropped

 SYN flood                           1           0

 ACK flood                           1           0

 SYN-ACK flood                       3           5000

 RST flood                           2           0

 FIN flood                           2           0

 UDP flood                           1           0

 ICMP flood                          1           0

 ICMPv6 flood                        1           0

 DNS flood                           1           0

 HTTP flood                          1           0

Signature attack defense statistics:

 AttackType                          AttackTimes Dropped

 IP option record route              1           100

 IP option security                  2           0

 IP option stream ID                 3           0

 IP option internet timestamp        4           1

 IP option loose source routing      5           0

 IP option strict source routing     6           0

 IP option route alert               3           0

 Fragment                            1           0

 Impossible                          1           1

 Teardrop                            1           1

 Tiny fragment                       1           0

 IP options abnormal                 3           0

 Smurf                               1           0

 Ping of death                       1           0

 Traceroute                          1           0

 Large ICMP                          1           0

 TCP NULL flag                       1           0

 TCP all flags                       1           0

 TCP SYN-FIN flags                   1           0

 TCP FIN only flag                   1           0

 TCP invalid flag                    1           0

 TCP Land                            1           0

 Winnuke                             1           0

 UDP Bomb                            1           0

 Snork                               1           0

 Fraggle                             1           0

 Large ICMPv6                        1           0

 ICMP echo request                   1           0

 ICMP echo reply                     1           0

 ICMP source quench                  1           0

 ICMP destination unreachable        1           0

 ICMP redirect                       2           0

 ICMP time exceeded                  3           0

 ICMP parameter problem              4           0

 ICMP timestamp request              5           0

 ICMP timestamp reply                6           0

 ICMP information request            7           0

 ICMP information reply              4           0

 ICMP address mask request           2           0

 ICMP address mask reply             1           0

 ICMPv6 echo request                 1           1

 ICMPv6 echo reply                   1           1

 ICMPv6 group membership query       1           0

 ICMPv6 group membership report      1           0

 ICMPv6 group membership reduction   1           0

 ICMPv6 destination unreachable      1           0

 ICMPv6 time exceeded                1           0

 ICMPv6 parameter problem            1           0

 ICMPv6 packet too big               1           0

Table 118 Command output

Field

Description

AttackType

Type of the attack.

AttackTimes

Number of times that the attack occurred.

Dropped

Number of dropped packets.

 

Related commands

reset attack-defense statistics local

dns-flood action

Use dns-flood action to specify global actions against DNS flood attacks.

Use undo dns-flood action to restore the default.

Syntax

dns-flood action { drop | logging } *

undo dns-flood action

Default

No global action is specified for DNS flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent DNS packets destined for the victim IP addresses.

logging: Enables logging for DNS flood attack events.

Examples

# Specify drop as the global action against DNS flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood action drop

Related commands

·          dns-flood detect

·          dns-flood detect non-specific

·          dns-flood threshold

dns-flood detect

Use dns-flood detect to configure IP address-specific DNS flood attack detection.

Use undo dns-flood detect to remove the IP address-specific DNS flood attack detection configuration.

Syntax

dns-flood detect { ip ip-address | ipv6 ipv6-address } [ port port-list ] [ threshold threshold-value ] [ action { { drop | logging } *| none } ]

undo dns-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific DNS flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

port port-list: Specifies a space-separated list of up to 65535 port number items. Each item specifies a port by its port number or a range of ports in the form of start-port-number to end-port-number. The end-port-number cannot be smaller than the start-port-number. If you do not specify this option, the global ports apply.

threshold threshold-value: Sets the threshold for triggering DNS flood attack prevention. The value range is 1 to 1000000 in units of DNS packets sent to the specified IP address per second.

action: Specifies the actions when a DNS flood attack is detected. If no action is specified, the global actions set by the dns-flood action command apply.

drop: Drops subsequent DNS packets destined for the protected IP address.

logging: Enables logging for DNS flood attack events.

none: Takes no action.

Usage guidelines

With DNS flood attack detection configured, the device is in attack detection state. When the sending rate of DNS packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure DNS flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood detect ip 192.168.1.2 port 53 threshold 2000

Related commands

·          dns-flood action

·          dns-flood detect non-specific

·          dns-flood threshold

·          dns-flood port

dns-flood detect non-specific

Use dns-flood detect non-specific to enable global DNS flood attack detection.

Use undo dns-flood detect non-specific to restore the default.

Syntax

dns-flood detect non-specific

undo dns-flood detect non-specific

Default

Global DNS flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global DNS flood attack detection applies to all IP addresses except for those specified by the dns-flood detect command. The global detection uses the global trigger threshold set by the dns-flood threshold command and global actions specified by the dns-flood action command.

Examples

# Enable global DNS flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood detect non-specific

Related commands

·          dns-flood action

·          dns-flood detect

·          dns-flood threshold

dns-flood port

Use dns-flood port to specify the global ports to be protected against DNS flood attacks.

Use undo dns-flood port to restore the default.

Syntax

dns-flood port port-list

undo dns-flood port

Default

The DNS flood attack prevention protects port 53.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

port-list: Specifies a global list of ports to be protected. Specify this argument in the format of { start-port-number [ to end-port-number ] } &<1-65535>. &<1-65535> indicates that you can specify up to 65535 ports or port lists. The end-port-number cannot be smaller than the start-port-number.

Usage guidelines

The device detects only DNS packets destined for the specified ports.

The global ports apply to global DNS flood attack detection and IP address-specific DNS flood attack detection with no port specified.

Examples

# Specify the ports 53 and 61000 as the global ports to be protected against DNS flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood port 53 61000

Related commands

·          dns-flood action

·          dns-flood detect

·          dns-flood detect non-specific

dns-flood threshold

Use dns-flood threshold to set the global threshold for triggering DNS flood attack prevention.

Use undo dns-flood threshold to restore the default.

Syntax

dns-flood threshold threshold-value

undo dns-flood threshold

Default

The global threshold is 1000 for triggering DNS flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of DNS packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global DNS flood attack detection.

Adjust the threshold according to the application scenarios. If the number of DNS packets sent to a protected DNS server is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering DNS flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood threshold 100

Related commands

·          dns-flood action

·          dns-flood detect

·          dns-flood detect non-specific

exempt acl

Use exempt acl to configure attack detection exemption.

Use undo exempt acl to restore the default.

Syntax

exempt acl [ ipv6 ] { acl-number | name acl-name }

undo exempt acl [ ipv6 ]

Default

Attack detection exemption is not configured. The attack defense policy applies to all incoming packets.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ipv6: Specifies an IPv6 ACL. Do not specify this keyword if you specify an IPv4 ACL.

acl-number: Specifies an ACL by its number:

·          2000 to 2999 for basic ACLs.

·          3000 to 3999 for advanced ACLs.

name acl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to 63 characters. It must start with an English letter and to avoid confusion, it cannot be all.

Usage guidelines

The attack defense policy uses an ACL to identify exempted packets. The policy does not check the packets permitted by the ACL. You can configure the ACL to identify packets from trusted servers. The exemption feature reduces the false alarm rate and improves packet processing efficiency.

If an ACL is used for attack detection exemption, only the following match criteria in the ACL permit rules take effect:

·          Source IP address.

·          Destination IP address.

·          Source port.

·          Destination port.

·          Protocol.

·          fragment keyword for matching non-first fragments.

If the specified ACL does not exist or does not contain a rule, attack detection exemption does not take effect.

Examples

# Configure an ACL to permit packets sourced from 1.1.1.1.

<Sysname> system-view

[Sysname] acl basic 2001

[Sysname-acl-ipv4-basic-2001] rule permit source 1.1.1.1 0

[Sysname-acl-ipv4-basic-2001] quit

# Configure attack detection exemption for packets matching the ACL.

[Sysname] attack-defense policy atk-policy-1

[attack-defense-policy-atk-policy-1] exempt acl 2001

Related commands

attack-defense policy

fin-flood action

Use fin-flood action to specify global actions against FIN flood attacks.

Use undo fin-flood action to restore the default.

Syntax

fin-flood action { drop | logging } *

undo fin-flood action

Default

No global action is specified for FIN flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent FIN packets destined for the victim IP addresses.

logging: Enables logging for FIN flood attack events.

Examples

# Specify drop as the global action against FIN flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] fin-flood action drop

Related commands

·          fin-flood detect

·          fin-flood detect non-specific

·          fin-flood threshold

fin-flood detect

Use fin-flood detect to configure IP address-specific FIN flood attack detection.

Use undo fin-flood detect to remove the IP address-specific FIN flood attack detection configuration.

Syntax

fin-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo fin-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific FIN flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering FIN flood attack prevention. The value range is 1 to 1000000 in units of FIN packets sent to the specified IP address per second.

action: Specifies the actions when a FIN flood attack is detected. If no action is specified, the global actions set by the fin-flood action command apply.

drop: Drops subsequent FIN packets destined for the protected IP address.

logging: Enables logging for FIN flood attack events.

none: Takes no action.

Usage guidelines

With FIN flood attack detection configured, the device is in attack detection state. When the sending rate of FIN packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure FIN flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] fin-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          fin-flood action

·          fin-flood detect non-specific

·          fin-flood threshold

fin-flood detect non-specific

Use fin-flood detect non-specific to enable global FIN flood attack detection.

Use undo fin-flood detect non-specific to restore the default.

Syntax

fin-flood detect non-specific

undo fin-flood detect non-specific

Default

Global FIN flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global FIN flood attack detection applies to all IP addresses except for those specified by the fin-flood detect command. The global detection uses the global trigger threshold set by the fin-flood threshold command and global actions specified by the fin-flood action command.

Examples

# Enable global FIN flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] fin-flood detect non-specific

Related commands

·          fin-flood action

·          fin-flood detect

·          fin-flood threshold

fin-flood threshold

Use fin-flood threshold to set the global threshold for triggering FIN flood attack prevention.

Use undo fin-flood threshold to restore the default.

Syntax

fin-flood threshold threshold-value

undo fin-flood threshold

Default

The global threshold is 1000 for triggering FIN flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of FIN packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global FIN flood attack detection.

Adjust the threshold according to the application scenarios. If the number of FIN packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering FIN flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] fin-flood threshold 100

Related commands

·          fin-flood action

·          fin-flood detect

·          fin-flood detect non-specific

http-flood action

Use http-flood action to specify global actions against HTTP flood attacks.

Use undo http-flood action to restore the default.

Syntax

http-flood action { drop | logging } *

undo http-flood action

Default

No global action is specified for HTTP flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent HTTP packets destined for the victim IP addresses.

logging: Enables logging for HTTP flood attack events.

Examples

# Specify drop as the global action against HTTP flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] http-flood action drop

Related commands

·          http-flood detect

·          http-flood detect non-specific

·          http-flood threshold

http-flood detect

Use http-flood detect to configure IP address-specific HTTP flood attack detection.

Use undo http-flood detect to remove the IP address-specific HTTP flood attack detection configuration.

Syntax

http-flood detect { ip ip-address | ipv6 ipv6-address } [ port port-list ] [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo http-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific HTTP flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

port port-list: Specifies a space-separated list of up to 65535 port number items. Each item specifies a port by its port number or a range of ports in the form of start-port-number to end-port-number. The end-port-number cannot be smaller than the start-port-number. If you do not specify this option, the global ports apply.

threshold threshold-value: Sets the threshold for triggering HTTP flood attack prevention. The value range is 1 to 1000000 in units of HTTP packets sent to the specified IP address per second.

action: Specifies the actions when an HTTP flood attack is detected. If no action is specified, the global actions set by the http-flood action command apply.

drop: Drops subsequent HTTP packets destined for the protected IP address.

logging: Enables logging for HTTP flood attack events.

none: Takes no action.

Usage guidelines

With HTTP flood attack detection configured, the device is in attack detection state. When the sending rate of HTTP packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure HTTP flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] http-flood detect ip 192.168.1.2 port 80 8080 threshold 2000

Related commands

·          http-flood action

·          http-flood detect non-specific

·          http-flood threshold

·          http-flood port

http-flood detect non-specific

Use http-flood detect non-specific to enable global HTTP flood attack detection.

Use undo http-flood detect non-specific to restore the default.

Syntax

http-flood detect non-specific

undo http-flood detect non-specific

Default

Global HTTP flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global HTTP flood attack detection applies to all IP addresses except for those specified by the http-flood detect command. The global detection uses the global trigger threshold set by the http-flood threshold command and global actions specified by the http-flood action command.

Examples

# Enable global HTTP flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] dns-flood detect non-specific

Related commands

·          http-flood action

·          http-flood detect

·          http-flood threshold

http-flood port

Use http-flood port to specify the global ports to be protected against HTTP flood attacks.

Use undo http-flood port to restore the default.

Syntax

http-flood port port-list

undo http-flood port

Default

The HTTP flood attack prevention protects port 80.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

port-list: Specifies a space-separated list of up to 65535 port number items. Each item specifies a port by its port number or a range of ports in the form of start-port-number to end-port-number. The end-port-number cannot be smaller than the start-port-number.

Usage guidelines

The device detects only HTTP packets destined for the specified ports.

The global ports apply to global HTTP flood attack detection and IP address-specific HTTP flood attack detection with no port specified.

Examples

# Specify the ports 80 and 8080 as the global ports to be protected against HTTP flood attacks in attack the defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] http-flood port 80 8080

Related commands

·          http-flood action

·          http-flood detect

·          http-flood detect non-specific

http-flood threshold

Use http-flood threshold to set the global threshold for triggering HTTP flood attack prevention.

Use undo http-flood threshold to restore the default.

Syntax

http-flood threshold threshold-value

undo http-flood threshold

Default

The global threshold is 1000 for triggering HTTP flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of HTTP packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global HTTP flood attack detection.

Adjust the threshold according to the application scenarios. If the number of HTTP packets sent to a protected HTTP server is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering HTTP flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] http-flood threshold 100

Related commands

·          http-flood action

·          http-flood detect

·          http-flood detect non-specific

icmp-flood action

Use icmp-flood action to specify global actions against ICMP flood attacks.

Use undo icmp-flood action to restore the default.

Syntax

icmp-flood action { drop | logging } *

undo icmp-flood action

Default

No global action is specified for ICMP flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent ICMP packets destined for the victim IP addresses.

logging: Enables logging for ICMP flood attack events.

Examples

# Specify drop as the global action against ICMP flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmp-flood action drop

Related commands

·          icmp-flood detect non-specific

·          icmp-flood detect ip

·          icmp-flood threshold

icmp-flood detect ip

Use icmp-flood detect ip to configure IP address-specific ICMP flood attack detection.

Use undo icmp-flood detect ip to remove the IP address-specific ICMP flood attack detection configuration.

Syntax

icmp-flood detect ip ip-address [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo icmp-flood detect ip ip-address

Default

IP address-specific ICMP flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

threshold threshold-value: Sets the threshold for triggering ICMP flood attack prevention. The value range is 1 to 1000000 in units of ICMP packets sent to the specified IP address per second.

action: Specifies the actions when an ICMP flood attack is detected. If no action is specified, the global actions set by the icmp-flood action command apply.

drop: Drops subsequent ICMP packets destined for the protected IP address.

logging: Enables logging for ICMP flood attack events.

none: Takes no action.

Usage guidelines

With ICMP flood attack detection configured, the device is in attack detection state. When the sending rate of ICMP packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure ICMP flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmp-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          icmp-flood action

·          icmp-flood detect non-specific

·          icmp-flood threshold

icmp-flood detect non-specific

Use icmp-flood detect non-specific to enable global ICMP flood attack detection.

Use undo icmp-flood detect non-specific to restore the default.

Syntax

icmp-flood detect non-specific

undo icmp-flood detect non-specific

Default

Global ICMP flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global ICMP flood attack detection applies to all IP addresses except for those specified by the icmp-flood detect ip command. The global detection uses the global trigger threshold set by the icmp-flood threshold command and global actions specified by the icmp-flood action command.

Examples

# Enable global ICMP flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmp-flood detect non-specific

Related commands

·          icmp-flood action

·          icmp-flood detect ip

·          icmp-flood threshold

icmp-flood threshold

Use icmp-flood threshold to set the global threshold for triggering ICMP flood attack prevention.

Use undo icmp-flood threshold to restore the default.

Syntax

icmp-flood threshold threshold-value

undo icmp-flood threshold

Default

The global threshold is 1000 for triggering ICMP flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of ICMP packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global ICMP flood attack detection.

Adjust the threshold according to the application scenarios. If the number of ICMP packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering ICMP flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmp-flood threshold 100

Related commands

·          icmp-flood action

·          icmp-flood detect ip

·          icmp-flood detect non-specific

icmpv6-flood action

Use icmpv6-flood action to specify global actions against ICMPv6 flood attacks.

Use undo icmpv6-flood action to restore the default.

Syntax

icmpv6-flood action { drop | logging } *

undo icmpv6-flood action

Default

No global action is specified for ICMPv6 flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent ICMPv6 packets destined for the victim IP addresses.

logging: Enables logging for ICMPv6 flood attack events.

Examples

# Specify drop as the global action against ICMPv6 flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmpv6-flood action drop

Related commands

·          icmpv6-flood detect ipv6

·          icmpv6-flood detect non-specific

·          icmpv6-flood threshold

icmpv6-flood detect ipv6

Use icmpv6-flood detect ipv6 to configure IPv6 address-specific ICMPv6 flood attack detection.

Use undo icmpv6-flood detect ipv6 to remove the IPv6 address-specific ICMPv6 flood attack detection configuration.

Syntax

icmpv6-flood detect ipv6 ipv6-address [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo icmpv6-flood detect ipv6 ipv6-address

Default

IPv6 address-specific ICMPv6 flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering ICMPv6 flood attack prevention. The value range is 1 to 1000000 in units of ICMPv6 packets sent to the specified IP address per second.

action: Specifies the actions when an ICMPv6 flood attack is detected. If no action is specified, the global actions set by the icmpv6-flood action command apply.

drop: Drops subsequent ICMPv6 packets destined for the protected IPv6 address.

logging: Enables logging for ICMPv6 flood attack events.

none: Takes no action.

Usage guidelines

With ICMPv6 flood attack detection configured, the device is in attack detection state. When the sending rate of ICMPv6 packets to a protected IPv6 address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure ICMPv6 flood attack detection for 2012::12 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmpv6-flood detect ipv6 2012::12 threshold 2000

Related commands

·          icmpv6-flood action

·          icmpv6-flood detect non-specific

·          icmpv6-flood threshold

icmpv6-flood detect non-specific

Use icmpv6-flood detect non-specific to enable global ICMPv6 flood attack detection.

Use undo icmpv6-flood detect non-specific to restore the default.

Syntax

icmpv6-flood detect non-specific

undo icmpv6-flood detect non-specific

Default

Global ICMPv6 flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global ICMPv6 flood attack detection applies to all IPv6 addresses except for those specified by the icmpv6-flood detect ipv6 command. The global detection uses the global trigger threshold set by the icmpv6-flood threshold command and global actions specified by the icmpv6-flood action command.

Examples

# Enable global ICMPv6 flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmpv6-flood detect non-specific

Related commands

·          icmpv6-flood action

·          icmpv6-flood detect ipv6

·          icmpv6-flood threshold

icmpv6-flood threshold

Use icmpv6-flood threshold to set the global threshold for triggering ICMPv6 flood attack prevention.

Use undo icmpv6-flood threshold to restore the default.

Syntax

icmpv6-flood threshold threshold-value

undo icmpv6-flood threshold

Default

The global threshold is 1000 for triggering ICMPv6 flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of ICMPv6 packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global ICMPv6 flood attack detection.

Adjust the threshold according to the application scenarios. If the number of ICMPv6 packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering ICMPv6 flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] icmpv6-flood threshold 100

Related commands

·          icmpv6-flood action

·          icmpv6-flood detect ipv6

·          icmpv6-flood detect non-specific

reset attack-defense policy flood

Use reset attack-defense policy flood statistics to clear flood attack detection and prevention statistics.

Syntax

reset attack-defense policy policy-name flood protected { ip | ipv6 } statistics

Views

User view

Predefined user roles

network-admin

network-operator

Parameters

policy-name: Specifies an attack defense policy by its name. The policy name is a case-insensitive string of 1 to 31 characters. Valid characters include uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

ip: Clears flood attack detection and prevention statistics for IPv4 addresses.

ipv6: Clears flood attack detection and prevention statistics for IPv6 addresses.

Examples

# Clear flood attack detection and prevention statistics for IPv4 addresses in the attack defense policy abc.

<Sysname> reset attack-defense policy abc flood protected ip statistics

# Clear flood attack detection and prevention statistics for IPv6 addresses in the attack defense policy abc.

<Sysname> reset attack-defense policy abc flood protected ipv6 statistics

Related commands

·          display attack-defense policy ip

·          display attack-defense policy ipv6

reset attack-defense statistics interface

Use reset attack-defense statistics interface to clear attack detection and prevention statistics for an interface.

Syntax

reset attack-defense statistics interface interface-type interface-number

Views

User view

Predefined user roles

network-admin

network-operator

Parameters

interface-type interface-number: Specifies an interface by its type and number.

Examples

# Clear attack detection and prevention statistics for interface VLAN-interface 200.

<Sysname> reset attack-defense statistics interface vlan-interface 200

Related commands

display attack defense policy

reset attack-defense statistics local

Use reset attack-defense statistics local to clear attack detection and prevention statistics for the device.

Syntax

reset attack-defense statistics local

Views

User view

Predefined user roles

network-admin

network-operator

Examples

Clear attack detection and prevention statistics for the device.

<Sysname> reset attack-defense statistics local

Related commands

display attack-defense statistics local

rst-flood action

Use rst-flood action to specify global actions against RST flood attacks.

Use undo rst-flood action to restore the default.

Syntax

rst-flood action { drop | logging } *

undo rst-flood action

Default

No global action is specified for RST flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent RST packets destined for the victim IP addresses.

logging: Enables logging for RST flood attack events.

Examples

# Specify drop as the global action against RST flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] rst-flood action drop

Related commands

·          rst-flood detect

·          rst-flood detect non-specific

·          rst-flood threshold

rst-flood detect

Use rst-flood detect to configure IP address-specific RST flood attack detection.

Use undo rst-flood detect to remove the IP address-specific RST flood attack detection configuration.

Syntax

rst-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo rst-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific RST flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering RST flood attack prevention. The value range is 1 to 1000000 in units of RST packets sent to the specified IP address per second.

action: Specifies the actions when an RST flood attack is detected. If no action is specified, the global actions set by the rst-flood action command apply.

drop: Drops subsequent RST packets destined for the protected IP address.

logging: Enables logging for RST flood attack events.

none: Takes no action.

Usage guidelines

With RST flood attack detection configured, the device is in attack detection state. When the sending rate of RST packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device considers returns to the attack detection state.

Examples

# Configure RST flood attack detection for 192.168.1.2 in the  attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] rst-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          rst-flood action

·          rst-flood detect non-specific

·          rst-flood threshold

rst-flood detect non-specific

Use rst-flood detect non-specific to enable global RST flood attack detection.

Use undo rst-flood detect non-specific to restore the default.

Syntax

rst-flood detect non-specific

undo rst-flood detect non-specific

Default

Global RST flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global RST flood attack detection applies to all IP addresses except for those specified by the rst-flood detect command. The global detection uses the global trigger threshold set by the rst-flood threshold command and global actions specified by the rst-flood action command.

Examples

# Enable global RST flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] rst-flood detect non-specific

Related commands

·          rst-flood action

·          rst-flood detect

·          rst-flood threshold

rst-flood threshold

Use rst-flood threshold to set the global threshold for triggering RST flood attack prevention.

Use undo rst-flood threshold to restore the default.

Syntax

rst-flood threshold threshold-value

undo rst-flood threshold

Default

The global threshold is 1000 for triggering RST flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of RST packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global RST flood attack detection.

Adjust the threshold according to the application scenarios. If the number of RST packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering RST flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] rst-flood threshold 100

Related commands

·          rst-flood action

·          rst-flood detect

·          rst-flood detect non-specific

scan detect

Use scan detect to configure scanning attack detection.

Use undo scan detect to restore the default.

Syntax

scan detect level { high | low | medium } action { drop | logging } *

undo scan detect level { high | low | medium }

Default

Scanning attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

level: Specifies the level of the scanning attack detection.

low: Specifies the low level. This level provides basic scanning attack detection. It has a low false alarm rate but many scanning attacks cannot be detected. Statistics are collected every 60 seconds for the low level detection.

high: Specifies the high level. This level can detect most of the scanning attacks, but has a high false alarm rate. Some packets from active hosts might be considered as attack packets. Statistics are collected every 600 seconds for the high level detection.

medium: Specifies the medium level. Compared with the high and low levels, this level has a medium false alarm rate and attack detection rate. Statistics are collected every 90 seconds for the medium level detection.

action: Specifies the actions against scanning attacks.

drop: Drops subsequent packets from detected scanning attack sources.

logging: Enables logging for scanning attack events.

Examples

# Configure low level scanning attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] scan detect level low action drop

# Configure scanning attack detection in the attack defense policy atk-policy-1. Specify the detection level as low and the prevention actions as logging.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] scan detect level low action logging

signature { large-icmp | large-icmpv6 } max-length

Use signature { large-icmp | large-icmpv6 } max-length to set the maximum length of safe ICMP or ICMPv6 packets. A large ICMP or ICMPv6 attack occurs if an ICMP or ICMPv6 packet larger than the specified length is detected.

Use undo signature { large-icmp | large-icmpv6 } max-length to restore the default.

Syntax

signature { large-icmp | large-icmpv6 } max-length length

undo signature { large-icmp | large-icmpv6 } max-length

Default

The maximum length of safe ICMP or ICMPv6 packets is 4000 bytes.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

large-icmp: Specifies large ICMP packet attack signature.

large-icmpv6: Specifies large ICMPv6 packet attack signature.

length: Specifies the maximum length of safe ICMP or ICMPv6 packets, in bytes. The value range for ICMP packet is 28 to 65534. The value range for ICMPv6 packet is 48 to 65534.

Examples

# Set the maximum length of safe ICMP packets for large ICMP attack to 50000 bytes.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] signature large-icmp max-length 50000

Related commands

signature detect

signature detect

Use signature detect to configure signature detection for single-packet attacks.

Use undo signature detect to remove the signature detection configuration for single-packet attacks.

Syntax

signature detect { fraggle | fragment | impossible | land | large-icmp | large-icmpv6 | smurf | snork | tcp-all-flags | tcp-fin-only | tcp-invalid-flags | tcp-null-flag | tcp-syn-fin | tiny-fragment | traceroute | udp-bomb | winnuke } [ action { { drop | logging } * | none } ]

undo signature detect { fraggle | fragment | impossible | land | large-icmp | large-icmpv6 | smurf | snork | tcp-all-flags | tcp-fin-only | tcp-invalid-flags | tcp-null-flag | tcp-syn-fin | tiny-fragment | traceroute | udp-bomb | winnuke }

signature detect { ip-option-abnormal | ping-of-death | teardrop } action { drop | logging } *

undo signature detect { ip-option-abnormal | ping-of-death | teardrop }

signature detect icmp-type { icmp-type-value | address-mask-reply | address-mask-request | destination-unreachable | echo-reply | echo-request | information-reply | information-request | parameter-problem | redirect | source-quench | time-exceeded | timestamp-reply | timestamp-request } [ action { { drop | logging } * | none } ]

undo signature detect icmp-type { icmp-type-value | address-mask-reply | address-mask-request | destination-unreachable | echo-reply | echo-request | information-reply | information-request | parameter-problem | redirect | source-quench | time-exceeded | timestamp-reply | timestamp-request }

signature detect icmpv6-type { icmpv6-type-value | destination-unreachable | echo-reply | echo-request | group-query | group-reduction | group-report | packet-too-big | parameter-problem | time-exceeded } [ action { { drop | logging } * | none } ]

undo signature detect icmpv6-type { icmpv6-type-value | destination-unreachable | echo-reply | echo-request | group-query | group-reduction | group-report | packet-too-big | parameter-problem | time-exceeded }

signature detect ip-option { option-code | internet-timestamp | loose-source-routing | record-route | route-alert | security | stream-id | strict-source-routing } [ action { { drop | logging } * | none } ]

undo signature detect ip-option { option-code | internet-timestamp | loose-source-routing | record-route | route-alert | security | stream-id | strict-source-routing }

signature detect ipv6-ext-header ext-header-value [ action { { drop | logging } * | none } ]

undo signature detect ipv6-ext-header next-header-value

Default

Signature detection is not configured for any single-packet attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

fraggle: Specifies the fraggle attack.

fragment: Specifies the fragment attack.

icmp-type: Specifies an ICMP packet attack by its signature type. You can specify the signature by the ICMP packet type value or keyword:

·          icmp-type-value: Specifies the ICMP type value in the range of 0 to 255.

·          address-mask-reply: Specifies the ICMP address mask reply type.

·          address-mask-request: Specifies the ICMP address mask request type.

·          destination-unreachable: Specifies the ICMP destination unreachable type.

·          echo-reply: Specifies the ICMP echo reply type.

·          echo-request: Specifies the ICMP echo request type.

·          information-reply: Specifies the ICMP information reply type.

·          information-request: Specifies the ICMP information request type.

·          parameter-problem: Specifies the ICMP parameter problem type.

·          redirect: Specifies the ICMP redirect type.

·          source-quench: Specifies the ICMP source quench type.

·          time-exceeded: Specifies the ICMP time exceeded type.

·          timestamp-reply: Specifies the ICMP timestamp reply type.

·          timestamp-request: Specifies the ICMP timestamp request type.

icmpv6-type: Specifies an ICMPv6 packet attack by its signature type. You can specify the signature by the ICMPv6 packet type value or keyword.

·          icmpv6-type-value: Specifies the ICMPv6 type value in the range of 0 to 255.

·          destination-unreachable: Specifies the ICMPv6 destination unreachable type.

·          echo-reply: Specifies the ICMPv6 echo reply type.

·          echo-request: Specifies the ICMPv6 echo request type.

·          group-query: Specifies the ICMPv6 group query type.

·          group-reduction: Specifies the ICMPv6 group reduction type.

·          group-report: Specifies the ICMPv6 group report type.

·          packet-too-big: Specifies the ICMPv6 packet too big type.

·          parameter-problem: Specifies the ICMPv6 parameter problem type.

·          time-exceeded: Specifies the ICMPv6 time exceeded type.

impossible: Specifies the IP impossible packet attack.

ip-option: Specifies an IP option. You can specify the IP option by its value or keyword:

·          option-code: Specifies the IP option value in the range of 0 to 255.

·          internet-timestamp: Specifies the timestamp option.

·          loose-source-routing: Specifies the loose source routing option.

·          record-route: Specifies the record route option.

·          route-alert: Specifies the route alert option.

·          security: Specifies the security option.

·          stream-id: Specifies the stream identifier option.

·          strict-source-routing: Specifies the strict source route option.

ip-option-abnormal: Specifies the abnormal IP option attack.

ipv6-ext-header ext-header-value: Specifies an IPv6 extension header by its value in the range of 0 to 255. An IPv6 extension header attack occurs when the specified IPv6 extension header value is detected.

land: Specifies the Land attack.

large-icmp: Specifies the large ICMP packet attack.

large-icmpv6: Specifies the large ICMPv6 packet attack.

ping-of-death: Specifies the ping-of-death attack.

smurf: Specifies the smurf attack.

snork: Specifies the UDP snork attack.

tcp-all-flags: Specifies the attack where a TCP packet has all flags set.

tcp-fin-only: Specifies the attack where a single TCP FIN packet is sent to a privileged port (port number lower than 1024).

tcp-invalid-flags: Specifies the attack that uses TCP packets with invalid flags.

tcp-null-flag: Specifies the attack where a single TCP packet has no TCP flags set.

tcp-syn-fin: Specifies the attack where a TCP packet has both SYN and FIN flags set.

teardrop: Specifies the teardrop attack.

tiny-fragment: Specifies the tiny fragment attack.

traceroute: Specifies the traceroute attack.

udp-bomb: Specifies the UDP bomb attack.

winnuke: Specifies the WinNuke attack.

action: Specifies the actions against the single-packet attack. If you do not specify this keyword, the default action of the attack level to which the single-packet attack belongs is used.

drop: Drops packets that match the specified signature.

logging: Enables logging for the specified single-packet attack.

none: Takes no action.

Usage guidelines

One command execution enables signature detection only for one single-packet attack type. You can use this command multiple times to configure signature detection for multiple single-packet attack types.

When you specify a packet type by its value, if the packet type has a corresponding keyword, the keyword is displayed in command output. Otherwise, the value is displayed.

Examples

# Configure signature detection for smurf attack in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] signature detect smurf action drop

Related commands

signature level action

signature level action

Use signature level action to specify the actions against single-packet attacks of a specific level.

Use undo signature level action to restore the default.

Syntax

signature level { high | info | low | medium } action { { drop | logging } * | none }

undo signature level { high | info | low | medium } action

Default

For informational-level and low-level single-packet attacks, the action is logging.

For medium-level and high-level single-packet attacks, the actions are logging and drop.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

high: Specifies the high level. None of the currently supported single-packet attacks belongs to this level.

info: Specifies the informational level. For example, large ICMP packet attack is of this level.

low: Specifies the low level. For example, the traceroute attack is of this level.

medium: Specifies the medium level. For example, the WinNuke attack is of this level.

drop: Drops packets that match the specified level.

logging: Enable logging for single-packet attacks of the specified level.

none: Takes no action.

Usage guidelines

According to their severity, single-packet attacks are divided into four levels: info, low, medium, and high.

If you enable the level-specific signature detection for single-packet attacks, the signature detection is enabled for all single-packet attacks of the level. If you enable the signature detection for a single-packet attack by using the signature detect command, action parameters in the signature detect command take effect.

Examples

# Specify the action against informational level single-packet attacks as drop in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy 1

[Sysname-attack-defense-policy-1] signature level info action drop

Related commands

·          signature detect

·          signature level detect

signature level detect

Use signature level detect to enable signature detection for single-packet attacks of a specific level.

Use undo signature level detect to disable signature detection for single-packet attacks of a specific level.

Syntax

signature level { high | info | low | medium } detect

undo signature level { high | info | low | medium } detect

Default

Signature detection is disabled for all levels of single-packet attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

high: Specifies the high level. None of the currently supported single-packet attacks belongs to this level.

info: Specifies the informational level. For example, large ICMP packet attack is of this level.

low: Specifies the low level. For example, the traceroute attack is of this level.

medium: Specifies the medium level. For example, the WinNuke attack is of this level.

Usage guidelines

According to their severity, single-packet attacks fall into four levels: info, low, medium, and high.

If you enable the level-specific signature detection for single-packet attacks, the signature detection is enabled for all single-packet attacks of the level. If you enable the signature detection for a single-packet attack by using the signature detect command, action parameters in the signature detect command take effect.

Use the signature level action command to specify the actions against single-packet attacks of a specific level. To display the level to which a single-packet attack belongs, use the display attack-defense policy command.

Examples

# Enable signature detection for informational level single-packet attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy 1

[Sysname-attack-defense-policy-1] signature level info detect

Related commands

·          display attack-defense policy

·          signature detect

·          signature level action

syn-ack-flood action

Use syn-ack-flood action to specify global actions against SYN-ACK flood attacks.

Use undo syn-ack-flood action to restore the default.

Syntax

syn-ack-flood action { drop | logging } *

undo syn-ack-flood action

Default

No global action is specified for SYN-ACK flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent SYN-ACK packets destined for the victim IP addresses.

logging: Enables logging for SYN-ACK flood attack events.

Examples

# Specify drop as the global action against SYN-ACK flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-ack-flood action drop

Related commands

·          syn-ack-flood detect

·          syn-ack-flood detect non-specific

·          syn-ack-flood threshold

syn-ack-flood detect

Use syn-ack-flood detect to configure IP address-specific SYN-ACK flood attack detection.

Use undo syn-ack-flood detect to remove the IP address-specific SYN-ACK flood attack detection configuration.

Syntax

syn-ack-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo syn-ack-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific SYN-ACK flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering SYN-ACK flood attack prevention. The value range is 1 to 1000000 in units of SYN-ACK packets sent to the specified IP address per second.

action: Specifies the actions when a SYN-ACK flood attack is detected. If no action is specified, the global actions set by the syn-ack-flood action command apply.

drop: Drops subsequent SYN-ACK packets destined for the protected IP address.

logging: Enables logging for SYN-ACK flood attack events.

none: Takes no action.

Usage guidelines

With SYN-ACK flood attack detection configured, the device is in attack detection state. When the sending rate of SYN-ACK packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure SYN-ACK flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-ack-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          syn-ack-flood action

·          syn-ack-flood detect non-specific

·          syn-ack-flood threshold

syn-ack-flood detect non-specific

Use syn-ack-flood detect non-specific to enable global SYN-ACK flood attack detection.

Use undo syn-ack-flood detect non-specific to restore the default.

Syntax

syn-ack-flood detect non-specific

undo syn-ack-flood detect non-specific

Default

Global SYN-ACK flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global SYN-ACK flood attack detection applies to all IP addresses except for those specified by the syn-ack-flood detect command. The global detection uses the global trigger threshold set by the syn-ack-flood threshold command and global actions specified by the syn-ack-flood action command.

Examples

# Enable global SYN-ACK flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-ack-flood detect non-specific

Related commands

·          syn-ack-flood action

·          syn-ack-flood detect

·          syn-ack-flood threshold

syn-ack-flood threshold

Use syn-ack-flood threshold to set the global threshold for triggering SYN-ACK flood attack prevention.

Use undo syn-ack-flood threshold to restore the default.

Syntax

syn-ack-flood threshold threshold-value

undo syn-ack-flood threshold

Default

The global threshold is 1000 for triggering SYN-ACK flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of SYN-ACK packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global SYN-ACK flood attack detection.

Adjust the threshold according to the application scenarios. If the number of SYN-ACK packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering SYN-ACK flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-ack-flood threshold 100

Related commands

·          syn-ack-flood action

·          syn-ack-flood detect

·          syn-ack-flood detect non-specific

syn-flood action

Use syn-flood action to specify global actions against SYN flood attacks.

Use undo syn-flood action to restore the default.

Syntax

syn-flood action { drop | logging } *

undo syn-flood action

Default

No global action is specified for SYN flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent SYN packets destined for the victim IP addresses.

logging: Enables logging for SYN flood attack events.

Examples

# Specify drop as the global action against SYN flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-flood action drop

Related commands

·          syn-flood detect

·          syn-flood detect non-specific

·          syn-flood threshold

syn-flood detect

Use syn-flood detect to configure IP address-specific SYN flood attack detection.

Use undo syn-flood detect to remove the IP address-specific SYN flood attack detection configuration.

Syntax

syn-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo syn-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific SYN flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering SYN flood attack prevention. The value range is 1 to 1000000 in units of SYN packets sent to the specified IP address per second.

action: Specifies the actions when a SYN flood attack is detected. If no action is specified, the global actions set by the syn-flood action command apply.

drop: Drops subsequent SYN packets destined for the protected IP address.

logging: Enables logging for SYN flood attack events.

none: Takes no action.

Usage guidelines

With SYN flood attack detection configured, the device is in attack detection state. When the sending rate of SYN packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure SYN flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          syn-flood action

·          syn-flood detect non-specific

·          syn-flood threshold

syn-flood detect non-specific

Use syn-flood detect non-specific to enable global SYN flood attack detection.

Use undo syn-flood detect non-specific to restore the default.

Syntax

syn-flood detect non-specific

undo syn-flood detect non-specific

Default

Global SYN flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global SYN flood attack detection applies to all IP addresses except for those specified by the syn-flood detect command. The global detection uses the global trigger threshold set by the syn-flood threshold command and global actions specified by the syn-flood action command.

Examples

# Enable global SYN flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-flood detect non-specific

Related commands

·          syn-flood action

·          syn-flood detect

·          syn-flood threshold

syn-flood threshold

Use syn-flood threshold to set the global threshold for triggering SYN flood attack prevention.

Use undo syn-flood threshold to restore the default.

Syntax

syn-flood threshold threshold-value

undo syn-flood threshold

Default

The global threshold is 1000 for triggering SYN flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of SYN packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global SYN flood attack detection.

Adjust the threshold according to the application scenarios. If the number of SYN packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering SYN flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] syn-flood threshold 100

Related commands

·          syn-flood action

·          syn-flood detect

·          syn-flood detect non-specific

udp-flood action

Use udp-flood action to specify global actions against UDP flood attacks.

Use undo udp-flood action to restore the default.

Syntax

udp-flood action { drop | logging } *

undo udp-flood action

Default

No global action is specified for UDP flood attacks.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

drop: Drops subsequent UDP packets destined for the victim IP addresses.

logging: Enables logging for UDP flood attack events.

Examples

# Specify drop as the global action against UDP flood attacks in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] udp-flood action drop

Related commands

·          udp-flood detect

·          udp-flood detect non-specific

·          udp-flood threshold

udp-flood detect

Use udp-flood detect to configure IP address-specific UDP flood attack detection.

Use undo udp-flood detect to remove the IP address-specific UDP flood attack detection configuration.

Syntax

udp-flood detect { ip ip-address | ipv6 ipv6-address } [ threshold threshold-value ] [ action { { drop | logging } * | none } ]

undo udp-flood detect { ip ip-address | ipv6 ipv6-address }

Default

IP address-specific UDP flood attack detection is not configured.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

ip ip-address: Specifies the IPv4 address to be protected. The ip-address argument cannot be 255.255.255.255 or 0.0.0.0.

ipv6 ipv6-address: Specifies the IPv6 address to be protected.

threshold threshold-value: Sets the threshold for triggering UDP flood attack prevention. The value range is 1 to 1000000 in units of UDP packets sent to the specified IP address per second.

action: Specifies the actions when a UDP flood attack is detected. If no action is specified, the global actions set by the udp-flood action command apply.

drop: Drops subsequent UDP packets destined for the protected IP address.

logging: Enables logging for UDP flood attack events.

none: Takes no action.

Usage guidelines

With UDP flood attack detection configured, the device is in attack detection state. When the device detects that the sending rate of UDP packets to a protected IP address reaches the threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.

Examples

# Configure UDP flood attack detection for 192.168.1.2 in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] udp-flood detect ip 192.168.1.2 threshold 2000

Related commands

·          udp-flood action

·          udp-flood detect non-specific

·          udp-flood threshold

udp-flood detect non-specific

Use udp-flood detect non-specific to enable global UDP flood attack detection.

Use undo udp-flood detect non-specific to restore the default.

Syntax

udp-flood detect non-specific

undo udp-flood detect non-specific

Default

Global UDP flood attack detection is disabled.

Views

Attack defense policy view

Predefined user roles

network-admin

Usage guidelines

The global UDP flood attack detection applies to all IP addresses except for those specified by the udp-flood detect command. The global detection uses the global trigger threshold set by the udp-flood threshold command and global actions specified by the udp-flood action command.

Examples

# Enable global UDP flood attack detection in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] udp-flood detect non-specific

Related commands

·          udp-flood action

·          udp-flood detect

·          udp-flood threshold

udp-flood threshold

Use udp-flood threshold to set the global threshold for triggering UDP flood attack prevention.

Use undo udp-flood threshold to restore the default.

Syntax

udp-flood threshold threshold-value

undo udp-flood threshold

Default

The global threshold is 1000 for triggering UDP flood attack prevention.

Views

Attack defense policy view

Predefined user roles

network-admin

Parameters

threshold-value: Sets the threshold value. The value range is 1 to 1000000 in units of UDP packets sent to an IP address per second.

Usage guidelines

The global threshold applies to global UDP flood attack detection.

Adjust the threshold according to the application scenarios. If the number of UDP packets sent to a protected server, such as an HTTP or FTP server, is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.

Examples

# Set the global threshold to 100 for triggering UDP flood attack prevention in the attack defense policy atk-policy-1.

<Sysname> system-view

[Sysname] attack-defense policy atk-policy-1

[Sysname-attack-defense-policy-atk-policy-1] rst-flood threshold 100

Related commands

·          udp-flood action

·          udp-flood detect

·          udp-flood detect non-specific


IP source guard commands

ip verify source

Use ip verify source to enable the IPSG feature for IPv4.

Use undo ip verify source to restore the default.

Syntax

ip verify source

undo ip verify source

Default

The IPSG feature is disabled for IPv4.

Views

WLAN service template view

Predefined user roles

network-admin

Usage guidelines

This feature uses WLAN snooping entries to filter IPv4 packets received by an AP. It drops packets that do not match the entries. A WLAN snooping entry is an IP-MAC binding.

In an IPv4 network, IPSG uses only the WLAN snooping entries obtained through DHCP packets.

Examples

# Enable the IPSG feature for IPv4.

<Sysname> system-view

[Sysname] wlan service-template security

[Sysname-wlan-st-security] ip verify source

ip verify unknown-ip

Use ip verify unknown-ip to configure the processing method for packets from unknown source IPv4 addresses received on APs.

Use undo ip verify unknown-ip to restore the default.

Syntax

ip verify unknown-ip { deauthenticate | drop }

undo ip verify unknown-ip

Default

An AP drops packets from unknown source IPv4 addresses and sends deauthentication frames to the sources.

Views

WLAN service template view

Predefined user roles

network-admin

Parameters

deauthenticate: Drops packets from unknown source IPv4 addresses and sends deauthentication frames to the sources.

drop: Drops packets from unknown source IPv4 addresses only.

Usage guidelines

Unknown source IPv4 addresses refer to the following addresses:

·          IPv4 addresses learned from ARP packets that pass through APs.

·          IPv4 addresses that have not been learned by APs.

This command is configurable only when the WLAN service template is disabled.

This command takes effect only when the IPSG feature is enabled for IPv4.

Examples

# Configure APs to drop packets from unknown source IPv4 addresses.

<Sysname> system-view

[Sysname] wlan service-template service1

[Sysname-wlan-st-service1] ip verify unknown-ip drop

ipv6 verify source

Use ipv6 verify source to enable the IPSG feature for IPv6.

Use undo ipv6 verify source to restore the default.

Syntax

ipv6 verify source

undo ipv6 verify source

Default

The IPSG feature is disabled for IPv6.

Views

WLAN service template view

Predefined user roles

network-admin

Usage guidelines

This feature uses WLAN snooping entries to filter IPv6 packets received by an AP. It drops packets that do not match the entries. A WLAN snooping entry is an IP-MAC binding.

Examples

# Enable the IPSG feature for IPv6.

<Sysname> system-view

[Sysname] wlan service-template security

[Sysname-wlan-st-security] ipv6 verify source


ARP attack protection commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

Source MAC-based ARP attack detection commands

arp source-mac

Use arp source-mac to enable the source MAC-based ARP attack detection feature and specify a handling method.

Use undo arp source-mac to restore the default.

Syntax

arp source-mac { filter | monitor }

undo arp source-mac [ filter | monitor ]

Default

The source MAC-based ARP attack detection feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

filter: Generates log messages and discards subsequent ARP packets from the MAC address.

monitor: Only generates log messages.

Usage guidelines

Configure this feature on the gateways.

This feature checks the number of ARP packets delivered to the CPU. If the number of ARP packets from the same MAC address within 5 seconds exceeds a threshold, the device takes the preconfigured method to handle the attack.

If you do not specify both the filter and monitor keywords for the undo arp source-mac command, the command disables this feature.

Examples

# Enable the source MAC-based ARP attack detection feature and specify the filter handling method.

<Sysname> system-view

[Sysname] arp source-mac filter

arp source-mac aging-time

Use arp source-mac aging-time to set the aging time for ARP attack entries.

Use undo arp anti-attack source-mac aging-time to restore the default.

Syntax

arp source-mac aging-time time

undo arp source-mac aging-time

Default

The aging time for ARP attack entries is set to 300 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

time: Sets the aging time for ARP attack entries, in the range of 60 to 6000 seconds.

Examples

# Set the aging time for ARP attack entries to 60 seconds.

<Sysname> system-view

[Sysname] arp source-mac aging-time 60

arp source-mac exclude-mac

Use arp anti-attack source-mac exclude-mac to exclude specific MAC addresses from source MAC-based ARP attack detection.

Use undo arp anti-attack source-mac exclude-mac to remove the excluded MAC addresses.

Syntax

arp source-mac exclude-mac mac-address&<1-10>

undo arp source-mac exclude-mac [ mac-address&<1-10> ]

Default

No MAC address is excluded from source MAC-based ARP attack detection.

Views

System view

Predefined user roles

network-admin

Parameters

mac-address&<1-10>: Specifies a MAC address list. The mac-address argument indicates an excluded MAC address in the format of H-H-H. &<1-10> indicates that you can specify a maximum of 10 excluded MAC addresses.

Usage guidelines

If you do not specify a MAC address, the undo arp source-mac exclude-mac command removes all excluded MAC addresses.

Examples

# Exclude a MAC address from source MAC-based ARP attack detection.

<Sysname> system-view

[Sysname] arp source-mac exclude-mac 2-2-2

arp source-mac threshold

Use arp source-mac threshold to set the threshold for source MAC-based ARP attack detection. If the number of ARP packets sent from a MAC address within 5 seconds exceeds this threshold, the device recognizes this as an attack.

Use undo arp source-mac threshold to restore the default.

Syntax

arp source-mac threshold threshold-value

undo arp source-mac threshold

Default

The threshold for source MAC-based ARP attack detection is 50.

Views

System view

Predefined user roles

network-admin

Parameters

threshold-value: Specifies the threshold for source MAC-based ARP attack detection. The value range for this argument is 1 to 5000.

Examples

# Set the threshold for source MAC-based ARP attack detection to 30.

<Sysname> system-view

[Sysname] arp source-mac threshold 30

display arp source-mac

Use display arp source-mac to display ARP attack entries detected by source MAC-based ARP attack detection.

Syntax

display arp source-mac { slot slot-number | interface interface-type interface-number }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number.

slot slot-number: Specifies an IRF member device by its ID. If you do not specify a member device, this command displays ARP attack entries for the master device.

Examples

# Display the ARP attack entries detected by source MAC-based ARP attack detection on GigabitEthernet 1/0/1.

<Sysname> display arp source-mac interface gigabitethernet 1/0/1

Source-MAC          VLAN ID  Interface                Aging-time

23f3-1122-3344      4094     GE1/0/1                  10

23f3-1122-3355      4094     GE1/0/2                  30

23f3-1122-33ff      4094     GE1/0/3                  25

23f3-1122-33ad      4094     GE1/0/4                  30

23f3-1122-33ce      4094     GE1/0/5                  2

ARP packet source MAC consistency check commands

arp valid-check enable

Use arp valid-check enable to enable ARP packet source MAC address consistency check on the gateway.

Use undo arp valid-check enable to disable ARP packet source MAC address consistency check.

Syntax

arp valid-check enable

undo arp valid-check enable

Default

ARP packet source MAC address consistency check is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Configure this feature on gateways. The gateways can filter out ARP packets whose source MAC address in the Ethernet header is different from the sender MAC address in the message body.

Examples

# Enable ARP packet source MAC address consistency check.

<Sysname> system-view

[Sysname] arp valid-check enable

ARP active acknowledgement commands

arp active-ack enable

Use arp active-ack enable to enable the ARP active acknowledgement feature.

Use undo arp active-ack enable to restore the default.

Syntax

arp active-ack [ strict ] enable

undo arp active-ack [ strict ] enable

Default

The ARP active acknowledgement feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

Strict: Enables strict mode for ARP active acknowledgement.

Usage guidelines

Configure this feature on gateways to prevent user spoofing.

In strict mode, a gateway learns an entry only when ARP active acknowledgement is successful based on the correct ARP resolution.

Examples

# Enable the ARP active acknowledgement feature.

<Sysname> system-view

[Sysname] arp active-ack enable

Authorized ARP commands

arp authorized enable

Use arp authorized enable to enable authorized ARP on an interface.

Use undo arp authorized enable to restore the default.

Syntax

arp authorized enable

undo arp authorized enable

Default

Authorized ARP is disabled on the interface.

Views

Layer 3 Ethernet interface view

Layer 3 Ethernet subinterface view

VLAN interface view

Predefined user roles

network-admin

Examples

# Enable authorized ARP on VLAN-interface 100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] arp authorized enable

ARP attack detection commands

arp detection enable

Use arp detection enable to enable ARP attack detection.

Use undo arp detection enable to restore the default.

Syntax

arp detection enable

undo arp detection enable

Default

ARP attack detection is disabled.

Views

VLAN view

Predefined user roles

network-admin

Examples

# Enable ARP attack detection for VLAN 2.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] arp detection enable

Related commands

arp detection rule

arp detection rule

Use arp detection rule to configure a user validity check rule.

Use undo arp detection rule to delete a user validity check rule.

Syntax

arp detection rule rule-id { deny | permit } ip { ip-address [ mask ] | any } mac { mac-address [ mask ] | any } [ vlan vlan-id ]

undo arp detection rule [ rule-id ]

Default

No user validity check rule is configured.

Views

System view

Predefined user roles

network-admin

Parameters

rule-id: Assigns an ID to the user validity check rule. The ID value range is 0 to 511. A smaller value represents a higher priority.

deny: Denies matching ARP packets.

permit: Permits matching ARP packets.

ip { ip-address [ mask ] | any }: Specifies the sender IP address as the match criterion.

·          ip-address: Specifies an IP address.

·          mask: Specifies the mask for the IP address.

·          any: Matches any IP address.

mac { mac-address [ mask ] | any }: Specifies the sender MAC address as the match criterion.

·          mac-address: Specifies a MAC address in the H-H-H format.

·          mask: Specifies the MAC address mask in the H-H-H format.

·          any: Matches any MAC address.

vlan vlan-id: Specifies the ID of a VLAN to which the specified rule applies. The value range for the vlan-id argument is 1 to 4094. If you do not specify a VLAN, the rule applies to all VLANs.

Usage guidelines

A user validity check rule takes effect only when ARP attack detection is enabled.

If you do not specify a rule ID, the undo arp detection rule command deletes all user validity check rules.

Examples

# Configure a user validity check rule and enable ARP detection for VLAN 2.

<Sysname> system-view

[Sysname] arp detection rule 0 permit ip 10.1.1.1 255.255.0.0 mac 0001-0203-0405 ffff-ffff-0000

[Sysname] vlan 2

[Sysname-vlan2] arp detection enable

Related commands

arp detection enable

arp detection trust

Use arp detection trust to configure an interface as an ARP trusted interface.

Use undo arp detection trust to restore the default.

Syntax

arp detection trust

undo arp detection trust

Default

An interface is an ARP untrusted interface.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

Examples

# Configure GigabitEthernet 1/0/1 as an ARP trusted interface.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] arp detection trust

arp detection validate

Use arp detection validate to enable ARP packet validity check.

Use undo arp detection validate to disable ARP packet validity check.

Syntax

arp detection validate { dst-mac | ip | src-mac } *

undo arp detection validate [ dst-mac | ip | src-mac ] *

Default

ARP packet validity check is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

dst-mac: Checks the target MAC address of ARP responses. If the target MAC address is all-zero, all-one, or inconsistent with the destination MAC address in the Ethernet header, the packet is considered invalid and discarded.

ip: Checks the sender and target IP addresses of ARP replies, and the sender IP address of ARP requests. All-one or multicast IP addresses are considered invalid and the corresponding packets are discarded.

src-mac: Checks whether the sender MAC address in the message body is identical to the source MAC address in the Ethernet header. If they are identical, the packet is forwarded. Otherwise, the packet is discarded.

Usage guidelines

You can specify more than one object to be checked in one command line.

If no keyword is specified, the undo arp detection validate command disables ARP packet validity check for all objects.

Examples

# Enable ARP packet validity check by checking the MAC addresses and IP addresses of ARP packets.

<Sysname> system-view

[Sysname] arp detection validate dst-mac src-mac ip

arp restricted-forwarding enable

Use arp restricted-forwarding enable to enable ARP restricted forwarding.

Use undo arp restricted-forwarding enable to disable ARP restricted forwarding.

Syntax

arp restricted-forwarding enable

undo arp restricted-forwarding enable

Default

ARP restricted forwarding is disabled.

Views

VLAN view

Predefined user roles

network-admin

Examples

# Enable ARP restricted forwarding in VLAN 2.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] arp restricted-forwarding enable

display arp detection

Use display arp detection to display the VLANs enabled with ARP attack detection.

Syntax

display arp detection

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the VLANs enabled with ARP attack detection.

<Sysname> display arp detection

ARP detection is enabled in the following VLANs:

1-2, 4-5

Related commands

arp detection enable

display arp detection statistics

Use display arp detection statistics to display ARP attack detection statistics.

Syntax

display arp detection statistics [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Displays the ARP attack detection statistics of an interface.

Usage guidelines

This command displays numbers of packets discarded by user validity check and ARP packet validity check. If you do not specify an interface, the command displays statistics for all interfaces.

Examples

# Display the ARP attack detection statistics for all interfaces.

<Sysname> display arp detection statistics

State: U-Untrusted  T-Trusted

ARP packets dropped by ARP inspect checking:

Interface(State)            IP        Src-MAC   Dst-MAC   Inspect

GE1/0/1(U)                  40        0         0         78

GE1/0/2(U)                  0         0         0         0

GE1/0/3(T)                  0         0         0         0

GE1/0/4(U)                  0         0         30        0

Table 119 Command output

Field

Description

State

State of an interface:

·         U—ARP untrusted interface.

·         T—ARP trusted interface.

Interface(State)

Inbound interface of ARP packets. State specifies the port state, trusted or untrusted.

IP

Number of ARP packets discarded due to invalid sender and target IP addresses.

Src-MAC

Number of ARP packets discarded due to invalid source MAC address.

Dst-MAC

Number of ARP packets discarded due to invalid destination MAC address.

Inspect

Number of ARP packets failed to pass user validity check.

 

ARP scanning and fixed ARP commands

arp fixup

Use arp fixup to convert existing dynamic ARP entries to static ARP entries.

Syntax

arp fixup

Views

System view

Predefined user roles

network-admin

Usage guidelines

The ARP conversion is a one-time operation. You can use this command again to convert the dynamic ARP entries learned later to static.

The static ARP entries converted from dynamic ARP entries have the same attributes as the manually configured static ARP entries. Due to the device's limit on the total number of static ARP entries, some dynamic ARP entries might fail the conversion.

The static ARP entries after conversion can include the following entries:

·          Existing dynamic and static ARP entries before conversion.

·          New dynamic ARP entries learned during the conversion.

Dynamic ARP entries that are aged out during the conversion are not converted to static ARP entries.

To delete a static ARP entry changed from a dynamic one, use the undo arp ip-address command.

Examples

# Enable fixed ARP.

<Sysname> system-view

[Sysname] arp fixup

arp scan

Use arp scan to enable ARP scanning in an address range.

Syntax

arp scan [ start-ip-address to end-ip-address ]

Views

Layer 3 Ethernet interface view

Layer 3 Ethernet subinterface view

VLAN interface view

Predefined user roles

network-admin

Parameters

start-ip-address: Specifies the start IP address of the scanning range.

end-ip-address: Specifies the end IP address of the scanning range. The end IP address must be higher than or equal to the start IP address.

Usage guidelines

ARP scanning automatically creates ARP entries for devices in the specified address range. IP addresses already in existing ARP entries are not scanned.

If the interface's primary and secondary IP addresses are in the address range, the sender IP address in the ARP request is the address on the smallest network segment.

If no address range is specified, the device learns ARP entries for devices on the subnet where the primary IP address of the interface resides. The sender IP address in the ARP requests is the primary IP address of the interface.

The start and end IP addresses must be on the same subnet as the primary IP address or secondary IP addresses of the interface.

ARP scanning will take some time. To stop an ongoing scan, press Ctrl + C. Dynamic ARP entries are created based on ARP replies received before the scan is terminated.

Examples

# Configure the device to scan the neighbors on the network where the primary IP address of VLAN-interface 2 resides.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] arp scan

# Configure the device to scan neighbors in an address range.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] arp scan 1.1.1.1 to 1.1.1.20

ARP gateway protection commands

arp filter source

Use arp filter source to enable ARP gateway protection for a gateway.

Use undo arp filter source to disable ARP gateway protection for a gateway.

Syntax

arp filter source ip-address

undo arp filter source ip-address

Default

ARP gateway protection is disabled.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the IP address of a protected gateway.

Usage guidelines

You can enable ARP gateway protection for a maximum of eight gateways on an interface.

You cannot configure both arp filter source and arp filter binding commands on the same interface.

Examples

# Enable ARP gateway protection for the gateway with IP address 1.1.1.1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] arp filter source 1.1.1.1

ARP filtering commands

arp filter binding

Use arp filter binding to configure an ARP permitted entry. If the sender IP and MAC addresses of an ARP packet match an ARP permitted entry, the ARP packet is permitted. If not, it is discarded.

Use undo arp filter binding to remove an ARP permitted entry.

Syntax

arp filter binding ip-address mac-address

undo arp filter binding ip-address

Default

No ARP permitted entry is configured.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

Parameters

ip-address: Specifies a permitted sender IP address.

mac-address: Specifies a permitted sender MAC address.

Usage guidelines

You can configure a maximum of eight ARP permitted entries on an interface.

You cannot configure both the arp filter source and arp filter binding commands on the same interface.

Examples

# Configure an ARP permitted entry.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] arp filter binding 1.1.1.1 2-2-2


ND attack defense commands

ipv6 nd check log enable

Use ipv6 nd check log enable to enable the ND logging feature.

Use undo ipv6 nd check log enable to restore the default.

Syntax

ipv6 nd check log enable

undo ipv6 nd check log enable

Default

The ND logging feature is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

The ND logging feature logs source MAC inconsistency events, and sends the log messages to the information center. The information center can then output log messages from different source modules to different destinations. For more information about the information center, see Network Management and Monitoring Configuration Guide.

H3C recommends that you disable the ND logging feature to avoid excessive ND logs.

Examples

# Enable the ND logging feature.

<Sysname> system-view

[Sysname] ipv6 nd check log enable

Related commands

ipv6 nd mac-check enable

ipv6 nd mac-check enable

Use ipv6 nd mac-check enable to enable source MAC consistency check for ND messages.

Use undo ipv6 nd mac-check enable to disable source MAC consistency check for ND messages.

Syntax

ipv6 nd mac-check enable

undo ipv6 nd mac-check enable

Default

Source MAC consistency check for ND messages is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Use this command to enable source MAC consistency check on a gateway. The gateway checks the source MAC address and the source link-layer address for consistency for each ND message. If an inconsistency is found, the gateway drops the ND message.

Examples

# Enable source MAC consistency check for ND messages.

<Sysname> system-view

[Sysname] ipv6 nd mac-check enable


User isolation commands

display user-isolation statistics

Use display user-isolation statistics to display user isolation statistics for a VLAN or for all VLANs.

Syntax

display user-isolation statistics [ vlan vlan-id ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094. If you do not specify a VLAN, this command displays user isolation statistics for all VLANs.

Examples

# Display user isolation statistics for all VLANs.

<Sysname> display user-isolation statistics

Number of VLANs enabled with user isolation: 2

Number of VLANs disabled with user isolation: 1

 

VLAN      State        Drops           Permit unicast        Permitted MAC list

4         Enabled      0               Y                     N/A

6         Disabled     0               N                     0023-89a2-3d4d

                                                             0033-89a2-3d4a

5         Enabled      0               Y                     N/A

Table 120 Command output

Field

Description

VLAN

VLAN ID.

State

Status of user isolation for the VLAN:

·         Enabled.

·         Disabled.

Drops

Number of dropped packets in the VLAN.

Permit unicast

Whether unicast packets are permitted among users in the VLAN:

·         Y—Yes. Only broadcast and multicast packets are isolated.

·         N—No. Unicast, broadcast, and multicast packets are all isolated.

Permitted MAC list

Permitted MAC address list in the VLAN.

 

Related commands

·          user-isolation vlan enable

·          user-isolation vlan permit-mac

reset user-isolation statistics

Use reset user-isolation statistics to clear user isolation statistics for a VLAN or for all VLANs.

Syntax

reset user-isolation statistics [ vlan vlan-id ]

Views

User view

Predefined user roles

network-admin

Parameters

vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094. If you do not specify a VLAN, this command clears user isolation statistics for all VLANs.

Examples

# Clear user isolation statistics for VLAN 1.

<Sysname> reset user-isolation statistics vlan 1

Related commands

·          user-isolation vlan enable

·          user-isolation vlan permit-mac

user-isolation enable

Use user-isolation enable to enable SSID-based user isolation.

Use undo user-isolation enable to restore the default.

Syntax

user-isolation enable

undo user-isolation enable

Default

SSID-based user isolation is disabled.

Views

Service template view

Predefined user roles

network-admin

Examples

# Enable SSID-based user isolation.

<Sysname> system-view

[Sysname] wlan service-template 1

[Sysname-wlan-st-1] user-isolation enable

user-isolation permit-broadcast

Use user-isolation permit-broadcast to permit broadcast and multicast traffic sent from wired users to wireless users.

Use undo user-isolation permit-broadcast to restore the default.

Syntax

user-isolation permit-broadcast

undo user-isolation permit-broadcast

Default

The device does not forward broadcast or multicast traffic sent from wired users to wireless users in the VLANs where user isolation is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Isolate broadcast and multicast packets of wired users from wireless users only in the following situations:

·          The wired and wireless users belong to the same VLAN.

·          The AC that the users access is an IRF fabric.

Examples

# Permit broadcast and multicast traffic sent from wired users to wireless users.

<Sysname> system-view

[Sysname] user-isolation permit-broadcast

Related commands

user-isolation vlan enable

user-isolation vlan enable

Use user-isolation vlan enable to enable user isolation for a list of VLANs.

Use undo user-isolation vlan enable to disable user isolation for a list of VLANs.

Syntax

user-isolation vlan vlan-list enable [ permit-unicast ]

undo user-isolation vlan vlan-list enable

Default

User isolation is disabled for a VLAN.

Views

System view

Predefined user roles

network-admin

Parameters

vlan-list: Specifies a space-separated list of up to 10 VLAN items. Each VLAN item specifies a VLAN by VLAN ID or specifies a range of VLANs in the form of vlan-id1 to vlan-id2. The value range for the VLAN IDs is 1 to 4094. If you specify a VLAN range, the value for the vlan-id2 argument must be greater than the value for the vlan-id1 argument.

permit-unicast: Permits unicast packets among users. If you do not specify this keyword, unicast packets are isolated among users together with broadcast and multicast packets.

Usage guidelines

To avoid network disconnection to the external network, add the MAC address of the gateway to the permitted MAC address list. To add a permitted MAC address, use the user-isolation vlan permit-mac command.

If you execute the user-isolation vlan enable command multiple times, the device accumulates the specified VLANs. If you execute the user-isolation vlan enable command multiple times for a VLAN, the most recent configuration takes effect.

Examples

# Enable user isolation for VLAN 1.

<Sysname> system-view

[Sysname] user-isolation vlan 1 enable

user-isolation vlan permit-mac

Use user-isolation vlan permit-mac to configure the permitted MAC address list for a list of VLANs.

Use undo user-isolation vlan enable to remove a list of permitted MAC addresses for VLANs.

Syntax

user-isolation vlan vlan-list permit-mac mac-list

undo user-isolation vlan vlan-list permit-mac { mac-list | all }

Default

No permitted MAC address list is specified for a VLAN.

Views

System view

Predefined user roles

network-admin

Parameters

vlan-list: Specifies a space-separated list of up to 10 VLAN items. Each VLAN item specifies a VLAN by VLAN ID or specifies a range of VLANs in the form of vlan-id1 to vlan-id2. The value range for the VLAN IDs is 1 to 4094. If you specify a VLAN range, the value for the vlan-id2 argument must be greater than the value for the vlan-id1 argument.

mac-list: Specifies a space-separated list of up to 16 MAC address items. Each MAC address item specifies a MAC address in the form of H-H-H. The MAC addresses cannot be broadcast or multicast MAC addresses.

all: Specifies all permitted MAC addresses.

Usage guidelines

Packets from users of the permitted MAC addresses are not isolated in their corresponding VLANs.

If you execute the user-isolation vlan permit-mac command multiple times, the device accumulates the specified permitted MAC addresses. The number of permitted MAC addresses cannot exceed 16 for a VLAN.

Examples

# Specify permitted MAC addresses 00bb-ccdd-eeff and 0022-3344-5566 for VLAN 1.

<Sysname> system-view

[Sysname] user-isolation vlan 1 permit-mac 00bb-ccdd-eeff 0022-3344-5566

Related commands

·          display user-isolation statistics

·          user-isolation vlan enable


ASPF commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

aspf apply policy

Use aspf apply policy to apply an ASPF policy to an interface.

Use undo aspf apply policy to remove an ASPF policy application from an interface.

Syntax

aspf apply policy aspf-policy-number { inbound | outbound }

undo aspf apply policy aspf-policy-number { inbound | outbound }

Default

No ASPF policy is applied to an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

aspf-policy-number: Specifies an ASPF policy number. The value range is 1 to 256.

inbound: Applies the ASPF policy to incoming packets.

outbound: Applies the ASPF policy to outgoing packets.

Usage guidelines

To inspect the traffic through an interface, you must apply a configured ASPF policy to that interface.

Make sure a connection initiation packet and the response packet pass through the same interface, because an ASPF stores and maintains the application layer protocol status based on interfaces.

You can apply an ASPF policy to both the inbound and outbound directions of an interface.

Examples

# Apply ASPF policy 1 to the outbound direction of GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] aspf apply policy 1 outbound

Related commands

aspf policy

display aspf all

display aspf interface

aspf policy

Use aspf policy to create an ASPF policy and enter its view, or enter the view of an existing ASPF policy.

Use undo aspf policy to remove an ASPF policy.

Syntax

aspf policy aspf-policy-number

undo aspf policy aspf-policy-number

Default

No ASPF policies exist.

Views

System view

Predefined user roles

network-admin

Parameters

aspf-policy-number: Assigns a number to the ASPF policy. The value range is 1 to 256.

Examples

# Create ASPF policy 1 and enter its view.

<Sysname> system-view

[Sysname] aspf policy 1

[Sysname-aspf-policy-1]

Related commands

display aspf all

display aspf policy

detect

Use detect to configure ASPF inspection for an application layer protocol.

Use undo detect to restore the default.

Syntax

detect { ftp | gtp | h323 | ils | mgcp | nbt | pptp | rsh | rtsp | sccp | sip | sqlnet | tftp | xdmcp }

undo detect { ftp |  gtp | h323 | ils | mgcp | nbt | pptp | rsh | rtsp | sccp | sip | sqlnet | tftp | xdmcp }

Default

ASPF does not inspect application layer protocols. ASPF inspects only transport layer protocols.

Views

ASPF policy view

Predefined user roles

network-admin

Parameters

ftp: Specifies FTP, an application layer protocol.

gtp: Specifies GPRS Tunneling Protocol (GTP), an application layer protocol.

h323: Specifies H.323 protocol stack, application layer protocols.

ils: Specifies Internet Locator Service (ILS), an application layer protocol.

mgcp: Specifies Media Gateway Control Protocol (MGCP), an application layer protocol.

nbt: Specifies NetBIOS over TCP/IP (NBT), an application layer protocol.

pptp: Specifies Point-to-Point Tunneling Protocol (PPTP), an application layer protocol.

rsh: Specifies Remote Shell (RSH), an application layer protocol.

rtsp: Specifies Real Time Streaming Protocol (RTSP), an application layer protocol.

sccp: Specifies Skinny Client Control Protocol (SCCP), an application layer protocol.

sip: Specifies Session Initiation Protocol (SIP), an application layer protocol.

sqlnet: Specifies SQLNET, an application layer protocol.

tftp: Specifies TFTP, an application layer protocol.

xdmcp: Specifies X Display Manager Control Protocol (XDMCP), an application layer protocol.

Usage guidelines

Use this command for multichannel protocols to ensure successful data connections. Application protocols supported by this command (except TFTP) are multichannel protocols.

Repeat the detect command to configure ASPF inspection for multiple application protocols.

ASPF inspection for transport layer protocols is always enabled and is not configurable. The supported transport layer protocols include TCP, UDP, UDP-Lite, SCTP, Raw IP, ICMP, ICMPv6, and DCCP.

This command configures ASPF inspection for application protocols. ASPF inspection only maintains connection status information, it does not support protocol status validity check.

Examples

# Configure ASPF inspection for FTP packets.

<Sysname> system-view

[Sysname] aspf policy 1

[Sysname-aspf-policy-1] detect ftp

Related commands

display aspf policy

display aspf all

Use display aspf all to display the configuration of all ASPF policies and their applications.

Syntax

display aspf all

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the configuration of all ASPF policies and their applications.

<Sysname> display aspf all

ASPF policy configuration:

  Policy default:

    ICMP error message check: Disabled

    TCP SYN packet check: Disabled

    Inspected protocol

      FTP

  Policy number: 1

    ICMP error message check: Disabled

    TCP SYN packet check: Disabled

    Inspected protocol

      FTP

 

Interface configuration:

  GigabitEthernet1/0/1

    Inbound policy : 1

    Outbound policy: none

Table 121 Command output

Field

Description

Policy default

Predefined ASPF policy.

ICMP error message check

Whether ICMP error message check is enabled.

TCP SYN packet check

Whether TCP SYN check is enabled.

Inspected protocol

Protocols to be inspected by ASPF.

Interface configuration

Interfaces where ASPF policy is applied.

Inbound policy

Inbound ASPF policy number.

Outbound policy

Outbound ASPF policy number.

 

Related commands

aspf apply policy

aspf policy

display aspf policy

display aspf interface

Use display aspf interface to display ASPF policy application on interfaces.

Syntax

display aspf interface

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display ASPF policy application on interfaces.

<Sysname> display aspf interface

Interface configuration:

  GigabitEthernet1/0/1

    Inbound policy : 1

    Outbound policy: none

Table 122 Command output

Field

Description

Interface configuration

Interfaces where ASPF policy is applied.

Inbound policy

Inbound ASPF policy number.

Outbound policy

Outbound ASPF policy number.

 

Related commands

aspf apply policy

aspf policy

display aspf policy

Use display aspf policy to display the configuration of an ASPF policy.

Syntax

display aspf policy { aspf-policy-number | default }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

aspf-policy-number: Specifies the number of an ASPF policy. The value range is 1 to 256.

default: Specifies the predefined ASPF policy.

Examples

# Display the configuration of ASPF policy 1.

<Sysname> display aspf policy 1

ASPF policy configuration:

  Policy number: 1

    ICMP error message check: Disabled

    TCP SYN packet check: Enabled

    Inspected protocol

     FTP

     RSH

Table 123 Command output

Field

Description

ICMP error message check

Whether ICMP error message check is enabled.

TCP SYN packet check

Whether TCP SYN check is enabled.

Inspected protocol

Protocols to be inspected by ASPF.

 

Related commands

aspf policy

display aspf session

Use display aspf session to display ASPF sessions.

Syntax

display aspf session [ ipv4 | ipv6 ] [ slot slot-number ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ipv4: Displays IPv4 ASPF sessions.

ipv6: Displays IPv6 ASPF sessions.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays ASPF sessions for all member devices.

verbose: Displays detailed information about ASPF sessions. If you do not specify this keyword, the command displays the brief information about ASPF sessions.

Usage guidelines

If you do not specify the ipv4 keyword or the ipv6 keyword, this command displays all ASPF sessions on the device.

Examples

# Display brief information about IPv4 ASPF sessions.

<Sysname> display aspf session ipv4

Slot 1:

Initiator:

  Source      IP/port: 192.168.1.18/1877

  Destination IP/port: 192.168.1.55/22

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: GigabitEthernet1/0/1

Initiator:

  Source      IP/port: 192.168.1.18/1792

  Destination IP/port: 192.168.1.55/2048

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: ICMP(1)

  Inbound interface: GigabitEthernet1/0/1

 

Total sessions found: 2

# Display detailed information about IPv4 ASPF sessions.

<Sysname> display aspf session ipv4 verbose

Slot 1:

Initiator:

  Source      IP/port: 192.168.1.18/1877

  Destination IP/port: 192.168.1.55/22

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: GigabitEthernet1/0/1

Responder:

  Source      IP/port: 192.168.1.55/22

  Destination IP/port: 192.168.1.18/1877

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: TCP(6)

  Inbound interface: GigabitEthernet1/0/2

State: TCP_SYN_SENT

Application: SSH

Start time: 2011-07-29 19:12:36  TTL: 28s

Initiator->Responder:         1 packets         48 bytes

Responder->Initiator:         0 packets          0 bytes

 

Initiator:

  Source      IP/port: 192.168.1.18/1792

  Destination IP/port: 192.168.1.55/2048

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: ICMP(1)

  Inbound interface: GigabitEthernet1/0/1

Responder:

  Source      IP/port: 192.168.1.55/1792

  Destination IP/port: 192.168.1.18/0

  DS-Lite tunnel peer: -

  VPN instance/VLAN ID/Inline ID: -/-/-

  Protocol: ICMP(1)

  Inbound interface: GigabitEthernet1/0/2

State: ICMP_REQUEST

Application: OTHER

Start time: 2011-07-29 19:12:33  TTL: 55s

Initiator->Responder:         1 packets         6048 bytes

Responder->Initiator:         0 packets          0 bytes

 

Total sessions found: 2

Table 124 Command output

Field

Description

Initiator

Session information from initiator to responder.

Responder

Session information from responder to initiator.

Source IP/port

Source IP address and port number.

Destination IP/port

Destination IP address and port number.

DS-Lite tunnel peer

IP address of the DS-Lite tunnel peer.

If the session is not tunneled by DS-Lite, this field displays a hyphen (-).

VPN-instance/VLAN ID/Inline ID

·         VPN-instance—MPLS L3VPN instance where the session is initiated.

·         VLAN ID—VLAN to which the session belongs during Layer 2 forwarding.

·         Inline ID—Inline to which the session belongs during Layer 2 forwarding.

If no VPN instance, VLAN ID, or Inline ID is specified, a hyphen (-) is displayed for each field.

Protocol

Transport layer protocols, including DCCP, ICMP, ICMPv6, Raw IP, SCTP, TCP, UDP, and UDP-Lite.

Number in parentheses represents the protocol number.

State

Protocol status of the session.

Application

Application layer protocol, including FTP and DNS.

If it is an unknown protocol identified by an unknown port, this field displays OTHER.

Start time

Establishment time of the session.

TTL

Remaining lifetime of the session, in seconds.

Initiator->Responder

Number of packets and bytes from initiator to responder.

Responder->Initiator

Number of packets and bytes from responder to initiator.

 

Related commands

reset aspf session

icmp-error drop

Use icmp-error drop to enable ICMP error message check and drop faked messages.

Use undo icmp-error drop to disable ICMP error message check.

Syntax

icmp-error drop

undo icmp-error drop

Default

ICMP error message check is disabled.

Views

ASPF policy view

Predefined user roles

network-admin

Usage guidelines

An ICMP error message carries information about the corresponding connection. ICMP error message check verifies the information. If the information does not match the connection, ASPF drops the message.

Examples

# Enable ICMP error message check for ASPF policy 1.

<Sysname> system-view

[Sysname] aspf policy 1

[Sysname-aspf-policy-1] icmp-error drop

Related commands

aspf policy

display aspf policy

reset aspf session

Use reset aspf session to clear ASPF session statistics.

Syntax

reset aspf session [ ipv4 | ipv6 ] [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

ipv4: Clears IPv4 ASPF session statistics.

ipv6: Clears IPv6 ASPF session statistics.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command clears ASPF session statistics for all member devices.

Usage guidelines

If you do not specify the ipv4 keyword or the ipv6 keyword, this command clears all ASPF session statistics.

Examples

# Clear all ASPF session statistics.

<Sysname> reset aspf session

Related commands

display aspf session

tcp syn-check

Use tcp syn-check to enable TCP SYN check.

Use undo tcp syn-check to disable TCP SYN check.

Syntax

tcp syn-check

undo tcp syn-check

Default

TCP SYN check is disabled.

Views

ASPF policy view

Predefined user roles

network-admin

Usage guidelines

TCP SYN check checks the first packet to establish a TCP connection whether it is a SYN packet. If the first packet is not a SYN packet, ASPF drops the packet.

When a device attached to the network is started up, it can receive a non-SYN packet of an existing TCP connection for the first time. If you do not want to interrupt the existing TCP connection, you can disable the TCP SYN check. Then, the device allows the non-SYN packet that is the first packet to establish a TCP connection to pass. After the network topology becomes steady, you can enable TCP SYN check again.

Examples

# Enable TCP SYN check for ASPF policy 1.

<Sysname> system-view

[Sysname] aspf policy 1

[Sysname-aspf-policy-1] tcp syn-check

Related commands

aspf policy


Protocol packet rate limit commands

The WX1800H series access controllers do not support the slot keyword or the slot-number argument.

anti-attack enable

Use anti-attack enable to enable packet rate limit.

Use undo anti-attack enable to disable packet rate limit.

Syntax

anti-attack enable [ slot slot-number ]

undo anti-attack enable [ slot slot-number ]

Default

Packet rate limit is disabled.

Views

System view

Predefined user roles

network-admin

network-operator

Parameters

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command enables packet rate limit for all member devices.

Usage guidelines

To implement packet rate limit for a protocol, you must complete the following tasks:

·          Execute the anti-attack enable command to enable packet rate limit.

·          Execute the anti-attack protocol enable command to enable packet rate limit for the protocol.

Examples

# Enable packet rate limit for slot 1.

<Sysname> system-view

[Sysname] anti-attack enable slot 1

Related commands

anti-attack protocol enable

anti-attack protocol enable

Use anti-attack protocol enable to enable packet rate limit for protocols.

Use undo anti-attack protocol enable to disable packet rate limit for protocols.

Syntax

anti-attack protocol { all | protocol } enable [ slot slot-number ]

undo anti-attack protocol { all | protocol } enable [ slot slot-number ]

Default

Packet rate limit is disabled for all protocols.

Views

System view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all protocols.

protocol: Specifies a protocol. This argument can be a case-insensitive string of 1 to 31 characters. Supported protocol values are shown in Table 125.

Table 125 Supported protocols

Protocol value

Description

acsei

ACSEI protocol packets

arp

ARP protocol packets

capwap_ctrl

CAPWAP control packets

capwap_data

CAPWAP data packets

dhcp

DHCP protocol packets

dot11_action

802.11 ACK packets

dot11_assoc

802.11 association request packets

dot11_auth

802.11 authentication packets

dot11_ctrl

Other types of 802.11 protocol packets

dot11_deauth

802.11 deauthentication packets

dot11_disassoc

802.11 disassociation request packets

dot11_null

802.11 null data packets

dot11_reassoc

802.11 reassociation request packets

dot1x

802.1X authentication packets

ethernet

Packets that are not identified as packets of specific protocols

http

HTTP protocol packets

iactp

IACTP protocol packets

icmp

ICMP protocol packets

icmpv6_nd

ICMPv6 neighbor discovery protocol packets

icmpv6_other

ICMPv6 protocol packets except for neighbor discovery protocol packets

igmp

IGMP protocol packets

ip

IPv4 protocol packets

ipv6

IPv6 protocol packets

ntp

NTP protocol packets

portal_syn

Portal redirect packets

radius

RADIUS protocol packets

snmp

SNMP protocol packets

tcp

TCP protocol packets

telnet

Telnet protocol packets

udp

UDP protocol packets

vrrp

VRRP protocol packets

 

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command enables the feature for all member devices.

Usage guidelines

To implement packet rate limit for a protocol, you must complete the following tasks:

·          Execute the anti-attack enable command to enable packet rate limit.

·          Execute the anti-attack protocol enable command to enable packet rate limit for the protocol.

Examples

# Enable packet rate limit for ARP on slot 1.

<Sysname> system-view

[Sysname] anti-attack protocol arp enable slot 1

Related commands

anti-attack enable

anti-attack protocol flow-threshold

Use anti-attack protocol flow-threshold to enable flow-based packet rate limit for a protocol and set the maximum transmission rate per flow.

Use undo anti-attack protocol flow-threshold to disable flow-based packet rate limit for a protocol.

Syntax

anti-attack protocol protocol flow-threshold flow-rate-limit [ slot slot-number ]

undo anti-attack protocol protocol flow-threshold [ slot slot-number ]

Default

Flow-based packet rate limit is disabled for all protocols.

Views

System view

Predefined user roles

network-admin

network-operator

Parameters

protocol: Specifies a protocol. This argument can be a case-insensitive string of 1 to 31 characters. For information about supported protocol values, see Table 125.

flow-rate-limit: Specifies the maximum transmission rate per flow for the protocol in packets per second. The value range is 0 to 102400.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command enables flow-based packet rate limit and sets the threshold for all member devices.

Usage guidelines

The device identifies flows of a protocol by source IP or MAC address. Protocol packets that are sourced from the same IP address or MAC address belong to the same flow.

Excessive packets are dropped.

You can configure both protocol-based and flow-based protocol packet rate limit for the same protocol. The device first performs flow-based protocol packet rate limit and then performs protocol-based packet rate limit.

Examples

# Enable flow-based packet rate limit for ARP and set the maximum transmission rate per flow to 50 packets per second on slot 1.

<Sysname> system-view

[Sysname] anti-attack protocol arp flow-threshold 50 slot 1

anti-attack protocol priority

Use anti-attack protocol priority to set the packet process priority for a protocol.

Use undo anti-attack protocol priority to restore the default.

Syntax

anti-attack protocol protocol priority priority [ slot slot-number ]

undo anti-attack protocol protocol priority [ slot slot-number ]

Default

The default settings vary by device model. To display the default setting for a protocol, execute the undo anti-attack protocol priority and display anti-attack protocol commands in turn.

Views

System view

Predefined user roles

network-admin

network-operator

Parameters

protocol: Specifies a protocol. This argument can be a case-insensitive string of 1 to 31 characters. For information about supported protocol values, see Table 125.

priority: Specifies the packet process priority for the protocol, in the range of 0 to 4. A smaller value represents a higher priority.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, the setting applies to all member devices.

Usage guidelines

When the maximum transmission rate is reached, the device determines packets to be dropped by priority. Packets of the lowest priority are dropped first.

Examples

# Set the packet process priority to 0 for ARP on slot 1.

<Sysname> system-view

[Sysname] anti-attack protocol arp priority 0 slot 1

anti-attack protocol threshold

Use anti-attack protocol threshold to set the maximum transmission rate for a protocol.

Use undo anti-attack protocol threshold to restore the default for a protocol.

Syntax

anti-attack protocol protocol threshold rate-limit [ slot slot-number ]

undo anti-attack protocol protocol threshold [ slot slot-number ]

Default

The default settings vary by device model. To display the default setting for a protocol, execute the undo anti-attack protocol threshold and display anti-attack protocol commands in turn.

Views

System view

Predefined user roles

network-admin

network-operator

Parameters

protocol: Specifies a protocol. This argument can be a case-insensitive string of 1 to 31 characters. For information about supported protocol values, see Table 125.

rate-limit: Specifies the maximum transmission rate for the protocol in packets per second. The value range is 0 to 102400.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, the setting applies to all member devices.

Usage guidelines

Excessive packets are dropped.

Examples

# Set the maximum transmission rate to 1000 packets per second for ARP on slot 1.

<Sysname> system-view

[Sysname] anti-attack protocol arp threshold 1000 slot 1

Related commands

display anti-attack protocol

display anti-attack protocol

Use display anti-attack protocol to display packet rate limit information about protocols.

Syntax

display anti-attack protocol [ protocol ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

protocol: Specifies a protocol. This argument can be a case-insensitive string of 1 to 31 characters. If you do not specify a protocol, the command displays information about all protocols. For information about supported protocol values, see Table 125.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, the command displays packet rate limit information for all member devices.

Examples

# Display packet rate limit information about all protocols on slot 1. Only protocol-based protocol packet rate limit is enabled in this example.

<Sysname> display anti-attack protocol slot 1

Slot 1:

                        Anti-attack statistics

Protocol       anti-attack Priority Limit(pps)  Rate(pps) Passed    Dropped

dot1x          enable      1        1024        0         0         0

dhcp           enable      2        2000        0         0         0

igmp           enable      2        1024        0         0         0

ntp            enable      2        256         0         0         0

arp            enable      1        1024        0         17907     0

snmp           enable      0        1024        0         0         0

telnet         enable      0        100         0         0         0

icmp           enable      0        20          0         0         0

icmpv6_nd      enable      0        1024        0         0         0

icmpv6_other   enable      0        1024        0         0         0

iactp          enable      1        2560        0         0         0

acsei          enable      2        128         0         0         0

http           enable      1        1024        0         0         0

udp            enable      2        20          0         0         0

tcp            enable      2        1           0         0         0

ip             enable      4        2560        0         0         0

ipv6           enable      2        128         0         0         0

ethernet       enable      2        128         0         0         0

radius         enable      1        2048        0         0         0

vrrp           enable      1        2048        0         0         0

capwap_ctrl    enable      1        2048        0         0         0

capwap_data    enable      1        2048        0         0         0

dot11_auth     enable      1        256         0         0         0

dot11_assoc    enable      1        256         0         0         0

dot11_reassoc  enable      1        256         0         0         0

dot11_null     enable      1        1024        0         0         0

dot11_disassoc enable      1        256         0         0         0

dot11_deauth   enable      1        256         0         0         0

dot11_action   enable      1        256         0         0         0

dot11_ctrl     enable      1        512         0         0         0

portal_syn     enable      1        1024        0         0         0

Table 126 Command output

Field

Description

Anti-attack

Status of protocol-based packet rate limit for the protocol:

·         EnabledThe feature is enabled.

·         DisabledThe feature is disabled.

Priority

Packet processing priority of the protocol. A smaller value represents a higher priority.

Limit(pps)

Maximum packet transmission rate of the protocol, in packets per second.

Rate(pps)

Current packet transmission rate of the protocol, in packets per second.

Passed

Number of protocol packets sent to the CPU.

Dropped

Number of dropped protocol packets.

 

# Display packet rate limit information about ARP on slot 1. Both protocol-based protocol packet rate limit and flow-based protocol packet rate limit are enabled in this example.

<Sysname> display anti-attack protocol arp slot 1

Slot 1:

                        Anti-attack statistics

Protocol       anti-attack Priority Limit(pps)  Rate(pps) Passed    Dropped

arp            enable      1        1024        0         17907     0

FlowSource              FlowLimit(pps)    FlowRate(pps)   Passed    Dropped

00e0-fc12-7723          1000              0               2         0

0011-e212-8801          1000              0               17905     0

Table 127 Command output

Field

Description

FlowSource

Source IP or MAC address of the flow.

FlowLimit(pps)

Maximum transmission rate for the flow, in packets per second.

FlowRate(pps)

Current transmission rate of the flow, in packets per second.

 

 


Index

A B C D E F G H I K L M N O P Q R S T U V W


A

aaa authorization,456

aaa authorization,491

aaa nas-id profile,1

aaa session-limit,1

aaa-fail nobinding enable,170

access-limit,40

accounting command,2

accounting default,3

accounting lan-access,4

accounting login,5

accounting portal,6

accounting ppp,8

accounting quota-out,9

accounting start-fail,10

accounting update-fail,10

accounting-level,140

accounting-merge enable,141

accounting-method,141

accounting-on enable,76

accounting-on extended,77

ack-flood action,632

ack-flood detect,632

ack-flood detect non-specific,633

ack-flood threshold,634

address,492

aging-time,170

ah authentication-algorithm,399

anti-attack enable,730

anti-attack protocol enable,730

anti-attack protocol flow-threshold,732

anti-attack protocol priority,733

anti-attack protocol threshold,734

app-id,171

app-key,172

arp active-ack enable,703

arp authorized enable,704

arp detection enable,705

arp detection rule,705

arp detection trust,706

arp detection validate,707

arp filter binding,711

arp filter source,711

arp fixup,709

arp restricted-forwarding enable,707

arp scan,710

arp source-mac,700

arp source-mac aging-time,700

arp source-mac exclude-mac,701

arp source-mac threshold,702

arp valid-check enable,703

aspf apply policy,720

aspf policy,720

attack-defense apply policy,635

attack-defense local apply policy,636

attack-defense login reauthentication-delay,636

attack-defense policy,637

attack-defense signature log non-aggregate,638

attack-defense tcp fragment enable,638

attribute,342

attribute 15 check-mode,78

attribute 25 car,79

attribute 31 mac-format,79

attribute remanent-volume,80

attribute-map,127

authentication default,11

authentication ike,12

authentication lan-access,13

authentication login,14

authentication portal,15

authentication ppp,16

authentication super,17

authentication-algorithm,457

authentication-method,493

authentication-method,458

authentication-server,127

authentication-timeout,173

authorization command,18

authorization default,20

authorization ike,21

authorization lan-access,22

authorization login,23

authorization portal,24

authorization ppp,25

authorization-attribute (ISP domain view),26

authorization-attribute (local user view/user group view),40

authorization-server,128

auth-url,174

B

basic-service-ip-type,27

bind-attribute,43

binding-retry,174

bye,544

byod authorization,71

byod rule,72

byod rule-order,73

C

ca identifier,343

captive-bypass enable,175

cd,544

cdup,545

certificate domain,494

certificate domain,458

certificate request entity,344

certificate request from,345

certificate request mode,345

certificate request polling,347

certificate request url,348

certificate-chain-sending enable,572

ciphersuite,572

client,81

client-authentication,459

client-verify,574

common-name,348

company,44

config-exchange,495

connection-limit,618

connection-limit apply,618

connection-limit apply global,619

country,349

crl check,350

crl url,350

D

data-flow-format (HWTACACS scheme view),109

data-flow-format (RADIUS scheme view),82

default-logon-page,176

delete,545

description,620

description,460

description,45

description,400

detect,721

dh,496

dh,461

dhcpv6-follow-ipv6cp,28

dir,546

display anti-attack protocol,734

display arp detection,708

display arp detection statistics,708

display arp source-mac,702

display aspf all,722

display aspf interface,723

display aspf policy,724

display aspf session,725

display attack-defense flood statistics ip,639

display attack-defense flood statistics ipv6,641

display attack-defense policy,642

display attack-defense policy ip,647

display attack-defense policy ipv6,648

display attack-defense scan attacker ip,650

display attack-defense scan attacker ipv6,651

display attack-defense scan victim ip,652

display attack-defense scan victim ipv6,653

display attack-defense statistics interface,654

display attack-defense statistics local,657

display byod rule,74

display byod rule-order,76

display connection-limit,621

display connection-limit ipv6-stat-nodes,623

display connection-limit statistics,626

display connection-limit stat-nodes,626

display domain,29

display dot1x,145

display dot1x connection,148

display hwtacacs scheme,110

display ike proposal,462

display ike sa,463

display ike statistics,466

display ikev2 policy,497

display ikev2 profile,498

display ikev2 proposal,500

display ikev2 sa,501

display ikev2 statistics,505

display ipsec { ipv6-policy | policy },400

display ipsec { ipv6-policy-template | policy-template },405

display ipsec sa,407

display ipsec statistics,411

display ipsec transform-set,413

display ipsec tunnel,414

display ldap scheme,129

display local-guest waiting-approval,45

display local-user,46

display mac-authentication,162

display mac-authentication connection,164

display password-control,306

display password-control blacklist,307

display pki certificate access-control-policy,351

display pki certificate attribute-group,352

display pki certificate domain,353

display pki certificate renew-status,358

display pki certificate request-status,359

display pki crl domain,361

display portal,177

display portal auth-error-record,181

display portal auth-fail-record,183

display portal captive-bypass statistics,186

display portal dns free-rule-host,186

display portal extend-auth-server,187

display portal local-binding mac-address,188

display portal logout-record,189

display portal mac-trigger-server,191

display portal packet statistics,194

display portal permit-rule statistics,199

display portal redirect statistics,200

display portal rule,200

display portal safe-redirect statistics,206

display portal server,207

display portal user,208

display portal user count,215

display portal web-server,215

display public-key local public,325

display public-key peer,328

display radius scheme,83

display radius statistics,85

display session aging-time state,584

display session relation-table,585

display session statistics,589

display session statistics ipv4,586

display session statistics ipv6,588

display session statistics multicast,592

display session table ipv4,592

display session table ipv6,595

display session table multicast ipv4,597

display session table multicast ipv6,601

display sftp client source,546

display ssh client source,547

display ssh server,531

display ssh user-information,532

display ssh2 algorithm,567

display ssl client-policy,575

display ssl server-policy,576

display user-group,50

display user-isolation statistics,715

display user-profile,303

display web-redirect rule,217

dns-flood action,659

dns-flood detect,659

dns-flood detect non-specific,660

dns-flood port,661

dns-flood threshold,662

domain,33

domain default enable,34

domain if-unknown,34

dot1x authentication-method,150

dot1x domain-delimiter,151

dot1x ead-assistant enable,152

dot1x ead-assistant free-ip,153

dot1x ead-assistant url,153

dot1x retry,154

dot1x supplicant anonymous identify,158

dot1x supplicant eap-method,159

dot1x supplicant enable,159

dot1x supplicant password,160

dot1x supplicant username,161

dot1x timer,155

dpd,467

dpd,506

E

email,51

encapsulation-mode,417

encryption,507

encryption-algorithm,468

esn enable,418

esp authentication-algorithm,419

esp encryption-algorithm,420

exchange-mode,469

exclude-attribute (MAC binding server view),219

exclude-attribute (portal authentication server view),221

exempt acl,663

exit,547

F

fin-flood action,664

fin-flood detect,664

fin-flood detect non-specific,665

fin-flood threshold,666

fqdn,363

free-traffic threshold,222

full-name,52

G

get,548

group,53

H

help,548

hostname,508

http-flood action,667

http-flood detect,667

http-flood detect non-specific,669

http-flood port,669

http-flood threshold,670

hwtacacs nas-ip,112

hwtacacs scheme,113

I

icmp-error drop,727

icmp-flood action,671

icmp-flood detect ip,671

icmp-flood detect non-specific,672

icmp-flood threshold,673

icmpv6-flood action,674

icmpv6-flood detect ipv6,674

icmpv6-flood detect non-specific,675

icmpv6-flood threshold,676

identity,508

identity local,509

if-match,222

ike address-group,469

ike dpd,470

ike identity,471

ike invalid-spi-recovery enable,472

ike keepalive interval,473

ike keepalive timeout,473

ike keychain,474

ike limit,475

ike logging negotiation enable,476

ike nat-keepalive,476

ike profile,477

ike proposal,477

ike signature-identity from-certificate,478

ike-profile,421

ikev2 address-group,510

ikev2 cookie-challenge,511

ikev2 dpd,512

ikev2 ipv6-address-group,513

ikev2 keychain,513

ikev2 nat-keepalive,514

ikev2 policy,515

ikev2 profile,516

ikev2 proposal,516

ikev2-profile,422

integrity,517

ip,363

ip,130

ip (MAC binding server view),224

ip (portal authentication server view),225

ip verify source,698

ip verify unknown-ip,698

ipsec { ipv6-policy | policy },423

ipsec { ipv6-policy | policy } isakmp template,424

ipsec { ipv6-policy | policy } local-address,425

ipsec { ipv6-policy-template | policy-template },426

ipsec anti-replay check,427

ipsec anti-replay window,427

ipsec apply,428

ipsec decrypt-check enable,429

ipsec df-bit,429

ipsec fragmentation,430

ipsec global-df-bit,431

ipsec limit max-tunnel,432

ipsec logging negotiation enable,432

ipsec logging packet enable,433

ipsec redundancy enable,433

ipsec sa global-duration,434

ipsec sa idle-time,435

ipsec transform-set,435

ipv6,131

ipv6,226

ipv6 nd check log enable,713

ipv6 nd mac-check enable,713

ipv6 verify source,699

ita policy,142

ita-policy,35

K

key (HWTACACS scheme view),114

key (RADIUS scheme view),87

keychain,479

keychain,518

L

ldap attribute-map,132

ldap scheme,133

ldap server,133

ldap-server,364

limit,629

local-address,436

local-binding aging-time,227

local-binding enable,228

local-guest auto-delete enable,53

local-guest email format,54

local-guest email sender,55

local-guest email smtp-server,55

local-guest generate,56

local-guest manager-email,57

local-guest send-email,58

local-guest timer,59

local-identity,480

locality,365

local-user,59

local-user-export class network guest,61

local-user-import class network guest,62

login-dn,134

login-password,135

logon-page bind,228

logout-notify,230

ls,549

M

mac-authentication domain,166

mac-authentication timer server-timeout,166

mac-authentication user-name-format,167

mail-domain-name,231

mail-protocol,231

map,135

match local (IKEv2 profile view),519

match local address (IKE keychain view),481

match local address (IKE profile view),482

match local address (IKEv2 policy view),520

match remote,482

match remote,521

mkdir,550

N

nas-id bind vlan,36

nas-ip (HWTACACS scheme view),115

nas-ip (RADIUS scheme view),87

nas-port-type,232

nat-keepalive,522

O

organization,365

organization-unit,366

P

password,64

password-control { aging | composition | history | length } enable,308

password-control aging,309

password-control alert-before-expire,310

password-control complexity,311

password-control composition,312

password-control enable,314

password-control expired-user-login,315

password-control history,315

password-control length,316

password-control login idle-time,317

password-control login-attempt,318

password-control super aging,320

password-control super composition,321

password-control super length,322

password-control update-interval,322

peer,523

peer-public-key end,330

pfs,437

phone,65

pki abort-certificate-request,366

pki certificate access-control-policy,367

pki certificate attribute-group,368

pki delete-certificate,369

pki domain,370

pki entity,371

pki export,372

pki import,378

pki request-certificate,383

pki retrieve-certificate,384

pki retrieve-crl,385

pki storage,386

pki validate-certificate,387

pki-domain,576

port,89

port (MAC binding server view),233

port (portal authentication server view),233

portal { bas-ip | bas-ipv6 },234

portal { ipv4-max-user | ipv6-max-user },235

portal apply mac-trigger-server,236

portal apply web-server,237

portal auth-error-record enable,238

portal auth-error-record export,239

portal auth-error-record max,240

portal auth-fail-record enable,240

portal auth-fail-record export,241

portal auth-fail-record max,242

portal authorization strict-checking,243

portal captive-bypass optimize delay,244

portal client-gateway interface,244

portal client-traffic-report interval,245

portal delete-user,246

portal device-id,247

portal domain,247

portal enable,248

portal extend-auth domain,249

portal extend-auth-server,250

portal fail-permit server,251

portal fail-permit web-server,252

portal free-all except destination,252

portal free-rule,253

portal free-rule destination,255

portal free-rule source,256

portal host-check enable,257

portal ipv6 free-all except destination,257

portal ipv6 user-detect,258

portal local-web-server,259

portal logout-record enable,261

portal logout-record export,262

portal logout-record max,263

portal mac-trigger-server,264

portal max-user,264

portal nas-id profile,265

portal nas-port-id format,266

portal nas-port-type,268

portal oauth user-sync interval,269

portal outbound-filter enable,270

portal packet log enable,271

portal pre-auth domain,271

portal pre-auth ip-pool,273

portal redirect log enable,274

portal refresh enable,274

portal roaming enable,275

portal safe-redirect enable,276

portal safe-redirect forbidden-file,276

portal safe-redirect forbidden-url,277

portal safe-redirect method,278

portal safe-redirect user-agent,278

portal server,280

portal temp-pass enable,280

portal user log enable,284

portal user-detect,281

portal user-dhcp-only,282

portal user-logoff after-client-offline enable,283

portal user-logoff ssid-switch enable,284

portal web-server,285

prefer-cipher,577

pre-shared-key,484

pre-shared-key,524

prf,525

primary accounting (HWTACACS scheme view),116

primary accounting (RADIUS scheme view),89

primary authentication (HWTACACS scheme view),117

primary authentication (RADIUS scheme view),90

primary authorization,118

priority (IKE keychain view),485

priority (IKE profile view),485

priority (IKEv2 policy view),526

priority (IKEv2 profile view),526

proposal,527

proposal,486

protocol,438

protocol-version,136

public-key dsa,389

public-key ecdsa,390

public-key local create,331

public-key local destroy,333

public-key local export dsa,335

public-key local export ecdsa,337

public-key local export rsa,338

public-key peer,340

public-key peer import sshkey,341

public-key rsa,391

put,550

pwd,551

Q

qos pre-classify,438

quit,551

R

radius dscp,92

radius dynamic-author server,92

radius nas-ip,93

radius scheme,94

radius session-control client,95

radius session-control enable,96

radius-server test-profile,96

redirect-url,286

redundancy replay-interval,439

remote-address,440

remove,552

rename,552

reset aspf session,728

reset attack-defense policy flood,677

reset attack-defense statistics interface,678

reset attack-defense statistics local,678

reset connection-limit statistics,631

reset dot1x statistics,157

reset hwtacacs statistics,119

reset ike sa,487

reset ike statistics,488

reset ikev2 sa,528

reset ikev2 statistics,529

reset ipsec sa,441

reset ipsec statistics,443

reset local-guest waiting-approval,65

reset mac-authentication statistics,168

reset password-control blacklist,323

reset password-control history-record,323

reset portal auth-error-record,287

reset portal auth-fail-record,287

reset portal captive-bypass statistics,288

reset portal local-binding mac-address,289

reset portal logout-record,289

reset portal packet statistics,290

reset portal redirect statistics,291

reset portal safe-redirect statistics,291

reset radius statistics,97

reset session relation-table,604

reset session statistics,605

reset session statistics multicast,605

reset session table,606

reset session table ipv4,606

reset session table ipv6,607

reset session table multicast,608

reset session table multicast ipv4,608

reset session table multicast ipv6,609

reset user-isolation statistics,716

retry,98

retry realtime-accounting,99

reverse-route dynamic,443

reverse-route preference,444

reverse-route tag,445

rmdir,553

root-certificate fingerprint,393

rst-flood action,678

rst-flood detect,679

rst-flood detect non-specific,680

rst-flood threshold,681

rule,394

S

sa duration,529

sa duration,445

sa duration,488

sa hex-key authentication,446

sa hex-key encryption,447

sa idle-time,449

sa spi,449

sa string-key,450

scan detect,682

scp,553

scp ipv6,555

scp server enable,533

search-base-dn,137

search-scope,138

secondary accounting (HWTACACS scheme view),120

secondary accounting (RADIUS scheme view),100

secondary authentication (HWTACACS scheme view),121

secondary authentication (RADIUS scheme view),101

secondary authorization,122

security acl,451

server-detect (portal authentication server view),292

server-detect (portal Web server view),293

server-register,294

server-timeout,138

server-type (MAC binding server view),294

server-type (portal server view/portal web-server view),295

server-verify enable,579

service-type (ISP domain view),37

service-type (local user view),66

session,579

session aging-time state,610

session log { bytes-active | packets-active },611

session log enable,612

session log flow-begin,613

session log flow-end,614

session log time-active,614

session persistent acl,615

session state-machine mode loose,616

session statistics enable,617

session-time include-idle-time,37

sftp,557

sftp client ipv6 source,558

sftp client source,559

sftp ipv6,560

sftp server enable,534

sftp server idle-timeout,534

signature { large-icmp | large-icmpv6 } max-length,682

signature detect,683

signature level action,686

signature level detect,687

snmp-agent trap enable ike,489

snmp-agent trap enable ipsec,453

snmp-agent trap enable radius,102

source,395

sponsor-department,67

sponsor-email,67

sponsor-full-name,68

ssh client ipv6 source,562

ssh client source,562

ssh server acl,535

ssh server authentication-retries,536

ssh server authentication-timeout,537

ssh server compatible-ssh1x enable,537

ssh server dscp,538

ssh server enable,539

ssh server ipv6 acl,539

ssh server ipv6 dscp,540

ssh server rekey-interval,541

ssh user,541

ssh2,563

ssh2 algorithm cipher,568

ssh2 algorithm key-exchange,569

ssh2 algorithm mac,570

ssh2 algorithm public-key,570

ssh2 ipv6,565

ssl client-policy,580

ssl renegotiation disable,581

ssl server-policy,581

ssl version ssl3.0 disable,582

state,396

state (ISP domain view),38

state (local user view),68

state primary,103

state secondary,104

subject-dn,396

syn-ack-flood action,688

syn-ack-flood detect,688

syn-ack-flood detect non-specific,689

syn-ack-flood threshold,690

syn-flood action,691

syn-flood detect,692

syn-flood detect non-specific,693

syn-flood threshold,693

T

tcp syn-check,728

tcp-port,296

tfc enable,454

timer quiet (HWTACACS scheme view),123

timer quiet (RADIUS scheme view),106

timer realtime-accounting (HWTACACS scheme view),124

timer realtime-accounting (RADIUS scheme view),106

timer response-timeout (HWTACACS scheme view),125

timer response-timeout (RADIUS scheme view),107

traffic-quota-out,143

traffic-separate,143

transform-set,454

U

udp-flood action,694

udp-flood detect,695

udp-flood detect non-specific,696

udp-flood threshold,696

url,297

url-parameter,297

usage,397

user-address-type,39

user-group,69

user-isolation enable,716

user-isolation permit-broadcast,716

user-isolation vlan enable,717

user-isolation vlan permit-mac,718

user-name-format (HWTACACS scheme view),126

user-name-format (RADIUS scheme view),108

user-parameters,139

user-profile,305

user-sync,299

V

validity-datetime,70

version,300

version,583

W

web-redirect url,301


 

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